<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
is	O
said	O
to	O
be	O
k-independent	O
,	O
k-wise	O
independent	O
or	O
k''-universal	O
if	O
selecting	O
a	O
function	O
at	O
random	O
from	O
the	O
family	O
guarantees	O
that	O
the	O
hash	B-Error_Name
codes	I-Error_Name
of	O
any	O
designated	O
k	O
keys	O
are	O
independent	O
random	O
variables	O
(	O
see	O
precise	O
mathematical	O
definitions	O
below	O
)	O
.	O
</s>
<s>
The	O
trade-offs	O
between	O
the	O
degree	O
of	O
independence	O
and	O
the	O
efficiency	O
of	O
evaluating	O
the	O
hash	B-Error_Name
function	I-Error_Name
are	O
well	O
studied	O
,	O
and	O
many	O
k-independent	O
families	O
have	O
been	O
proposed	O
.	O
</s>
<s>
In	O
the	O
analysis	O
of	O
randomized	O
algorithms	O
and	O
data	O
structures	O
,	O
it	O
is	O
often	O
desirable	O
for	O
the	O
hash	B-Error_Name
codes	I-Error_Name
of	O
various	O
keys	O
to	O
"	O
behave	O
randomly	O
"	O
.	O
</s>
<s>
For	O
instance	O
,	O
if	O
the	O
hash	B-Error_Name
code	I-Error_Name
of	O
each	O
key	O
were	O
an	O
independent	O
random	O
choice	O
in	O
,	O
the	O
number	O
of	O
keys	O
per	O
bin	O
could	O
be	O
analyzed	O
using	O
the	O
Chernoff	O
bound	O
.	O
</s>
<s>
A	O
deterministic	O
hash	B-Error_Name
function	I-Error_Name
cannot	O
offer	O
any	O
such	O
guarantee	O
in	O
an	O
adversarial	O
setting	O
,	O
as	O
the	O
adversary	O
may	O
choose	O
the	O
keys	O
to	O
be	O
the	O
precisely	O
the	O
preimage	O
of	O
a	O
bin	O
.	O
</s>
<s>
Furthermore	O
,	O
a	O
deterministic	O
hash	B-Error_Name
function	I-Error_Name
does	O
not	O
allow	O
for	O
rehashing	B-Algorithm
:	O
sometimes	O
the	O
input	O
data	O
turns	O
out	O
to	O
be	O
bad	O
for	O
the	O
hash	B-Error_Name
function	I-Error_Name
(	O
e.g.	O
</s>
<s>
there	O
are	O
too	O
many	O
collisions	O
)	O
,	O
so	O
one	O
would	O
like	O
to	O
change	O
the	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
The	O
solution	O
to	O
these	O
problems	O
is	O
to	O
pick	O
a	O
function	O
randomly	O
from	O
a	O
large	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
.	O
</s>
<s>
The	O
randomness	O
in	O
choosing	O
the	O
hash	B-Error_Name
function	I-Error_Name
can	O
be	O
used	O
to	O
guarantee	O
some	O
desired	O
random	O
behavior	O
of	O
the	O
hash	B-Error_Name
codes	I-Error_Name
of	O
any	O
keys	O
of	O
interest	O
.	O
</s>
<s>
The	O
first	O
definition	O
along	O
these	O
lines	O
was	O
universal	B-Algorithm
hashing	I-Algorithm
,	O
which	O
guarantees	O
a	O
low	O
collision	O
probability	O
for	O
any	O
two	O
designated	O
keys	O
.	O
</s>
<s>
The	O
concept	O
of	O
-independent	O
hashing	O
,	O
introduced	O
by	O
Wegman	O
and	O
Carter	O
in	O
1981	O
,	O
strengthens	O
the	O
guarantees	O
of	O
random	O
behavior	O
to	O
families	O
of	O
designated	O
keys	O
,	O
and	O
adds	O
a	O
guarantee	O
on	O
the	O
uniform	O
distribution	O
of	O
hash	B-Error_Name
codes	I-Error_Name
.	O
</s>
<s>
The	O
strictest	O
definition	O
,	O
introduced	O
by	O
Wegman	O
and	O
Carter	O
under	O
the	O
name	O
"	O
strongly	O
universal	B-Algorithm
hash	I-Algorithm
family	O
"	O
,	O
is	O
the	O
following	O
.	O
</s>
<s>
A	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
is	O
-independent	O
if	O
for	O
any	O
distinct	O
keys	O
and	O
any	O
hash	B-Error_Name
codes	I-Error_Name
(	O
not	O
necessarily	O
distinct	O
)	O
,	O
we	O
have	O
:	O
</s>
<s>
Therefore	O
,	O
a	O
more	O
common	O
alternative	O
to	O
dealing	O
with	O
rounding	O
issues	O
is	O
to	O
prove	O
that	O
the	O
hash	B-Error_Name
family	O
is	O
close	O
in	O
statistical	O
distance	O
to	O
a	O
-independent	O
family	O
,	O
which	O
allows	O
black-box	O
use	O
of	O
the	O
independence	O
properties	O
.	O
</s>
<s>
The	O
original	O
technique	O
for	O
constructing	O
-independent	O
hash	B-Error_Name
functions	I-Error_Name
,	O
given	O
by	O
Carter	O
and	O
Wegman	O
,	O
was	O
to	O
select	O
a	O
large	O
prime	O
number	O
,	O
choose	O
random	O
numbers	O
modulo	O
,	O
and	O
use	O
these	O
numbers	O
as	O
the	O
coefficients	O
of	O
a	O
polynomial	O
of	O
degree	O
whose	O
values	O
modulo	O
are	O
used	O
as	O
the	O
value	O
of	O
the	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
All	O
polynomials	O
of	O
the	O
given	O
degree	O
modulo	O
are	O
equally	O
likely	O
,	O
and	O
any	O
polynomial	O
is	O
uniquely	O
determined	O
by	O
any	O
-tuple	O
of	O
argument-value	O
pairs	O
with	O
distinct	O
arguments	O
,	O
from	O
which	O
it	O
follows	O
that	O
any	O
-tuple	O
of	O
distinct	O
arguments	O
is	O
equally	O
likely	O
to	O
be	O
mapped	O
to	O
any	O
-tuple	O
of	O
hash	B-Error_Name
values	I-Error_Name
.	O
</s>
<s>
"	O
Faster	O
64-bit	O
universal	B-Algorithm
hashing	I-Algorithm
using	O
carry-less	O
multiplications.	O
"	O
</s>
<s>
Tabulation	B-Algorithm
hashing	I-Algorithm
is	O
a	O
technique	O
for	O
mapping	O
keys	O
to	O
hash	B-Error_Name
values	I-Error_Name
by	O
partitioning	O
each	O
key	O
into	O
bytes	B-Application
,	O
using	O
each	O
byte	B-Application
as	O
the	O
index	O
into	O
a	O
table	O
of	O
random	O
numbers	O
(	O
with	O
a	O
different	O
table	O
for	O
each	O
byte	B-Application
position	O
)	O
,	O
and	O
combining	O
the	O
results	O
of	O
these	O
table	O
lookups	O
by	O
a	O
bitwise	O
exclusive	O
or	O
operation	O
.	O
</s>
<s>
Variations	O
of	O
tabulation	B-Algorithm
hashing	I-Algorithm
can	O
achieve	O
higher	O
degrees	O
of	O
independence	O
by	O
performing	O
table	O
lookups	O
based	O
on	O
overlapping	O
combinations	O
of	O
bits	O
from	O
the	O
input	O
key	O
,	O
or	O
by	O
applying	O
simple	O
tabulation	B-Algorithm
hashing	I-Algorithm
iteratively	O
.	O
</s>
<s>
For	O
instance	O
,	O
hash	B-Error_Name
chaining	O
takes	O
constant	O
expected	O
time	O
even	O
with	O
a	O
2-independent	O
family	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
because	O
the	O
expected	O
time	O
to	O
perform	O
a	O
search	O
for	O
a	O
given	O
key	O
is	O
bounded	O
by	O
the	O
expected	O
number	O
of	O
collisions	O
that	O
key	O
is	O
involved	O
in	O
.	O
</s>
<s>
By	O
linearity	O
of	O
expectation	O
,	O
this	O
expected	O
number	O
equals	O
the	O
sum	O
,	O
over	O
all	O
other	O
keys	O
in	O
the	O
hash	B-Error_Name
table	O
,	O
of	O
the	O
probability	O
that	O
the	O
given	O
key	O
and	O
the	O
other	O
key	O
collide	O
.	O
</s>
<s>
Because	O
the	O
terms	O
of	O
this	O
sum	O
only	O
involve	O
probabilistic	O
events	O
involving	O
two	O
keys	O
,	O
2-independence	O
is	O
sufficient	O
to	O
ensure	O
that	O
this	O
sum	O
has	O
the	O
same	O
value	O
that	O
it	O
would	O
for	O
a	O
truly	O
random	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
Double	B-Algorithm
hashing	I-Algorithm
is	O
another	O
method	O
of	O
hashing	O
that	O
requires	O
a	O
low	O
degree	O
of	O
independence	O
.	O
</s>
<s>
It	O
is	O
a	O
form	O
of	O
open	O
addressing	O
that	O
uses	O
two	O
hash	B-Error_Name
functions	I-Error_Name
:	O
one	O
to	O
determine	O
the	O
start	O
of	O
a	O
probe	O
sequence	O
,	O
and	O
the	O
other	O
to	O
determine	O
the	O
step	O
size	O
between	O
positions	O
in	O
the	O
probe	O
sequence	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
linear	B-Algorithm
probing	I-Algorithm
,	O
a	O
simpler	O
form	O
of	O
open	O
addressing	O
where	O
the	O
step	O
size	O
is	O
always	O
one	O
,	O
requires	O
5-independence	O
.	O
</s>
<s>
It	O
can	O
be	O
guaranteed	O
to	O
work	O
in	O
constant	O
expected	O
time	O
per	O
operation	O
with	O
a	O
5-independent	O
hash	B-Error_Name
function	I-Error_Name
,	O
and	O
there	O
exist	O
4-independent	O
hash	B-Error_Name
functions	I-Error_Name
for	O
which	O
it	O
takes	O
logarithmic	O
time	O
per	O
operation	O
.	O
</s>
<s>
For	O
Cuckoo	B-Algorithm
hashing	I-Algorithm
the	O
required	O
k-independence	O
is	O
not	O
known	O
as	O
of	O
2021	O
.	O
</s>
<s>
Another	O
approach	O
is	O
to	O
use	O
Tabulation	B-Algorithm
hashing	I-Algorithm
,	O
which	O
is	O
not	O
6-independent	O
,	O
but	O
was	O
shown	O
in	O
2012	O
to	O
have	O
other	O
properties	O
sufficient	O
for	O
Cuckoo	B-Algorithm
hashing	I-Algorithm
.	O
</s>
<s>
A	O
third	O
approach	O
from	O
2014	O
is	O
to	O
slightly	O
modify	O
the	O
cuckoo	O
hashtable	O
with	O
a	O
so-called	O
stash	O
,	O
which	O
makes	O
it	O
possible	O
to	O
use	O
nothing	O
more	O
than	O
2-independent	O
hash	B-Error_Name
functions	I-Error_Name
.	O
</s>
<s>
Kane	O
,	O
Nelson	O
and	O
David	O
Woodruff	O
improved	O
the	O
Flajolet	B-Algorithm
–	I-Algorithm
Martin	I-Algorithm
algorithm	I-Algorithm
for	O
the	O
Distinct	O
Elements	O
Problem	O
in	O
2010	O
.	O
</s>
<s>
To	O
give	O
an	O
approximation	O
to	O
the	O
correct	O
answer	O
,	O
they	O
need	O
a	O
-independent	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
The	O
Count	B-Algorithm
sketch	I-Algorithm
algorithm	O
for	O
dimensionality	B-Algorithm
reduction	I-Algorithm
requires	O
two	O
hash	B-Error_Name
functions	I-Error_Name
,	O
one	O
2-independent	O
and	O
one	O
4-independent	O
.	O
</s>
<s>
The	O
Karloff	B-Algorithm
–	I-Algorithm
Zwick	I-Algorithm
algorithm	I-Algorithm
for	O
the	O
MAX-3SAT	B-Application
problem	O
can	O
be	O
implemented	O
with	O
3-independent	O
random	O
variables	O
.	O
</s>
