next up previous
Next: Up: Previous:

Analysis of Chaining



Let the load factor $\alpha$ be calculated as number of keys stored / number of slots = n/m. For our earlier example, \(\alpha \;=\; \frac{100}{10} \;=\; 10\).



$\alpha$ represents the expected length l of the chain.

The performance of Search is relative to the performance of the hash function computation and the length of the chain, or \(\Theta(1 + \alpha)\), both for successful and unsuccessful searches.



Thus, if m is proportional to n, then $\alpha$ is a constant, and all operations are $\Theta(1)$.


next up previous
Next: Up: Previous: