Answered step by step
Verified Expert Solution
Question
1 Approved Answer
5. (20 points) In this problem we will compute the expected average size of a chain in the hash table, under the Simple Uniform
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 Li be the length of the chain attached to bucket i. Define a = n 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-1) me-1. (a) What is the relation between ni and Li? (b) Show that Li = n m + No, where No is the number of empty buckets. m (c) Show that E( Li) = 1 + ea by computing the expectation of No. m =1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started