<s>
A	O
hash	B-Algorithm
function	I-Algorithm
is	O
any	O
function	O
that	O
can	O
be	O
used	O
to	O
map	O
data	B-General_Concept
of	O
arbitrary	O
size	O
to	O
fixed-size	O
values	O
,	O
though	O
there	O
are	O
some	O
hash	B-Algorithm
functions	I-Algorithm
that	O
support	O
variable	O
length	O
output	O
.	O
</s>
<s>
The	O
values	O
returned	O
by	O
a	O
hash	B-Algorithm
function	I-Algorithm
are	O
called	O
hash	B-Error_Name
values	I-Error_Name
,	O
hash	B-Error_Name
codes	I-Error_Name
,	O
digests	O
,	O
or	O
simply	O
hashes	B-Algorithm
.	O
</s>
<s>
The	O
values	O
are	O
usually	O
used	O
to	O
index	O
a	O
fixed-size	O
table	O
called	O
a	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
Use	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
to	O
index	O
a	O
hash	B-Algorithm
table	I-Algorithm
is	O
called	O
hashing	O
or	O
scatter	B-Algorithm
storage	I-Algorithm
addressing	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
and	O
their	O
associated	O
hash	B-Algorithm
tables	I-Algorithm
are	O
used	O
in	O
data	B-General_Concept
storage	O
and	O
retrieval	O
applications	O
to	O
access	O
data	B-General_Concept
in	O
a	O
small	O
and	O
nearly	O
constant	O
time	O
per	O
retrieval	O
.	O
</s>
<s>
They	O
require	O
an	O
amount	O
of	O
storage	O
space	O
only	O
fractionally	O
greater	O
than	O
the	O
total	O
space	O
required	O
for	O
the	O
data	B-General_Concept
or	O
records	O
themselves	O
.	O
</s>
<s>
Hashing	O
is	O
a	O
computationally	O
and	O
storage	O
space-efficient	O
form	O
of	O
data	B-General_Concept
access	O
that	O
avoids	O
the	O
non-constant	O
access	O
time	O
of	O
ordered	O
and	O
unordered	O
lists	O
and	O
structured	O
trees	O
,	O
and	O
the	O
often	O
exponential	O
storage	O
requirements	O
of	O
direct	O
access	O
of	O
state	O
spaces	O
of	O
large	O
or	O
variable-length	O
keys	O
.	O
</s>
<s>
Use	O
of	O
hash	B-Algorithm
functions	I-Algorithm
relies	O
on	O
statistical	O
properties	O
of	O
key	O
and	O
function	O
interaction	O
:	O
worst-case	O
behaviour	O
is	O
intolerably	O
bad	O
with	O
a	O
vanishingly	O
small	O
probability	O
,	O
and	O
average-case	O
behaviour	O
can	O
be	O
nearly	O
optimal	O
(	O
minimal	O
collision	B-Algorithm
)	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
are	O
related	O
to	O
(	O
and	O
often	O
confused	O
with	O
)	O
checksums	B-Algorithm
,	O
check	B-Error_Name
digits	I-Error_Name
,	O
fingerprints	B-Algorithm
,	O
lossy	B-Algorithm
compression	I-Algorithm
,	O
randomization	O
functions	O
,	O
error-correcting	B-Error_Name
codes	I-Error_Name
,	O
and	O
ciphers	B-Application
.	O
</s>
<s>
The	O
hash	B-Algorithm
function	I-Algorithm
differs	O
from	O
these	O
concepts	O
mainly	O
in	O
terms	O
of	O
data	B-General_Concept
integrity	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
takes	O
a	O
key	O
as	O
an	O
input	O
,	O
which	O
is	O
associated	O
with	O
a	O
datum	O
or	O
record	O
and	O
used	O
to	O
identify	O
it	O
to	O
the	O
data	B-General_Concept
storage	O
and	O
retrieval	O
application	O
.	O
</s>
<s>
The	O
output	O
is	O
a	O
hash	B-Error_Name
code	I-Error_Name
used	O
to	O
index	O
a	O
hash	B-Algorithm
table	I-Algorithm
holding	O
the	O
data	B-General_Concept
or	O
records	O
,	O
or	O
pointers	O
to	O
them	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
may	O
be	O
considered	O
to	O
perform	O
three	O
functions	O
:	O
</s>
<s>
A	O
good	O
hash	B-Algorithm
function	I-Algorithm
satisfies	O
two	O
basic	O
properties	O
:	O
1	O
)	O
it	O
should	O
be	O
very	O
fast	O
to	O
compute	O
;	O
2	O
)	O
it	O
should	O
minimize	O
duplication	O
of	O
output	O
values	O
(	O
collisions	O
)	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
rely	O
on	O
generating	O
favourable	O
probability	O
distributions	O
for	O
their	O
effectiveness	O
,	O
reducing	O
access	O
time	O
to	O
nearly	O
constant	O
.	O
</s>
<s>
High	O
table	O
loading	O
factors	O
,	O
pathological	O
key	O
sets	O
and	O
poorly	O
designed	O
hash	B-Algorithm
functions	I-Algorithm
can	O
result	O
in	O
access	O
times	O
approaching	O
linear	O
in	O
the	O
number	O
of	O
items	O
in	O
the	O
table	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
can	O
be	O
designed	O
to	O
give	O
the	O
best	O
worst-case	O
performance	O
,	O
good	O
performance	O
under	O
high	O
table	O
loading	O
factors	O
,	O
and	O
in	O
special	O
cases	O
,	O
perfect	B-Algorithm
(	O
collisionless	O
)	O
mapping	O
of	O
keys	O
into	O
hash	B-Error_Name
codes	I-Error_Name
.	O
</s>
<s>
A	O
necessary	O
adjunct	O
to	O
the	O
hash	B-Algorithm
function	I-Algorithm
is	O
a	O
collision-resolution	O
method	O
that	O
employs	O
an	O
auxiliary	O
data	B-General_Concept
structure	I-General_Concept
like	O
linked	B-Data_Structure
lists	I-Data_Structure
,	O
or	O
systematic	O
probing	O
of	O
the	O
table	O
to	O
find	O
an	O
empty	O
slot	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
are	O
used	O
in	O
conjunction	O
with	O
hash	B-Algorithm
tables	I-Algorithm
to	O
store	O
and	O
retrieve	O
data	B-General_Concept
items	O
or	O
data	B-Application
records	I-Application
.	O
</s>
<s>
The	O
hash	B-Algorithm
function	I-Algorithm
translates	O
the	O
key	O
associated	O
with	O
each	O
datum	O
or	O
record	O
into	O
a	O
hash	B-Error_Name
code	I-Error_Name
,	O
which	O
is	O
used	O
to	O
index	O
the	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
When	O
an	O
item	O
is	O
to	O
be	O
added	O
to	O
the	O
table	O
,	O
the	O
hash	B-Error_Name
code	I-Error_Name
may	O
index	O
an	O
empty	O
slot	O
(	O
also	O
called	O
a	O
bucket	O
)	O
,	O
in	O
which	O
case	O
the	O
item	O
is	O
added	O
to	O
the	O
table	O
there	O
.	O
</s>
<s>
If	O
the	O
hash	B-Error_Name
code	I-Error_Name
indexes	O
a	O
full	O
slot	O
,	O
some	O
kind	O
of	O
collision	B-Algorithm
resolution	O
is	O
required	O
:	O
the	O
new	O
item	O
may	O
be	O
omitted	O
(	O
not	O
added	O
to	O
the	O
table	O
)	O
,	O
or	O
replace	O
the	O
old	O
item	O
,	O
or	O
it	O
can	O
be	O
added	O
to	O
the	O
table	O
in	O
some	O
other	O
location	O
by	O
a	O
specified	O
procedure	O
.	O
</s>
<s>
That	O
procedure	O
depends	O
on	O
the	O
structure	O
of	O
the	O
hash	B-Algorithm
table	I-Algorithm
:	O
In	O
chained	O
hashing	O
,	O
each	O
slot	O
is	O
the	O
head	O
of	O
a	O
linked	B-Data_Structure
list	I-Data_Structure
or	O
chain	O
,	O
and	O
items	O
that	O
collide	O
at	O
the	O
slot	O
are	O
added	O
to	O
the	O
chain	O
.	O
</s>
<s>
In	O
open	O
address	O
hashing	O
,	O
the	O
table	O
is	O
probed	O
starting	O
from	O
the	O
occupied	O
slot	O
in	O
a	O
specified	O
manner	O
,	O
usually	O
by	O
linear	B-Algorithm
probing	I-Algorithm
,	O
quadratic	B-Algorithm
probing	I-Algorithm
,	O
or	O
double	B-Algorithm
hashing	I-Algorithm
until	O
an	O
open	O
slot	O
is	O
located	O
or	O
the	O
entire	O
table	O
is	O
probed	O
(	O
overflow	O
)	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
are	O
also	O
used	O
to	O
build	O
caches	B-General_Concept
for	O
large	O
data	B-General_Concept
sets	O
stored	O
in	O
slow	O
media	O
.	O
</s>
<s>
A	O
cache	B-General_Concept
is	O
generally	O
simpler	O
than	O
a	O
hashed	O
search	O
table	O
since	O
any	O
collision	B-Algorithm
can	O
be	O
resolved	O
by	O
discarding	O
or	O
writing	O
back	O
the	O
older	O
of	O
the	O
two	O
colliding	O
items	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
are	O
an	O
essential	O
ingredient	O
of	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
a	O
space-efficient	O
probabilistic	O
data	B-General_Concept
structure	I-General_Concept
that	O
is	O
used	O
to	O
test	O
whether	O
an	O
element	O
is	O
a	O
member	O
of	O
a	O
set	O
.	O
</s>
<s>
A	O
special	O
case	O
of	O
hashing	O
is	O
known	O
as	O
geometric	B-Algorithm
hashing	I-Algorithm
or	O
the	O
grid	O
method	O
.	O
</s>
<s>
In	O
these	O
applications	O
,	O
the	O
set	O
of	O
all	O
inputs	O
is	O
some	O
sort	O
of	O
metric	O
space	O
,	O
and	O
the	O
hashing	B-Error_Name
function	I-Error_Name
can	O
be	O
interpreted	O
as	O
a	O
partition	O
of	O
that	O
space	O
into	O
a	O
grid	O
of	O
cells	O
.	O
</s>
<s>
The	O
table	O
is	O
often	O
an	O
array	O
with	O
two	O
or	O
more	O
indices	O
(	O
called	O
a	O
grid	B-Data_Structure
file	I-Data_Structure
,	O
grid	O
index	O
,	O
bucket	O
grid	O
,	O
and	O
similar	O
names	O
)	O
,	O
and	O
the	O
hash	B-Algorithm
function	I-Algorithm
returns	O
an	O
index	O
tuple	B-Application
.	O
</s>
<s>
This	O
principle	O
is	O
widely	O
used	O
in	O
computer	O
graphics	O
,	O
computational	O
geometry	O
and	O
many	O
other	O
disciplines	O
,	O
to	O
solve	O
many	O
proximity	B-Algorithm
problems	I-Algorithm
in	O
the	O
plane	O
or	O
in	O
three-dimensional	O
space	O
,	O
such	O
as	O
finding	O
closest	B-Algorithm
pairs	I-Algorithm
in	O
a	O
set	O
of	O
points	O
,	O
similar	O
shapes	O
in	O
a	O
list	O
of	O
shapes	O
,	O
similar	O
images	B-Algorithm
in	O
an	O
image	B-General_Concept
database	I-General_Concept
,	O
and	O
so	O
on	O
.	O
</s>
<s>
Hash	B-Algorithm
tables	I-Algorithm
are	O
also	O
used	O
to	O
implement	O
associative	B-Application
arrays	I-Application
and	O
dynamic	O
sets	O
.	O
</s>
<s>
A	O
good	O
hash	B-Algorithm
function	I-Algorithm
should	O
map	O
the	O
expected	O
inputs	O
as	O
evenly	O
as	O
possible	O
over	O
its	O
output	O
range	O
.	O
</s>
<s>
That	O
is	O
,	O
every	O
hash	B-Error_Name
value	I-Error_Name
in	O
the	O
output	O
range	O
should	O
be	O
generated	O
with	O
roughly	O
the	O
same	O
probability	O
.	O
</s>
<s>
The	O
reason	O
for	O
this	O
last	O
requirement	O
is	O
that	O
the	O
cost	O
of	O
hashing-based	O
methods	O
goes	O
up	O
sharply	O
as	O
the	O
number	O
of	O
collisions	O
—	O
pairs	O
of	O
inputs	O
that	O
are	O
mapped	O
to	O
the	O
same	O
hash	B-Error_Name
value	I-Error_Name
—	O
increases	O
.	O
</s>
<s>
If	O
some	O
hash	B-Error_Name
values	I-Error_Name
are	O
more	O
likely	O
to	O
occur	O
than	O
others	O
,	O
a	O
larger	O
fraction	O
of	O
the	O
lookup	O
operations	O
will	O
have	O
to	O
search	O
through	O
a	O
larger	O
set	O
of	O
colliding	O
table	O
entries	O
.	O
</s>
<s>
A	O
good	O
randomizing	O
function	O
is	O
(	O
barring	O
computational	O
efficiency	O
concerns	O
)	O
generally	O
a	O
good	O
choice	O
as	O
a	O
hash	B-Algorithm
function	I-Algorithm
,	O
but	O
the	O
converse	O
need	O
not	O
be	O
true	O
.	O
</s>
<s>
Hash	B-Algorithm
tables	I-Algorithm
often	O
contain	O
only	O
a	O
small	O
subset	O
of	O
the	O
valid	O
inputs	O
.	O
</s>
<s>
In	O
special	O
cases	O
when	O
the	O
keys	O
are	O
known	O
in	O
advance	O
and	O
the	O
key	O
set	O
is	O
static	O
,	O
a	O
hash	B-Algorithm
function	I-Algorithm
can	O
be	O
found	O
that	O
achieves	O
absolute	O
(	O
or	O
collisionless	O
)	O
uniformity	O
.	O
</s>
<s>
Such	O
a	O
hash	B-Algorithm
function	I-Algorithm
is	O
said	O
to	O
be	O
perfect	B-Algorithm
.	O
</s>
<s>
Finding	O
a	O
perfect	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
over	O
more	O
than	O
a	O
very	O
small	O
set	O
of	O
keys	O
is	O
usually	O
computationally	O
infeasible	O
;	O
the	O
resulting	O
function	O
is	O
likely	O
to	O
be	O
more	O
computationally	O
complex	O
than	O
a	O
standard	O
hash	B-Algorithm
function	I-Algorithm
and	O
provides	O
only	O
a	O
marginal	O
advantage	O
over	O
a	O
function	O
with	O
good	O
statistical	O
properties	O
that	O
yields	O
a	O
minimum	O
number	O
of	O
collisions	O
.	O
</s>
<s>
See	O
universal	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
When	O
testing	O
a	O
hash	B-Algorithm
function	I-Algorithm
,	O
the	O
uniformity	O
of	O
the	O
distribution	O
of	O
hash	B-Error_Name
values	I-Error_Name
can	O
be	O
evaluated	O
by	O
the	O
chi-squared	B-General_Concept
test	I-General_Concept
.	O
</s>
<s>
A	O
ratio	O
within	O
one	O
confidence	O
interval	O
(	O
0.95	O
-	O
1.05	O
)	O
is	O
indicative	O
that	O
the	O
hash	B-Algorithm
function	I-Algorithm
evaluated	O
has	O
an	O
expected	O
uniform	O
distribution	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
can	O
have	O
some	O
technical	O
properties	O
that	O
make	O
it	O
more	O
likely	O
that	O
they	O
'll	O
have	O
a	O
uniform	O
distribution	O
when	O
applied	O
.	O
</s>
<s>
The	O
relevance	O
of	O
the	O
criterion	O
to	O
a	O
multiplicative	O
hash	B-Algorithm
function	I-Algorithm
is	O
assessed	O
here	O
.	O
</s>
<s>
In	O
data	B-General_Concept
storage	O
and	O
retrieval	O
applications	O
,	O
the	O
use	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
is	O
a	O
trade-off	O
between	O
search	O
time	O
and	O
data	B-General_Concept
storage	O
space	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
takes	O
a	O
finite	O
amount	O
of	O
time	O
to	O
map	O
a	O
potentially	O
large	O
keyspace	O
to	O
a	O
feasible	O
amount	O
of	O
storage	O
space	O
searchable	O
in	O
a	O
bounded	O
amount	O
of	O
time	O
regardless	O
of	O
the	O
number	O
of	O
keys	O
.	O
</s>
<s>
In	O
most	O
applications	O
,	O
the	O
hash	B-Algorithm
function	I-Algorithm
should	O
be	O
computable	O
with	O
minimum	O
latency	O
and	O
secondarily	O
in	O
a	O
minimum	O
number	O
of	O
instructions	O
.	O
</s>
<s>
Because	O
collisions	O
should	O
be	O
infrequent	O
,	O
and	O
cause	O
a	O
marginal	O
delay	O
but	O
are	O
otherwise	O
harmless	O
,	O
it	O
's	O
usually	O
preferable	O
to	O
choose	O
a	O
faster	O
hash	B-Algorithm
function	I-Algorithm
over	O
one	O
that	O
needs	O
more	O
computation	O
but	O
saves	O
a	O
few	O
collisions	O
.	O
</s>
<s>
Consider	O
a	O
pseudorandom	B-Algorithm
number	I-Algorithm
generator	I-Algorithm
function	O
that	O
is	O
uniform	O
on	O
the	O
interval	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
uniform	O
on	O
the	O
interval	O
is	O
.	O
</s>
<s>
If	O
keys	O
are	O
being	O
hashed	O
repeatedly	O
,	O
and	O
the	O
hash	B-Algorithm
function	I-Algorithm
is	O
costly	O
,	O
computing	O
time	O
can	O
be	O
saved	O
by	O
precomputing	O
the	O
hash	B-Error_Name
codes	I-Error_Name
and	O
storing	O
them	O
with	O
the	O
keys	O
.	O
</s>
<s>
Matching	O
hash	B-Error_Name
codes	I-Error_Name
almost	O
certainly	O
means	O
the	O
keys	O
are	O
identical	O
.	O
</s>
<s>
This	O
technique	O
is	O
used	O
for	O
the	O
transposition	B-General_Concept
table	I-General_Concept
in	O
game-playing	O
programs	O
,	O
which	O
stores	O
a	O
64-bit	O
hashed	O
representation	O
of	O
the	O
board	O
position	O
.	O
</s>
<s>
A	O
universal	B-Algorithm
hashing	I-Algorithm
scheme	O
is	O
a	O
randomized	B-General_Concept
algorithm	I-General_Concept
that	O
selects	O
a	O
hashing	B-Error_Name
function	I-Error_Name
among	O
a	O
family	O
of	O
such	O
functions	O
,	O
in	O
such	O
a	O
way	O
that	O
the	O
probability	O
of	O
a	O
collision	B-Algorithm
of	O
any	O
two	O
distinct	O
keys	O
is	O
,	O
where	O
is	O
the	O
number	O
of	O
distinct	O
hash	B-Error_Name
values	I-Error_Name
desired	O
—	O
independently	O
of	O
the	O
two	O
keys	O
.	O
</s>
<s>
Universal	B-Algorithm
hashing	I-Algorithm
ensures	O
(	O
in	O
a	O
probabilistic	O
sense	O
)	O
that	O
the	O
hash	B-Algorithm
function	I-Algorithm
application	O
will	O
behave	O
as	O
well	O
as	O
if	O
it	O
were	O
using	O
a	O
random	O
function	O
,	O
for	O
any	O
distribution	O
of	O
the	O
input	O
data	B-General_Concept
.	O
</s>
<s>
It	O
will	O
,	O
however	O
,	O
have	O
more	O
collisions	O
than	O
perfect	B-Algorithm
hashing	I-Algorithm
and	O
may	O
require	O
more	O
operations	O
than	O
a	O
special-purpose	O
hash	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
is	O
applicable	O
in	O
a	O
variety	O
of	O
situations	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
that	O
allows	O
only	O
certain	O
table	O
sizes	O
,	O
strings	O
only	O
up	O
to	O
a	O
certain	O
length	O
,	O
or	O
ca	O
n't	O
accept	O
a	O
seed	O
(	O
i.e.	O
</s>
<s>
allow	O
double	B-Algorithm
hashing	I-Algorithm
)	O
is	O
n't	O
as	O
useful	O
as	O
one	O
that	O
does	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
procedure	O
must	O
be	O
deterministic	B-General_Concept
—	O
meaning	O
that	O
for	O
a	O
given	O
input	O
value	O
it	O
must	O
always	O
generate	O
the	O
same	O
hash	B-Error_Name
value	I-Error_Name
.	O
</s>
<s>
In	O
other	O
words	O
,	O
it	O
must	O
be	O
a	O
function	O
of	O
the	O
data	B-General_Concept
to	O
be	O
hashed	O
,	O
in	O
the	O
mathematical	O
sense	O
of	O
the	O
term	O
.	O
</s>
<s>
This	O
requirement	O
excludes	O
hash	B-Algorithm
functions	I-Algorithm
that	O
depend	O
on	O
external	O
variable	O
parameters	O
,	O
such	O
as	O
pseudo-random	B-Algorithm
number	I-Algorithm
generators	I-Algorithm
or	O
the	O
time	O
of	O
day	O
.	O
</s>
<s>
It	O
also	O
excludes	O
functions	O
that	O
depend	O
on	O
the	O
memory	O
address	O
of	O
the	O
object	O
being	O
hashed	O
in	O
cases	O
that	O
the	O
address	O
may	O
change	O
during	O
execution	O
(	O
as	O
may	O
happen	O
on	O
systems	O
that	O
use	O
certain	O
methods	O
of	O
garbage	B-General_Concept
collection	I-General_Concept
)	O
,	O
although	O
sometimes	O
rehashing	B-Algorithm
of	O
the	O
item	O
is	O
possible	O
.	O
</s>
<s>
For	O
example	O
,	O
Python	B-Language
adds	O
the	O
feature	O
that	O
hash	B-Algorithm
functions	I-Algorithm
make	O
use	O
of	O
a	O
randomized	O
seed	O
that	O
is	O
generated	O
once	O
when	O
the	O
Python	B-Language
process	O
starts	O
in	O
addition	O
to	O
the	O
input	O
to	O
be	O
hashed	O
.	O
</s>
<s>
The	O
Python	B-Language
hash	B-Algorithm
(	O
SipHash	B-Error_Name
)	O
is	O
still	O
a	O
valid	O
hash	B-Algorithm
function	I-Algorithm
when	O
used	O
within	O
a	O
single	O
run	O
.	O
</s>
<s>
But	O
if	O
the	O
values	O
are	O
persisted	O
(	O
for	O
example	O
,	O
written	O
to	O
disk	O
)	O
they	O
can	O
no	O
longer	O
be	O
treated	O
as	O
valid	O
hash	B-Error_Name
values	I-Error_Name
,	O
since	O
in	O
the	O
next	O
run	O
the	O
random	O
value	O
might	O
differ	O
.	O
</s>
<s>
It	O
is	O
often	O
desirable	O
that	O
the	O
output	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
have	O
fixed	O
size	O
(	O
but	O
see	O
below	O
)	O
.	O
</s>
<s>
If	O
,	O
for	O
example	O
,	O
the	O
output	O
is	O
constrained	O
to	O
32-bit	O
integer	O
values	O
,	O
the	O
hash	B-Error_Name
values	I-Error_Name
can	O
be	O
used	O
to	O
index	O
into	O
an	O
array	O
.	O
</s>
<s>
Such	O
hashing	O
is	O
commonly	O
used	O
to	O
accelerate	O
data	B-General_Concept
searches	O
.	O
</s>
<s>
Producing	O
fixed-length	O
output	O
from	O
variable	O
length	O
input	O
can	O
be	O
accomplished	O
by	O
breaking	O
the	O
input	O
data	B-General_Concept
into	O
chunks	O
of	O
specific	O
size	O
.	O
</s>
<s>
Hash	B-Algorithm
functions	I-Algorithm
used	O
for	O
data	B-General_Concept
searches	O
use	O
some	O
arithmetic	O
expression	O
that	O
iteratively	O
processes	O
chunks	O
of	O
the	O
input	O
(	O
such	O
as	O
the	O
characters	O
in	O
a	O
string	O
)	O
to	O
produce	O
the	O
hash	B-Error_Name
value	I-Error_Name
.	O
</s>
<s>
In	O
many	O
applications	O
,	O
the	O
range	O
of	O
hash	B-Error_Name
values	I-Error_Name
may	O
be	O
different	O
for	O
each	O
run	O
of	O
the	O
program	O
or	O
may	O
change	O
along	O
the	O
same	O
run	O
(	O
for	O
instance	O
,	O
when	O
a	O
hash	B-Algorithm
table	I-Algorithm
needs	O
to	O
be	O
expanded	O
)	O
.	O
</s>
<s>
In	O
those	O
situations	O
,	O
one	O
needs	O
a	O
hash	B-Algorithm
function	I-Algorithm
which	O
takes	O
two	O
parameters	O
—	O
the	O
input	O
data	B-General_Concept
,	O
and	O
the	O
number	O
of	O
allowed	O
hash	B-Error_Name
values	I-Error_Name
.	O
</s>
<s>
A	O
common	O
solution	O
is	O
to	O
compute	O
a	O
fixed	O
hash	B-Algorithm
function	I-Algorithm
with	O
a	O
very	O
large	O
range	O
(	O
say	O
,	O
to	O
)	O
,	O
divide	O
the	O
result	O
by	O
,	O
and	O
use	O
the	O
division	O
's	O
remainder	O
.	O
</s>
<s>
When	O
this	O
approach	O
is	O
used	O
,	O
the	O
hash	B-Algorithm
function	I-Algorithm
must	O
be	O
chosen	O
so	O
that	O
the	O
result	O
has	O
fairly	O
uniform	O
distribution	O
between	O
and	O
,	O
for	O
any	O
value	O
of	O
that	O
may	O
occur	O
in	O
the	O
application	O
.	O
</s>
<s>
When	O
the	O
hash	B-Algorithm
function	I-Algorithm
is	O
used	O
to	O
store	O
values	O
in	O
a	O
hash	B-Algorithm
table	I-Algorithm
that	O
outlives	O
the	O
run	O
of	O
the	O
program	O
,	O
and	O
the	O
hash	B-Algorithm
table	I-Algorithm
needs	O
to	O
be	O
expanded	O
or	O
shrunk	O
,	O
the	O
hash	B-Algorithm
table	I-Algorithm
is	O
referred	O
to	O
as	O
a	O
dynamic	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
that	O
will	O
relocate	O
the	O
minimum	O
number	O
of	O
records	O
when	O
the	O
table	O
is	O
resized	O
is	O
desirable	O
.	O
</s>
<s>
What	O
is	O
needed	O
is	O
a	O
hash	B-Algorithm
function	I-Algorithm
–	O
where	O
is	O
the	O
key	O
being	O
hashed	O
and	O
is	O
the	O
number	O
of	O
allowed	O
hash	B-Error_Name
values	I-Error_Name
–	O
such	O
that	O
with	O
probability	O
close	O
to	O
.	O
</s>
<s>
Linear	B-Algorithm
hashing	I-Algorithm
and	O
spiral	O
storage	O
are	O
examples	O
of	O
dynamic	O
hash	B-Algorithm
functions	I-Algorithm
that	O
execute	O
in	O
constant	O
time	O
but	O
relax	O
the	O
property	O
of	O
uniformity	O
to	O
achieve	O
the	O
minimal	O
movement	O
property	O
.	O
</s>
<s>
Extendible	B-Algorithm
hashing	I-Algorithm
uses	O
a	O
dynamic	O
hash	B-Algorithm
function	I-Algorithm
that	O
requires	O
space	O
proportional	O
to	O
to	O
compute	O
the	O
hash	B-Algorithm
function	I-Algorithm
,	O
and	O
it	O
becomes	O
a	O
function	O
of	O
the	O
previous	O
keys	O
that	O
have	O
been	O
inserted	O
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
with	O
minimal	O
movement	O
is	O
especially	O
useful	O
in	O
distributed	B-Operating_System
hash	I-Operating_System
tables	I-Operating_System
.	O
</s>
<s>
In	O
some	O
applications	O
,	O
the	O
input	O
data	B-General_Concept
may	O
contain	O
features	O
that	O
are	O
irrelevant	O
for	O
comparison	O
purposes	O
.	O
</s>
<s>
For	O
such	O
data	B-General_Concept
,	O
one	O
must	O
use	O
a	O
hash	B-Algorithm
function	I-Algorithm
that	O
is	O
compatible	O
with	O
the	O
data	B-General_Concept
equivalence	O
criterion	O
being	O
used	O
:	O
that	O
is	O
,	O
any	O
two	O
inputs	O
that	O
are	O
considered	O
equivalent	O
must	O
yield	O
the	O
same	O
hash	B-Error_Name
value	I-Error_Name
.	O
</s>
<s>
The	O
method	O
giving	O
the	O
best	O
distribution	O
is	O
data-dependent	O
.	O
</s>
<s>
If	O
the	O
data	B-General_Concept
to	O
be	O
hashed	O
is	O
small	O
enough	O
,	O
one	O
can	O
use	O
the	O
data	B-General_Concept
itself	O
(	O
reinterpreted	O
as	O
an	O
integer	O
)	O
as	O
the	O
hashed	O
value	O
.	O
</s>
<s>
The	O
cost	O
of	O
computing	O
this	O
identity	O
hash	B-Algorithm
function	I-Algorithm
is	O
effectively	O
zero	O
.	O
</s>
<s>
This	O
hash	B-Algorithm
function	I-Algorithm
is	O
perfect	B-Algorithm
,	O
as	O
it	O
maps	O
each	O
input	O
to	O
a	O
distinct	O
hash	B-Error_Name
value	I-Error_Name
.	O
</s>
<s>
For	O
example	O
,	O
in	O
Java	B-Language
,	O
the	O
hash	B-Error_Name
code	I-Error_Name
is	O
a	O
32-bit	O
integer	O
.	O
</s>
<s>
Other	O
types	O
of	O
data	B-General_Concept
can	O
also	O
use	O
this	O
hashing	O
scheme	O
.	O
</s>
<s>
If	O
each	O
character	O
is	O
stored	O
in	O
8	O
bits	O
(	O
as	O
in	O
extended	B-Protocol
ASCII	I-Protocol
or	O
ISO	O
Latin	O
1	O
)	O
,	O
the	O
table	O
has	O
only	O
28	O
=	O
256	O
entries	O
;	O
in	O
the	O
case	O
of	O
Unicode	O
characters	O
,	O
the	O
table	O
would	O
have	O
17×216	O
=	O
entries	O
.	O
</s>
<s>
The	O
same	O
technique	O
can	O
be	O
used	O
to	O
map	O
two-letter	B-Language
country	I-Language
codes	I-Language
like	O
"	O
us	O
"	O
or	O
"	O
za	O
"	O
to	O
country	O
names	O
(	O
262	O
=	O
676	O
table	O
entries	O
)	O
,	O
5-digit	O
zip	O
codes	O
like	O
13083	O
to	O
city	O
names	O
(	O
entries	O
)	O
,	O
etc	O
.	O
</s>
<s>
Invalid	O
data	B-General_Concept
values	O
(	O
such	O
as	O
the	O
country	O
code	O
"	O
xx	O
"	O
or	O
the	O
zip	O
code	O
00000	O
)	O
may	O
be	O
left	O
undefined	O
in	O
the	O
table	O
or	O
mapped	O
to	O
some	O
appropriate	O
"	O
null	O
"	O
value	O
.	O
</s>
<s>
In	O
this	O
case	O
,	O
any	O
number	O
of	O
any	O
bits	O
in	O
the	O
key	O
may	O
be	O
extracted	O
and	O
collated	O
as	O
an	O
index	O
into	O
the	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
a	O
simple	O
hash	B-Algorithm
function	I-Algorithm
might	O
mask	O
off	O
the	O
least	O
significant	O
m	O
bits	O
and	O
use	O
the	O
result	O
as	O
an	O
index	O
into	O
a	O
hash	B-Algorithm
table	I-Algorithm
of	O
size	O
2m	O
.	O
</s>
<s>
A	O
folding	O
hash	B-Error_Name
code	I-Error_Name
is	O
produced	O
by	O
dividing	O
the	O
input	O
into	O
n	O
sections	O
of	O
m	O
bits	O
,	O
where	O
2m	O
is	O
the	O
table	O
size	O
,	O
and	O
using	O
a	O
parity-preserving	O
bitwise	O
operation	O
such	O
as	O
ADD	O
or	O
XOR	O
to	O
combine	O
the	O
sections	O
,	O
followed	O
by	O
a	O
mask	O
or	O
shifts	O
to	O
trim	O
off	O
any	O
excess	O
bits	O
at	O
the	O
high	O
or	O
low	O
end	O
.	O
</s>
<s>
A	O
mid-squares	O
hash	B-Error_Name
code	I-Error_Name
is	O
produced	O
by	O
squaring	O
the	O
input	O
and	O
extracting	O
an	O
appropriate	O
number	O
of	O
middle	O
digits	O
or	O
bits	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
input	O
is	O
123,456,789	O
and	O
the	O
hash	B-Algorithm
table	I-Algorithm
size	O
10	O
,	O
000	O
,	O
squaring	O
the	O
key	O
produces	O
15	O
,	O
241	O
,	O
578	O
,	O
750	O
,	O
190	O
,	O
521	O
,	O
so	O
the	O
hash	B-Error_Name
code	I-Error_Name
is	O
taken	O
as	O
the	O
middle	O
4	O
digits	O
of	O
the	O
17-digit	O
number	O
(	O
ignoring	O
the	O
high	O
digit	O
)	O
8750	O
.	O
</s>
<s>
The	O
mid-squares	O
method	O
produces	O
a	O
reasonable	O
hash	B-Error_Name
code	I-Error_Name
if	O
there	O
is	O
not	O
a	O
lot	O
of	O
leading	O
or	O
trailing	O
zeros	O
in	O
the	O
key	O
.	O
</s>
<s>
If	O
follows	O
that	O
the	O
corresponding	O
hash	B-Algorithm
function	I-Algorithm
will	O
map	O
keys	O
with	O
fewer	O
than	O
t	O
bits	O
in	O
common	O
to	O
unique	O
indices	O
.	O
</s>
<s>
Standard	O
multiplicative	O
hashing	O
uses	O
the	O
formula	O
which	O
produces	O
a	O
hash	B-Error_Name
value	I-Error_Name
in	O
.	O
</s>
<s>
and	O
for	O
fixed	O
and	O
this	O
translates	O
into	O
a	O
single	O
integer	O
multiplication	O
and	O
right-shift	O
making	O
it	O
one	O
of	O
the	O
fastest	O
hash	B-Algorithm
functions	I-Algorithm
to	O
compute	O
.	O
</s>
<s>
A	O
property	O
of	O
this	O
multiplier	O
is	O
that	O
it	O
uniformly	O
distributes	O
over	O
the	O
table	O
space	O
,	O
blocks	B-Application
of	O
consecutive	O
keys	O
with	O
respect	O
to	O
any	O
block	O
of	O
bits	O
in	O
the	O
key	O
.	O
</s>
<s>
Tabulation	O
hashing	O
,	O
more	O
generally	O
known	O
as	O
Zobrist	O
hashing	O
after	O
Albert	O
Zobrist	O
,	O
an	O
American	O
computer	O
scientist	O
,	O
is	O
a	O
method	O
for	O
constructing	O
universal	B-Algorithm
families	I-Algorithm
of	O
hash	B-Algorithm
functions	I-Algorithm
by	O
combining	O
table	O
lookup	O
with	O
XOR	O
operations	O
.	O
</s>
<s>
The	O
resulting	O
value	O
was	O
reduced	O
by	O
modulo	O
,	O
folding	O
or	O
some	O
other	O
operation	O
to	O
produce	O
a	O
hash	B-Algorithm
table	I-Algorithm
index	O
.	O
</s>
<s>
The	O
original	O
Zobrist	O
hash	B-Algorithm
was	O
stored	O
in	O
the	O
table	O
as	O
the	O
representation	O
of	O
the	O
position	O
.	O
</s>
<s>
This	O
kind	O
of	O
function	O
has	O
some	O
nice	O
theoretical	O
properties	O
,	O
one	O
of	O
which	O
is	O
called	O
3-tuple	O
independence	O
meaning	O
every	O
3-tuple	O
of	O
keys	O
is	O
equally	O
likely	O
to	O
be	O
mapped	O
to	O
any	O
3-tuple	O
of	O
hash	B-Error_Name
values	I-Error_Name
.	O
</s>
<s>
A	O
hash	B-Algorithm
function	I-Algorithm
can	O
be	O
designed	O
to	O
exploit	O
existing	O
entropy	O
in	O
the	O
keys	O
.	O
</s>
<s>
If	O
the	O
keys	O
have	O
leading	O
or	O
trailing	O
zeros	O
,	O
or	O
particular	O
fields	O
that	O
are	O
unused	O
,	O
always	O
zero	O
or	O
some	O
other	O
constant	O
,	O
or	O
generally	O
vary	O
little	O
,	O
then	O
masking	O
out	O
only	O
the	O
volatile	O
bits	O
and	O
hashing	O
on	O
those	O
will	O
provide	O
a	O
better	O
and	O
possibly	O
faster	O
hash	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Selected	O
divisors	O
or	O
multipliers	O
in	O
the	O
division	O
and	O
multiplicative	O
schemes	O
may	O
make	O
more	O
uniform	O
hash	B-Algorithm
functions	I-Algorithm
if	O
the	O
keys	O
are	O
cyclic	O
or	O
have	O
other	O
redundancies	O
.	O
</s>
<s>
When	O
the	O
data	B-General_Concept
values	O
are	O
long	O
(	O
or	O
variable-length	O
)	O
character	O
strings	O
—	O
such	O
as	O
personal	O
names	O
,	O
web	O
page	O
addresses	O
,	O
or	O
mail	O
messages	O
—	O
their	O
distribution	O
is	O
usually	O
very	O
uneven	O
,	O
with	O
complicated	O
dependencies	O
.	O
</s>
<s>
For	O
example	O
,	O
text	O
in	O
any	O
natural	O
language	O
has	O
highly	O
non-uniform	O
distributions	O
of	O
characters	O
,	O
and	O
character	B-Language
pairs	I-Language
,	O
characteristic	O
of	O
the	O
language	O
.	O
</s>
<s>
For	O
such	O
data	B-General_Concept
,	O
it	O
is	O
prudent	O
to	O
use	O
a	O
hash	B-Algorithm
function	I-Algorithm
that	O
depends	O
on	O
all	O
characters	O
of	O
the	O
string	O
—	O
and	O
depends	O
on	O
each	O
character	O
in	O
a	O
different	O
way	O
.	O
</s>
<s>
Simplistic	O
hash	B-Algorithm
functions	I-Algorithm
may	O
add	O
the	O
first	O
and	O
last	O
characters	O
of	O
a	O
string	O
along	O
with	O
the	O
length	O
,	O
or	O
form	O
a	O
word-size	O
hash	B-Algorithm
from	O
the	O
middle	O
4	O
characters	O
of	O
a	O
string	O
.	O
</s>
<s>
but	O
hash	B-Algorithm
functions	I-Algorithm
that	O
do	O
not	O
hash	B-Algorithm
on	O
all	O
characters	O
of	O
a	O
string	O
can	O
readily	O
become	O
linear	O
due	O
to	O
redundancies	O
,	O
clustering	O
or	O
other	O
pathologies	O
in	O
the	O
key	O
set	O
.	O
</s>
<s>
Such	O
strategies	O
may	O
be	O
effective	O
as	O
a	O
custom	O
hash	B-Algorithm
function	I-Algorithm
if	O
the	O
structure	O
of	O
the	O
keys	O
is	O
such	O
that	O
either	O
the	O
middle	O
,	O
ends	O
or	O
other	O
fields	O
are	O
zero	O
or	O
some	O
other	O
invariant	O
constant	O
that	O
does	O
n't	O
differentiate	O
the	O
keys	O
;	O
then	O
the	O
invariant	O
parts	O
of	O
the	O
keys	O
can	O
be	O
ignored	O
.	O
</s>
<s>
A	O
better	O
idea	O
is	O
to	O
multiply	O
the	O
hash	B-Error_Name
total	I-Error_Name
by	O
a	O
constant	O
,	O
typically	O
a	O
sizable	O
prime	O
number	O
,	O
before	O
adding	O
in	O
the	O
next	O
character	O
,	O
ignoring	O
overflow	O
.	O
</s>
<s>
The	O
weakness	O
of	O
this	O
procedure	O
is	O
that	O
information	O
may	O
cluster	O
in	O
the	O
upper	O
or	O
lower	O
bits	O
of	O
the	O
bytes	O
,	O
which	O
clustering	O
will	O
remain	O
in	O
the	O
hashed	O
result	O
and	O
cause	O
more	O
collisions	O
than	O
a	O
proper	O
randomizing	O
hash	B-Algorithm
.	O
</s>
<s>
ASCII	B-Protocol
byte	O
codes	O
,	O
for	O
example	O
,	O
have	O
an	O
upper	O
bit	O
of	O
0	O
and	O
printable	O
strings	O
do	O
n't	O
use	O
the	O
first	O
32	O
byte	O
codes	O
,	O
so	O
the	O
information	O
(	O
95-byte	O
codes	O
)	O
is	O
clustered	O
in	O
the	O
remaining	O
bits	O
in	O
an	O
unobvious	O
manner	O
.	O
</s>
<s>
The	O
classic	O
approach	O
dubbed	O
the	O
PJW	B-Error_Name
hash	I-Error_Name
based	O
on	O
the	O
work	O
of	O
Peter	O
.	O
</s>
<s>
This	O
hash	B-Algorithm
function	I-Algorithm
offsets	O
the	O
bytes	O
4	O
bits	O
before	O
ADDing	O
them	O
together	O
.	O
</s>
<s>
The	O
result	O
is	O
a	O
word	O
size	O
hash	B-Error_Name
code	I-Error_Name
to	O
which	O
a	O
modulo	O
or	O
other	O
reducing	O
operation	O
can	O
be	O
applied	O
to	O
produce	O
the	O
final	O
hash	B-Algorithm
index	O
.	O
</s>
<s>
The	O
final	O
word	O
,	O
which	O
may	O
have	O
unoccupied	O
byte	O
positions	O
,	O
is	O
filled	O
with	O
zeros	O
or	O
a	O
specified	O
"	O
randomizing	O
"	O
value	O
before	O
being	O
folded	O
into	O
the	O
hash	B-Algorithm
.	O
</s>
<s>
The	O
accumulated	O
hash	B-Error_Name
code	I-Error_Name
is	O
reduced	O
by	O
a	O
final	O
modulo	O
or	O
other	O
operation	O
to	O
yield	O
an	O
index	O
into	O
the	O
table	O
.	O
</s>
<s>
Analogous	O
to	O
the	O
way	O
an	O
ASCII	B-Protocol
or	O
EBCDIC	O
character	O
string	O
representing	O
a	O
decimal	O
number	O
is	O
converted	O
to	O
a	O
numeric	O
quantity	O
for	O
computing	O
,	O
a	O
variable	O
length	O
string	O
can	O
be	O
converted	O
as	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
directly	O
as	O
the	O
hash	B-Error_Name
code	I-Error_Name
,	O
or	O
a	O
hash	B-Algorithm
function	I-Algorithm
applied	O
to	O
it	O
to	O
map	O
the	O
potentially	O
large	O
value	O
to	O
the	O
hash	B-Algorithm
table	I-Algorithm
size	O
.	O
</s>
<s>
Available	O
data	B-General_Concept
sizes	O
may	O
restrict	O
the	O
maximum	O
length	O
of	O
string	O
that	O
can	O
be	O
hashed	O
with	O
this	O
method	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
128-bit	O
double	O
long	O
word	O
will	O
hash	B-Algorithm
only	O
a	O
26	O
character	O
alphabetic	O
string	O
(	O
ignoring	O
case	O
)	O
with	O
a	O
radix	O
of	O
29	O
;	O
a	O
printable	O
ASCII	B-Protocol
string	O
is	O
limited	O
to	O
9	O
characters	O
using	O
radix	O
97	O
and	O
a	O
64-bit	O
long	O
word	O
.	O
</s>
<s>
However	O
,	O
alphabetic	O
keys	O
are	O
usually	O
of	O
modest	O
length	O
,	O
because	O
keys	O
must	O
be	O
stored	O
in	O
the	O
hash	B-Algorithm
table	I-Algorithm
.	O
</s>
<s>
In	O
some	O
applications	O
,	O
such	O
as	O
substring	B-Algorithm
search	I-Algorithm
,	O
one	O
can	O
compute	O
a	O
hash	B-Algorithm
function	I-Algorithm
for	O
every	O
-character	O
substring	O
of	O
a	O
given	O
-character	O
string	O
by	O
advancing	O
a	O
window	O
of	O
width	O
characters	O
along	O
the	O
string	O
;	O
where	O
is	O
a	O
fixed	O
integer	O
,	O
and	O
is	O
greater	O
than	O
.	O
</s>
<s>
However	O
,	O
with	O
the	O
proper	O
choice	O
of	O
,	O
one	O
can	O
use	O
the	O
technique	O
of	O
rolling	O
hash	B-Algorithm
to	O
compute	O
all	O
those	O
hashes	B-Algorithm
with	O
an	O
effort	O
proportional	O
to	O
where	O
is	O
the	O
number	O
of	O
occurrences	O
of	O
the	O
substring	O
.	O
</s>
<s>
The	O
most	O
familiar	O
algorithm	O
of	O
this	O
type	O
is	O
Rabin-Karp	B-Algorithm
with	O
best	O
and	O
average	O
case	O
performance	O
and	O
worst	O
case	O
(	O
in	O
all	O
fairness	O
,	O
the	O
worst	O
case	O
here	O
is	O
gravely	O
pathological	O
:	O
both	O
the	O
text	O
string	O
and	O
substring	O
are	O
composed	O
of	O
a	O
repeated	O
single	O
character	O
,	O
such	O
as	O
=	O
"	O
AAAAAAAAAAA	O
"	O
,	O
and	O
=	O
"	O
AAA	O
"	O
)	O
.	O
</s>
<s>
The	O
hash	B-Algorithm
function	I-Algorithm
used	O
for	O
the	O
algorithm	O
is	O
usually	O
the	O
Rabin	B-Algorithm
fingerprint	I-Algorithm
,	O
designed	O
to	O
avoid	O
collisions	O
in	O
8-bit	O
character	O
strings	O
,	O
but	O
other	O
suitable	O
hash	B-Algorithm
functions	I-Algorithm
are	O
also	O
used	O
.	O
</s>
<s>
Worst	O
case	O
result	O
for	O
a	O
hash	B-Algorithm
function	I-Algorithm
can	O
be	O
assessed	O
two	O
ways	O
:	O
theoretical	O
and	O
practical	O
.	O
</s>
<s>
Practical	O
worst	O
case	O
is	O
expected	O
longest	O
probe	O
sequence	O
(	O
hash	B-Algorithm
function	I-Algorithm
+	O
collision	B-Algorithm
resolution	O
method	O
)	O
.	O
</s>
<s>
This	O
analysis	O
considers	O
uniform	O
hashing	O
,	O
that	O
is	O
,	O
any	O
key	O
will	O
map	O
to	O
any	O
particular	O
slot	O
with	O
probability	O
,	O
characteristic	O
of	O
universal	B-Algorithm
hash	I-Algorithm
functions	I-Algorithm
.	O
</s>
<s>
The	O
term	O
hash	B-Algorithm
offers	O
a	O
natural	O
analogy	O
with	O
its	O
non-technical	O
meaning	O
(	O
to	O
chop	O
up	O
or	O
make	O
a	O
mess	O
out	O
of	O
something	O
)	O
,	O
given	O
how	O
hash	B-Algorithm
functions	I-Algorithm
scramble	O
their	O
input	O
data	B-General_Concept
to	O
derive	O
their	O
output	O
.	O
</s>
<s>
In	O
his	O
research	O
for	O
the	O
precise	O
origin	O
of	O
the	O
term	O
,	O
Donald	O
Knuth	O
notes	O
that	O
,	O
while	O
Hans	O
Peter	O
Luhn	O
of	O
IBM	O
appears	O
to	O
have	O
been	O
the	O
first	O
to	O
use	O
the	O
concept	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
in	O
a	O
memo	O
dated	O
January	O
1953	O
,	O
the	O
term	O
itself	O
would	O
only	O
appear	O
in	O
published	O
literature	O
in	O
the	O
late	O
1960s	O
,	O
in	O
Herbert	O
Hellerman	O
's	O
Digital	O
Computer	O
System	O
Principles	O
,	O
even	O
though	O
it	O
was	O
already	O
widespread	O
jargon	O
by	O
then	O
.	O
</s>
