Learning objectives
After this class, you should be able to:
- Given a sequence of
n
integers, a numberk
in[1,n]
, and a sequence of random numbers, show the steps involved in applying the good randomized selection algorithm discussed in class to find thek
th smallest of these numbers.
Reading assignment
- Class notes and sections 4 of http://www.csee.wvu.edu/~ksmani/courses/fa01/random/lecnotes/lecture4.pdf.
Exercises and review questions
- Questions on current lecture's material
- (Post your answer on the discussion board) Give an example set of data and show how the better randomized selection algorithm that we discussed in class would determine the
4
th smallest number in it. Use a sequence of random numbers generated by any of the Unix random number generators, and show this sequence too.- Questions on next lecture's material
- For independent random variables, prove that the expected value of the product is the product of expected values.