Reasoning & Logic (CSE1300)
Summary
By Jeffey Lim (Jeffey-LLimoutlouu.coum) in 2018c
Based un lhe ffsl TU Deof ditun uf Deofse Futndatuns uf Cumptlatun (Seplembef 2018)c
Chapter 2: Logic
Basic DNF Operators
Name Negation Conjunction Disjunction
Meaning NOT AND OR
Symbol ¬ ∧ uf ∙ ∨ uf +
Other notations ¬(¬p ∨ ¬q) ¬(¬p ∧ ¬q)
Logic gate
Other Operators
Exclusive Logical
Name Implication Sheffer stroke Joint denial
disjunction equality
Meaning IMPLY XOR NAND NOR XNOR uf Q
Symbol → ⊕ ↑ ↓ ⊙ uf ≡ uf ↔
Other (p ∨ q) ∧ (p → q) ∧
¬(p ∧ ¬q) ¬(p ∧ q) ¬(p ∨ q)
notations (¬p ∨ ¬q) (q → p)
(p ∧ ¬q) ∨ (p ∧ q) ∨
DNF form ¬p ∨ q ¬p ∨ ¬q ¬p ∧ ¬q
(¬p ∧ q) (¬p ∧ ¬q)
Logic gate
Basic Truth Table
p q p∧q p∨q p→q p⊕q p↑q p↓q p⊙q
0 0 0 0 1 0 1 1 1
0 1 0 1 1 1 1 0 0
1 0 0 1 0 1 1 0 0
1 1 1 1 1 0 0 0 1
Implications
Implication p→q
Contrapositive ¬q → ¬p
Converse q→p
Inverse ¬p → ¬q
Bi-implication p↔q
, p q p→q ¬q → ¬p q→p ¬p → ¬q p↔q
0 0 1 1 1 1 1
0 1 1 1 0 0 0
1 0 0 0 1 1 0
1 1 1 1 1 1 1
Sufciency anN Necessity
In p → q, p is stfoienl fuf q and q is neoessafy fuf pc p oan unoy be lfte when q is lfte, btl q
oan be lfte independenl uf pc
Laws of Boolean algebra
Double negation ¬(¬p) ≡ p
Excluded middle p ∨ ¬p ≡ T
Contradiction p ∧ ¬p ≡ F
T∧p≡p
Identity laws
F∨p≡p
p∧p≡p
Idempotent laws
p∨p≡p
p∧q≡q∧p
Commutative laws
p∨q≡q∨p
(p ∧ q) ∧ f ≡ p ∧ (q ∧ f)
Associative laws
(p ∨ q) ∨ f ≡ p ∨ (q ∨ f)
p ∧ (q ∨ f) ≡ (p ∧ q) ∨ (p ∧ f)
Distributive laws
p ∨ (q ∧ f) ≡ (p ∨ q) ∧ (p ∨ f)
¬(p ∧ q) ≡ ¬p ∨ ¬q
DeMorgan’s laws
¬(p ∨ q) ≡ ¬p ∧ ¬q
Quantifiers
Universal Existential Uniqueness
Name Bounded quantifier
quantifier quantifier quantifier
Fuf aoo, Thefe exisls, Thefe is une Is a membef / Is nul a membef
Meaning
given any fuf sume and unoy une eoemenl uf / eoemenl uf
Symbol ∀ ∃ ∃! ∈ ∉
Four important rules of preNicate logic
¬(∀x P(x)) ≡ ∃x (¬P(x))
DeMorgan’s laws
¬(∃x P(x)) ≡ ∀x (¬P(x))
∀x∀y Q(x,y) ≡ ∀y∀x Q(x,y)
Commutative laws
∃x∃y Q(x,y) ≡ ∃y∃x Q(x,y)
CompounN Proposition Types
A oumputnd pfupusitun lhal is true fuf aoo pussiboe oumbinatuns uf lftlh
Tautology
vaotes uf lhe pfupusitunao vafiaboes whioh il ounlainsc
A oumputnd pfupusitun lhal is false fuf aoo pussiboe oumbinatuns uf lftlh
Contradiction
vaotes uf lhe pfupusitunao vafiaboes whioh il ounlainsc
Contingency A oumputnd pfupusitun lhal is neilhef a latluougy nuf a ounlfadiotunc
Summary
By Jeffey Lim (Jeffey-LLimoutlouu.coum) in 2018c
Based un lhe ffsl TU Deof ditun uf Deofse Futndatuns uf Cumptlatun (Seplembef 2018)c
Chapter 2: Logic
Basic DNF Operators
Name Negation Conjunction Disjunction
Meaning NOT AND OR
Symbol ¬ ∧ uf ∙ ∨ uf +
Other notations ¬(¬p ∨ ¬q) ¬(¬p ∧ ¬q)
Logic gate
Other Operators
Exclusive Logical
Name Implication Sheffer stroke Joint denial
disjunction equality
Meaning IMPLY XOR NAND NOR XNOR uf Q
Symbol → ⊕ ↑ ↓ ⊙ uf ≡ uf ↔
Other (p ∨ q) ∧ (p → q) ∧
¬(p ∧ ¬q) ¬(p ∧ q) ¬(p ∨ q)
notations (¬p ∨ ¬q) (q → p)
(p ∧ ¬q) ∨ (p ∧ q) ∨
DNF form ¬p ∨ q ¬p ∨ ¬q ¬p ∧ ¬q
(¬p ∧ q) (¬p ∧ ¬q)
Logic gate
Basic Truth Table
p q p∧q p∨q p→q p⊕q p↑q p↓q p⊙q
0 0 0 0 1 0 1 1 1
0 1 0 1 1 1 1 0 0
1 0 0 1 0 1 1 0 0
1 1 1 1 1 0 0 0 1
Implications
Implication p→q
Contrapositive ¬q → ¬p
Converse q→p
Inverse ¬p → ¬q
Bi-implication p↔q
, p q p→q ¬q → ¬p q→p ¬p → ¬q p↔q
0 0 1 1 1 1 1
0 1 1 1 0 0 0
1 0 0 0 1 1 0
1 1 1 1 1 1 1
Sufciency anN Necessity
In p → q, p is stfoienl fuf q and q is neoessafy fuf pc p oan unoy be lfte when q is lfte, btl q
oan be lfte independenl uf pc
Laws of Boolean algebra
Double negation ¬(¬p) ≡ p
Excluded middle p ∨ ¬p ≡ T
Contradiction p ∧ ¬p ≡ F
T∧p≡p
Identity laws
F∨p≡p
p∧p≡p
Idempotent laws
p∨p≡p
p∧q≡q∧p
Commutative laws
p∨q≡q∨p
(p ∧ q) ∧ f ≡ p ∧ (q ∧ f)
Associative laws
(p ∨ q) ∨ f ≡ p ∨ (q ∨ f)
p ∧ (q ∨ f) ≡ (p ∧ q) ∨ (p ∧ f)
Distributive laws
p ∨ (q ∧ f) ≡ (p ∨ q) ∧ (p ∨ f)
¬(p ∧ q) ≡ ¬p ∨ ¬q
DeMorgan’s laws
¬(p ∨ q) ≡ ¬p ∧ ¬q
Quantifiers
Universal Existential Uniqueness
Name Bounded quantifier
quantifier quantifier quantifier
Fuf aoo, Thefe exisls, Thefe is une Is a membef / Is nul a membef
Meaning
given any fuf sume and unoy une eoemenl uf / eoemenl uf
Symbol ∀ ∃ ∃! ∈ ∉
Four important rules of preNicate logic
¬(∀x P(x)) ≡ ∃x (¬P(x))
DeMorgan’s laws
¬(∃x P(x)) ≡ ∀x (¬P(x))
∀x∀y Q(x,y) ≡ ∀y∀x Q(x,y)
Commutative laws
∃x∃y Q(x,y) ≡ ∃y∃x Q(x,y)
CompounN Proposition Types
A oumputnd pfupusitun lhal is true fuf aoo pussiboe oumbinatuns uf lftlh
Tautology
vaotes uf lhe pfupusitunao vafiaboes whioh il ounlainsc
A oumputnd pfupusitun lhal is false fuf aoo pussiboe oumbinatuns uf lftlh
Contradiction
vaotes uf lhe pfupusitunao vafiaboes whioh il ounlainsc
Contingency A oumputnd pfupusitun lhal is neilhef a latluougy nuf a ounlfadiotunc