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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A ANSWERS TO EXERCISES 561<br />

X, + Y,, where Y,, = -1 if the (n + 1)st particle hits a diphage receptor<br />

(conditional probability 2X,/(n + 2)) and Y,, = +2 otherwise. Hence<br />

EX,,+I = EX,, + EY, = EX, ~ 2EX,/(n+2) + 2(1 ~ 2EX,/(n+2)) .<br />

The recurrence (n+2)EX,+l = (n-4)EX,+2n+4 can be solved if we multiply<br />

both sides by the summation factor (n + 1)“; or we can guess the answer and<br />

prove it by induction: EX, = (2n + 4)/7 <strong>for</strong> all n > 4. (Incidentally, there<br />

are always two diphages and one triphage after five steps, regardless of the<br />

configuration after four.)<br />

8.48 (a) The distance between frisbees (measured so as to make it an even<br />

number) is either 0, 2, or 4 units, initially 4. The corresponding generating<br />

functions A, B, C (where, say, [z”] C is the probability of distance 4 after n<br />

throws) satisfy<br />

A = $zB, B = ;zB++zC, C = 1 + ;zB + +zC<br />

It follows that A = z2/(16 - 202 + 5z2) = t’/F(z), and we have Mean(A) =<br />

2 - Mean(F) = 12, Var(A) = - Var( F) = 100. (A more difficult but more<br />

amusing solution factors A as follows:<br />

A =<br />

PlZ P2Z P2 PlZ + Pl P2Z<br />

-.-=<br />

1-q1z l-q2z Pz-Pl l-412 Pl - P2 1 - q2= ’<br />

where p1 = a2/4 = (3 + &i/8, p2 = $j2/4 = (3 - &)/8, and p1 + q1 =<br />

p2 + qr = 1. Thus, the game is equivalent to having two biased coins whose<br />

heads probabilities are p1 and ~2; flip the coins one at a time until they<br />

have both come up heads, and the total number of flips will have the same<br />

distribution as the number of frisbee throws. The mean and variance of the<br />

waiting times <strong>for</strong> these two coins are respectively 6 F 2fi and 50 F 22fi,<br />

hence the total mean and variance are 12 and 100 as be<strong>for</strong>e.)<br />

(b) Expanding the generating function in partial fractions makes it<br />

possible to sum the probabilities. (Note that d/(4@) + a2/4 = 1, so the<br />

answer can be stated in terms of powers of 4.) The game will last more than<br />

n steps with probability 5inp11/24pn ( $nf2 - @m”p2); when n is even this is<br />

5"124 nF,+Z. So the answer is 5504 1ooF,02 G .00006.<br />

8.49 (a) If n > 0, PN(O,n) = i[N=Ol + ~PN j(O,n) + iPN~-i(l,n-1);<br />

PN (m, 0) is similar; PN (0,O) = [N = 01. Hence<br />

gm,n = $=gm l,n+l + ;=%n,n + &ll+1,n 1 ;<br />

90 .n = i + izgg,, + igl,,-1 ; etc.<br />

64 gk,., = l-t&, l,n+l+tg~,,+~g~sl,n~~l; sh,, = ~+$&,+-&& +?tc.<br />

By induction on m, we have gi,, = (2m + l)gh,,,+,, - 2m2 <strong>for</strong> all m,n 3 0.

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

Saved successfully!

Ooh no, something went wrong!