17.04.2013 Views

Algorithms, Probability, and Computing Fall 09 Mid-Term Exam

Algorithms, Probability, and Computing Fall 09 Mid-Term Exam

Algorithms, Probability, and Computing Fall 09 Mid-Term Exam

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.

Exercise 1<br />

We consider a r<strong>and</strong>om search tree for the elements {1, . . ., n} for n ≥ 3. Let p (1)<br />

n denote the probability<br />

that the descendants of element 1 are exactly the elements 1, 2 <strong>and</strong> 3, i.e. no further elements are<br />

descendants of 1.<br />

(a) Compute p (1)<br />

n for n = 3 <strong>and</strong> n = 4.<br />

(b) Set up a recurrence for p (1)<br />

n <strong>and</strong> solve the recurrence. Remark: Do not be tempted to solve (b) by<br />

first solving (c). You have to solve (b) via the recurrence method.<br />

(c) For n ≥ 5 <strong>and</strong> 2 ≤ i ≤ n − 3, consider the indicator variable<br />

Ei := [the descendants of i are exactly i, i + 1, <strong>and</strong> i + 2] .<br />

Express Ei in terms of the indicator variables A i j<br />

A i j<br />

from the lecture notes. These where defined as<br />

:= [i is an ancestor of j] .<br />

(d) Compute E[Ei]. Warning: the events Ai j you used for solving (c) are most likely not independent.

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

Saved successfully!

Ooh no, something went wrong!