Professional Documents
Culture Documents
Unit - 1 Logic & Proofs
Unit - 1 Logic & Proofs
Unit - 1 Logic & Proofs
LOGIC
&
PROOFS
PROPOSITION
&
SYMBOLIC FORM
Symbolize the statement : “If Vani attends classes regularly
and if either she is attentive in the class or studies well then
she gets the top grade.”
ANS :
truth value F
TABLE
Construct the truth table 𝒑 ∧ 𝒒 → 𝒑 ∨ 𝐪 .
ANS :
T T T T T
T F F T T
F T F T T
F F F F T
Construct the truth table for 𝑝 → 𝑞 ↔ ¬𝑝 → ¬𝑞 .
ANS :
Is ¬𝑝 ∧ 𝑝 ∨ 𝑞 →𝑞 a tautology.
ANS :
p q ¬𝒑 𝒑 ∨ 𝒒 (¬𝒑 (¬𝒑 ∧ 𝒑 ∨ 𝒒 )
∧ 𝒑∨𝒒 →𝒒
T T F T F T
T F F T F T
F T T T T T
F F T F F T
Prove that 𝑃 ∧ 𝑄 ∧ ¬(𝑃 ∨ 𝑄) is a contradiction.
ANS :
T F F T F F
F T F T F F
F F F F T F
CONVERSE
CONTRAPOSITIVE
INVERSE
What are the contra positive, converse and inverse of the
conditional statement “If there is rain, then I buy an
umbrella”.
Q : I buy an umbrella
Contrapositive : ¬Q → ¬𝑃
Converse : Q→P
Inverse : ¬P → ¬Q
What are the contra positive , converse and inverse of the
conditional statement “ If you work hard then you will be
rewarded”.
Contrapositive : ¬Q → ¬𝑃
Converse : Q→P
Inverse : ¬P → ¬Q
Write the converse and contra-positive of the conditional
statement: If you obey the traffic rules, then you will not
be fined.
IMPLICATION
Prove that 𝑝 → 𝑞 ∧ 𝑞 → 𝑟 ⟹ 𝑝 → 𝑟
ANS: Antecedent : Assume that 𝑝 → 𝑞 ∧ 𝑞 → 𝑟 is true
Consequent : To prove 𝑝 → 𝑟 is true.
𝑝 → 𝑞 ∧ 𝑞 → 𝑟 is true ⟹ 𝑝 → 𝑞 𝑖𝑠 𝑡𝑟𝑢𝑒 & 𝑞 → 𝑟 is true
𝑝 → 𝑞 is true ⟹ 𝑝 is true & 𝑞 is true --------(1)
𝑝 is false & 𝑞 is true --------(2)
𝑝 is false & 𝑞 is false --------(3)
𝑞 → 𝑟 is true ⟹ 𝑞 is true & 𝑟 is true --------(4)
𝑞 is false & 𝑟 is true --------(5)
𝑞 is false & 𝑟 is false --------(6)
ANS:
𝑃→𝑄 ∧ 𝑅→𝑄
⟺ (¬𝑃 ∨ 𝑄) ∧ (¬𝑅 ∨ 𝑄)
⟺ (¬𝑃 ∧ ¬𝑅) ∨ 𝑄
⟺ ¬ (𝑃 ∨ 𝑅) ∨ 𝑄
⟺ 𝑃∨𝑅 →𝑄
LOGICAL
EQUIVALENCE
Show that 𝑃 → 𝑄 → 𝑅 ⟺ 𝑃 ∧ 𝑄 → 𝑅 ⟺ 𝑃 → ¬𝑄 ∨ 𝑅 .
ANS:
𝑃→ 𝑄→𝑅 ⟺ ¬𝑃 ∨ 𝑄 → 𝑅
⟺ ¬𝑃 ∨ ¬𝑄 ∨ 𝑅
⟺ (¬𝑃 ∨ ¬𝑄) ∨ 𝑅
⟺ ¬(𝑃 ∧ 𝑄) ∨ 𝑅
⟺ 𝑃∧𝑄 →𝑅
𝑃 → 𝑄 → 𝑅 ⟺ ¬𝑃 ∨ 𝑄 → 𝑅
⟺ ¬𝑃 ∨ ¬𝑄 ∨ 𝑅
⟺ 𝑃 → ¬𝑄 ∨ 𝑅
Prove without using truth table
¬ 𝑝 ⟷ 𝑞 ≡ 𝑝 ∨ 𝑞 ∧ ¬ 𝑝 ∨ 𝑞 ≡ 𝑝 ∧ ¬𝑞 ∨ ¬𝑝 ∧ 𝑞 .
⟺ ¬ ¬𝑝 ∨ 𝑞 ∧ ¬𝑞 ∨ 𝑝
⟺ ¬ (¬𝑝 ∨ 𝑞 ∧ ¬𝑞) ∨ ¬𝑝 ∨ 𝑞 ∧ 𝑝
⟺ ¬ ¬𝑝 ∧ ¬𝑞 ∨ (q ∧ ¬𝑞) ∨ ¬𝑝 ∧ 𝑝) ∨ (𝑞 ∧ 𝑝
⟺ ¬ ¬𝑝 ∧ ¬𝑞 ∨ F ∨ F ∨ 𝑞 ∧ 𝑝
⟺ ¬ ¬𝑝 ∧ ¬𝑞 ∨ 𝑞 ∧ 𝑝
⟺ 𝑝 ∨ 𝑞 ∧ (¬𝑞 ∨ 𝑞)
⟺ ¬ ¬𝑝 ∨ 𝑞 ∧ ¬𝑞 ∨ 𝑝
⟺ 𝑝 ∧ ¬𝑞 ∨ ¬𝑝 ∧ 𝑞
Prove that 𝑝⋁𝑞 ⋀¬ ¬𝑝⋀ ¬𝑞⋁¬𝑟 ⋁ ¬𝑝⋀¬𝑞 ⋁ ¬𝑝⋀¬𝑟 is a
tautology.
⟺ 𝑝 ∨ 𝑞 ∧ ¬ ¬𝑝⋀¬ 𝑞 ∧ 𝑟 ∨ ¬ 𝑝 ∨ 𝑞 ∨ ¬(𝑝 ∨ 𝑟)
⟺ 𝑝 ∨ 𝑞 ∧ 𝑝 ∨ 𝑞 ∧ (𝑝 ∨ 𝑟) ∨ ¬[𝑝 ∨ 𝑞 ∧ 𝑟 ]
⟺ [𝑝 ∨ (𝑞 ∧ 𝑟)] ∨ ¬[𝑝 ∨ 𝑞 ∧ 𝑟 ]
⟺ T
PCNF
&
PDNF
Obtain PCNF & PDNF of 𝑝 → 𝑞 ∧ 𝑟 ∧ ¬𝑝 → ¬𝑞 ∧ ¬𝑟 .
ANS: 𝑝→ 𝑞∧𝑟 ∧ ¬𝑝 → ¬𝑞 ∧ ¬𝑟
⟺ [¬𝑝 ∨ 𝑞 ∧ 𝑟 ] ∧ [𝑝 ∨ ¬𝑞 ∧ ¬𝑟 ]
⟺ ¬𝑝 ∧ 𝑝 ∨ ¬𝑝 ∧ ¬𝑞 ∧ ¬𝑟 ∨ 𝑞 ∧ 𝑟 ∧ 𝑝 ∨ (𝑞 ∧ 𝑟 ∧ ¬𝑞 ∧ ¬𝑟)
⟺ F ∨ ¬𝑝 ∧ ¬𝑞 ∧ ¬𝑟 ∨ (𝑝 ∧ 𝑞 ∧ 𝑟) ∨ 𝐹
PDNF of S ⟺ ¬𝑝 ∧ ¬𝑞 ∧ ¬𝑟 ∨ (𝑝 ∧ 𝑞 ∧ 𝑟)
PDNF of ¬S ⟺ 𝑝 ∧ 𝑞 ∧ ¬𝑟 ∨ 𝑝 ∧ ¬𝑞 ∧ 𝑟 ∨ 𝑝 ∧ ¬𝑞 ∧ ¬𝑟 ∨ ¬𝑝 ∧ 𝑞 ∧ 𝑟
∨ ¬𝑝 ∧ 𝑞 ∧ ¬𝑟 ∨ (¬𝑝 ∧ ¬𝑞 ∧ 𝑟)
PCNF OF S ⟺ ¬𝑝 ∨ ¬𝑞 ∨ 𝑟 ∧ ¬𝑝 ∨ 𝑞 ∨ ¬𝑟 ∧ ¬𝑝 ∨ 𝑞 ∨ 𝑟
∧ 𝑝 ∨ ¬𝑞 ∨ ¬𝑟 ∧ 𝑝 ∨ ¬𝑞 ∨ 𝑟 ∧ 𝑝 ∨ 𝑞 ∨ ¬𝑟)
Obtain PDNF of 𝑃 ∧ 𝑄 ∨ 𝑅 → ¬𝑃 & hence find its PCNF.
ANS: 𝑃 ∧ 𝑄 ∨ 𝑅 → ¬𝑃 ⟺ ¬[ 𝑃 ∧ 𝑄 ∨ 𝑅] ∨ ¬𝑃 ⟺ [ ¬𝑃 ∨ ¬𝑄 ∧ ¬𝑅] ∨ ¬𝑃
⟺ ¬𝑃 ∨ ¬𝑄 ∨ ¬𝑃 ∧ ¬𝑅 ∨ ¬𝑃
⟺ ¬𝑃 ∨ ¬𝑄 ∨ (𝑅 ∧ ¬𝑅) ∧ ¬𝑅 ∨ ¬𝑃 ∨ (𝑄 ∧ ¬𝑄)
PCNF of ¬S ⟺ 𝑃 ∨ 𝑄 ∨ 𝑅 ∧ ¬𝑃 ∨ 𝑄 ∨ 𝑅 ∧ 𝑃 ∨ ¬𝑄 ∨ 𝑅
∧ 𝑃 ∨ 𝑄 ∨ ¬𝑅 ∧ 𝑃 ∨ ¬𝑄 ∨ ¬𝑅
PDNF of S ⟺ ¬( PCNF of ¬S )
PDNF of S ⟺ 𝑃 ∧ ¬𝑄 ∧ ¬𝑅 ∨ ¬𝑃 ∧ 𝑄 ∧ 𝑅 ∨ ¬𝑃 ∧ 𝑄 ∧ ¬𝑅
∨ ¬𝑃 ∧ ¬𝑄 ∧ 𝑅 ∨ ¬𝑃 ∧ ¬𝑄 ∧ ¬𝑅 .
Show that ¬𝑃 → 𝑅 ∧ 𝑄 ⟷ 𝑃
ANS:
¬𝑃 → 𝑅 ∧ 𝑄 ⟷ 𝑃 ⟺ ¬𝑃 → 𝑅 ∧ 𝑄 → 𝑃 ∧ (𝑃 → 𝑄)
⟺ 𝑃 ∨𝑅 ∧ ¬𝑄 ∨ 𝑃 ∧ (¬𝑃 ∨𝑄)
⟺ 𝑃 ∨𝑅 ∨𝐹 ∧ ¬𝑄 ∨𝑃 ∨𝐹 ∧ [(¬𝑃 ∨𝑄) ∨ 𝐹]
⟺ 𝑃 ∨𝑅 ∨ 𝑄 ∧ 𝑃 ∨𝑅 ∨¬𝑄 ∧ ¬𝑄 ∨𝑃 ∨𝑅 ∧ ¬𝑄 ∨𝑃 ∨¬𝑅
Symbolic form :
⇒ ∀x P(x) ∧ B(x) ⟶ M(x) .
Write the symbolic form & negate the following statement
(i)Everyone who is healthy can do all kinds of work.
(ii) Some people are not admired by everyone.
(iii) Everyone should help his neighbors or his neighbors will not help him.
ANS:
ANS:
𝑄 𝑥 ∶ 𝑥 is a negative integer
ANS:
S.No Premises Rule Reason
1. ∀𝑥 𝑃 𝑥 → 𝑄 𝑥 P Given premises
2. 𝑃 𝑦 →𝑄 𝑦 US ∀𝑥 𝑃(𝑥) ⇒ 𝑃(𝑦)
3. ∀𝑥 𝑅 𝑥 → ¬𝑄 𝑥 P Given premises
4. 𝑅 𝑦 → ¬𝑄 𝑦 US ∀𝑥 𝑃(𝑥) ⇒ 𝑃(𝑦)
6. 𝑃 𝑦 →¬𝑅 𝑦 T 2 , 5 hypothetical
8. ∀𝑥 𝑅 𝑥 → ¬𝑃 𝑥 UG (8)
Show that the premises “One student in this class knows how to write programs in JAVA”
and “Everyone who knows how to write programs in JAVA can get high paying job”
imply the conclusion “Someone in this class can get a high paying job”.
ANS: Let A(x) : x is in the class B(x) : x knows JAVA programming
H(x) : x can get a high paying job.
Premises : ∃𝑥 𝐴 𝑥 ∧ 𝐵 𝑥 , 𝑥 𝐵 𝑥 →𝐻 𝑥 Conclusion : ∃𝑥 𝐴 𝑥 ∧ 𝐻 𝑥
S.No Premises Rule Reason
1. ∃𝑥 𝐴 𝑥 ∧ 𝐵 𝑥 P Given premises
2. 𝐴 𝑦 ∧𝐵 𝑦 ES ∃𝑥 𝑃(𝑥) ⇒ 𝑃(𝑦)
3. 𝐴 𝑦 T P∧Q ⇒ P
4. 𝐵 𝑦 T P∧Q ⇒ Q
5. 𝑥 𝐵 𝑥 →𝐻 𝑥 P Given premises
6. 𝐵 𝑦 →𝐻 𝑦 US ∀𝑥 𝑃(𝑥) ⇒ 𝑃(𝑦)
7. 𝐻 𝑦 T (4), (6) Modus ponens
8. 𝐴 𝑦 ∧𝐻 𝑦 T (3), (4)
9. ∃𝑥 𝐴 𝑥 ∧ 𝐻 𝑥 EG (8)
Verify the validity of the following argument. Lions are dangerous animals. There are Lions.
Therefore, there are dangerous animals.
ANS:
Let (𝒙) : 𝒙 is a lion Q(𝒙) : 𝒙 is a dangerous animal
Premises : (∀𝒙)[P 𝒙 → 𝑸(𝒙)] , ∃𝒙 𝑷 𝒙
Conclusion : ∃𝒙 𝑸 𝒙