Lecture 3-1
Lecture 3-1
3 Laws of Logic
SIMPLIFYING A STATEMENT:
“You will get an A if you are hardworking and the sun shines, or you are hardworking
and it rains.” Rephrase the condition more simply.
Solution:
Let p = “You are hardworking’
q = “The sun shines”
r = “It rains” .
The condition is (p ∧ q) ∨ (p ∧ r)
Using distributive law in reverse,
(p ∧ q) ∨ (p ∧ r) ≡ p ∧ (q ∨ r)
EXERCISE:
Use Logical Equivalence to rewrite each of the following sentences more simply.
CONDITIONAL STATEMENTS:
Introduction
Consider the statement:
"If you earn an A in Math, then I'll buy you a computer."
This statement is made up of two simpler statements:
p: "You earn an A in Math"
q: "I will buy you a computer."
TRUTH TABLE:
p q p→q
T T T
T F F
F T T
F F T
EXERCISE:
Write the following statements in the form “if p, then q” in English.
a) Your guarantee is good only if you bought your CD less than 90 days ago.
If your guarantee is good, then you must have bought your CD player less
than 90 days ago.
b) To get tenure as a professor, it is sufficient to be world-famous.
If you are world-famous, then you will get tenure as a professor.
c) That you get the job implies that you have the best credentials.
If you get the job, then you have the best credentials.
d) It is necessary to walk 8 miles to get to the top of the Peak.
If you get to the top of the peak, then you must have walked 8 miles.
2. You do every exercise in this book; You get an A on the final, implies,
you get an A in the class.
SOLUTION p q r
3. Getting an A on the final and doing every exercise in this book is sufficient
For getting an A in this class.
SOLUTION p q r
2. ~q r
If you don’t miss the final exam, you will pass the course.
3. ~p ~q r
If you neither have flu nor miss the final exam, then you will pass the course.
HIERARCHY OF OPERATIONS
FOR LOGICAL CONNECTIVES
•~ (negation)
• ∧ (conjunction), ∨ (disjunction)
• → (conditional)
p q ~ ~p p ∨ ~q p ~q ~p
q
T T F F T F
T F T F T F
F T F T F T
F F T T T T
p q ~q ~p p→q ~q → ~p
T T F F T T
T F T F F F
F T F T T T
F F T T T T
IMPLICATION LAW
p q ~p q
p q p→q ~p ~p∨q
T T T F T
T F F F F
F T T T T
F F T T T
Thus the negation of “if p then q” is logically equivalent to “p and not q”.
Accordingly, the negation of an if-then statement does not start with the word if.
EXAMPLES
p q p→q ~p ~q ~p →~q
T T T F F T
T F F F T T
F T T T F F
F F T T T T
A conditional and its converse are not equivalent. i.e., is not a commutative operator.
p q p→q q→p
T T T T
T F F T
F T T F
F F T T
EXERCISE:
1. Show that p→q ≡ ~ q → ~ p ( Use the truth table. )
2. Show that q→ p ≡ ~ p → ~ q ( Use the truth table. )