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 555<br />

7; in case (b) it is y. Bill wins only half as often, but when he does win he<br />

tends to win sooner. The overall average number of flips is 5 y + $. $! = l$,<br />

agreeing with exercise 21. The solitaire game <strong>for</strong> each pattern has a waiting<br />

time of 8.<br />

8 . 29 Set H = T = 1 in 2<br />

l+N(H+T) = N+SA+SB+S~<br />

N HHTH = SA(~+HTH)+S~(HTH+TH+~)+S~(HTH+TH)<br />

N HTHH = SA(THH + H) + S~(THH + 1) + S~(THH)<br />

N THHH = SA(~H) + So + SC<br />

to get the winning probabilities. In general we will have SA + Ss + SC = 1<br />

and<br />

SA(A:A) + Ss(B:A) + Sc(C:A) = SA(A:B) +Ss(B:B) + Sc(C:B)<br />

= SA(A:B) + Ss(B:C) + Sc(C:C).<br />

In particular, the equations 9SA+SSs+3Sc =5SA+9Ss+Sc = 2SA+4Ss+9Sc<br />

imply that SA = g, Sa = g, Sc = g.<br />

8.30 The variance of P(hl , . . . , h,; k) I k is the variance of the shifted binomial<br />

distribution ((m ~ 1 + z)/m) k ’ z, which is (k-1)($)(1 - $) by (8.61).<br />

Hence the average of the variance is Mean(S)(m - 1)/m’. The variance of<br />

the average is the variance of (k - 1 )/m, namely Var( S)/m’. According to<br />

(8.105), the sum of these two quantities should be VP, and it is. Indeed, we<br />

have just replayed the derivation of (8.~5) in slight disguise. (See exercise 15.)<br />

8.31 (a) A brute <strong>for</strong>ce solution would set up five equations in five unknowns:<br />

A = ;zB + ;zE; B = ;zC; C = 1 + +zB + ;zD; D = ;zC + ;zE; E = ;zD.<br />

But positions C and D are equidistant from the goal, as are B and E, so we<br />

can lump them together. If X = B + E and Y = C + D, there are now three<br />

equations:<br />

A = ;zX; X = ;zY; Y = 1 +;zX+;zY.<br />

Hence A = z2/(4 ~ 22 - z’); we have Mean(A) = 6 and Var(A) = 22. (Rings<br />

a bell? In fact, this problem is equivalent to flipping a fair coin until getting<br />

heads twice in a row: Heads means “advance toward the apple” and<br />

tails means “go back.“) (b) Chebyshev’s inequality says that Pr(S 3 100) =<br />

Pr( (S - 6)’ 3 942) 6 22/942 z .0025. (c) The second tail equality says that<br />

Pr( S > 100) < 1 /x98 (4 - 2x - x2) <strong>for</strong> all x 3 1, and we get the upper bound<br />

0.00000005 when x = (v’m - 99)/l 00. (The actual probability is approximately<br />

0.0000000009, according to exercise 37.)

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

Saved successfully!

Ooh no, something went wrong!