next up previous
Next: Analysis Up: CSE 2320: Algorithms and Previous: What if the keys

Hash Tables

Problem with Direct Addressing:

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).

Copyright © 1998 The University of Texas at Arlington