Discrete Mathematics I: Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Discrete Mathematics I

Solution sheet 5 2023

Exercise 1. Using truth tables, prove or disprove that the following pairs of formulas are equiva-
lent:

(a) ¬(P ∨ (Q ∧ R)) and (¬P ∧ (¬Q ∨ ¬R))


(b) ¬(P ∧ (Q ∨ R)) and (¬P ∨ (¬Q ∨ ¬R))

Solution:
1. We prove/disprove that ¬(P ∨ (Q ∧ R)) and (¬P ∧ (¬Q ∨ ¬R)) are equivalent

P Q R ¬ (P ∨ (Q ∧ R)) (¬P ∧ (¬Q ∨ ¬R))


T T T F T T T T T F F F F F
T T F F T T T F F F F F T T
T F T F T T F F T F F T T F
T F F F T T F F F F F T T T
F T T F F T T T T T F F F F
F T F T F F T F F T T F T T
F F T T F F F F T T T T T F
F F F T F F F F F T T T T T

Table 1: Truth Table of ¬(P ∨ (Q ∧ R)) and (¬P ∧ (¬Q ∨ ¬R))

Conclusion should refer to the table and that the truth values of the two complex formulas are
equal under each valuation of the atoms.

2. We prove/disprove that ¬(P ∧ (Q ∨ R)) and (¬P ∨ (¬Q ∨ ¬R)) are equivalent

P Q R ¬ (P ∧ (Q ∨ R)) (¬P ∨ (¬Q ∨ ¬R))


T T T F T T T T T F F F F F
T T F F T T T T F F T F T T
T F T F T T F T T F T T T F
T F F T T F F F F F T T T T
F T T T F F T T T T T F F F
F T F T F F T T F T T F T T
F F T T F F F T T T T T T F
F F F T F F F F F T T T T T

Table 2: Truth Table of ¬(P ∧ (Q ∨ R)) and (¬P ∨ (¬Q ∨ ¬R))

Conclusion should refer to the table and that the truth values of the two complex formulas are
not-equal under each valuation of the atoms.

2023 1
Discrete Mathematics I
Solution sheet 5 2023

n
Exercise 2. Prove that for every odd a and every natural number n: a2 − 1 is divisible by 4 × 2n .
Hint: First, think about possible variables you could do induction on (try out multiple possibil-
ities if you don’t succeed). Second, be on the lookout for a binomial formula.

Solution: n
We prove using induction that for every odd a and every natural number n: a2 − 1 is divisible
n
by 4 × 2n ; i.e. 4 × 2n |a2 − 1.
n
We proceed by induction on n for P (n) ::= 4 × 2n |a2 − 1.

Base case: We prove our the P (n) for the base case n = 0. First we substitute n = 0 and
0
evaluate: 4 ∗ 20 = 4 = 1 = 4 and a2 − 1 = a2∗0 − 1 = a0 − 1 = 0 and 4|0 since 40 = 0. Therefore
P (0) is true.

Inductive Hypothesis: Assume that for a positive integer k ∈ N, P (k) is true; that is 4 ×
k
2k |a2 − 1.

Induction Step: We prove that P (k) → P (k + 1). From our assumption, we know that
k k+1
4 × 2k |a2 − 1. Furthermore, we can rewrite a2 − 1 as follows:
√ 2
2k+1 2k ∗2 k k k
a −1=a − 1 = a2 ∗2 − 1 = (a ) − 1 = (a2 − 1)(a2 + 1)
k 2 2
k
Using our induction assumption that 4 × 2k |(a2 − 1). Furthermore, since a is odd we know that
k k
a2 is odd and by extension a2 + 1 is even. Therefore, it can be divided by two and rewritten
k
using l ∈ N as a2 + 1 = 2l. Then our binomial factorization can be divided another time by two
k k
and we can conclude 4 × 2k+1 |(a2 − 1)(a2 + 1). Therefore, we can conclude our induction step is
true.

We conclude that for all n ∈ N and odd a = 2k+1 with k ∈ N that by the principle of mathematical
n
induction using our base case and induction step that the proposition 4 × 2n |a2 − 1 is true.

2023 2
Discrete Mathematics I
Solution sheet 5 2023

Exercise 3. The binary logical connectives ∧ (and), ∨ (or), and → (implies) appear often in
not only computer programs, but also everyday speech. In computer chip designs, however, it is
considerably easier to construct these out of another operation, nand, which is simpler to represent
in a circuit. We will show in this exercise that we can represents all other logical symbols in terms
of nand alone. Here is the truth table for nand:

P Q P nand Q
T T F
T F T
F T T
F F T

(a) For each of the following expressions, find an equivalent expression using only nand and ¬
(not), as well as parentheses to specify the order of the application of the operators. You may
use P , Q, and the operators any number of times.

(i) (P ∧ Q)
Solution:
P ∧ Q ≡ ¬(P nand Q)

(ii) (P ∨ Q)
Solution:
P ∨ Q ≡ ¬P nand ¬Q

(iii) (P → Q)
Solution:
P → Q ≡ P nand ¬Q

(b) It is actually possible to express each of the above using only nand, without needing to use ¬.
Find an equivalent expression for ¬P using only nand and parentheses.
Solution:
¬P ≡ P nand P

(c) The constants T and F themselves may be expressed using only nand. Construct an expression
using an arbitrary statement P and nand that evaluates to T regardless of whether P is true
or false. Similarly, construct a second expression that always evaluates to false. Do not use
the constants T and F in your expressions.
Solution:
T ≡ P nand (P nand P )
F ≡ (P nand (P nand P )) nand (P nand (P nand P ))

2023 3
Discrete Mathematics I
Solution sheet 5 2023

Exercise 4. Prove or provide a counterexample for the following statements:

(a) {(R ∧ (P ∨ Q))} ⊢prop (P → ¬Q)


(b) {(R ∧ (P ∧ Q))} ⊢prop (P → ¬Q)

Solution:
(a) P ∧ Q is not excluded by the premise. The premise provides that P ∨ Q is true. The
conclusion therefore has a counterexample, namely P ∧ Q since (P → ¬Q) ↔ ¬(P ∧ Q)

(b)
1. (R ∧ (P ∧ Q)) Premise
2. R 1
3. P ∧Q 1
4. ¬¬(P ∧ Q) double negation introduction, 3
5. ¬(¬P ∨ ¬Q) negation elimination, 4
6. ¬(P → ¬Q) implication equivalence, 5
Here we can also have a counterexample but more immediate from the premise compared to before.
Since now, we can assume P ∧ Q which is the counter example to P → ¬Q.

2023 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy