{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

chap5-solutions

# chap5-solutions - Selected Solutions for Chapter 5...

This preview shows pages 1–2. Sign up to view the full content.

Selected Solutions for Chapter 5: Probabilistic Analysis and Randomized Algorithms Solution to Exercise 5.2-1 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.2-4 Another way to think of the hat-check 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 per- mutations, count the total number of fixed points, and divide by 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.

{[ snackBarMessage ]}

### Page1 / 3

chap5-solutions - Selected Solutions for Chapter 5...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online