0% found this document useful (0 votes)
22 views54 pages

Propositional Equivalences: Presenter Yukun Wang Computer Science and Technology

Uploaded by

frogboynayeem
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)
22 views54 pages

Propositional Equivalences: Presenter Yukun Wang Computer Science and Technology

Uploaded by

frogboynayeem
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/ 54

P r o p o s i t i o n a l

E q u i v a l e n c e s
P r e s e n t e r : Yu k u n Wa n g

C o m p u t e r s c i e n c e a n d Te c h n o l o g y
1
Introduction
Introduction
An important type of step used in a mathematical argument is the replacement of a
statement with another statement with the same truth value. Because of this,
methods that produce propositions with the same truth value as a given compound
proposition are used extensively in the construction of mathematical arguments.

We begin our discussion with a classification of compound propositions according to


their possible truth values.
Introduction
Definition 1
• A compound proposition that is always true, no matter what the truth values of the
propositional variables that occur in it, is called a tautology.
•A compound proposition that is always false is called a contradiction.
•A compound proposition that is neither a tautology nor a contradiction is called a
contingency.

Tautologies and contradictions are often important in mathematical reasoning.


Example 1 illustrates these types of compound propositions.
Introduction

Example 1: We can construct examples of tautologies and contradictions using just


one propositional variable.
Consider the truth tables of p ¬p and p ¬p, shown in Table 1.
•Because p ¬p is always true, it is a tautology.
•Because p ¬p is always false, it is a contradiction.

TABLE 1 Examples of a Tautology and a Contradiction.

p ¬p p ∨ ¬p p ∧ ¬p

T F T F
F T T F
Basic equivalence

1. Double negation law A  A


2. Idempotent laws AA  A, AA  A
3. Commutative laws AB  BA, AB  BA
4. Absorption laws (AB)C  A(BC), (AB)C  A(BC)
5. Distributive law A(BC)  (AB)(AC), A(BC)  (AB)(AC)
6. De Morgan’s Laws (AB)  AB, (AB)  AB
7. Associative laws A(AB)  A, A(AB)  A
8. Domination laws A1  1, A0  0
Basic equivalence

9. Identity laws A0  A, A1  A


10. Negation laws AA  1, AA  0
11.conditional disjunction equivalence AB  AB
12. Logical Equivalences Involving Conditional or Biconditional Statements.
2
Logical Equivalences
Logical Equivalences
Compound propositions that have the same truth values in all possible cases are
called logically equivalent. We can also define this notion as follows.

Definition 2
•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.


De Morgan laws
One way to determine whether two compound propositions are equivalent is to use a
truth table.

Example 2 illustrates this method to establish an extremely important and useful


logical equivalence, namely, that of ¬(p q) with ¬p ¬q. This logical equivalence
is one of the two De Morgan laws, shown in Table 2.

TABLE 2 De Morgan’s Laws.

¬(p q) ≡ ¬p ¬q
¬(p q) ≡ ¬p ¬q
De Morgan laws

Example 2: Show that ¬(p q) and ¬p ¬q are logically equivalent.

Solution:
•The truth tables for these compound propositions are displayed in Table 3

TABLE 3 Truth Tables for ¬(p ∨ q) and ¬p ∧ ¬q.


p q p∨q ¬(p ∨ q) ¬p ¬q ¬p ∧ ¬q
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T
Logical Equivalences

The next example establishes an extremely important equivalence. It allows us to


replace conditional statements with negations and disjunctions.

Example 3: Show that p → q and ¬p q are logically equivalent. (This is known as


the conditional disjunction equivalence.)

Solution:
•We construct the truth table for these compound propositions in Table 4. Because
the truth values of ¬p q and p → q agree, they are logically equivalent.
Logical Equivalences

TABLE 4 Truth Tables for ¬p q and p → q.


p q ¬p ¬p q p→q
T T F T T
T F F F F
F T T T T
F F T T T
Logical Equivalences

We will now establish a logical equivalence of two compound propositions involving
three different propositional variables p, q, and r.

Example 4: Show that p (q r) and (p q) (p r) are logically equivalent.


This is the distributive law of disjunction over conjunction.

Solution:
•We construct the truth table for these compound propositions in Table 5.
Logical Equivalences

TABLE 5 A Demonstration That p (q r) and (p q) (p r)


Are Logically Equivalent.
p q r q r p (q r) p q p r (p q) (p r)
T T T T T T T T
T F F F T T T T
F T T F T T T T
F F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Logical Equivalences

Table 6 contains some important equivalences.

TABLE 6 Logical Equivalences.


Equivalence Name
p T≡p Identity laws
p F≡p
p T≡T Domination laws
p F≡F
p p≡p Idempotent laws
p p≡p
¬(¬p) ≡ p Double negation law
p q≡q p Commutative laws
p q≡q p
Logical Equivalences

TABLE 6 Logical Equivalences.


Equivalence Name
(p q) r ≡ p (q r) Associative laws
(p q) r ≡ p (q r)
p (q r) ≡ (p q) (p r) Distributive laws
p (q r) ≡ (p q) (p r)
¬(p q) ≡ ¬p ¬q De Morgan’s laws
¬(p q) ≡ ¬p ¬q
p (p q) ≡ p Absorption laws
p (p q) ≡ p
p ¬p ≡ T Negation laws
p ¬p ≡ F
Logical Equivalences

We also display some useful equivalences for compound propositions involving
conditional statements and biconditional statements in Tables 7 and 8, respectively.
Logical Equivalences
TABLE 7 Logical Equivalences Involving Conditional
Statements.
p → q ≡ ¬p q
p → q ≡ ¬q → ¬p
p q ≡ ¬p → q
p q ≡ ¬(p → ¬q)
¬(p → q) ≡ p ¬q
(p → q) (p → r) ≡ p → (q r)
(p → r) (q → r) ≡ (p q) → r
(p → q) (p → r) ≡ p → (q r)
(p → r) (q → r) ≡ (p q) → r
Equivalence caculus

Show p(qr)  (pq)r with basic laws


solution:
p(qr)
 p(qr) (conditional disjunction equivalence)
 (pq)r (Commutative laws)
 (pq)r (De Morgan’s Laws)
 (pq)r (conditional disjunction equivalence)
Exercise

(p → r) (q → r) ≡ (p q) → r
Open Question Points: 10

(p → r) (q → r) ≡ (p q) → r

Answer
Logical Equivalences

TABLE 8 Logical Equivalences Involving


Biconditional Statements.
p q ≡ (p → q) (q → p)

p q ≡ ¬p ¬q

p q ≡ (p q) (¬p ¬q)

¬(p q) ≡ p ¬q
Logical Equivalences
Furthermore, note that De Morgan’s laws extend to

•¬(p1 p2 pn) ≡ (¬p1 ¬p2 ¬pn)

•¬(p1 p2 pn) ≡ (¬p1 ¬p2 ¬pn)

A truth table with 2n rows is needed to prove the equivalence of two compound
propositions in n variables.Because 2n grows extremely rapidly as n increases, the
use of truth tables to establishe quivalences becomes impractical as the number of
variables grows.
Using De Morgan’s Laws

The equivalence ¬(p q) ≡ ¬p ¬q tells us that the negation of a disjunction is


formed by taking the conjunction of the negations of the component propositions.

Similarly, the equivalence ¬(p q) ≡ ¬p ¬q tells us that the negation of a


conjunction is formed by taking the disjunction of the negations of the component
propositions.

Example 5 illustrates the use of De Morgan’s laws.


Using De Morgan’s Laws

Example 5: Use De Morgan’s laws to express the negations of “Miguel has a


cellphone and he has a laptop computer” and “Heather will go to the concert or Steve
will go to the concert.”
Solution:
•Let p be “Miguel has a cellphone” and q be “Miguel has a laptop computer.” Then
Assessment “Miguel has a cellphone and he has a laptop computer” can be
represented by p q. By the first of De Morgan’s laws, ¬(p q) is equivalent to ¬p
¬q. Consequently, we can express the negation of our original statement as
“Miguel does not have a cellphone or he does not have a laptop computer.”
Using De Morgan’s Laws

Example 5: Use De Morgan’s laws to express the negations of “Miguel has a


cellphone and he has a laptop computer” and “Heather will go to the concert or Steve
will go to the concert.”

Solution:
•Let r be “Heather will go to the concert” and s be “Steve will go to the concert.”
Then “Heather will go to the concert or Steve will go to the concert” can be
represented by r s. By the second of De Morgan’s laws, ¬(r s) is equivalent to ¬r
¬s. Consequently, we can express the negation of our original statement as
“Heather will not go to the concert and Steve will not go to the concert.”
3
New Logical Equivalences
Constructing New Logical Equivalences

The logical equivalences in Table 6, as well as any others that have been established
(such as those shown in Tables 7 and 8), can be used to construct additional logical
equivalences.

The reason for this is that a proposition in a compound proposition can be replaced
by a compound proposition that is logically equivalent to it without changing the
truth value of the original compound proposition.
Constructing New Logical Equivalences

Example 6: Show that ¬(p (¬p q)) and ¬p ¬q are logically equivalent by
developing a series of logical equivalences.

Solution:
•We will use one of the equivalences in Table 6 at a time, starting with ¬(p (¬p
q)) and ending with ¬p ¬q. (Note: we could also easily establish this equivalence
using a truth table.) We have the following equivalences:
Constructing New Logical Equivalences

Exersice 1: Show that ¬(p (¬p q)) and ¬p ¬q are logically equivalent by
developing a series of logicalequivalences.

Solution:
Constructing New Logical Equivalences

Exercise 2: Show that (p q) → (p q) is a tautology


Solution:
(p q) → (p q)
≡ ¬(p q) (p q)
≡(¬p ¬q) (p q)
≡ ¬p ¬q p q
≡ ¬p p ¬q q
≡T
4
Normal form
Normal form

Definition:
Suppose that a truth table in n propositional variables is specified. Show that a
compound proposition with this truth table can be formed by taking the disjunction
of conjunctions of the variables or their negations, with one conjunction included
for each combination of values for which the compound proposition is true. The
resulting
compound proposition is said to be in disjunctive normal form.

disjunctive normal form: ( ) ( )...... ( )

conjunctions of the variables or their negations,each


proposition variable pi or ¬pi appears in i-the position
p1 p2 p3 .......pn ¬p1 p2 p3 .......pn
Normal form

n=2: how many conjunction terms


disjunctive normal form: ( ) ( )...... ( )

conjunctions of the variables or their negations,each


proposition variable pi or ¬pi appears in i-the position
p1 p2 p3 .......pn ¬p1 p2 p3 .......pn
conjunctions of the variables or their
negations
form assignment code
for truth
pq 0 0 m0
pq 0 1 m1
pq 1 0 m2
pq 1 1 m3
Normal form

Theorem:
Each compound proposition has a disjunctive normal form.
Example 1:
The normal form of (pq)q
(pq)q
 (pq)q
 pqq
0 disjunctive normal form
Normal form

Theorem:
Each compound proposition has a disjunctive normal form.
Example 2:
The normal form of (pq)p

(pq)p
 (pq)p
 p(pq)
 (pT)(pq)
 (p(qq))(pq)
 (pq)(pq)(pq) (pq)(pq)
 m0  m1
Normal form

Theorem:
Each compound proposition has a disjunctive normal form.
Example 3:
The normal form of (pq)(qp)

(pq)(qp)
 (pq)(qp)
 (pq)(qp)
 (pq)(pq)(pq)(pq)
 m2  m1  m3  m0
 m0  m1  m2  m3
Normal form

Theorem:
Each compound proposition has a disjunctive normal form.
Exercises 1:
The normal form of (pq)r conjunctions of the variables or their negations
form truth code
assignment
(pq)r p q r 0 0 0 m0
 (pq)r p q  r 0 0 1 m1
p q  r 0 1 0 m2
 (pq(rr))((pp)r) p q  r 0 1 1 m3
 (pqr)(pqr)(p(qq)r) p q r 1 0 0 m4
(p(qq)r) p q  r 1 0 1 m5
p q  r 1 1 0 m6
(pqr)(pqr)(pqr)(pq p q  r 1 1 1 m7
r)(pqr) (pqr)
 m0m1m3 m5m7
Normal form

Theorem:
Each compound proposition has a disjunctive normal form.
 reason:

(1) eliminate,  in A(if exist) (3) using distributive laws


ABAB A(BC)(AB)(AC)---conjunction
AB(AB)(AB) A(BC) (AB)(AC)---disjunction
(2) shif inward or eliminate 
 A A
(AB)AB
(AB)AB
Normal form

Definition:
Suppose that a truth table in n propositional variables is specified. Show that a
compound proposition with this truth table can be formed by taking the conjunction
of disjunctions of the variables or their negations, with one disjunction included for
each combination of values for which the compound proposition is false. The
resulting
compound proposition is said to be in conjunctive normal form.

conjunctive normal form: ( ) ( )...... ( )

disjunctions of the variables or their negations,each


proposition variable pi or ¬pi appears in i-the position
p1 p2 p3 .......pn ¬p1 p2 p3 .......pn
Normal form

n=2: how many disjunction terms


disjunctive normal form: ( ) ( )...... ( )
disjunctions of the variables or their negations,each proposition variable pi or ¬pi
appears in i-the position
p1 p2 p3 .......pn ¬p1 p2 p3 .......pn

disjunctions of the variables or their negations


form assignment for false code
pq 0 0 M0
pq 0 1 M1
pq 1 0 M2
pq 1 1 M3
Normal form

n=3: how many disjunction terms


disjunctive normal form: ( ) ( )...... ( )
disjunctions of the variables or their negations,each proposition variable pi or ¬pi
appears in i-the position
p1 p2 p3 .......pn ¬p1 p2 p3 .......pn
disjunctions of the variables or their negations
form false assignment code
pqr 0 0 0 M0
p  q  r 0 0 1 M1
p  q  r 0 1 0 M2
p  q r 0 1 1 M3
p  q  r 1 0 0 M4
p  q  r 1 0 1 M5
p  q  r 1 1 0 M6
p  q r 1 1 1 M7
Normal form application
The lights in the room are controlled by two switches, either of which is required
to turn the lights on or off. Try to design a circuit like this.

x, y: the status of the switch, F: the status of the lamp,


on is 1, off is 0. x y F(x,y)
Let the light be on when both switches are 0. 0 0 1
F(x,y) = m0 m3 = (x y) (x y) 0 1 0
1 0 0
x x y 1 1 1
y (x y) (x y)

x
y x y
4
Satisfiability
Satisfiability

A compound proposition is satisfiable if there is an assignment of truth values to its


variables that makes it true (that is, when it is a tautology or a contingency).
When no such assignments exists, that is, 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.
Satisfiability

When we find a particular assignment of truth values that makes a compound


proposition true, we have shown that it is satisfiable; such an assignment is called a
solution of this particular satisfiability problem.
Satisfiability

Example 7: Determine whether each of the compound propositions


(p ¬q) (q ¬r) (r ¬p),
(p q r) (¬p ¬q ¬r), and
(p ¬q) (q ¬r) (r ¬p) (p q r) (¬p ¬q ¬r) is satisfiable.
Solution:
•Instead of using a truth table to solve this problem, we will reason about truth
values.
•Note that (p ¬q) (q ¬r) (r ¬p) is true when the three variables p, q, and r
have the same truth value. Hence, it is satisfiable as there is at least one assignment
of truth values for p, q, and r that makes it true.The second empathy.
Satisfiability

Solution:
•Instead of using a truth table to solve this problem, we will reason about truth
values.
•Note that (p ¬q) (q ¬r) (r ¬p) is true when the three variables p, q, and r
have the same truth value. Hence, it is satisfiable as there is at least one assignment
of truth values for p, q, and r that makes it true.The second empathy.
•Finally, note that for (p ¬q) (q ¬r) (r ¬p) (p q r) (¬p ¬q ¬r) to
be true, (p ¬q) (q ¬r) (r ¬p) and (p q r) (¬p ¬q ¬r) must both be
true. For the first to be true, the three variables must have the same truth values, and
for the sec_x0002_ond to be true, at least one of the three variables must be true and
at least one must be false. However, these conditions are contradictory.
Applications of Satisfiability

Many problems, in diverse areas such as robotics, software testing, artificial


intelligence, computer-aided design, machine vision, integrated circuit design,
scheduling, computer networking, and genetics, can be modeled in terms of
propositional satisfiability.

Although most applications are quite complex and beyond the scope of our class.In
this section, two puzzles are chosen: the n-queens problem and Sudoku. If you are
interested, please read Section 1.3.6 of the book Discrete Mathematics and Its
Applications.
Solving Satisfiability Problems

A truth table can be used to determine whether a compound proposition is satisfiable,


or equivalently, whether its negation is a tautology. This can be done by hand for a
compound proposition with a small number of variables, but when the number of
variables grows, this becomes impractical.

For instance, there are 220 = 1,048,576 rows in the truth table for a compound
proposition with 20 variables. Thus, you need a computer to help you determine, in
this way, whether a compound proposition in 20 variables is satisfiable.
5
Exercises
Homwork 四

2. Determine whether (¬q (p → q)) → ¬p is a tautology


3. Show the following propostions are logically equivalent
• (p → q) (p → r) and p → (q r)
• ¬p → (q → r) and q → (p r)
Homwork 五

4.the disjunction normal form of the following propositions


• (pq)r
• (p  q)(r  q)

You might also like