2. Proposition
A proposition is a statement that is either true or false,
but not both.
Atlanta was the site of the 1996 Summer Olympic
games.
1+1 = 2
3+1 = 5
What will my CS1050 grade be?
3. Definition 1. Negation of p
Let p be a proposition.
The statement “It is not
the case that p” is also a
proposition, called the
“negation of p” or ¬p
(read “not p”)
Table 1.
The Truth Table for the
Negation of a Proposition
p ¬p
T F
F T
p = The sky is blue.
Øp = It is not the case that
the sky is blue.
Øp = The sky is not blue.
4. Definition 2. Conjunction of p
and q
Let p and q be
propositions. The
proposition “p and q,”
denoted by pÙq is true
when both p and q are
true and is false
otherwise. This is
called the conjunction
of p and q.
Table 2. The Truth Table for
the Conjunction of two
propositions
p q pÙq
T T T
T F F
F T F
F F F
5. Definition 3. Disjunction of p and
q
Let p and q be
propositions. The
proposition “p or q,”
denoted by pÚq, is the
proposition that is false
when p and q are both
false and true otherwise.
Table 3. The Truth Table for
the Disjunction of two
propositions
p q pÚq
T T T
T F T
F T T
F F F
6. Definition 4. Exclusive or of p and
q
Let p and q be
propositions. The
exclusive or of p and q,
denoted by pÅq, is the
proposition that is true
when exactly one of p
and q is true and is false
otherwise.
Table 4. The Truth Table for
the Exclusive OR of two
propositions
p q pÅq
T T F
T F T
F T T
F F F
7. Definition 5. Implication p®q
Let p and q be propositions.
The implication p®q is the
proposition that is false when
p is true and q is false, and
true otherwise. In this
implication p is called the
hypothesis (or antecedent or
premise) and q is called the
conclusion (or consequence).
Table 5. The Truth Table for
the Implication of p®q.
p q p®q
T T T
T F F
F T T
F F T
8. Implications
If p, then q
p implies q
if p,q
p only if q
p is sufficient for q
q if p
q whenever p
q is necessary for p
Not the same as the if-then
construct used in
programming languages
such as If p then S
9. Implications
How can both p and q be false, and p®q be true?
•Think of p as a “contract” and q as its “obligation” that is
only carried out if the contract is valid.
•Example: “If you make more than $25,000, then you must
file a tax return.” This says nothing about someone who
makes less than $25,000. So the implication is true no
matter what someone making less than $25,000 does.
•Another example:
p: Bill Gates is poor.
q: Pigs can fly.
p®q is always true because Bill Gates is not poor. Another
way of saying the implication is
“Pigs can fly whenever Bill Gates is poor” which is true
since neither p nor q is true.
11. Definition 6. Biconditional
Let p and q be
propositions. The
biconditional p«q is the
proposition that is true
when p and q have the
same truth values and is
false otherwise. “p if and
only if q, p is necessary
and sufficient for q”
Table 6. The Truth Table for
the biconditional p«q.
p q p«q
T T T
T F F
F T F
F F T
12. Practice
p: You learn the simple things well.
q: The difficult things become easy.
You do not learn the
simple things well.
If you learn the simple
things well then the
difficult things become
easy.
If you do not learn the
simple things well, then
the difficult things will
not become easy.
The difficult things
become easy but you did
not learn the simple
things well.
You learn the simple
things well but the
difficult things did not
become easy.
Øp
p®
q
Øp ® Øq
q Ù Øp
p Ù Øq
13. Truth Table Puzzle Steve would like to determine the relative
salaries of three coworkers using two facts (all
salaries are distinct):
If Fred is not the highest paid of the three,
then Janice is.
If Janice is not the lowest paid, then Maggie is
paid the most.
Who is paid the most and who is paid the least?
14. p : Janice is paid the most.
q: Maggie is paid the most.
r: Fred is paid the most.
s: Janice is paid the least.
p q r s Ør®p Øs ®q (Ør®p)Ù
(Øs®q)
T F F F T F F
F T F T F T F
F F T T T T T
F T F F F T F
F F T F T F F
Fred, Maggie, Janice
•If Fred is not the highest paid
of the three, then Janice is.
•If Janice is not the lowest paid,
then Maggie is paid the most.
15. p : Janice is paid the most.
•If Fred is not the highest paid
q: Maggie is paid the most.
of the three, then Janice is.
r: Fred is paid the most.
•If Janice is the lowest paid,
then Maggie is paid the most.
s: Janice is paid the least.
p q r s Ør®p s ®q (Ør®p)Ù
(s®q)
T F F F T T T
F T F T F T F
F F T T T F F
F T F F F T F
F F T F T T T
Fred, Janice, Maggie or Janice, Maggie, Fred
or Janice, Fred, Maggie
16. A computer bit has two possible values: 0 (false) and 1
(true). A variable is called a Boolean variable is its value is
either true or false.
Bit operations correspond to the logical connectives:
Ú OR
Ù AND
Å XOR
Information can be represented by bit strings, which are
sequences of zeros and ones, and manipulated by
operations on the bit strings.
18. Logical Equivalence
An important technique in proofs is to replace a
statement with another statement that is “logically
equivalent.”
Tautology: compound proposition that is always true
regardless of the truth values of the propositions in it.
Contradiction: Compound proposition that is
always false regardless of the truth values of the
propositions in it.
19. Logically Equivalent
Compound propositions P and Q are logically
equivalent if P«Q is a tautology. In other words, P
and Q have the same truth values for all combinations
of truth values of simple propositions.
This is denoted: PÛQ (or by P Q)
º
20. Example: DeMorgans
Prove that Ø(pÚq) Û (Ø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
25. Prove that: p Ú (q Ù r) Û (p Ú q) Ù (p Ú r)
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 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
26. Prove: p«qÛ(p®q) Ù (q®p)
p q p«q p®q q®p (p®q)Ù(q®p)
T T T T T T
T F F F T F
F T F T F F
F F T T T T
We call this biconditional equivalence.
27. pÙT Û p; pÚF Û p Identity Laws
pÚT Û T; pÙF Û F Domination Laws
pÚp Û p; pÙp Û p Idempotent Laws
Ø(Øp) Û p Double Negation Law
pÚq Û qÚp; pÙq Û qÙp Commutative Laws
(pÚq)Ú r Û pÚ (qÚr); (pÙq) Ù r Û p Ù (qÙr)
Associative Laws
28. pÚ(qÙr) Û (pÚq)Ù(pÚr) Distribution Laws
pÙ(qÚr) Û (pÙq)Ú(pÙr)
Ø(pÚq)Û(Øp Ù Øq) De Morgan’s Laws
Ø(pÙq)Û(Øp Ú Øq)
Miscellaneous
p Ú Øp Û T Or Tautology
p Ù Øp Û F And Contradiction
(p®q) Û (Øp Ú q) Implication Equivalence
p«qÛ(p®q) Ù (q®p) Biconditional Equivalence