Slot-size bound for chaining: expected number of keys in a slot.
Analyze the slot-size bound for chaining: expected number of keys in a slot..
Examples
Input:"test_input_1"
Output:"output_1"
Input:"test_input_2"
Output:"output_2"
Hints
Recall that in chaining, each key is independently and uniformly hashed into one of the m slots. What is the probability that a specific key lands in a particular slot?
Model the number of keys in a given slot as a random variable. What is its distribution, and what is its expected value?
Use linearity of expectation to compute the expected number of keys in a single slot, then generalize to all slots. How does this relate to the load factor α = n/m?
Slot-size bound for chaining: expected number of keys in a slot.
Analyze the slot-size bound for chaining: expected number of keys in a slot..