CSI 2101 Discrete Structures
Winter 2012
Prof. Lucia Moura
University of Ottawa
Homework Assignment #1
(100 points, weight 5%)
Due: Thursday Feb 9, at 1:00 p.m. (in lecture);
assignments with lateness between 1min-24hs will have a discount of 10%; after 24hs, not accepted;
please drop off late assignments under my office door (STE5027).
Propositional Logic
1. (12 points) Use logical equivalences to show that [(
p
∨
q
)
∧
(
p
→
r
)
∧
(
q
→
r
)]
→
r
is a tautology.
It is sufficient to show that if we assume the premise (
p
∨
q
)
∧
(
p
→
r
)
∧
(
q
→
r
), then
we can derive the conclusion
r
. Here is such an argument:
1.
p
∨
q
Simplification
2.
p
→
r
≡ ¬
p
∨
r
Simplification
3.
q
→
r
≡ ¬
q
∨
r
Simplification
4.
q
∨
r
Resolution (1) and (2)
5.
r
∨
r
≡
r
Resolution (3) and (4)
Thus, the statement is a tautology.
2. (12 points; each 2+2+2 points=truth table+DNF+CNF)
For each of the following compound propositions give its truth table and derive an
equivalent compound proposition in disjunctive normal formal (DNF) and in conjunc-
tive normal form (CNF).
(a) (
p
→
q
)
→
r
We write out the truth table:
p
q
r
p
→
q
(
p
→
q
)
→
r
T
T
T
T
T
T
T
F
T
F
T
F
T
F
T
T
F
F
F
T
F
T
T
T
T
F
T
F
T
F
F
F
T
T
T
F
F
F
T
F
1

** Subscribe** to view the full document.

To get disjunctive normal form, we take the conjunction of the values for
p
,
q
, and
r
for each row where the final evaluation is T, and then take their disjunction:
(
p
∧
q
∧
r
)
∨
(
p
∧ ¬
q
∧
r
)
∨
(
p
∧ ¬
q
∧ ¬
r
)
∨
(
¬
p
∧
q
∧
r
)
∨
(
¬
p
∧ ¬
q
∧
r
)
To get conjunctive normal form, we take the conjunction of the values for
p
,
q
,
and
r
for each row where the final evaluation is F, and then take their disjunction:
(
p
∧
q
∧ ¬
r
)
∨
(
¬
p
∧
q
∧ ¬
r
)
∨
(
¬
p
∧ ¬
q
∧ ¬
r
)
Now we take the negation of this entire expression, and repeatedly using DeMor-
gan’s, we derive:
(
¬
p
∨ ¬
q
∨
r
)
∧
(
p
∨ ¬
q
∨
r
)
∧
(
p
∨
q
∨
r
)
(b) (
p
∧ ¬
q
)
∨
(
p
↔
r
)
We write out the truth table:
p
q
r
p
∧ ¬
qq
p
↔
r
(
p
∧ ¬
q
)
∨
(
p
↔
r
)
T
T
T
F
T
T
T
T
F
F
F
F
T
F
T
T
T
T
T
F
F
T
F
T
F
T
T
F
F
F
F
T
F
F
T
T
F
F
T
F
F
F
F
F
F
F
T
T
To get disjunctive normal form, we take the conjunction of the values for
p
,
q
, and
r
for each row where the final evaluation is T, and then take their disjunction:
(
p
∧
q
∧
r
)
∨
(
p
∧ ¬
q
∧
r
)
∨
(
p
∧ ¬
q
∧ ¬
r
)
∨
(
¬
p
∧
q
∧ ¬
r
)
∨
(
¬
p
∧ ¬
q
∧ ¬
r
)
To get conjunctive normal form, we take the conjunction of the values for
p
,
q
,
and
r
for each row where the final evaluation is F, and then take their disjunction:
(
p
∧
q
∧ ¬
r
)
∨
(
¬
p
∧
q
∧
r
)
∨
(
¬
p
∧ ¬
q
∧
r
)
Now we take the negation of this entire expression, and repeatedly using DeMor-
gan’s, we derive:
(
¬
p
∨ ¬
q
∨
r
)
∧
(
p
∨ ¬
q
∨ ¬
r
)
∧
(
p
∨
q
∨ ¬
r
)
2

Predicate Logic
3. (15 points) For each of the given statements:
1 - Express each of the statements using quantifiers and propositional functions.

** Subscribe** to view the full document.

- Winter '11
- TBA