Discrete Mathematics I: Solution
Discrete Mathematics I: Solution
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
Case 2: Z is F alse
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.
2023 2