09.12.2012 Views

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

Concrete mathematics : a foundation for computer science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A ANSWERS TO EXERCISES 541<br />

7.6 Let the solution to go = LX, gl = fi, gn = g,, I + 29, 2 + (-1)“~ be<br />

4 n= A(n)& + B(n)13 + C(n)y. The function 2” works when 01 = 1, /3 = 2,<br />

y = 0; the function (-1)” works when LX = 1, fi = -1, y = 0; the function<br />

(-1)“n works when 01 = 0, 6 = -1, y = 3. Hence A(n) + 2B(n) = 2”,<br />

A(n) -B(n) = (-l)“, and -B(n) + 3Cln) = (-l)%.<br />

7.7 G(z) = (z/(1 --z)‘)G(z) + 1, hence<br />

I bet that the controversial<br />

“fan of<br />

1 ~ 22 z2 z<br />

G(z) = -- 1 -32+22 + 1 - =l+ 32 + 22 ;<br />

order zero” does<br />

have one spanning<br />

we have gn = Fzn + ‘n=Oj.<br />

tree. 7.8 Differentiate (1 - z) -x-l twice with respect to x, obtaining<br />

Now set x = m.<br />

((H,,, - H,)’ - (H$ ~ HL2’))<br />

7.9 (n + l)(Hi - Hi2)) - 2n(H, ~ 1).<br />

7.10 The identity Hkm,,2-HP,,Z = & +...+ f = 2Hlk-Hk implies that<br />

tk (‘;) (‘; 5 (2H2k - Hk) = 4nH,.<br />

7.11 (a) C(z) = A(z)B(z’)/(l - z). (b) zB’(z) = A(Zz)e’, hence A(z) =<br />

$e ‘l’B’($). (c) A(z) = B(z)/(l -z)‘+‘, hence B(z) = (1 -z)‘+‘A(z) and we<br />

have fk(r) = (‘l’)(-l)k.<br />

7.12 C,. The nunibers in the upper row correspond to the positions of +1’s<br />

in a sequence of +l ‘s and -1 ‘s that defines a “mountain range”; the numbers<br />

in the lower row correspond to the positions of -1’s. For example, the given<br />

array corresponds to<br />

7.13 Extend the sequence periodically (let x,+k = Xk) and define s, =<br />

x1 f...+x,. We have s, = 1, ~2~ = 21, etc. There must be a largest index<br />

ki such that Sk, = j, Sk,+,,, = 1+ j, etc. These indices kl, . . . , kl (modulo m)<br />

specify the cyclic shifts in question.<br />

For example, in the sequence (-2,1, -1 ,O, 1, 1, -1, 1, 1,l) with m = 10<br />

and1=2wehavek, =17,k2=24.<br />

7.14 6 (z) = -2zG(z) + e(z)2 + z (be careful about the final term!) leads<br />

via the quadratic <strong>for</strong>mula to<br />

l+Zz-VTT-Q<br />

G(z) = ~ 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!