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.

404 DISCRETE PROBABILITY<br />

There<strong>for</strong>e the pgf <strong>for</strong> P itself is<br />

where<br />

GP(z) = ‘&~GP,I;(z’I<br />

k=l<br />

= 2s ~-<br />

n-l+2<br />

( m > ’<br />

(8.92)<br />

S(z) = Sl + s2z + s& + . . . + S,P’ (8.93)<br />

is the pgf <strong>for</strong> the search probabilities sk (divided by z <strong>for</strong> convenience).<br />

Good. We have a probability generating function <strong>for</strong> P; we can now find<br />

the mean and variance by differentiation. It’s somewhat easier to remove the<br />

z factor first, as we’ve done be<strong>for</strong>e, thus finding the mean and variance of<br />

P - 1 instead:<br />

There<strong>for</strong>e<br />

F(z) = Gp(z),‘z = S(m-m+f) ;<br />

F’(z) = ;S’(+) ;<br />

F”(z) = -&“(!+) .<br />

EP = 1 + Mean(F) = 1 + F’( 1) = 1 + m-’ Mean(S) ; (8.94)<br />

VP = Var(F) = F"(l)+F'(l)-F'(l)'<br />

= rn-‘S”(1) +m-‘S’(1) -m~2S’(1)2<br />

= rnp2 Va.r(S) + (rn-’ - m-*) Mean(S). (8.95)<br />

These are general <strong>for</strong>mula,s expressing the mean and variance of the number<br />

of probes P in terms ‘of the mean and variance of the assumed search<br />

distribution S.<br />

For example, suppose we have sk = l/n <strong>for</strong> 1 6 k 6 n. This means<br />

we are doing a purely “ran.dom” successful search, with all keys in the table<br />

equally likely. Then S(z) is the uni<strong>for</strong>m probability distribution U,(z) in

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

Saved successfully!

Ooh no, something went wrong!