Chapter 2
Chapter 2
1. INTRODUCTION
2. NORMAL FORMS
Example:
P Q R Output
1 1 1 1
1 1 0 1
1 0 1 0
1 0 0 0
0 1 1 1
0 1 0 1
0 0 1 0
0 0 0 1
Solution:
Get the F value from the table
Read in disjunctive form = (P ∧ ¬Q ∧ R) ∨ (P ∧ ¬Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ R)
Complement the whole expressions
= (¬P ∨ Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R) ∧ (P ∨ Q ∨ ¬R)
CNF : (¬P ∨ Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R) ∧ (P ∨ Q ∨ ¬R)
2.2 Disjunctive Normal Form
Solution:
Example:
P Q R Output
1 1 1 1
1 1 0 0
1 0 1 1
1 0 0 0
0 1 1 0
0 1 0 0
0 0 1 1
0 0 0 0
Solution:
Get the T value from the table
Read in disjunctive form = (P ∧ Q ∧ R) ∨ (P ∧ ¬Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R)
DNF : (P ∧ Q ∧ R) ∨ (P ∧ ¬Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R)
p q ¬p ¬q p→q ¬q → ¬p (p → q) ↔
(¬q → ¬p)
1 1 0 0 1 1 1
1 0 0 1 0 0 1
0 1 1 0 1 1 1
0 0 1 1 1 1 1
Can you notice that the last column (biconditional) produces TAUTOLOGY?
i. DeMorgan's Laws:
1) ¬( p ∨ q ) ↔ ¬p ∧ ¬q
2) ¬( p ∧ q ) ↔ ¬p ∨ ¬q
Example: Negate "The summer in Mexico is cold and sunny" with DeMorgan's
Laws.
Solution: "The summer in Mexico is not cold or not sunny."
ii. Identity
p∧T↔p
p∨F ↔ p
iii. Domination
p∨T↔T
p∧F ↔ F
iv. Idempotent
p∨p ↔p
p∧p ↔p
v. Double negation
¬(¬p) ↔ p
vi. Commutative
p∨q↔q∨p
p∧q↔q∧p
vii. Associative
(p ∨ q) ∨ r ↔ p ∨ (q ∨ r)
(p ∧ q) ∧ r ↔ p ∧ (q ∧ r)
viii. Distributive
p ∨ (q ∧ r) ↔ (p ∨ q) ∧ (p ∨ r)
p ∧ (q ∨ r) ↔ (p ∧ q) ∨ (p ∧ r)
ix. Useful
p ∨ ¬p ↔ T
p ∧ ¬p ↔ F
p → q ↔ (¬p ∨ q)
3.2 Proving Techniques
To verify that two expressions are logically equivalent, we can check using
TWO methods; a truth table or rules of equivalence.
p q p∧q (p ∧ q) → p
1 1 1 1
1 0 0 1
0 1 0 1
0 0 0 1
Mathematical logic is often used for logical proofs. Proofs are valid arguments
that determine the truth values of mathematical statements.
An argument is a sequence of statements. The last statement is the conclusion,
and all its preceding statements are called premises (or hypothesis). The symbol
“∴”, (read therefore) is placed before the conclusion. A valid argument is one
where the conclusion follows from the truth values of the premises.
in ROI form:
p→q
∴q
ii. Addition
p → (p ∨ q)
in ROI form:
∴p∨q
(p ∧ q) → p
In ROI form:
p∧q
∴p
[ ¬q ∧ (p → q)] → ¬p
in ROI form:
¬q
p→q
∴ ¬p
Example:
v. Hypothetical Syllogism
[(p → q) ∧ (q → r)] → (p → r)
in ROI form:
p→q
q→r
∴p→r
Example:
vi. Disjunctive Syllogism
[(p ∨ q) ∧ ¬p] → q
in ROI form:
p∨q
¬p
∴q
Example:
Text:
Propositions:
• p = It is sunny this afternoon, q = it is colder than yesterday,
Translation:
• Assumptions: ¬ p ∧ q, r → p, ¬ r → s, s→ t
• Hypothesis: t
Translations:
Premises:
P1 ¬ p ∧ q
P2 r → p
P3 ¬ r → s,
P4 s→ t
Conclusion : t
Translations:
• Premises: P1 ¬ p ∧ q,P2 r → p, P3 ¬ r → s, P4 s→ t
• Conclusion: t
Proof:
1. ¬ p ∧ q Premise 1
2. ¬ p Simplification
3. r → p Premise 2
5. ¬ r → s Premise 3
7. s→ t Premise 4
end of proof
5. PROOF TECHNIQUES
Proofs of equivalence
Previously we used the law of equivalence p ↔ q is replaced with (p → q) ∧
(q → p)’
Proof:
• Assume the hypothesis is true, i.e. suppose n is odd.
p: n is odd
q : n x n is odd
Proof:
p: 3n + 2 is odd
q: n is odd
We want to prove p → q
• To reject p → q show that (p ∧ ¬q ) can be true
• To reject (p ∧ ¬q ) show that either q or ¬ p is True
Proof:
p: 3n + 2 is odd
q: n is odd, ¬q : n is even
We want to show p1 ∨ p2 ∨ … ∨ pn → q
Equivalent to (p1 → q) ∧ (p2 → q) ∧ … ∧ (pn → q)
2. Equivalence
Implication = contrapositive = useful
3. ROI
MP, MT, HS, DS, Simplification, addition, useful, etc
4. MOP
4 methods:
i. Direct
ii. Indirect/contrapositive
iii. Contradiction
iv. By cases