Week 2
Week 2
LAWS OF LOGIC
Solution:
p [~(~p q)] p [~(~p) (~q)] DeMorgan’s Law
p [p(~q)] Double Negative Law
[p p](~q) Associative Law for
p (~q) Indempotent Law
Which is the simplified statement form.
EXAMPLE
~ (~ p q) (p q) p
SOLUTION
Consider
~(~p q) (pq)
(~(~p) ~q) (p q) DeMorgan’s Law
(p ~q) (pq) Double Negative Law
p (~q q) Distributive Law
pc Negation Law
p Identity Law
Hence the logical equivalence has been shown. 2
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," and
q: "I will buy you a computer."
The original statement is then saying :
if p is true, then q is true, or, more simply, if p, then q.
We can also phrase this as p implies q, and we write p q.
EXPLANATION
p q pq
T T T
T F F
F T T
F F T
4
PRACTICE WITH CONDITIONAL STATEMENTS
• “if p then q”
• “p implies q”
• “if p, q”
• “p only if q”
• “p is sufficient for q”
• “not p unless q”
• “q follows from p”
• “q if p”
• “q whenever p”
• “q is necessary for p”
5
TRANSLATING ENGLISH SENTENCES TO SYMBOLS
6
1. To get an A in this class it is necessary for you to get an A on the
final.
SOLUTION pr
2. You do every exercise in this book; You get an A on the final, implies,
you get an A in the class.
SOLUTION pqr
1. ~(negation)
2. (conjunction), (disjunction)
3. (conditional)
EXAMPLE
p q ~q ~p p ~q p~q~p
T T F F T F
T F T F T F
F T F T F T
F F T T T T
In the above table we use the hierarchy of operations to complete the truth
table.
That’s why we have column for ~q and then for ~p after the columns of p
and q then we have the column for p ~q because order of operation as
given below and at the end we have column for the statement form which
involve implication that is p ~ q ~ p.
8
EXAMPLE
p q ~q ~p pq ~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
9
IMPLICATION LAW
pq ~pq
p q pq ~p ~pq
T T T F T
T F F F F
F T T T T
F F T T T
In the above table as you note that the entries in the third and last
columns are same so these statement forms are logically equivalent.
This is very important logical equivalence shows that the implication
can be replaced by using ~ and .
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.
You should see yourself that the Negation of implication and implication
are not Logically equivalent.
10
EXAMPLES
p q pq ~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
11
WRITING INVERSE
p q pq qp
T T T T
T F F T
F T T F
F F T T
Now since the entries in the last two columns are not same so the
corresponding statement forms are not logically equivalent. That is
conditional statement and its converse are not logically equivalent
12
WRITING CONVERSE
p q pq ~q~p
T T T T
T F F F
F T T T
F F T T
Note that the entries in the last two columns are same .Hence the
corresponding statement forms are logically equivalent. Also note that in the
above table we did not made the columns for ~ q and ~ p. But you should
made these columns also.
13
WRITING CONTRAPOSITIVE
14
CONVERSE, INVERSE, AND CONTRAPOSITIVE
Implication: pq
Inverse: ~p ~q
Converse: qp
Contrapositive: ~q ~p
NOTE
1. An implication is logically equivalent to it’s contrapositive.
2. The converse and inverse of an implication are logically equivalent.
3. An implication is not equivalent to it’s converse.
We have already seen that pq is not the same as q p. It may
happen, however, that both p q and q p are true. For example, if p=
“1+1= 2" and q=“2+2 = 4," then p q and q p are both true because p
and q are both true.
Similarly, if p= “1+1= 3" and q=“2+2 = 5," then p q and q p are both
true because p and q are both false.
EXAMPLE
TRUTH TABLE
p q p q
T T T
T F F
F T F
F F T
From the Truth Table of pq it is quite clear that pq have F where both
p and q have different values and where both p and q have the same values
we have T in the column of pq. That is biconditional is true when p and q
have same truth value.
16
EXAMPLES
True or false?
1. “1+1 = 3 if and only if earth is flat”
The above biconditional has truth value TRUE. Because The both the
statements have the same truth value, that is 1+1 = 3 is false as well as
earth is flat. So their biconditional is has Truth value True.
(Remember that biconditional is true when both statements have the
same truth values)
2. “Sky is blue iff 1 = 0”
The above biconditional has truth value FALSE because both
statements have different truth values. Sky is blue has truth value T
and 1 = 0 has truth value F.
3. “Milk is white iff birds lay eggs”
TRUE
4. “33 is divisible by 4 if and only if horse has four legs”
FALSE
5. “x > 5 iff x2 > 25”
FALSE
17
pq (pq)(qp)
REMARK
For the phrasing "p if and only if q,", remember that "p if q“ means qp
while "p only if q" means p q.
That’s why pq is logically equivalent to (pq)(qp) and
this also justifies the name of the operator as biconditional.
REPHRASING BICONDITIONAL
18
EXERCISE
3. If you read the news paper every day, you will be informed and
conversely.
Sol You will be informed if and only if you read the news paper every day.
4. It rains if it is a weekend day, and it is a weekend day if it rains.
Sol It rains if and only if it is a weekend day.
5. The train runs late on exactly those days when I take it.
Sol The train runs late if and only if it is a day I take the train.
6. This number is divisible by 6 precisely when it is divisible by both
2 and 3.
Sol This number is divisible by 6 if and only if it is divisible by both 2 and
3.
19
HIERARCHY OF OPERATIONS
FOR LOGICAL CONNECTIVES
1. ~(negation)
2. (conjunction), (disjunction)
3. (conditional), (biconditional)
In the next table we will use the hierarchy of operations
TRUTH TABLE FOR
p ~r qr
T F T F F T F
T F F T T F F
F T T F F T F
F T F T F T F
F F T F F T F
F F F T F F T
From the last column of the table we can easily see that (pq)(rq) is
not a Tautology.(Remember the definition of tautology, a statement is
tautology if it has only its Truth values as “True” regardless the values of its
constituents statements.) 20
LOGICAL EQUIVALENCE
INVOLVING BICONDITIONAL
p q ~p ~q ~pq p~q
T T F F F F
T F F T T T
F T T F T T
F F T T F F
EXERCISE
Now note that the entries in the last two columns are same hence the
corresponding statement forms are Logically equivalent.
21
EXAMPLE
ARGUMENT
P2 Premise
P3 Premise
. . . . .. . . . .
Pn Premise
______________
C Conclusion
NOTE The symbol read “therefore,” is normally placed just before the
conclusion.
But not always ,sometimes we use thus, so etc instead of therefore.
22
VALID AND INVALID ARGUMENT
An argument is valid if the conclusion is true when all the premises are true.
Alternatively, an argument is valid if conjunction of its premises imply
conclusion.
That is (P1 P2 P3 . . . Pn) C is a tautology.
An argument is invalid if the conclusion is false when all the premises are
true.
Alternatively, an argument is invalid if conjunction of its premises does not
imply conclusion.
REMARK:
A valid argument may have true premises and a true
conclusion, or false premises and a false conclusion, or false premises
and a true conclusion but it cannot have all true premises and yet a false
conclusion.
It is not part of logic to determine the truth or falsity of the premises
of arguments.
Arguments should never be described as true or false; and statements
should never be described as valid or invalid.
23
EXAMPLE
p q pq p q
T T T T T
T F F T F
F T T F T
F F T F F
Now first row is such that both the premises have truth value T and
hence that row is the critical row and the conclusion also have truth
value T so the argument is valid.
EXERCISE
Now in the above table first and third rows are critical because both of our
premises are true in these rows. But the argument is invalid because in the
third row our conclusion is false.
EXAMPLE
SOLUTION:
First of all note that in our argument there are three
statements are involved namely p , q and r , and we have three premises so
our table will have eight rows (means as there are 3 variables, so total no of
combinations are 8) and seven columns (note these seven columns does not
have the column for ~q). Now the truth table for the arguments and
conclusion is given below
25
p q r pq p~q pr r
T T T T F T T
T T F T F F F
T F T T T T T
T F F T T F F
F T T T T T T
F T F T T T F
F F T F T T T
F F F F T T F
In the above table we note that there are three critical rows and conclusion
It has truth value F against one critical row(which is 6th row) consequently our
argument is invalid.
WORD PROBLEM
If Tariq is not on team A, then Hameed is on team B.
If Hameed is not on team B, then Tariq is on team A.
Tariq is not on team A or Hameed is not on team B.
SOLUTION
Let
t = Tariq is on team A
h = Hameed is on team B
Then the argument is
~th
~ht 26
~t~h
t h ~t h ~h t ~t ~h
T T T T F
T F T T T
F T T T T
F F F F T
EXERCISE
28
EXERCISE
29