0% found this document useful (0 votes)
25 views

Discrete Mathematics I: Solution

This document contains an exercise sheet for a discrete mathematics course. Exercise 1 asks students to prove the validity of a logical formula using both a truth table with 8192 rows and case analysis based on the truth value of Z. Exercise 2 asks students to express several mathematical notions as logical formulas using variables, quantifiers, and symbols for addition, multiplication, and equality but not subtraction, division, exponents, or constants. The notions include being equal to 1, being a divisor, being a remainder, being a prime number, and being a power of a prime number.

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Discrete Mathematics I: Solution

This document contains an exercise sheet for a discrete mathematics course. Exercise 1 asks students to prove the validity of a logical formula using both a truth table with 8192 rows and case analysis based on the truth value of Z. Exercise 2 asks students to express several mathematical notions as logical formulas using variables, quantifiers, and symbols for addition, multiplication, and equality but not subtraction, division, exponents, or constants. The notions include being equal to 1, being a divisor, being a remainder, being a prime number, and being a power of a prime number.

Uploaded by

ryuu.ducat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Discrete Mathematics I

Exercise sheet 6 2023

Exercise 1. There are many ways to show that the following formula is valid:


((¬A ∨ ¬B ∨ ¬C ∨ ¬D ∨ ¬E ∨ ¬F ) ∧ G ∧ (¬H ∨ ¬I ∨ ¬J)) ∨ (X → ¬ Z ∧ ¬Y ∧ ¬(X → Z)))

(a) One of your classmates decides to check the validity of the formula using a truth table. Write
a simple numerical expression for how many rows this truth table will contain (you do not
need to evaluate this expression).

Solution:
The number of rows correspond to the possible values(T rue, F alse) for each variable, which is
2number of variables = 213 = 8192 rows.
(b) You decide to be a little bit more efficient. Prove that the formula is valid using case analysis
based on the truth value of Z.

Solution:
We use case analysis:
We name this formula P : ((¬A ∨ ¬B ∨ ¬C ∨ ¬D ∨ ¬E ∨ ¬F ) ∧ G ∧ (¬H ∨ ¬I ∨ ¬J)),
and we name this formula Q : (X → ¬ Z ∧ ¬Y ∧ ¬(X → Z)))
We prove P ∨ Q without loss of generality. We have two cases:

Case 1: Z is T rue

Z ¬(X → Z) Z ∧ ¬Y ∧ ¬(X → Z)) ¬ Z ∧ ¬Y ∧ ¬(X → Z)) Q : (X → ¬ Z ∧ ¬Y ∧ ¬(X → Z)))


T F F T T
Since Q is T rue, P ∨ Q is T rue too.

Case 2: Z is F alse

Z Z ∧ ¬Y ∧ ¬(X → Z)) ¬ Z ∧ ¬Y ∧ ¬(X → Z)) Q : (X → ¬ Z ∧ ¬Y ∧ ¬(X → Z)))


F F T T
Since Q is T rue, P ∨ Q is T rue too.

Conclusion: In both cases P ∨ Q is true, thus the formula presented is always true.

2023 1
Discrete Mathematics I
Exercise sheet 6 2023

Exercise 2. The aim of this exercise is to express some mathematical notions in formal logic nota-
tion. The domain of discourse is the non-negative integers, N (including 0). Moreover, in addition
to the propositional operators, variables and quantifiers, you use the addition (+), multiplication
(×), and equality (=) symbols in your formulas, but you are not allowed to use subtraction (−),
division (÷), exponentiation (such as xy ) and integer constants such as 0 and 1.
For example, the predicate “GreaterOrEq(x, y)”, which expresses the fact that x ≥ y, can be
expressed by the following logical formula (remember our domain is N):

GreaterOrEq(x, y) := ∃w.(y + w = x)
Now that we can express ≥, it’s ok to re-use it to express other predicates. For example, the
predicate LessThan(x, y), meaning x < y, can now be expressed as

GreaterOrEq(y, x) ∧ ¬(x = y)
Now, it’s your turn! For each of the predicates below, describe a logical formula to express it.
You can re-use any predicate you have defined.

(a) One(x): x = 1 (remember, you cannot use constants such as 0, 1, etc...)


Solution:
One(x) := ∀y.(x × y = x)

(b) Divisor(m, n): m is a divisor of n (also written as: m | n).


Solution:
Divisor(m, n) := ∃k.(m × k = n)

(c) Rem(r, m, n): r is the remainder of the integer divison of m by n.


Solution:

Rem(r, m, n) := ∃k. (n × k + r = m) ∧ Lesserthan(r, n)

(d) Prime(n): n is a prime number.


Solution:

P rime(n) := ∀k. ¬(Divisor(k, n)) ∨ One(k) ∨ (k = n) ∧ ¬One(n)

(e) PowerPrime(n): n is a power of a prime (remember, you cannot use exponentiations).


Solution:
 
P owerP rime(n) := ∀p.∀p′ Divisor(p, n)∧Divisor(p′ , n)∧P rime(p)∧P rime(p′ ) → (p = p′ )

2023 2

You might also like