Discrete
Structure
Eng. Asmaa Ossama
Main Points
◈ Compound Propositions
◈ Truth Table
◈ Proofs
◈ Translating
Compound Propositions
🡪 Propositions are denoted with letters P,Q,R,…. Those letters are called Propositional
Variables
◈ Connectives
🡪 Negation ¬ not
🡪 Conjunction ∧ and / but
🡪 Disjunction ∨ or
🡪 Implication → if ,then
🡪 Biconditional ↔ iff
🡪 Exclusive or ⊕
Truth Tables
◈ A truth table provides a method for mapping out the possible truth values in
an expression and to determine their outcomes. The table includes a
column for each variable in the expression and a row for each possible
combination of truth values
Negations ( ¬ , ~ )
P ¬P
Neg P = 1 – P
T F In case P True (1) … ¬P = 1-1 = 0 … False
In case P False (0) …¬ P = 1-0 = 1 … True
F T
Truth Table (cont.)
Conjunction (∧ , & , . )
p q p∧q
1 1 1
1 0 0 p ∧ q = min ( p , q )
0 1 0
0 0 0
Truth Table (cont.)
Disjunction (v , + )
p q pvq
1 1 1
1 0 1 P v q = max (p , q)
0 1 1
0 0 0
Truth table (cont.)
Implication ( 🡪 )
p q p🡪q If its sunny
I will wear sunscreen
1 1 1
1 0 0 p🡪q=1
If p <= q
0 1 1
0 0 1
Truth Table (cont.)
Biconditional (↔)
p q p↔q
1 1 1 Iff (if and only if)
1 0 0 << Hypothesis if and
0 1 0 only if conclusion>>
p = q then p ↔ q = 1
0 0 1
Truth Table (cont.)
Exclusive or (⊕)
p q p⊕q
1 1 0
1 0 1 p != q then p ⊕ q = 1
0 1 1
0 0 0
Proofs
Example 1:
Is (p ∧ q) logically equivalent to ¬ (p v q)?
No because the truth condition
for p ∧ q and the truth condition
for ¬ (p v q) are not identical
Proofs (cont.)
Example 2:
Is ¬ (p ∧ q) equivalent to (¬p v ¬q)?
Yes, they're logically equivalent which
means if I ever have ¬ (p ∧ q) in a
proof somewhere I can substitute
that in with (¬p v ¬q) because they
are the same thing so that's what
logical equivalence can do for us
Proofs (cont.)
Example 3:
Show that (p v ¬ p) is always true .
p ¬p p v ¬p Therefore, p v ¬p is a Tautology
1 0 1 meaning that every single output is a
0 1 1 1 so p v ¬p will always be true
(a ∧ b) v ¬ (a ∧
b)
Proofs (cont.)
Example 4:
Show that (p ∧ ¬p) is always false ( proof by contradiction)
p ¬p p ∧ ¬p
1 0 0
0 1 0
Translate the following into English
Example 1:
P = I cheat R = I write an exam
Q = I will get caught S = I will fail
(R ∧ P) 🡪 (Q ∧ S)
(R ∧ P) 🡪 (Q ∧ S)
If I write an exam and I cheat
Then I will get caught and I will fail
Translate into Propositional Logic
Example 2:
If James does not die, then Mary will not get any money and James’ family will be happy
… If James does not die, then Mary will not get any money and James’ family will be happy
(¬ ) 🡪 (¬ ∧ )
P= James dies
Q= Mary will get money
R= James’ family will be happy
Ans. (¬ P ) 🡪 (¬ Q ∧ R )
Any Questions?