CS 341
Homework 1
Answers
1) Prove each of the following:
a)
((
A
∧
B
)
→
C
)
↔
(
¬
A
∨
¬
B
∨
C
).
((
A
∧
B
)
→
C
)
↔
(
¬
A
∨
¬
B
∨
C
)
≡
(
¬
(
A
∧
B
)
∨
C
)
↔
(
¬
A
∨
¬
B
∨
C
)
Definition of
→
((
¬
A
∨
¬
B
)
∨
C
)
↔
(
¬
A
∨
¬
B
∨
C
)
de Morgan’s Law
(
¬
A
∨
¬
B
∨
C
)
↔
(
¬
A
∨
¬
B
∨
C
)
Associativity of
∨
True
Definition of
↔
b)
(
A
∧
¬
B
∧
¬
C
)
→
(
A
∨
¬
(
B
∧
C
)).
(
A
∧
¬
B
∧
¬
C
)
→
(
A
∨
¬
(
B
∧
C
))
≡
¬
(
A
∧
¬
B
∧
¬
C
)
∨
(
A
∨
¬
(
B
∧
C
)) Definition of
→
¬
A
∨
B
∨
C
∨
(
A
∨
¬
(
B
∧
C
))
de Morgan’s Law
¬
A
∨
B
∨
C
∨
A
∨
¬
(
B
∧
C
)
Associativity of
∨
¬
A
∨
B
∨
C
∨
A
∨
¬
B
∨
¬
C
de Morgan’s Law
¬
A
∨
A
∨
B
¬
B
∨
C
∨
¬
C
Commutativity of
∨
(
¬
A
∨
A
)
∨
(
B
¬
B
)
∨
(
C
∨
¬
C
)
Associativity of
∨
True
∨
True
∨
True
Definition of
∨
True
Definition of
∨
2) List the elements of each of the following sets:
a)
P
({apple, pear, banana}).
∅
, {apple}, {pear}, {banana}, {apple, pear}, {apple, banana}, {pear, banana}, {apple, pear,banana}
b)
P
({
a
,
b
}) -
P
({
a
,
c
}).
{
b
}, {
a
,
b
}
c)
P
(
∅
).
∅
d)
{
a
,
b
}
×
{1, 2, 3}
×
∅
.
∅
e)
{
x
∈
ℕ
: (
x
≤
7
∧
x
≥
7}.
7
f)
{
x
∈
ℕ
:
5
y
∈
ℕ
(
y
< 10
∧
(
y
+ 2 =
x
))} (where
ℕ
is the set of nonnegative integers).
2, 3, 4, 5, 6, 7, 8, 9, 10, 11
g)
{
x
∈
ℕ
:
5
y
∈
ℕ
(
5
z
∈
ℕ
((
x
=
y
+
z
)
∧
(
y
< 5)
∧
(
z
< 4)))}.
0, 1, 2, 3, 4, 5, 6, 7
3) Prove each of the following:
a)
A
∪
(
B
∩
C
∩
D
) = (
A
∪
B
)
∩
(
A
∪
D
)
∩
(
A
∪
C
).
A
∪
(
B
∩
C
∩
D
) = (
A
∪
B
)
∩
(
A
∪
D
)
∩
(
A
∪
C
).
Set union distributes over set intersection.