ps3 - Massachusetts Institute of Technology Handout 5...

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

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Massachusetts Institute of Technology Handout 5 6.854J/18.415J: Advanced Algorithms Wednesday, September 23, 2009 David Karger Problem Set 3 Due: Wednesday, September 30, 2009. Collaboration policy: collaboration is strongly encouraged . However, remember that 1. You must write up your own solutions, independently. 2. You must record the name of every collaborator. 3. You must actually participate in solving all the problems. This is difficult in very large groups, so you should keep your collaboration groups limited to 3 or 4 people in a given week. 4. No bibles. This includes solutions posted to problems in previous years. Problem 1. Perfect hashing is nice, but does have the drawback that the perfect hash function has a lengthy description (since you have to describe the second-level hash function for each bucket). Consider the following alternative approach to producing a perfect hash function with a small description. Define bi-bucket hashing , or bashing , as follows. Given n items, allocate two arrays of size n 1 . 5 . When inserting an item, map it to one bucket in each array, and place it in the emptier of the two buckets. (a) Suppose a random function is used to map each item to buckets. Give a good upper bound on the expected number of collisions. Hint: What is the probability that the k th inserted item collides with some previously inserted item? (b) Argue that bashing can be implemented efficiently, with the same expected out- come, using the ideas from 2-universal hashing....
View Full Document

This note was uploaded on 11/24/2009 for the course CS 6.854/18.4 taught by Professor Davidkarger during the Fall '09 term at MIT.

Page1 / 3

ps3 - Massachusetts Institute of Technology Handout 5...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online