Question: 5. (20 points) In this problem we will compute the expected average size of a chain in the hash table, under the Simple Uniform Hashing

 5. (20 points) In this problem we will compute the expected

5. (20 points) In this problem we will compute the expected average size of a chain in the hash table, under the Simple Uniform Hashing assumption. The simple uniform hashing assumption states that each key is hashed into every bucket in the hash table with equal probability, regardless where any other elements have already been placed. Suppose a hash table has m buckets and n elements, and uses chaining to resolve collisions. Let n, be the number of elements in bucket i and L, be the length of the chain attached to bucket i. Define a -n/m to be the load factor of the hash table. You may find the following equation useful: when m is large (as we always assume), 1-)m. Let n, be the number of elements in bucket i and Li be the length (a) What is the relation between ni and L? (b) Show that i-1 Li-n-m + M0, where o is the number of empty buckets. (c) Show thatEa1ea by computing the expectation of No 5. (20 points) In this problem we will compute the expected average size of a chain in the hash table, under the Simple Uniform Hashing assumption. The simple uniform hashing assumption states that each key is hashed into every bucket in the hash table with equal probability, regardless where any other elements have already been placed. Suppose a hash table has m buckets and n elements, and uses chaining to resolve collisions. Let n, be the number of elements in bucket i and L, be the length of the chain attached to bucket i. Define a -n/m to be the load factor of the hash table. You may find the following equation useful: when m is large (as we always assume), 1-)m. Let n, be the number of elements in bucket i and Li be the length (a) What is the relation between ni and L? (b) Show that i-1 Li-n-m + M0, where o is the number of empty buckets. (c) Show thatEa1ea by computing the expectation of No

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!