Background: Ch. 10.
Due October 2nd:
- 4.1: Given a list L of n numbers, we want to compute
. Prove that x equal to the median of L
minimizes the expression. [Extra Credit!] - 4.2: Given a list L of n numbers, we want to compute
. Prove that x equal to the mean of L
minimizes the expression. [Extra Credit!] - 4.3: Give an algorithm for computing the mode of a list of numbers
(not necessarily sorted).
- 4.4: Give an algorithm for efficiently computing the rank of GPA
x both when the list L of GPAs is sorted and when it is not.
Give tight worst-case running time bounds.
- 4.5: Show that the expected running time of SELECT is O(n).
- 4.6: CLR Exercise 10.3-3 (pg. 192).
- 4.7: CLR Exercise 10.3-7 (pg. 192).
Up: HOMEWORK
Previous: Homework 3