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.

558 ANSWERS TO EXERCISES<br />

8.37 The number of coin-toss sequences of length n is F,-‘, <strong>for</strong> all n > 0,<br />

because of the relation between domino tilings and coin flips. There<strong>for</strong>e the<br />

probability that exactly n tosses are needed is F,-’ /2n, when the coin is fair.<br />

Also q,, = Fn+‘/2n-‘, since xkbnFnzn = (Fnzn + F,-~z~+‘)/(l - z - zz).<br />

(A systematic solution via generating functions is, of course, also possible.)<br />

8.38 When k faces have been seen, the task of rolling a new one is equivalent<br />

to flipping coins with success probability pk = (m - k)/m. Hence the pgf is<br />

11<br />

nki(,Pkd(l - qkz) = nk:zO( ’ ’ m - k)z/(m - kz). The mean is ~~~~pk’ =<br />

M-b - H,-l); the variance is m’(H!’ - HE!,) - m(H, - H,-1); and<br />

equation (7.47) provides a closed <strong>for</strong>m <strong>for</strong> the requested probability, namely<br />

mpnm!{;I,‘}/( m-L)!. (The problem discussed in this exercise is traditionally<br />

called “coupon collecting!‘)<br />

8.39 E(X) = P(-1); V(X) = P(-2) - P(-l)2; E(lnX) = -P’(O).<br />

8.40 (a) We have K, =n(O!{';}p-l!{T}p2 +2!{y}p3 -...), by (7.49).<br />

Incidentally, the third cumulant is npq(q-p) and the fourth is npq(l-6pq).<br />

Theidentity q+pet = (p+qept)et shows that f,,,(p) = (-l)“f,(q)+[m=l];<br />

hence we can write f,,,(p) = g,,,(pq)(q-p)'m Odd], where g,,, is a polynomial<br />

of degree [m/2], whenever m > 1. (b) Let p = i and F(t) = ln( 5 + Set).<br />

Then~,~,~,tm-‘/(m-1~t!=F’(t)=1-1/(et+1),andwecanuseexercise<br />

6.23.<br />

8.41 If G(z) is the pgf <strong>for</strong> a random variable X that assumes only positive<br />

integer values, then s: G(z) dz/z = tk>, Pr(X=k)/k = E(X-‘). If X is the<br />

distribution of the number of flips to obtain n + 1 heads, we have G(z) =<br />

(PZ/(l - qz)y+’ by (8.5g), and the integral is<br />

if we substitute w = pz/(l .- qz). When p = q the integrand can be written<br />

(-l)n((l+w)~1-l+w-w2+~~~+(-l)nwn~’),sotheintegralis (-l)n(ln2l+~-~+...+(-l)n/n).<br />

WehaveH~,-Hn=ln2-~n~‘+~n~Z+O(n~4)<br />

by (g.28), and it follows tha.t E(X,:,) = :n-’ - $np2 + O(np4).<br />

8.42 Let F,(z) and G,(z) be pgf’s <strong>for</strong> the number of employed evenings, if<br />

the man is initially unemployed or employed, respectively. Let qh = 1 - ph<br />

and qf := 1 -pf. Then Fo(z) = Go(z) = 1, and<br />

F,,(z) = PhZGv’ (Z) + qhFm ’ (Z) ;<br />

G,,(Z) = PfFn-1 (z) + qfZGn-1 (z).

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

Saved successfully!

Ooh no, something went wrong!