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.

556 ANSWERS TO EXERCISES<br />

8.32 By symmetry, we can reduce each month’s situation to one of four<br />

possibilities: “Toto, I have a<br />

D, the states are diagonally opposite;<br />

A, the states are adjacent and not Kansas;<br />

K, the states are Kansas and one other;<br />

S, the states are the same.<br />

Considering the Markovian transitions, we get four equations<br />

D = 1 +z($D++)<br />

A = z(;A+ AK)<br />

4 4 4<br />

K = z(~D+~A+~~K)<br />

S = z(fD + ;A + $K)<br />

whosesumisD+K+A+S=l+z(D+A+K). Thesolutionis<br />

s=<br />

812-452= -- 423<br />

243-243z+24z2 +8z3 '<br />

but the simplest way to find the mean and variance may be to write z = 1 + w<br />

and expand in powers of w, ignoring multiples of w2:<br />

D = g+‘593w+.,..<br />

16 512<br />

A = ?+?115w+..,.’<br />

8 256<br />

K = fi+&i!iiw+.,..<br />

8 256<br />

Now S’(1) = g + g + $ = $, and is”(l) = s + z + $$! = w. The<br />

mean is $ and the variance is y. (Is there a simpler way?)<br />

8.33 First answer: Clearly yes, because the hash values hl, . . . , h, are<br />

independent. Second answer: Certainly no, even though the hash values hi,<br />

h, areindependent. WehavePr(Xj=O) =xt=, sk([j#k](m-1)/m) =<br />

(;‘lsj)(m-1)/m, but Pr(XI=Xz=O) =xL=, sk[k>2](m-l)2/m2 = (1 -<br />

s1 - sl)(m- 1)=/m= # Pr(XI =0) Pr(X2 =O).<br />

8.34 Let [z”] S,(z) be the probability that Gina has advanced < m steps<br />

after taking n turns. Then S,( 1) is her average score on a par-m hole;<br />

[z”‘] S,(z) is the probability that she loses such a hole against a steady player;<br />

and 1 - [z’“~~‘] S,(z) is the probability that she wins it. We have the recurrence<br />

So(z) = 0;<br />

S,(z) = (1 + P&l~~Z(~) + q&lpl (z))/(l - =I, <strong>for</strong> m > 0.<br />

feeling we’re not in<br />

Kansas anymore. ”<br />

-Dorothy

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

Saved successfully!

Ooh no, something went wrong!