next up previous
Next: Analysis Up: l5 Previous: What if the keys

Hash Tables



Problem with Direct Addressing: U may be too large.

For example, consider a compiler symbol table. Symbols here are up to 30 alphabetic characters.




$\mid$U$\mid$ = 26 . 26 . 26 . ... . 26 = $26^{30}$ = 2x$10^{42}$ bits.
Note that 1 gigabyte is only $10^{9}$ bits.



Let K = set of actual keys occurring.
For large $\mid$U$\mid$, $\mid$K$\mid$ is typically $<<\mid$U$\mid$.



Define Table T of size $\mid$K$\mid$
(T is a hash table, where we have chopped up U).


next up previous
Next: Analysis Up: l5 Previous: What if the keys