0% found this document useful (0 votes)
10 views24 pages

02 Propositional Equivalences

The document discusses propositional logic and logical equivalences. It defines logical equivalence and explains that two compound propositions are logically equivalent if they have the same truth value in all possible cases. Logical equivalences can be determined using truth tables. The document provides examples of logical equivalences and their names, including De Morgan's laws, distribution, and others. It also discusses logical implications and provides examples of checking the validity of arguments using propositional logic.

Uploaded by

handerajat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views24 pages

02 Propositional Equivalences

The document discusses propositional logic and logical equivalences. It defines logical equivalence and explains that two compound propositions are logically equivalent if they have the same truth value in all possible cases. Logical equivalences can be determined using truth tables. The document provides examples of logical equivalences and their names, including De Morgan's laws, distribution, and others. It also discusses logical implications and provides examples of checking the validity of arguments using propositional logic.

Uploaded by

handerajat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

CS2006D: D ISCRETE S TRUCTURES

Propositional Logic

Renjith P.

NIT Calicut CS2006D: Discrete Structures 1 / 21


Logical Equivalences

⋆ Compound propositions that have the same truth values in all


possible cases are called logically equivalent.
⋆ The compound propositions p and q are called logically
equivalent if p ↔ q is a tautology.
⋆ The notation p ≡ q denotes that p and q are logically equivalent.
⋆ The symbol ≡ is not a logical connective, and p ≡ q is not a
compound proposition.
⋆ The symbol ⇐⇒ is sometimes used instead of ≡ to denote
logical equivalence.
⋆ One way to determine whether two compound propositions are
equivalent is to use a truth table.

NIT Calicut CS2006D: Discrete Structures 2 / 21


Logical Equivalences using Truth Tables

¬(P ∨ Q) is equivalent to (¬P ∧ ¬Q)

¬P ∨ Q is equivalent to P → Q

NIT Calicut CS2006D: Discrete Structures 3 / 21


Some Logical Equivalences

P → (Q → R) equivalent to (P → Q) → (P → R)
P Q R Q→R (P → Q) (P → R) (P → Q) → (P → R) P → (Q → R)

T T T T T T T T
T T F F T F F F
T F T T F T T T
T F F T F F T T
F T T T T T T T
F T F F T T T T
F F T T T T T T
F F F T T T T T

NIT Calicut CS2006D: Discrete Structures 4 / 21


Some Logical Equivalences

p ∨ (q ∧ r ) and (p ∨ q) ∧ (p ∨ r ) are logically equivalent

NIT Calicut CS2006D: Discrete Structures 5 / 21


Some Logical Equivalences

Logical Equivalences Involving Conditional Statements

NIT Calicut CS2006D: Discrete Structures 6 / 21


Some Logical Equivalences

Logical Equivalences Involving Biconditional Statements

NIT Calicut CS2006D: Discrete Structures 7 / 21


Logical Equivalences and their Name

E QUIVALENCE N AME
p ↔ (p ∨ p) p ↔ (p ∧ p) Idempotence
p∨q ↔q∨p p∧q ↔q∧p Commutativity
(p ∨ q) ∨ r ↔ p ∨ (q ∨ r ) (p ∧ q) ∧ r ↔ p ∧ (q ∧ r ) Associativity
¬(p ∨ q) ↔ ¬p ∧ ¬q ¬(p ∧ q) ↔ ¬p ∨ ¬q De-morgans Law
p ∧ (q ∨ r ) ↔ (p ∧ q) ∨ (p ∧ r ) p ∨ (q ∧ r ) ↔ (p ∨ q) ∧ (p ∨ r ) Distribution
p∨T↔T p∧F↔F Domination
p ∨ ¬p ↔ T p ∧ ¬p ↔ F Negation
p∨F↔p p∧T↔p Identity
p ↔ ¬(¬p) Double negation
p ∨ (p ∧ q) ↔ p p ∧ (p ∨ q) ↔ p Absorption law
p → q ↔ ¬p ∨ q Implication
(p ↔ q) ↔ (p → q) ∧ (q → p) Equivalence
(p ∧ q) → r ↔ p → (q → r ) Exportation
(p → q) ∧ (p → ¬q) ↔ ¬p Absurdity
p → q ↔ ¬q → ¬p Contrapositive

NIT Calicut CS2006D: Discrete Structures 8 / 21


Logical Implication and their Name

I MPLICATION N AME
p → (p ∨ q) Addition
(p ∧ q) → p Simplification
[p ∧ (p → q)] → q Modus Ponens
[(p → q) ∧ ¬q] → ¬p Modus Tollens
[¬p ∧ (p ∨ q)] → q Disjunctive Syllogism
[(p → q) ∧ (q → r )] → (p → r ) Hypothetical Syllogism
((p ∨ q) ∧ (¬p ∨ r )) → (q ∨ r ) Resolution
(p → q) → [(q → r ) → (p → r )]
[(p → q) ∧ (r → s)] → [(p ∧ r ) → (q ∧ s)]
[(p ↔ q) ∧ (q ↔ r )] → p ↔ r

NIT Calicut CS2006D: Discrete Structures 9 / 21


Questions

Show that ¬(p → q) and p ∧ ¬q are logically equivalent


¬(p → q) ≡ ¬(¬p ∨ q) (Implication)
≡ ¬(¬p) ∧ ¬q (The De Morgan’s Law)
≡ p ∧ ¬q (The Double Negation Law)

NIT Calicut CS2006D: Discrete Structures 10 / 21


Questions

Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent


¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬(¬p ∧ q)) (The De Morgan’s Law)
≡ ¬p ∧ [¬(¬p) ∨ ¬q] (The De Morgan’s Law)
≡ ¬p ∧ (p ∨ ¬q) (The Double Negation Law
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q) (The Distributive Law)
≡ F ∨ (¬p ∧ ¬q) (Negation, ¬p ∧ p ≡ F )
≡ (¬p ∧ ¬q) ∨ F (The Commutative Law)
≡ ¬p ∧ ¬q (The Identity Law)

NIT Calicut CS2006D: Discrete Structures 11 / 21


Questions

Show that (p ∧ q) → (p ∨ q) is a tautology


(p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q) (Implication)
≡ (¬p ∨ ¬q) ∨ (p ∨ q) (The De Morgan’s Law)
≡ (¬p ∨ p) ∨ (¬q ∨ q) (The associative and
commutative laws)
≡ T∨T (Negation, ¬p ∨ p ≡ T)
≡ T (the domination law)

NIT Calicut CS2006D: Discrete Structures 12 / 21


Questions

Show that ¬(p ∨ (¬p ∧ q)) and ¬p ∧ ¬q are logically equivalent


¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬(¬p ∧ q)) (The De Morgan’s Law)
≡ ¬p ∧ [¬(¬p) ∨ ¬q] (The De Morgan’s Law)
≡ ¬p ∧ (p ∨ ¬q) (The Double Negation Law
≡ (¬p ∧ p) ∨ (¬p ∧ ¬q) (The Distributive Law)
≡ F ∨ (¬p ∧ ¬q) (Negation, ¬p ∧ p ≡ F )
≡ (¬p ∧ ¬q) ∨ F (The Commutative Law)
≡ ¬p ∧ ¬q (The Identity Law)

NIT Calicut CS2006D: Discrete Structures 13 / 21


Case Study

1. DM is a classical subject
2. If DM is a classical subject, then B.Tech in CSE is a good program

Therefore, B.Tech in CSE is a good program

Is the above argument a valid one? Does the conclusion follow from
the premise?

P: DM is a classical subject
Q: B.Tech in CSE is a good program
Given
P
P → Q In otherwords, Is (P ∧ (P → Q)) → Q is a tautology?
Q
If (P ∧ (P → Q)) → Q is a tautology, then Q follows.

NIT Calicut CS2006D: Discrete Structures 14 / 21


Case Study
1. If DM is a classical subject, then B.Tech CSE is a good program
2. If B.Tech CSE is a good program, then MS(CSE) is a good program

Therefore, If DM is a classical subject, then MS(CSE) is a good pro-


gram

Is the above argument a valid one? Does the conclusion follow from
the premise?
P: DM is a classical subject
Q: B.Tech CSE is a good program
R: MS(CSE) is a good program
Given
P→ Q
Q→R
P→R
In otherwords, Is ((P → Q) ∧ (Q → R)) → (P → R) is a tautology?
If ((P → Q) ∧ (Q → R)) → (P → R) is a tautology, then P → R follows.
NIT Calicut CS2006D: Discrete Structures 15 / 21
Case Study

Determine whether these system specifications are consistent:


1 “The diagnostic message is stored in the buffer or it is
retransmitted.”
2 “The diagnostic message is not stored in the buffer.”
3 “If the diagnostic message is stored in the buffer, then it is
retransmitted.”

NIT Calicut CS2006D: Discrete Structures 16 / 21


Case Study

Determine whether these system specifications are consistent:


1 “The diagnostic message is stored in the buffer or it is
retransmitted.”
2 “The diagnostic message is not stored in the buffer.”
3 “If the diagnostic message is stored in the buffer, then it is
retransmitted.”
p: The diagnostic message is stored in the buffer
q: The diagnostic message is retransmitted
p ∨ q, ¬p, p → q
p: T RUE
q: FALSE

NIT Calicut CS2006D: Discrete Structures 16 / 21


Case Study

Determine whether these system specifications are consistent:


1 “The diagnostic message is stored in the buffer or it is
retransmitted.”
2 “The diagnostic message is not stored in the buffer.”
3 “If the diagnostic message is stored in the buffer, then it is
retransmitted.”
4 “ The diagnostic message is not retransmitted”

NIT Calicut CS2006D: Discrete Structures 17 / 21


Case Study

Determine whether these system specifications are consistent:


1 “The diagnostic message is stored in the buffer or it is
retransmitted.”
2 “The diagnostic message is not stored in the buffer.”
3 “If the diagnostic message is stored in the buffer, then it is
retransmitted.”
4 “ The diagnostic message is not retransmitted”
p ∨ q, ¬p, p → q, ¬q
See the truth value of (p ∨ q) ∧ ¬p ∧ (p → q) ∧ ¬q
If (p ∨ q) ∧ ¬p ∧ (p → q) ∧ ¬q is a contradiction, then the above system
specifications are inconsistent.

NIT Calicut CS2006D: Discrete Structures 17 / 21


Propositional Satisfiability

⋆ A compound proposition is satisfiable if there is an assignment of


truth values to its variables that makes it true.
Such an assignment is called a solution of this particular
satisfiability problem.
⋆ When the compound proposition is false for all assignments of
truth values to its variables, the compound proposition is
unsatisfiable.
⋆ Note that a compound proposition is unsatisfiable if and only if
its negation is true for all assignments of truth values to the
variables, that is, if and only if its negation is a tautology.

NIT Calicut CS2006D: Discrete Structures 18 / 21


Propositional Satisfiability

Determine whether each of the compound propositions are satisfiable?

1 (p ∨ ¬q) ∧ (q ∨ ¬r ) ∧ (r ∨ ¬p)
2 (p ∨ q ∨ r ) ∧ (¬p ∨ ¬q ∨ ¬r )
3 (p ∨ ¬q) ∧ (q ∨ ¬r ) ∧ (r ∨ ¬p) ∧ (p ∨ q ∨ r ) ∧ (¬p ∨ ¬q ∨ ¬r )
4 (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q)
5 (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧ (¬p → ¬q)
6 (p ↔ q) ∧ (¬p ↔ q)

NIT Calicut CS2006D: Discrete Structures 19 / 21


Logic Puzzles

Puzzles that can be solved using logical reasoning are known as logic
puzzles
1 Smullyan posed many puzzles about an island that has two kinds
of inhabitants, knights, who always tell the truth, and their
opposites, knaves, who always lie. You encounter two people A
and B. What are A and B if A says B is a knight and B says The
two of us are opposite types?

NIT Calicut CS2006D: Discrete Structures 20 / 21


Logic Puzzles

Puzzles that can be solved using logical reasoning are known as logic
puzzles
1 Smullyan posed many puzzles about an island that has two kinds
of inhabitants, knights, who always tell the truth, and their
opposites, knaves, who always lie. You encounter two people A
and B. What are A and B if A says B is a knight and B says The
two of us are opposite types?
Both A and B are knaves

NIT Calicut CS2006D: Discrete Structures 20 / 21


Logic Puzzles

Puzzles that can be solved using logical reasoning are known as logic
puzzles
2 A father tells his two children, a boy and a girl, to play in their
backyard without getting dirty. However, while playing, both
children get mud on their foreheads. When the children stop
playing, the father says “At least one of you has a muddy
forehead,” and then asks the children to answer “Yes” or “No” to
the question: “Do you know whether you have a muddy
forehead?” The father asks this question twice. What will the
children answer each time this question is asked, assuming that a
child can see whether his or her sibling has a muddy forehead,
but cannot see his or her own forehead? Assume that both
children are honest and that the children answer each question
simultaneously.

NIT Calicut CS2006D: Discrete Structures 21 / 21

You might also like