Discrete-Structures-2-Module-2 2
Discrete-Structures-2-Module-2 2
City of Olongapo
GORDON COLLEGE
Olongapo City Sports Complex, East Tapinac, Olongapo City
Tel. No. (047) 224-2089 loc. 314
www.gordoncollege.edu.ph
DISCRETE STRUCTURES 2
Title: PROPOSITIONAL EQUIVALENCES Module No. 2
I. 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. Note that we will use the
term “compound proposition” to refer to an expression formed from propositional
variables using logical operators, such as p ∧ q.
EXAMPLE 1
We can construct examples of tautologies and contradictions using one propositional
variable. Consider the truth tables of p ∨ ¬p and p ∧ ¬p shown below. Because p ∨ ¬p
is always true, it is a tautology. Because p ∧ ¬p is always false, it is a contradiction.
p ¬p p ∨ ¬p p ∧ ¬p
T F T F
F T T F
B. 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.
One way to determine whether two compound propositions are equivalent is to use a
truth table. In particular, the compound propositions p and q are equivalent if and
only if the columns giving their truth values agree. 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, named
after the English mathematician Augustus De Morgan, of the mid-nineteenth century.
¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q
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.
Because the truth values of the compound propositions ¬(p ∨ q) and ¬p ∧ ¬q agree
for all possible combinations of the truth values of p and q, it follows that ¬(p ∨ q) ↔
(¬p ∧ ¬q) is a tautology and that these compound propositions are logically
equivalent.
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
EXAMPLE 3
Show that p → q and ¬p ∨ q are logically equivalent.
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.
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
T T T T T T T T
T T F F T T T T
T F T F T T T T
T 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
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.
Because the truth values of p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) agree, these compound
propositions are logically equivalent.
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 ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p
p ∨ ¬p ≡ T Negation laws
p ∧ ¬p ≡ F
The associative law for disjunction shows that the expression p ∨ q ∨ r is well defined,
in the sense that it does not matter whether we first take the disjunction of p with q
and then the disjunction of p ∨ q with r, or if we first take the disjunction of q and r
and then take the disjunction of p with q ∨ r. Similarly, the expression p ∧ q ∧ r is well
and
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
p ↔ q ≡ (p → q) ∧ (q → p)
p ↔ q ≡ ¬p ↔ ¬ q
p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
¬(p → q) ≡ p ∧ ¬q
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 “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.”
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.”
EXAMPLE 6
Show that ¬(p → q) and p ∧ ¬q are logically equivalent.
Solution: We could use a truth table to show that these compound propositions are
equivalent (similar to what we did in Example 4). Indeed, it would not be hard to do
so. However, we want to illustrate how to use logical identities that we already know
to establish new logical identities, something that is of practical importance for
establishing equivalences of compound propositions with a large number of variables.
So, we will establish this equivalence by developing a series of logical equivalences,
using one of the equivalences in Table 6 at a time, starting with ¬(p → q) and ending
with p ∧ ¬q. We have the following equivalences.
EXAMPLE 7
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.
EXAMPLE 8
Show that (p ∧ q) → (p ∨ q) is a tautology.
Solution: To show that this statement is a tautology, we will use logical equivalences
to demonstrate that it is logically equivalent to T. (Note: This could also be done using
a truth table.)
(p ∧ q) → (p ∨ q) ≡ ¬(p ∧ q) ∨ (p ∨ q) by Example 3
≡ (¬p ∨ ¬q) ∨ (p ∨ q) by the first De Morgan law
≡ (¬p ∨ p) ∨ (¬q ∨ q) by the associative and commutative
laws for disjunction
≡T∨T by Example 1 and the commutative
law for disjunction
≡T by the domination law
For instance, there are 220 = 1,048,576 rows in the truth value table for a compound
proposition with 20 variables. Clearly, you need a computer to help you determine, in
this way, whether a compound proposition in 20 variables is a tautology. But when
there are 1000 variables, can even a computer determine in a reasonable amount of
time whether a compound proposition is a tautology? Checking every one of the 21000
(a number with more than 300 decimal digits) possible combinations of truth values
simply cannot be done by a computer in even trillions of years.
We will study questions such as this in the next modules, when we study the
complexity of algorithms.
E. PROPOSITIONAL SATISFIABILITY
A compound proposition is satisfiable if there is an assignment of truth values to its
variables that makes it true. 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.
EXAMPLE 9
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 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 variable 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. Similarly, note that (p ∨ q
∨ r) ∧ (¬p ∨ ¬q ∨ ¬r) is true when at least one of p, q, and r is true and at least one is
false. Hence, (p ∨ q ∨ r) ∧ (¬p ∨ ¬q ∨ ¬r) is satisfiable, as there is at least one
assignment of truth values for p, q, and r that makes it true.
F. APPICATIONS OF SATISFIABILITY
Many problems, in diverse areas such as robotics, software testing, artificial
intelligence planning, 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, we can
illustrate how two puzzles can be modeled as satisfiability problems.
V. LEARNING TASKS
EXERCISES:
1. Use truth tables to verify these equivalences.
a. p ∧ T ≡ p
b. p ∨ F ≡ p
c. p ∧ F ≡ F
d. p ∨ T ≡ T
e. p ∨ p ≡ p
f. p ∧ p ≡ p
4. Show that each of these conditional statements is a tautology by using truth tables.
a. p → (p ∨ q)
b. (p ∧ q) → (p → q)
c. ¬(p → q) → ¬q
5. Show that ¬(p ∨ ¬(p ∧ q)) is a contradiction without using a truth table.
RUBRIC:
3 2 1 0
VI. REFERENCE
Rosen, K. H. (2018). Discrete Mathematics and Its Applications, Eighth Edition.
McGraw-Hill.