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

values of X in a sequence of independent trials will be a median or mode of<br />

the random variable X.<br />

8.53 We can disprove the statement, even in the special case that each<br />

variableisOor1. LetpO=Pr(X=Y=Z=O),pl=Pr(X=Y=Z=O),...,<br />

p7=Pr(X=Y=Z=O),whereX=l-X. Thenpo+pl+...+p7=1,and<br />

the variables are independent in pairs if and only if we have<br />

(p4+p5+p6+p7)(pL+p3+p6+p7) = p6+p7,<br />

(p4 + p5 + p 6 -+ p7)(pl + p 3 + p5 + p7) = p5 + p7,<br />

(p2 + p3 + p6 -t p7)tpl + p3 + p5 + p7) = p3 + p7.<br />

But WX+Y=Z=O) # Pr(X+Y=O)Pr(Z=O) w p0 # (pO +p,)(pc +<br />

pr + p4 + p61. One solution is<br />

PO = P3 = Ps = P6 = l/4; p1 = p2 = p4 = p7 = 0.<br />

This is equivalent to flipping two fair coins and letting X = (the first coin<br />

is heads), Y = (the second coin is heads), Z = (the coins differ). Another<br />

example, with all probabilities nonzero, is<br />

PO = 4/64, PI = ~2 = ~4 = 5/64,<br />

p3 = p5 = p6 = 10/64, p7 = 15/64.<br />

For this reason we say that n variables XI, , X, are independent if<br />

Pr(X1 =x1 and...and Xn=x,) = Pr(X, =xl)...Pr(X, = x,);<br />

pairwise independence isn’t enough to guarantee this.<br />

8.54 (See exercise 27 <strong>for</strong> notation.) We have<br />

E(t:) = nll4 +n(n-1)~:;<br />

E(LzLfI = np4 +2n(n-l)u3pl +n(n-1)~: +n(n-l)(n-2)p2&;<br />

E(xy) = np4 +4n(n-l)p~u1 +3n(n-1)~:<br />

it follows that V(\iX) = K4/n + 2K:/(n ~ 1).<br />

+ 6n(n-l)(n-2)u2p: + n(n-l)(n-2)(np3)pT ;<br />

8.55 There are A � = & .52! permutations with X = Y, and B = g .52!<br />

permutations with X # Y. After the stated procedure, each permutation<br />

with X = Y occurs with probability A/(( 1 - gp)A), because we return<br />

to step Sl with probability $p. Similarly, each permutation with X # Y<br />

occurs with probability g(l - p)/((l ~ sp)B). Choosing p = i makes<br />

Pr (X = x and Y = 9) = & <strong>for</strong> all x and y (We could there<strong>for</strong>e make two flips<br />

of a fair coin and go back to Sl if both come up heads.)

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

Saved successfully!

Ooh no, something went wrong!