Selected Solutions for Chapter 5:
Probabilistic Analysis and Randomized
Algorithms
Solution to Exercise 5.21
Since H
IRE
A
SSISTANT
always hires candidate
1
, it hires exactly once if and only
if no candidates other than candidate
1
are hired. This event occurs when candi
date
1
is the best candidate of the
n
, which occurs with probability
1=n
.
H
IRE
A
SSISTANT
hires
n
times if each candidate is better than all those who were
interviewed (and hired) before. This event occurs precisely when the list of ranks
given to the algorithm is
h
1; 2; : : : ; n
i
, which occurs with probability
1=nŠ
.
Solution to Exercise 5.24
Another way to think of the hatcheck problem is that we want to determine the
expected number of fixed points in a random permutation.
(A
fixed point
of a
permutation
±
is a value
i
for which
±.i/
D
i
.) We could enumerate all
nŠ
per
mutations, count the total number of fixed points, and divide by
nŠ
to determine
the average number of fixed points per permutation. This would be a painstak
ing process, and the answer would turn out to be
1
. We can use indicator random
variables, however, to arrive at the same answer much more easily.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 .
 Probability theory, Probabilistic Analysis and Randomized Algorithms, D1 j Di, Di C1

Click to edit the document details