S71
Answers to OddNumbered Exercises S71
35. a)
'l:! 'lij
2
.~~:_~;t__ ~
i
15. Because Bk+l is formed from two copies of Bi, one shifted down one level, the height increases by I as k increases by I. Because Bo had height 0, it follows by induction that B, has heightk. 17. Because the root of'Rq., is the root oi B, with one additional child (namely the root of the other Bd, the degree of the root increases by I as k increases by I. Because Bo had a root with degree 0, it follows by induction that B; has a root with degree k.
19.
So
S
•
37. 6 39. a) 0 for 00, 11 forOI, 100 for 10,101 for II (exact coding depends on how ties were broken, but all versions are equivalent); O.645n for string oflength n b) 0 for 000, 100 for 001,101 for 010, 110 for 100, 11100 for 011, 11101 for 101, 11110 for 110, 11111 for III (exact coding depends on how ties were broken, but all versions are equivalent); 0.5326n for string of length n 41. Let G' be the graph obtained by deleting from G the vertex v and all edges incident to v. A minimum spanning tree of G can be obtained by taking an edge of minimal weight incident to v together with a minimum spanning tree of G'. 43. Suppose that edge e is the edge ofleast weight incident to vertex v, and suppose that T is a spanning tree that does not include e. Add e to T, and delete from the simple circuit formed thereby the other edge of the circuit that contains v. The result will be a spanning tree of strictly smaller weight (because the deleted edge has weight greater than the weight of e). This is a contradiction, so T must include e.
CHAPTER 11
21. Use mathematical induction. The result is trivial fork = O. Suppose it is true for k  I. Tkl is the parent tree for T. By induction, the child tree for T can be obtained from To, ... , Tk2 in the manner stated. The final connection of rk2 to rkl is as stated in the definition of Srtree. 23. procedure level(T: ordered rooted tree with root r) queue := sequence consisting of just the root r while queue contains at least one term
begin v := first vertex in queue
Section 11.1
1. a) I b) I c) 0 d) 0 3. a) (I . 1)+ (0· I 1+ (0 +0) = 1+ (I + 0) I + I = I =
t\
+ 0) =
b)(T
T) v HF
y z
A
T) v F) == T
5. a) x I
xy
b) x I
y
z I
x+yz I I
I
I
list v remove v from queue and put children of v onto the end of queue
end
I
I
25. Build the tree by inserting a root for the address 0, and then inserting a subtree for each vertex labeled i, for i a positive integer, built up from subtrees for each vertex labeled i.j for j a positive integer, and so on. 27. a) Yes b) No c) Yes 29. The resulting graph has no edge that is in more than one simple circuit of the type described. Hence, it is a cactus.
31. abc
I 0 0 0 0
c) x y
0 0 I I 0 0
z
I 0 I 0
I
0 I 0
0 0 0 0 I I 0 0
xy+xyz
I I
I
I I 0 0
I
0
I
I
I I
0 0 0 0
d) x
1 0 0
y
0 I 0 1 0
z x(yz
0 0 0
+ yZ)
1 0 0
I
:z
d e [
33.
1 1 1
I
1
I
1 0
I
0
I
1
I
0 0
I
0
I
1 1
I
0 0 0 0
1 0 0
0 1 0
1
I
1
1 1 0 0 0 0
1 1 0 0 1
I
1 0 1 0 1 0
I
0 0
0
0 0 0 0
S72
Answers to OddNumbered
Exercises
S72
25.
x y xElly x+y
I I 0 0 I 0 1 0 0 I 1 0 I I I 0
xy (xy) (x+y)(xy)
I 0 0 0 0 I I I 0 I I 0

xy xy xy+xy
0 I 0 0 0 0 I 0 0 I 1 0


<l,oo~'
ltj7011 000 001
~'""~'
lZj7011 000 001
9. (0, 0) and (I, I)
y)
= x(y + I) = x
.I
=x
11.x+xy=x·l+xy=x(l+
13.
x y z xy yz xz
I I I I 0 0 0 0 I I 0 0 I I 0 0 I 0 I 0 I 0 I 0 0 0 I I 0 0 0 0 0 I 0 0 0 I 0 0 0 0 0 0 I 0 I 0
xy+yz +xz
0 I I I I I I 0
xy yz xz
0 0 0 0 I I 0 0 0 0 I 0 0 0 I 0 0 I 0 I 0 0 0 0
xy+yz +xz
0 I I I I I I 0
15·x
x+x
0 I
X'x
0 I
17. x
x
+1
I
I
x· 0 0
0
o
I 19.
o
I
x y z y+z
I I I I 0 0 0 0 I I 0 0 I I 0 0 I 0 I 0 I 0 I 0 I I I 0 I I I 0
x+
(y +z) I I I I I I I 0
x+y
I I I I I I 0 0
(x+y) +z
I I I I I I I 0
yz x(yz) xy (xy)z
I 0 0 0 I 0 0 0 I 0 0 0 0 0 0 0 I I 0 0 0 0 0 0 I 0 0 0 0 0 0 0
27. a) True, as a table of values can show b) False; take = I, Y = I, z = I, for instance c) False; take x = 1, y = I, z = 0, for instance 29. By De Morgan's laws, the complement of an expression is like the dual except that the complementofeach variable has been taken. 31.16' 33. Ifwe replace each ObyF, IbyT, Boolean sum by v, Boolean product by A, and by~ (andx by p andy by q sothatthe variables look like they represent propositions, and the equals sign by the logical equivalence symbol), then xy = x + y becomes ~(p A q) '" ~p v ~q andx + y = xybecomes ~(p v q) '" ~p A ~q. 35. By the domination, distributive, and identity laws, x v x = (x v x) A I = (x v x) A (x V Xl = x v (x A x) = x v 0 = x. Similarly, x A x = (x AX) V 0 = (x A x)v(x AX) =X A (x vx) = X A I =X. 37. Because o v I = I and 0 A I = 0 by the identity and commutative laws, it follows that 0 = 1. Similarly, because I v 0 = I and I A 0 = I, it follows that T = O. 39. First, note that x A 0 = o and x v I = I for all x, as can easily be proved. To prove the first identity, it is sufficient to show that (x v y) v (x A y) = I and (x v y) A (x A y) = O. By the associative, commutative, distributive, domination, and identity laws, (x v y) v (x A )i)=y v[xv(x Ay)]=yV[(XVX)A(XVy)]=yV[1A (x v yl] = y v (x. v y) = (y v yl v x = I v x = I and (x v y)A(X Ay)=y A [x A(XVy)]=yA[(X AX)V(X Ay)] =y A [0 V (X A y)] = Y A (X A y) = X A (y A y) = X A 0 = O. The second identity is proved in a similar way. 41. Using the hypotheses, Exercise 35, and the distributive law it follows that x = x v 0 = x v (x v y) = (x v x) v y = x v y = O. Similarly, y = O. To prove the second statement, note that x = x A 1 = X A (x A y) = (x A x) A Y = x A Y = 1. Similarly, y = 1. 43. Use Exercises 39 and 41 in the Supplementary Exercises in Chapter 8 and the definition of a complemented, distributed lattice to establish the five pairs of laws in the definition.
x
Section 11.2
1. a) xyz b) xyz c) xyz d) xyz 3. a) xyz + xyz + xyz + xyz + xyz + xyz + xyz b) xyz + xyz + xyz c)xyz+xyz+xyz+xyz d)xyz+xyz 5.wxyz+ wxyz + wxyz + wxyz + wxyz + wxyz + wxyz + wxyz 7. a)x + y +z b)x + y+z c)x + y +z 9. Y1 + Y2 + ... + Yn = 0 if and only if Yi = 0 for i = I, 2, ... , n. This holds if and only if Xi = 0 when Yi = Xi and x, = 1 when y, =X;. 11. a)x + y+z b) (x + y+z) (x + y + Z)(x + y + z)(X + y + z)(x + y + z) c) (x + y + z)(x + y + Z)(x+y+z)(x+y+z) d)(x+y+z) ~+y+Z)~+y+~~+y+Z)(X+y+~(X+y+Z)
21.
x
I I 0 0
y
I 0 I 0
xy
I 0 0 0
(xy)
0 I I I
X 0 0 I I
Y
0 I 0 I
x+y
0 I I I
x+y
I I I 0

(x+y)
0 0 0 I
~ xy
0 0 0 I
23. 0 . il= 0 . I
= 0;
I .T
=
I .0
=0
S73
Answers to OddNumbered Exercises
S73
13. a) x d) [x 15. a) x
+ y + z b) x + [y + (x + z)] + (x + y + z)]
x 0 1 XY
I 0 0 0
c) (x
+ y)
9.
Xo Yo XI YI
X2
xlx
o
b) x I I 0 0 c) x I I 0 0
I
o
I
Y2
Y
I 0 I 0
xlx
0 0 I I
YlY
0 I 0 I
(x
1x) 1 (y
I 0 0 0
lY)
Xl
Y3
x4
Y4
Xj
Y5
Y
I 0 I 0
x+y 1
I I 0
(x 1y)
0 0 0 I
(x lY>l (x lY)
I I I 0 11.
x Y bi
X
HA = half adder FA = full adder
17. a) {[(x I x) I (y I y)] I [(x I x) I (y I y)]} I (z I z) b) {[(x Ix)l(zlz)]ly) I {[(x I x) I (z I z)]1 y) c)x d) [x I (y I y)]1 [x I (y I y)] 19.1t is impossible to represent x using + and . because there is no way to get the value o if the input is I.
Y b,
X
d
Y b,
Section 11.3
l.(x+y)y (X + y + z) 7. v
w
v W
X Y bi
+ (x + y + z)
3. (xy)+(z+x)
5. (x
+y
+z)+
x Y bi
X
Y bi X Y b, + l'ltY + vwz + vX)' + vxz + X Y
Y w
z
vwx x
b,
y
v x z y
13.
XI YI XI YI XI
z
w
x w
w
YI xyz Xo Yo
x
S74
Answers to OddNumbered
Exercises
S74
Section 11.4
1. a)
x +y
EE
y
Y
b)xyandxy
3. a) xy
fTl
y
y
y
r.:
~
d)
xE!ly
xCI]
~
rr
5. a)
yz,
xOJ xLI]
y
y
y:;:
17. X"~
Circuit from 15 (d)
Sum=xE!ly
b)
Circuit from 15 (c)
xyz, xyz, xyz
vz x
Carry=xy
7. a)
vz
yz
i
19. Co I.,..._
c,~
X3
I>L____/
Co 1>OI""'_ c,'~ X2 I>L____/
b)
(
}'Z
yz
yz
x, c, 1[>01.,"
Co 1:X>~ Xo I>L_./
Co I.,..._ c,r:X)~ Ioi_____/
1
1
S75
Answers to OddNumbered Exercises 875
yz
c) x x
yz
1
vz
52
1
15. a)
X1X4XS
X1:r4.xS X1X4rS
x1i4x'j
'\t4XS
x]x4iS
x3x4xS x1x4x"j
1
XIX2
1
1
1
x\x2
9. Implicants: xyz, xyz, x yz, xyz, xy, xz, yz; prime implicants: xy, xz, yz; essential prime implicants: xy, xz, yz
yz x 1
.tll2
.t\x2
yz
1
yz 1
yz
1
b)
11. The 3cube on the right corresponds to w; the 3cube given by the top surface of the whole figure represents x; the 3cube given by the back surface of the whole figure represents y; the 3cube given by the right surfaces of both the left and the right 3cube represents z. In each case, the opposite 3face represents the complemented literal. The 2cube that represents wz is the right face of the 3cube on the right; the 2cube that represents x y is bottom rear; the 2cube that represents y z is front left.
1 1
1 1
c)
1
1
1
1
1
1
1
1
13. a)
wx
yz
yz
yz
d)
wi
1 1
1 1
wx
wx
b)
1
1 1
1 1
wxyz, wxyz, wxyz, wxyz
S76
Answers to OddNumbered Exercises
S76
2
1 1
1 1
1 1
1 1
2
y~
2
z
~X>1",'"
x+L_/
1 1 1 1 1 1 1 1
2
t)
2
1 1
1 1
1 1
1
2
1
2
1 1
1 1
1 1
1 1
2
17. a) 64 b) 6 19. Rows 1 and 4 are considered adjacent. The pairs of columns considered adjacent are: columns 1 and 4,1 and 12, 1 and 16,2 and 11,2 and 15, 3 and 6,3 and 10,4 and 9, 5 and 8, 5 and 16,6 and 15, 7 and 10, 7 and 14, 8 and 13,9 and 12,11 and 14, 13 and 16.
31. XZ + xz 33. We use induction on n. If n = 1, then we are looking at a line segment, labeled 0 at one end and 1 at the other end. The only possible value of k is also 1, and if the literal is Xl, then the subcube we have is the Odimensional subcube consisting of the endpoint labeled 1, and if the literal is x j, then the subcube we have is the Odimensional subcube consisting of the endpoint labeled O. Now assume that the statement is true for n; we must show that it is true for n + I. If the literal Xn+ j (or its complement) is not part of the product, then by the inductive hypothesis, the product when viewed in the setting of n variables corresponds to an (n  k)dimensional subcube of the ndimensional cube, and the Cartesian product of that subcube with the line segment [0, I] gives us a subcube one dimension higher in our given (n + I)dimensional cube, namely having dimension (n + I)  k, as desired. On the other hand, if the literal Xn+j (or its complement) is part of the product, then the product of the remaining k  I literals corresponds to a subcube of dimension n  (k  I) = (n + I)  k in the ndimensional cube, and that slice, at either the Iend or the Oend in the last variable, is the desired subcube.
21. Smith Jones
Adams
=:?L
b) y c) XZ + XZ
Supplementary
Exercises
Bt;1;;r~
Marcus Adams Burton
1. a) X = 0, y = 0, z = 0; X = I, Y = I, z = I b) X = 0, y = 0, z = 0; x = 0, y = 0, z = I; x = 0, y = 1, z = 0; x = 1, y = 0, z = 1; x = 1, Y = 1, z = 0; x = 1, Y = 1, z = 1 c) No values 3. a) Yes b) No c) No d) Yes 5.2r1 7. a)If F(xj, ... , xn) = 1, then (F + G)(Xj, ... , xn) = F(xj, ... ,xn) + G(Xj, ... ,xn) = 1 by the dominance law. Hence, F :s F + G. b) If(FG)(xj, ... , xn) = 1, then F(xj, ... ,xn)· G(Xj, ... ,xn) = I. Hence, F(xj, , xn) = I. It follows that FG :s F. 9. Because F(xj, , xn) = 1 implies that F(xj, ... , xn) = 1, :s is reflexive. Suppose that F:s G and G:s F. Then F(xj, ... ,xn) = 1 if and only if G(Xj, ... , xn) = 1. This implies that F = G. Hence, :s is antisymmetric. Suppose that F :s G :s H. Then if
+ wxy + wyz wxyz+wxyz+wxyz d)wy+yz+xy+wxz+wxz
23. a) xz 25. a) wxz
+ wxyz
+ yz
d) xz + xy + yz b) xyz + wyz +
c)yz+wxy+wxy+wxyz 27. x(y+z)
F(xj, ... , xn) = 1, it follows that G(Xj, ... , xn) = 1, which implies that Hix», ... ,xn)=I. Hence, F:sH, so that :s is transitive. 11. a)x = I,y = O,z = 0 b)x = 1, y=O,z=O c)x=I,y=O,z=O
S77
Answers to OddNumbered Exercises
S77
13.
x
1 1 0 0
y
1 0 1 0
x0y
1 0 0 1
xEEly
0 1 1 0

(x EEly)
1 0 0 1 17. a) 6 b) 5 c) 5 d) 6
3. The only way to get a noun, such as tortoise, at the end is to have a noun phrase at the end, which can be achieved only via the production sentence + noun phrase transitive verb phrase noun phrase. However, transitive verb phrase + transitive verb + passes, and this sentence does not contain
passes.
15. Yes. as a truth table shows
19. x +~
21. X3 + x2Xl 23. Suppose it were with weights a and b. Then there would be a real number T such that xa + yb :::: T for (l.0) and (0,1), but with xa + yb < T for (0,0) and (l,1). Hence, a :::: , b :::: , 0 < T, and a + b < T. Thus, a and b T T are positive, which implies that a + b > a :::: , a contradicT tion.
CHAPTER 12
Section 12.1
1. a) sentence noun phrase intransitive verb phrase adjective noun intransitive verb phrase article adjective noun intransitive verb (after 3 steps) ... the happy hare runs. b) sentence noun phrase intransitive verb phrase article adjective noun intransitive verb phrase article adjective noun intransitive verb adverb ... (after 4 steps) ... the sleepy tortoise runs
'* article '* '*
'*
'*
'*
'* ...
'*
'*
c) sentence noun phrase transitive verb phrase noun phrase article noun transitive verb phrase noun phrase article noun transitive verb noun phrase article noun transitive verb article noun (after 4 steps) ... the tortoise passes the hare d) sentence noun phrase transitive verb phrase noun phrase article adjective noun transitive verb phrase noun phrase article adjective noun transitive verb noun phrase article adjective noun transitive verb article adjective noun (after 6 steps) ... the sleepy hare passes the happy
quickly
5. a) S,* 1A lOB lOlA 1010B 10101 b) Because of the productions in this grammar, every 1 must be followed by a unless it occurs at the end of the string. c) All strings consistmg of a 0 or a 1 followed by one or more repetitions of 01 7. S OSl OOSll 000S111 00011 r 9. a) S OS OOS OOSk 00S11,* OOSlll,* OOSllll,* 00 1111 b) S OS OOS 001 A 0011 A 00111 A 001111 11. S OSAB OOSABAB ,*OOABAB 00 AABB 001ABB 0011BB 00112B 001122 13. a) S + 0, S + 1, S + 11 b) S + IS, S + A c) S + OA1, A + lA, A + OA, A + A d) S + OA, A + 11A, A + A 15. a) S + OOS,S + A b) S + lOA, A + OOA, A + A c) S + AAS, S + BBS, AB + BA, BA + AB, S + A, A + 0, B + 1 d) S + OOOOOOOOOOA, A+OA,A+A e) S+ AS, S+ ABS, S+ A, AB+ BA,BA + AB,A + O,B + 1 t)S + ABS,S + A, AB + BA, BA + AB, A + 0, B + 1 g) S + ABS, S + T, S + U, T + AT, T + A, U + BU, U + B, AB + BA, BA + AB, A + O,B + 1 17. a) S + OS, S + A b) S + AO, A + lA, A + A c) S + OOOS, S + A 19. a) Type 2, not type 3 b) Type 3 c) Type 0, not type 1 d) Type 2, not type 3 e) Type 2, not type 3 t) Type 0, not type 1 g) Type 3 h) Type 0, not type 1 i) Type 2, not type 3 j) Type 2, not type 3 21. Let S] and S2 be the start symbols of G] and G2, respectively. Let S be a new start symbol. a) Add S and productions S + S] and S + S2. b) Add S and production S + S] S2. c) Add S andproductionS + AandS + SIS.
'*
'*
'*
'*
?
'*
'* '* '* '*
'* '* '* '* '* '* '* '* '* '* '*
'*
'*
'*
'*
'* '* ...
'* '* '*
23. a)
'* '*
'*
'*
'*
article
li~ "'f"adjective noun intransitive verb
happy
.>.
hare
'* ...
tortoise
'*
the
I
I
I
runs
I