

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Discrete Structures, Randomized Algorithm, Exercises, Exam Paper
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


(a) In class we proved that the two-choices approach improves the maximum load to O(log log n). A generalization is that choosing the least loaded of d choices reduces the maximum load to O(logd log n). Explain what changes to the proof are needed to derive this result. Give only the diffs; do not bother writing a complete proof. (b) Optional. Suppose that instead of making two choices at random, you divide the bins into a left and right half and break all ties by putting items in the left bin. Show that the maximum load improves by a constant factor, from O(log log n/ log 2) to O(log log n/2 log φ) where φ = (1 +
5)/2 is the golden ratio. Hint: for the number of height i bins on each side, use different recur- rences βi for the left side and γi for the right side. Show that βi+1 ≤ c 1 βiγi/n^2 while γi+1 ≤ c 2 βi+1γi/n^2. (c) Optional. Generalize to d bins, showing a load of O((log log n)/d).
Use this to achieve constant-time lookups using only (1 + ) space for any constant . Determine the best tradeoffs you can between number of probes required and amount of space used.