next up previous
Next: Up: Previous:

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 = 2630 = 2x1042 bits.
Note that 1 gigabyte is only
109 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: Up: Previous: