CS123
Spring 2010
Solution to Homework 4
Problem 1 (25 points)
Let (
B,
+
,
•
,
0
,
0
,
1) be a Boolean algebra. Deﬁne the following operations
⊕
and
⊗
:
x
⊕
y
=
xy
0
+
x
0
y
,
and
x
⊗
y
= (
x
+
y
)
0
.
a) Prove that
x
⊕
y
= (
x
+
y
)(
x
0
+
y
0
)
Solution
:
(
x
+
y
)(
x
0
+
y
0
) =
xx
0
+
xy
0
+
yx
0
+
yy
0
by distributive laws
= 0 +
xy
0
+
x
0
y
+ 0
by zero property and commutative laws
=
xy
0
+
x
0
y
by identity laws
=
x
⊕
y
by deﬁnition of operation
⊕
b) Evaluate
x
⊕
x
,
x
⊕
1,
x
⊕
0,
x
⊗
1, and
x
⊗
0, all in terms of
x,
0
,
1 and
0
.
Solution
:
x
⊕
x
=
xx
0
+
x
0
x
=
xx
0
+
xx
0
= 0 + 0 = 0
x
⊕
1 =
x
·
1
0
+
x
0
·
1 =
x
·
0 +
x
0
= 0 +
x
0
=
x
0
x
⊕
0 =
x
·
0
0
+
x
0
·
0 =
x
·
1 + 0 =
x
+ 0 =
x
x
⊗
1 = (
x
+ 1)
0
= 1
0
= 0
x
⊗
0 = (
x
+ 0)
0
=
x
0
c) Express
xy
using the operation
⊗
but without using +
,
•
,
⊕
, or
0
.
Solution
:
xy
= (
x
0
)
0
·
(
y
0
)
0
by law of the double complement
= (
x
0
+
y
0
)
0
by De Morgan’s laws
=
x
0
⊗
y
0
by deﬁnition of the operation
⊗
= (
x
⊗
0)
⊗
(
y
⊗
0)
by the property shown in b)
Note:
x
⊗
x
= (
x
+
x
)
0
=
x
0
, so answer as (
x
⊗
x
)
⊗
(
y
⊗
y
) is also correct.
d) Express
x
+
y
using the operation
⊗
but without using +
,
•
,
⊕
, or
0
.
Solution
:
x
+
y
= ((
x
+
y
)
0
)
0
= (
x
⊗
y
)
0
= (
x
⊗
y
)
⊗
0 ,or (
x
⊗
y
)
⊗
(
x
⊗
y
)
Problem 2 (20 points)
a) Suppose that there is a panel of 3 judges for some game, and that after each player completes
his/her presentation, each judge enters his/her vote of yes or no (yes = 1, no= 0) into a machine.
The machine tallies the votes and returns 1 (that is, “pass”) if at least two judges vote yes.
Otherwise, the machine returns 0 (for “fail”). Express the working of the machine as a Boolean
function of three variables (the 3 judges’ votes).
Solution
: Let
f
(
x,y,z
) be the Boolean function deﬁning the working of the machine. The values
of this function are displayed in the following table:
1