<s>
Static	B-Algorithm
Hashing	I-Algorithm
is	O
another	O
form	O
of	O
the	O
hashing	B-Error_Name
problem	O
which	O
allows	O
users	O
to	O
perform	O
lookups	O
on	O
a	O
finalized	O
dictionary	O
set	O
(	O
all	O
objects	O
in	O
the	O
dictionary	O
are	O
final	O
and	O
not	O
changing	O
)	O
.	O
</s>
<s>
Since	O
static	B-Algorithm
hashing	I-Algorithm
requires	O
that	O
the	O
database	O
,	O
its	O
objects	O
and	O
reference	O
remain	O
the	O
same	O
its	O
applications	O
are	O
limited	O
.	O
</s>
<s>
Databases	O
which	O
contain	O
information	O
which	O
changes	O
rarely	O
are	O
also	O
eligible	O
as	O
it	O
would	O
only	O
require	O
a	O
full	O
rehash	B-Algorithm
of	O
the	O
entire	O
database	O
on	O
rare	O
occasion	O
.	O
</s>
<s>
Perfect	O
hashing	B-Error_Name
is	O
a	O
model	O
of	O
hashing	B-Error_Name
in	O
which	O
any	O
set	O
of	O
n	O
elements	O
can	O
be	O
stored	O
in	O
a	O
hash	B-Algorithm
table	I-Algorithm
of	O
equal	O
size	O
and	O
can	O
have	O
lookups	O
done	O
in	O
constant	O
time	O
.	O
</s>
<s>
It	O
was	O
specifically	O
discovered	O
and	O
discussed	O
by	O
Fredman	O
,	O
Komlos	O
and	O
Szemeredi	O
(	O
1984	O
)	O
and	O
has	O
therefore	O
been	O
nicknamed	O
"	O
FKS	O
Hashing	B-Error_Name
"	O
.	O
</s>
<s>
FKS	O
Hashing	B-Error_Name
makes	O
use	O
of	O
a	O
hash	B-Algorithm
table	I-Algorithm
with	O
two	O
levels	O
in	O
which	O
the	O
top	O
level	O
contains	O
n	O
buckets	O
which	O
each	O
contain	O
their	O
own	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
FKS	O
hashing	B-Error_Name
requires	O
that	O
if	O
collisions	B-Algorithm
occur	O
they	O
must	O
do	O
so	O
only	O
on	O
the	O
top	O
level	O
.	O
</s>
<s>
The	O
top	O
level	O
contains	O
a	O
randomly	O
created	O
hash	B-Error_Name
function	I-Error_Name
,	O
h(x )	O
,	O
which	O
fits	O
within	O
the	O
constraints	O
of	O
a	O
Carter	O
and	O
Wegman	O
hash	B-Error_Name
function	I-Error_Name
-	O
seen	O
in	O
Universal	B-Algorithm
hashing	I-Algorithm
.	O
</s>
<s>
Following	O
this	O
pattern	O
,	O
all	O
of	O
the	O
buckets	O
hold	O
a	O
hash	B-Algorithm
table	I-Algorithm
of	O
size	O
si	O
and	O
a	O
respective	O
hash	B-Error_Name
function	I-Error_Name
,	O
hi(x )	O
.	O
</s>
<s>
The	O
hash	B-Error_Name
function	I-Error_Name
will	O
be	O
decided	O
by	O
setting	O
si	O
to	O
ki2	O
and	O
randomly	O
going	O
through	O
functions	O
until	O
there	O
are	O
no	O
collisions	B-Algorithm
.	O
</s>
<s>
Because	O
there	O
are	O
pairs	O
of	O
elements	O
,	O
of	O
which	O
have	O
a	O
probability	O
of	O
collision	O
equal	O
to	O
1/n	O
,	O
FKS	O
hashing	B-Error_Name
can	O
expect	O
to	O
have	O
strictly	O
less	O
than	O
n/2	O
collisions	B-Algorithm
.	O
</s>
<s>
Based	O
on	O
this	O
fact	O
and	O
that	O
each	O
h(x )	O
was	O
selected	O
so	O
that	O
the	O
number	O
of	O
collisions	B-Algorithm
would	O
be	O
at	O
most	O
n/2	O
,	O
the	O
size	O
of	O
each	O
table	O
on	O
the	O
lower	O
level	O
will	O
be	O
no	O
greater	O
than	O
2n	O
.	O
</s>
