Program: B.Tech, CSE, 3rd sem/2nd year
CS-302: Discrete Structures
Ms. Neha Sharma
Assistant Professor, Dept. of Mathematics
Unit 3
Logic and Algebra of Propositions
Topic: Laws of Algebra of Propositions
Jul-Dec 2021-22
Lecture 4
Outlines
• Prerequisites
• Real Life Examples
• Laws
• Truth Tables of Some Laws
• Examples
• Learning Outcomes
• References
CS-302
2
Prerequisites
Basic Mathematical operations
Propositions
Logical Connectives
Well Formed Formulas
CS-302 3
Real Life Examples
To design computer circuits.
To construct computer programs.
To verify the correctness of programs.
To build expert systems.
To analyze and solve many familiar puzzles.
Reference No.: R3
CS-302 4
<SELO: 1,2>
Laws on Algebra of Propositions
There are some predefined equivalences and those are as follows:
Let P, Q, and R be statements. Let t be a formula that is a tautology
and let f be a formula that is a contradiction.
Then:
1. The Law of Double Negation: ¬¬P⇔P.
2. The Associative Law for Disjunction: P∨(Q∨R)⇔(P∨Q)∨R.
3. The Associative Law for Conjunction: P∧(Q∧R)⇔(P∧Q)∧R.
CS-302 5
<SELO: 1,2> Reference No.: R1
Examples
4. The Commutative Law for Disjunction: P∨Q⇔Q∨P.
5. The Commutative Law for Conjunction : P∧Q⇔Q∧P.
6. The First Distributive Law: P∨(Q∧R)⇔(P∨Q)∧(P∨R).
7. The Second Distributive Law: P∧(Q∨R)⇔(P∧Q)∨(P∧R).
8. The Idempotent Law for Disjunction: P∨P⇔P.
9. The Idempotent Law for Conjunction : P∧P⇔P.
CS-302 6
<SELO: 1,2> Reference No.: R3
Examples Contd.
10. The Identity Law for Tautologies: P∧t⇔P.
11. The Identity Law for Contradictions: P∨f⇔P.
12. The Inverse Law for Tautologies: P∨¬P⇔t.
13. The Inverse Law for Contradictions: P∧¬P⇔f.
14. The Domination Law for Tautologies: P∨t⇔t.
15. The Domination Law for Contradictions: P∧f⇔f.
CS-302 7
<SELO: 1,2> Reference No.: R2
Laws Contd.
16. De Morgan's Law 1: ¬(P∨Q)⇔¬P∧¬Q.
17. De Morgan's Law 2: ¬(P∧Q)⇔¬P∨¬Q.
CS-302 8
<SELO: 1,2> Reference No.: R1
Proof of Some Laws with Truth Tables
Commutative Law: 1. P∧Q⇔Q∧P.
2. P∨Q⇔Q∨P.
Similarly the result can be proved for 2 also.
CS-302 9
<SELO: 1,2> Reference No.: R1
p q p∧q q∧p p∧q ⇔q∧p
T T T T T
T F F F T
F T F F T
F F F F T
Proof of Laws Contd.
Associative Law: 1. P∨(Q∨R)⇔(P∨Q)∨R.
2. P∧(Q∧R)⇔(P∧Q)∧R.
CS-302 10
<SELO: 1,2> Reference No.: R1
p q R p∧q q∧r (p∧q)∧r p∧(q∧r) (p∧q)∧r ⇔ p∧(q∧r)
T T T T T T T T
T T F T F F F T
T F T F F F F T
T F F F F F F T
F T T F T F F T
F T F F F F F T
F F T F F F F T
F F F F F F F T
Identity Laws
Identity Laws: P∧t⇔P.
P∨f⇔P.
CS-302 11
<SELO: 1,2> Reference No.: R1
p t p∧t p∧t ⇔ p
T T T T
F T F T
p f p∨f p∨f ⇔ p
T F T T
F F F T
Proving Equivalence without Truth Tables
Question: (∼p ∧(∼q∧r))∨(q∧r)∨(p∧r) ⇔ r, without using
truth tables.
Solution: Consider,
(∼p ∧(∼q∧r))∨(q∧r)∨(p∧r)
⇔ (∼p ∧(∼q∧r))∨((q∨p) ∧r) (distributive law)
⇔ ((∼p ∧∼q)∧r)∨((q∨p) ∧r) (Associative law)
⇔ ((∼p ∧∼q) ∨ (q∨p)) ∧r (Distributive Law)
CS-302 12
<SELO: 1,2> Reference No.: R1
Proving Equivalence without Truth Tables
⇔ (∼ (p ∨ q) ∨ (q∨p)) ∧ r (Demorgan’s Law)
⇔ T ∧ r (Negation Law)
⇔ r (Identity Law)
CS-302 13
<SELO: 1,2> Reference No.: R1
Learning Outcomes
Concept of Laws on Algebra of Propositions is learnt.
Questions related to it have also been discussed.
CS-302 14
References
1. Dr. D. K. Jain, “Discrete Mathematics”.
2. C.L.Liu, “Elements of Discrete Mathematics”.
CS-302 15
CS-302 16

(L5)(U3)Laws of Algebra of Propositions.pdf

  • 1.
    Program: B.Tech, CSE,3rd sem/2nd year CS-302: Discrete Structures Ms. Neha Sharma Assistant Professor, Dept. of Mathematics Unit 3 Logic and Algebra of Propositions Topic: Laws of Algebra of Propositions Jul-Dec 2021-22 Lecture 4
  • 2.
    Outlines • Prerequisites • RealLife Examples • Laws • Truth Tables of Some Laws • Examples • Learning Outcomes • References CS-302 2
  • 3.
  • 4.
    Real Life Examples Todesign computer circuits. To construct computer programs. To verify the correctness of programs. To build expert systems. To analyze and solve many familiar puzzles. Reference No.: R3 CS-302 4 <SELO: 1,2>
  • 5.
    Laws on Algebraof Propositions There are some predefined equivalences and those are as follows: Let P, Q, and R be statements. Let t be a formula that is a tautology and let f be a formula that is a contradiction. Then: 1. The Law of Double Negation: ¬¬P⇔P. 2. The Associative Law for Disjunction: P∨(Q∨R)⇔(P∨Q)∨R. 3. The Associative Law for Conjunction: P∧(Q∧R)⇔(P∧Q)∧R. CS-302 5 <SELO: 1,2> Reference No.: R1
  • 6.
    Examples 4. The CommutativeLaw for Disjunction: P∨Q⇔Q∨P. 5. The Commutative Law for Conjunction : P∧Q⇔Q∧P. 6. The First Distributive Law: P∨(Q∧R)⇔(P∨Q)∧(P∨R). 7. The Second Distributive Law: P∧(Q∨R)⇔(P∧Q)∨(P∧R). 8. The Idempotent Law for Disjunction: P∨P⇔P. 9. The Idempotent Law for Conjunction : P∧P⇔P. CS-302 6 <SELO: 1,2> Reference No.: R3
  • 7.
    Examples Contd. 10. TheIdentity Law for Tautologies: P∧t⇔P. 11. The Identity Law for Contradictions: P∨f⇔P. 12. The Inverse Law for Tautologies: P∨¬P⇔t. 13. The Inverse Law for Contradictions: P∧¬P⇔f. 14. The Domination Law for Tautologies: P∨t⇔t. 15. The Domination Law for Contradictions: P∧f⇔f. CS-302 7 <SELO: 1,2> Reference No.: R2
  • 8.
    Laws Contd. 16. DeMorgan's Law 1: ¬(P∨Q)⇔¬P∧¬Q. 17. De Morgan's Law 2: ¬(P∧Q)⇔¬P∨¬Q. CS-302 8 <SELO: 1,2> Reference No.: R1
  • 9.
    Proof of SomeLaws with Truth Tables Commutative Law: 1. P∧Q⇔Q∧P. 2. P∨Q⇔Q∨P. Similarly the result can be proved for 2 also. CS-302 9 <SELO: 1,2> Reference No.: R1 p q p∧q q∧p p∧q ⇔q∧p T T T T T T F F F T F T F F T F F F F T
  • 10.
    Proof of LawsContd. Associative Law: 1. P∨(Q∨R)⇔(P∨Q)∨R. 2. P∧(Q∧R)⇔(P∧Q)∧R. CS-302 10 <SELO: 1,2> Reference No.: R1 p q R p∧q q∧r (p∧q)∧r p∧(q∧r) (p∧q)∧r ⇔ p∧(q∧r) T T T T T T T T T T F T F F F T T F T F F F F T T F F F F F F T F T T F T F F T F T F F F F F T F F T F F F F T F F F F F F F T
  • 11.
    Identity Laws Identity Laws:P∧t⇔P. P∨f⇔P. CS-302 11 <SELO: 1,2> Reference No.: R1 p t p∧t p∧t ⇔ p T T T T F T F T p f p∨f p∨f ⇔ p T F T T F F F T
  • 12.
    Proving Equivalence withoutTruth Tables Question: (∼p ∧(∼q∧r))∨(q∧r)∨(p∧r) ⇔ r, without using truth tables. Solution: Consider, (∼p ∧(∼q∧r))∨(q∧r)∨(p∧r) ⇔ (∼p ∧(∼q∧r))∨((q∨p) ∧r) (distributive law) ⇔ ((∼p ∧∼q)∧r)∨((q∨p) ∧r) (Associative law) ⇔ ((∼p ∧∼q) ∨ (q∨p)) ∧r (Distributive Law) CS-302 12 <SELO: 1,2> Reference No.: R1
  • 13.
    Proving Equivalence withoutTruth Tables ⇔ (∼ (p ∨ q) ∨ (q∨p)) ∧ r (Demorgan’s Law) ⇔ T ∧ r (Negation Law) ⇔ r (Identity Law) CS-302 13 <SELO: 1,2> Reference No.: R1
  • 14.
    Learning Outcomes Concept ofLaws on Algebra of Propositions is learnt. Questions related to it have also been discussed. CS-302 14
  • 15.
    References 1. Dr. D.K. Jain, “Discrete Mathematics”. 2. C.L.Liu, “Elements of Discrete Mathematics”. CS-302 15
  • 16.