<s>
A	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
a	O
space-efficient	O
probabilistic	O
data	B-General_Concept
structure	I-General_Concept
,	O
conceived	O
by	O
Burton	O
Howard	O
Bloom	O
in	O
1970	O
,	O
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>
Elements	O
can	O
be	O
added	O
to	O
the	O
set	O
,	O
but	O
not	O
removed	O
(	O
though	O
this	O
can	O
be	O
addressed	O
with	O
the	O
counting	O
Bloom	B-Algorithm
filter	I-Algorithm
variant	O
)	O
;	O
the	O
more	O
items	O
added	O
,	O
the	O
larger	O
the	O
probability	O
of	O
false	O
positives	O
.	O
</s>
<s>
Bloom	O
proposed	O
the	O
technique	O
for	O
applications	O
where	O
the	O
amount	O
of	O
source	O
data	O
would	O
require	O
an	O
impractically	O
large	O
amount	O
of	O
memory	O
if	O
"	O
conventional	O
"	O
error-free	O
hashing	B-Error_Name
techniques	O
were	O
applied	O
.	O
</s>
<s>
He	O
gave	O
the	O
example	O
of	O
a	O
hyphenation	B-Algorithm
algorithm	I-Algorithm
for	O
a	O
dictionary	B-Application
of	O
500,000	O
words	O
,	O
out	O
of	O
which	O
90%	O
follow	O
simple	O
hyphenation	O
rules	O
,	O
but	O
the	O
remaining	O
10%	O
require	O
expensive	O
disk	O
accesses	O
to	O
retrieve	O
specific	O
hyphenation	O
patterns	O
.	O
</s>
<s>
With	O
sufficient	O
core	B-General_Concept
memory	I-General_Concept
,	O
an	O
error-free	O
hash	B-Error_Name
could	O
be	O
used	O
to	O
eliminate	O
all	O
unnecessary	O
disk	O
accesses	O
;	O
on	O
the	O
other	O
hand	O
,	O
with	O
limited	O
core	B-General_Concept
memory	I-General_Concept
,	O
Bloom	O
's	O
technique	O
uses	O
a	O
smaller	O
hash	B-Error_Name
area	O
but	O
still	O
eliminates	O
most	O
unnecessary	O
accesses	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
hash	B-Error_Name
area	O
only	O
15%	O
of	O
the	O
size	O
needed	O
by	O
an	O
ideal	O
error-free	O
hash	B-Error_Name
still	O
eliminates	O
85%	O
of	O
the	O
disk	O
accesses	O
.	O
</s>
<s>
An	O
empty	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
of	O
bits	O
,	O
all	O
set	O
to	O
0	O
.	O
</s>
<s>
There	O
must	O
also	O
be	O
different	O
hash	B-Error_Name
functions	I-Error_Name
defined	O
,	O
each	O
of	O
which	O
maps	B-Algorithm
or	O
hashes	B-Error_Name
some	O
set	O
element	O
to	O
one	O
of	O
the	O
array	O
positions	O
,	O
generating	O
a	O
uniform	O
random	O
distribution	O
.	O
</s>
<s>
To	O
add	O
an	O
element	O
,	O
feed	O
it	O
to	O
each	O
of	O
the	O
hash	B-Error_Name
functions	I-Error_Name
to	O
get	O
array	O
positions	O
.	O
</s>
<s>
To	O
query	O
for	O
an	O
element	O
(	O
test	O
whether	O
it	O
is	O
in	O
the	O
set	O
)	O
,	O
feed	O
it	O
to	O
each	O
of	O
the	O
hash	B-Error_Name
functions	I-Error_Name
to	O
get	O
array	O
positions	O
.	O
</s>
<s>
In	O
a	O
simple	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
there	O
is	O
no	O
way	O
to	O
distinguish	O
between	O
the	O
two	O
cases	O
,	O
but	O
more	O
advanced	O
techniques	O
can	O
address	O
this	O
problem	O
.	O
</s>
<s>
The	O
requirement	O
of	O
designing	O
different	O
independent	O
hash	B-Error_Name
functions	I-Error_Name
can	O
be	O
prohibitive	O
for	O
large	O
.	O
</s>
<s>
For	O
a	O
good	O
hash	B-Error_Name
function	I-Error_Name
with	O
a	O
wide	O
output	O
,	O
there	O
should	O
be	O
little	O
if	O
any	O
correlation	O
between	O
different	O
bit-fields	O
of	O
such	O
a	O
hash	B-Error_Name
,	O
so	O
this	O
type	O
of	O
hash	B-Error_Name
can	O
be	O
used	O
to	O
generate	O
multiple	O
"	O
different	O
"	O
hash	B-Error_Name
functions	I-Error_Name
by	O
slicing	O
its	O
output	O
into	O
multiple	O
bit	O
fields	O
.	O
</s>
<s>
Alternatively	O
,	O
one	O
can	O
pass	O
different	O
initial	O
values	O
(	O
such	O
as	O
0	O
,	O
1	O
,	O
...	O
,	O
1	O
)	O
to	O
a	O
hash	B-Error_Name
function	I-Error_Name
that	O
takes	O
an	O
initial	O
value	O
;	O
or	O
add	O
(	O
or	O
append	O
)	O
these	O
values	O
to	O
the	O
key	O
.	O
</s>
<s>
For	O
larger	O
and/or	O
,	O
independence	O
among	O
the	O
hash	B-Error_Name
functions	I-Error_Name
can	O
be	O
relaxed	O
with	O
negligible	O
increase	O
in	O
false	O
positive	O
rate	O
.	O
</s>
<s>
and	O
triple	O
hashing	B-Error_Name
,	O
variants	O
of	O
double	B-Algorithm
hashing	I-Algorithm
that	O
are	O
effectively	O
simple	O
random	O
number	O
generators	O
seeded	O
with	O
the	O
two	O
or	O
three	O
hash	B-Error_Name
values	I-Error_Name
.	O
)	O
</s>
<s>
Removing	O
an	O
element	O
from	O
this	O
simple	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
impossible	O
because	O
there	O
is	O
no	O
way	O
to	O
tell	O
which	O
of	O
the	O
bits	O
it	O
maps	B-Algorithm
to	O
should	O
be	O
cleared	O
.	O
</s>
<s>
One-time	O
removal	O
of	O
an	O
element	O
from	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
can	O
be	O
simulated	O
by	O
having	O
a	O
second	O
Bloom	B-Algorithm
filter	I-Algorithm
that	O
contains	O
items	O
that	O
have	O
been	O
removed	O
.	O
</s>
<s>
While	O
risking	O
false	O
positives	O
,	O
Bloom	B-Algorithm
filters	I-Algorithm
have	O
a	O
substantial	O
space	O
advantage	O
over	O
other	O
data	B-General_Concept
structures	I-General_Concept
for	O
representing	O
sets	O
,	O
such	O
as	O
self-balancing	B-Data_Structure
binary	I-Data_Structure
search	I-Data_Structure
trees	I-Data_Structure
,	O
tries	B-General_Concept
,	O
hash	B-Algorithm
tables	I-Algorithm
,	O
or	O
simple	O
arrays	B-Data_Structure
or	O
linked	B-Data_Structure
lists	I-Data_Structure
of	O
the	O
entries	O
.	O
</s>
<s>
However	O
,	O
Bloom	B-Algorithm
filters	I-Algorithm
do	O
not	O
store	O
the	O
data	O
items	O
at	O
all	O
,	O
and	O
a	O
separate	O
solution	O
must	O
be	O
provided	O
for	O
the	O
actual	O
storage	O
.	O
</s>
<s>
A	O
Bloom	B-Algorithm
filter	I-Algorithm
with	O
a	O
1%	O
error	O
and	O
an	O
optimal	O
value	O
of	O
,	O
in	O
contrast	O
,	O
requires	O
only	O
about	O
9.6	O
bits	O
per	O
element	O
,	O
regardless	O
of	O
the	O
size	O
of	O
the	O
elements	O
.	O
</s>
<s>
This	O
advantage	O
comes	O
partly	O
from	O
its	O
compactness	O
,	O
inherited	O
from	O
arrays	B-Data_Structure
,	O
and	O
partly	O
from	O
its	O
probabilistic	O
nature	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
number	O
of	O
potential	O
values	O
is	O
small	O
and	O
many	O
of	O
them	O
can	O
be	O
in	O
the	O
set	O
,	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
easily	O
surpassed	O
by	O
the	O
deterministic	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
which	O
requires	O
only	O
one	O
bit	O
for	O
each	O
potential	O
element	O
.	O
</s>
<s>
Hash	B-Algorithm
tables	I-Algorithm
gain	O
a	O
space	O
and	O
time	O
advantage	O
if	O
they	O
begin	O
ignoring	O
collisions	O
and	O
store	O
only	O
whether	O
each	O
bucket	O
contains	O
an	O
entry	O
;	O
in	O
this	O
case	O
,	O
they	O
have	O
effectively	O
become	O
Bloom	B-Algorithm
filters	I-Algorithm
with	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
also	O
have	O
the	O
unusual	O
property	O
that	O
the	O
time	O
needed	O
either	O
to	O
add	O
items	O
or	O
to	O
check	O
whether	O
an	O
item	O
is	O
in	O
the	O
set	O
is	O
a	O
fixed	O
constant	O
,	O
,	O
completely	O
independent	O
of	O
the	O
number	O
of	O
items	O
already	O
in	O
the	O
set	O
.	O
</s>
<s>
No	O
other	O
constant-space	O
set	O
data	B-General_Concept
structure	I-General_Concept
has	O
this	O
property	O
,	O
but	O
the	O
average	O
access	O
time	O
of	O
sparse	O
hash	B-Algorithm
tables	I-Algorithm
can	O
make	O
them	O
faster	O
in	O
practice	O
than	O
some	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
In	O
a	O
hardware	O
implementation	O
,	O
however	O
,	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
shines	O
because	O
its	O
lookups	O
are	O
independent	O
and	O
can	O
be	O
parallelized	O
.	O
</s>
<s>
To	O
understand	O
its	O
space	O
efficiency	O
,	O
it	O
is	O
instructive	O
to	O
compare	O
the	O
general	O
Bloom	B-Algorithm
filter	I-Algorithm
with	O
its	O
special	O
case	O
when	O
.	O
</s>
<s>
The	O
generalized	O
Bloom	B-Algorithm
filter	I-Algorithm
(	O
greater	O
than	O
1	O
)	O
allows	O
many	O
more	O
bits	O
to	O
be	O
set	O
while	O
still	O
maintaining	O
a	O
low	O
false	O
positive	O
rate	O
;	O
if	O
the	O
parameters	O
(	O
and	O
)	O
are	O
chosen	O
well	O
,	O
about	O
half	O
of	O
the	O
bits	O
will	O
be	O
set	O
,	O
and	O
these	O
will	O
be	O
apparently	O
random	O
,	O
minimizing	O
redundancy	O
and	O
maximizing	O
information	O
content	O
.	O
</s>
<s>
Assume	O
that	O
a	O
hash	B-Error_Name
function	I-Error_Name
selects	O
each	O
array	O
position	O
with	O
equal	O
probability	O
.	O
</s>
<s>
Each	O
of	O
the	O
k	O
array	O
positions	O
computed	O
by	O
the	O
hash	B-Error_Name
functions	I-Error_Name
is	O
1	O
with	O
a	O
probability	O
as	O
above	O
.	O
</s>
<s>
After	O
all	O
n	O
items	O
have	O
been	O
added	O
to	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
let	O
q	O
be	O
the	O
fraction	O
of	O
the	O
m	O
bits	O
that	O
are	O
set	O
to	O
0	O
.	O
</s>
<s>
Then	O
,	O
when	O
testing	O
membership	O
of	O
an	O
element	O
not	O
in	O
the	O
set	O
,	O
for	O
the	O
array	O
position	O
given	O
by	O
any	O
of	O
the	O
k	O
hash	B-Error_Name
functions	I-Error_Name
,	O
the	O
probability	O
that	O
the	O
bit	O
is	O
found	O
set	O
to	O
1	O
is	O
.	O
</s>
<s>
So	O
the	O
probability	O
that	O
all	O
k	O
hash	B-Error_Name
functions	I-Error_Name
find	O
their	O
bit	O
set	O
to	O
1	O
is	O
.	O
</s>
<s>
The	O
number	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
k	O
,	O
must	O
be	O
a	O
positive	O
integer	O
.	O
</s>
<s>
with	O
the	O
corresponding	O
number	O
of	O
hash	B-Error_Name
functions	I-Error_Name
k	O
(	O
ignoring	O
integrality	O
)	O
:	O
</s>
<s>
This	O
means	O
that	O
for	O
a	O
given	O
false	O
positive	O
probability	O
ε	O
,	O
the	O
length	O
of	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
m	O
is	O
proportionate	O
to	O
the	O
number	O
of	O
elements	O
being	O
filtered	O
n	O
and	O
the	O
required	O
number	O
of	O
hash	B-Error_Name
functions	I-Error_Name
only	O
depends	O
on	O
the	O
target	O
false	O
positive	O
probability	O
ε	O
.	O
</s>
<s>
showed	O
that	O
the	O
number	O
of	O
items	O
in	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
can	O
be	O
approximated	O
with	O
the	O
following	O
formula	O
,	O
</s>
<s>
where	O
is	O
an	O
estimate	O
of	O
the	O
number	O
of	O
items	O
in	O
the	O
filter	O
,	O
m	O
is	O
the	O
length	O
(	O
size	O
)	O
of	O
the	O
filter	O
,	O
k	O
is	O
the	O
number	O
of	O
hash	B-Error_Name
functions	I-Error_Name
,	O
and	O
X	O
is	O
the	O
number	O
of	O
bits	O
set	O
to	O
one	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
are	O
a	O
way	O
of	O
compactly	O
representing	O
a	O
set	O
of	O
items	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
used	O
to	O
approximate	O
the	O
size	O
of	O
the	O
intersection	O
and	O
union	O
of	O
two	O
sets	O
.	O
</s>
<s>
where	O
is	O
the	O
number	O
of	O
bits	O
set	O
to	O
one	O
in	O
either	O
of	O
the	O
two	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
Unlike	O
a	O
standard	O
hash	B-Algorithm
table	I-Algorithm
using	O
open	O
addressing	O
for	O
collision	O
resolution	O
,	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
of	O
a	O
fixed	O
size	O
can	O
represent	O
a	O
set	O
with	O
an	O
arbitrarily	O
large	O
number	O
of	O
elements	O
;	O
adding	O
an	O
element	O
never	O
fails	O
due	O
to	O
the	O
data	B-General_Concept
structure	I-General_Concept
"	O
filling	O
up	O
"	O
.	O
</s>
<s>
With	O
open	O
addressing	O
hashing	B-Error_Name
,	O
false	O
positives	O
are	O
never	O
produced	O
,	O
but	O
performance	O
steadily	O
deteriorates	O
until	O
it	O
approaches	O
linear	O
search	O
.	O
</s>
<s>
Union	O
and	O
intersection	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
with	O
the	O
same	O
size	O
and	O
set	O
of	O
hash	B-Error_Name
functions	I-Error_Name
can	O
be	O
implemented	O
with	O
bitwise	O
OR	O
and	O
AND	O
operations	O
,	O
respectively	O
.	O
</s>
<s>
The	O
union	O
operation	O
on	O
Bloom	B-Algorithm
filters	I-Algorithm
is	O
lossless	O
in	O
the	O
sense	O
that	O
the	O
resulting	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
the	O
same	O
as	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
created	O
from	O
scratch	O
using	O
the	O
union	O
of	O
the	O
two	O
sets	O
.	O
</s>
<s>
The	O
intersect	O
operation	O
satisfies	O
a	O
weaker	O
property	O
:	O
the	O
false	O
positive	O
probability	O
in	O
the	O
resulting	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
at	O
most	O
the	O
false-positive	O
probability	O
in	O
one	O
of	O
the	O
constituent	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
but	O
may	O
be	O
larger	O
than	O
the	O
false	O
positive	O
probability	O
in	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
created	O
from	O
scratch	O
using	O
the	O
intersection	O
of	O
the	O
two	O
sets	O
.	O
</s>
<s>
Some	O
kinds	O
of	O
superimposed	B-General_Concept
code	I-General_Concept
can	O
be	O
seen	O
as	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
implemented	O
with	O
physical	O
edge-notched	O
cards	O
.	O
</s>
<s>
An	O
example	O
is	O
Zatocoding	B-General_Concept
,	O
invented	O
by	O
Calvin	O
Mooers	O
in	O
1947	O
,	O
in	O
which	O
the	O
set	O
of	O
categories	O
associated	O
with	O
a	O
piece	O
of	O
information	O
is	O
represented	O
by	O
notches	O
on	O
a	O
card	O
,	O
with	O
a	O
random	O
pattern	O
of	O
four	O
notches	O
for	O
each	O
category	O
.	O
</s>
<s>
Fruit	O
flies	O
use	O
a	O
modified	O
version	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
detect	O
novelty	O
of	O
odors	O
,	O
with	O
additional	O
features	O
including	O
similarity	O
of	O
novel	O
odor	O
to	O
that	O
of	O
previously	O
experienced	O
examples	O
,	O
and	O
time	O
elapsed	O
since	O
previous	O
experience	O
of	O
the	O
same	O
odor	O
.	O
</s>
<s>
The	O
servers	O
of	O
Akamai	B-Application
Technologies	I-Application
,	O
a	O
content	O
delivery	O
provider	O
,	O
use	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
prevent	O
"	O
one-hit-wonders	O
"	O
from	O
being	O
stored	O
in	O
its	O
disk	O
caches	O
.	O
</s>
<s>
One-hit-wonders	O
are	O
web	O
objects	O
requested	O
by	O
users	O
just	O
once	O
,	O
something	O
that	O
Akamai	B-Application
found	O
applied	O
to	O
nearly	O
three-quarters	O
of	O
their	O
caching	O
infrastructure	O
.	O
</s>
<s>
Using	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
to	O
detect	O
the	O
second	O
request	O
for	O
a	O
web	O
object	O
and	O
caching	O
that	O
object	O
only	O
on	O
its	O
second	O
request	O
prevents	O
one-hit	O
wonders	O
from	O
entering	O
the	O
disk	O
cache	B-Protocol
,	O
significantly	O
reducing	O
disk	O
workload	O
and	O
increasing	O
disk	O
cache	B-Protocol
hit	O
rates	O
.	O
</s>
<s>
Google	O
Bigtable	B-Application
,	O
Apache	B-Language
HBase	I-Language
and	O
Apache	B-Application
Cassandra	I-Application
and	O
PostgreSQL	B-Application
use	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
reduce	O
the	O
disk	O
lookups	O
for	O
non-existent	O
rows	O
or	O
columns	O
.	O
</s>
<s>
The	O
Google	B-Application
Chrome	I-Application
web	O
browser	O
previously	O
used	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
to	O
identify	O
malicious	O
URLs	O
.	O
</s>
<s>
Any	O
URL	O
was	O
first	O
checked	O
against	O
a	O
local	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
and	O
only	O
if	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
returned	O
a	O
positive	O
result	O
was	O
a	O
full	O
check	O
of	O
the	O
URL	O
performed	O
(	O
and	O
the	O
user	O
warned	O
,	O
if	O
that	O
too	O
returned	O
a	O
positive	O
result	O
)	O
.	O
</s>
<s>
Microsoft	B-Application
Bing	I-Application
(	O
search	O
engine	O
)	O
uses	O
multi-level	O
hierarchical	O
Bloom	B-Algorithm
filters	I-Algorithm
for	O
its	O
search	O
index	O
,	O
BitFunnel	B-Algorithm
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
provided	O
lower	O
cost	O
than	O
the	O
previous	O
Bing	B-Application
index	O
,	O
which	O
was	O
based	O
on	O
inverted	B-Algorithm
files	I-Algorithm
.	O
</s>
<s>
The	O
Squid	B-Protocol
Web	I-Protocol
Proxy	I-Protocol
Cache	I-Protocol
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
for	O
cache	B-Protocol
digests	O
.	O
</s>
<s>
Bitcoin	B-Protocol
used	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
speed	O
up	O
wallet	O
synchronization	O
until	O
privacy	O
vulnerabilities	O
with	O
the	O
implementation	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
were	O
discovered	O
.	O
</s>
<s>
The	O
Venti	B-Application
archival	O
storage	O
system	O
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
detect	O
previously	O
stored	O
data	O
.	O
</s>
<s>
The	O
SPIN	B-Application
model	I-Application
checker	I-Application
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
track	O
the	O
reachable	O
state	O
space	O
for	O
large	O
verification	O
problems	O
.	O
</s>
<s>
The	O
Cascading	B-General_Concept
analytics	O
framework	O
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
speed	O
up	O
asymmetric	O
joins	O
,	O
where	O
one	O
of	O
the	O
joined	O
data	O
sets	O
is	O
significantly	O
larger	O
than	O
the	O
other	O
(	O
often	O
called	O
Bloom	O
join	O
in	O
the	O
database	O
literature	O
)	O
.	O
</s>
<s>
The	O
Exim	B-Protocol
mail	O
transfer	O
agent	O
(	O
MTA	O
)	O
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
in	O
its	O
rate-limit	O
feature	O
.	O
</s>
<s>
Medium	B-Protocol
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
avoid	O
recommending	O
articles	O
a	O
user	O
has	O
previously	O
read	O
.	O
</s>
<s>
Ethereum	B-Application
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
for	O
quickly	O
finding	O
logs	O
on	O
the	O
Ethereum	B-Application
blockchain	O
.	O
</s>
<s>
Grafana	B-Protocol
Tempo	O
uses	O
Bloom	B-Algorithm
filters	I-Algorithm
to	O
improve	O
query	O
performance	O
by	O
storing	O
bloom	B-Algorithm
filters	I-Algorithm
for	O
each	O
backend	O
block	O
.	O
</s>
<s>
Classic	O
Bloom	B-Algorithm
filters	I-Algorithm
use	O
bits	O
of	O
space	O
per	O
inserted	O
key	O
,	O
where	O
is	O
the	O
false	O
positive	O
rate	O
of	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
However	O
,	O
the	O
space	O
that	O
is	O
strictly	O
necessary	O
for	O
any	O
data	B-General_Concept
structure	I-General_Concept
playing	O
the	O
same	O
role	O
as	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
only	O
per	O
key	O
.	O
</s>
<s>
Hence	O
Bloom	B-Algorithm
filters	I-Algorithm
use	O
44%	O
more	O
space	O
than	O
an	O
equivalent	O
optimal	O
data	B-General_Concept
structure	I-General_Concept
.	O
</s>
<s>
provide	O
an	O
optimal-space	O
data	B-General_Concept
structure	I-General_Concept
.	O
</s>
<s>
Moreover	O
,	O
their	O
data	B-General_Concept
structure	I-General_Concept
has	O
constant	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
independent	O
of	O
the	O
false	O
positive	O
rate	O
,	O
unlike	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
where	O
a	O
lower	O
false	O
positive	O
rate	O
leads	O
to	O
a	O
greater	O
number	O
of	O
memory	O
accesses	O
per	O
query	O
,	O
.	O
</s>
<s>
Also	O
,	O
it	O
allows	O
elements	O
to	O
be	O
deleted	O
without	O
a	O
space	O
penalty	O
,	O
unlike	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
The	O
same	O
improved	O
properties	O
of	O
optimal	O
space	O
usage	O
,	O
constant	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
,	O
and	O
the	O
ability	O
to	O
delete	O
elements	O
are	O
also	O
provided	O
by	O
the	O
cuckoo	B-Algorithm
filter	I-Algorithm
of	O
,	O
an	O
open	O
source	O
implementation	O
of	O
which	O
is	O
available	O
.	O
</s>
<s>
describe	O
a	O
probabilistic	O
structure	O
based	O
on	O
hash	B-Algorithm
tables	I-Algorithm
,	O
hash	B-Error_Name
compaction	O
,	O
which	O
identify	O
as	O
significantly	O
more	O
accurate	O
than	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
when	O
each	O
is	O
configured	O
optimally	O
.	O
</s>
<s>
Dillinger	O
and	O
Manolios	O
,	O
however	O
,	O
point	O
out	O
that	O
the	O
reasonable	O
accuracy	O
of	O
any	O
given	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
a	O
wide	O
range	O
of	O
numbers	O
of	O
additions	O
makes	O
it	O
attractive	O
for	O
probabilistic	O
enumeration	O
of	O
state	O
spaces	O
of	O
unknown	O
size	O
.	O
</s>
<s>
Hash	B-Error_Name
compaction	O
is	O
,	O
therefore	O
,	O
attractive	O
when	O
the	O
number	O
of	O
additions	O
can	O
be	O
predicted	O
accurately	O
;	O
however	O
,	O
despite	O
being	O
very	O
fast	O
in	O
software	O
,	O
hash	B-Error_Name
compaction	O
is	O
poorly	O
suited	O
for	O
hardware	O
because	O
of	O
worst-case	O
linear	O
access	O
time	O
.	O
</s>
<s>
have	O
studied	O
some	O
variants	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
that	O
are	O
either	O
faster	O
or	O
use	O
less	O
space	O
than	O
classic	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
The	O
basic	O
idea	O
of	O
the	O
fast	O
variant	O
is	O
to	O
locate	O
the	O
k	O
hash	B-Error_Name
values	I-Error_Name
associated	O
with	O
each	O
key	O
into	O
one	O
or	O
two	O
blocks	O
having	O
the	O
same	O
size	O
as	O
processor	O
's	O
memory	O
cache	B-Protocol
blocks	O
(	O
usually	O
64	O
bytes	O
)	O
.	O
</s>
<s>
This	O
will	O
presumably	O
improve	O
performance	O
by	O
reducing	O
the	O
number	O
of	O
potential	O
memory	O
cache	B-Protocol
misses	O
.	O
</s>
<s>
The	O
proposed	O
variants	O
have	O
however	O
the	O
drawback	O
of	O
using	O
about	O
32%	O
more	O
space	O
than	O
classic	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
The	O
space	O
efficient	O
variant	O
relies	O
on	O
using	O
a	O
single	O
hash	B-Error_Name
function	I-Error_Name
that	O
generates	O
for	O
each	O
key	O
a	O
value	O
in	O
the	O
range	O
where	O
is	O
the	O
requested	O
false	O
positive	O
rate	O
.	O
</s>
<s>
The	O
sequence	O
of	O
values	O
is	O
then	O
sorted	O
and	O
compressed	O
using	O
Golomb	B-Algorithm
coding	I-Algorithm
(	O
or	O
some	O
other	O
compression	O
technique	O
)	O
to	O
occupy	O
a	O
space	O
close	O
to	O
bits	O
.	O
</s>
<s>
To	O
query	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
for	O
a	O
given	O
key	O
,	O
it	O
will	O
suffice	O
to	O
check	O
if	O
its	O
corresponding	O
value	O
is	O
stored	O
in	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Decompressing	O
the	O
whole	O
Bloom	B-Algorithm
filter	I-Algorithm
for	O
each	O
query	O
would	O
make	O
this	O
variant	O
totally	O
unusable	O
.	O
</s>
<s>
Because	O
of	O
decompression	O
overhead	O
,	O
this	O
variant	O
may	O
be	O
slower	O
than	O
classic	O
Bloom	B-Algorithm
filters	I-Algorithm
but	O
this	O
may	O
be	O
compensated	O
by	O
the	O
fact	O
that	O
a	O
single	O
hash	B-Error_Name
function	I-Error_Name
needs	O
to	O
be	O
computed	O
.	O
</s>
<s>
Another	O
alternative	O
to	O
classic	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
the	O
cuckoo	B-Algorithm
filter	I-Algorithm
,	O
based	O
on	O
space-efficient	O
variants	O
of	O
cuckoo	B-Algorithm
hashing	I-Algorithm
.	O
</s>
<s>
In	O
this	O
case	O
,	O
a	O
hash	B-Algorithm
table	I-Algorithm
is	O
constructed	O
,	O
holding	O
neither	O
keys	O
nor	O
values	O
,	O
but	O
short	O
fingerprints	O
(	O
small	O
hashes	B-Error_Name
)	O
of	O
the	O
keys	O
.	O
</s>
<s>
One	O
useful	O
property	O
of	O
cuckoo	B-Algorithm
filters	I-Algorithm
is	O
that	O
they	O
are	O
updatable	O
;	O
entries	O
may	O
be	O
dynamically	O
added	O
(	O
with	O
a	O
small	O
probability	O
of	O
failure	O
due	O
to	O
the	O
hash	B-Algorithm
table	I-Algorithm
being	O
full	O
)	O
and	O
removed	O
.	O
</s>
<s>
describes	O
an	O
approach	O
called	O
an	O
xor	O
filter	O
,	O
where	O
they	O
store	O
fingerprints	O
in	O
a	O
particular	O
type	O
of	O
perfect	B-Algorithm
hash	I-Algorithm
table	O
,	O
producing	O
a	O
filter	O
which	O
is	O
more	O
memory	O
efficient	O
(	O
bits	O
per	O
key	O
)	O
and	O
faster	O
than	O
Bloom	O
or	O
cuckoo	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
However	O
,	O
filter	O
creation	O
is	O
more	O
complex	O
than	O
Bloom	O
and	O
cuckoo	B-Algorithm
filters	I-Algorithm
,	O
and	O
it	O
is	O
not	O
possible	O
to	O
modify	O
the	O
set	O
after	O
creation	O
.	O
</s>
<s>
There	O
are	O
over	O
60	O
variants	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
many	O
surveys	O
of	O
the	O
field	O
,	O
and	O
a	O
continuing	O
churn	O
of	O
applications	O
(	O
see	O
e.g.	O
,	O
Luo	O
,	O
et	O
al	O
)	O
.	O
</s>
<s>
Some	O
of	O
the	O
variants	O
differ	O
sufficiently	O
from	O
the	O
original	O
proposal	O
to	O
be	O
breaches	O
from	O
or	O
forks	O
of	O
the	O
original	O
data	B-General_Concept
structure	I-General_Concept
and	O
its	O
philosophy	O
.	O
</s>
<s>
A	O
treatment	O
which	O
unifies	O
Bloom	B-Algorithm
filters	I-Algorithm
with	O
other	O
work	O
on	O
random	B-Architecture
projections	I-Architecture
,	O
compressive	O
sensing	O
,	O
and	O
locality	B-Algorithm
sensitive	I-Algorithm
hashing	I-Algorithm
remains	O
to	O
be	O
done	O
(	O
though	O
see	O
Dasgupta	O
,	O
et	O
al	O
for	O
one	O
attempt	O
inspired	O
by	O
neuroscience	O
)	O
.	O
</s>
<s>
Content	B-Operating_System
delivery	I-Operating_System
networks	I-Operating_System
deploy	O
web	B-Protocol
caches	I-Protocol
around	O
the	O
world	O
to	O
cache	B-Protocol
and	O
serve	O
web	O
content	O
to	O
users	O
with	O
greater	O
performance	O
and	O
reliability	O
.	O
</s>
<s>
A	O
key	O
application	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
is	O
their	O
use	O
in	O
efficiently	O
determining	O
which	O
web	O
objects	O
to	O
store	O
in	O
these	O
web	B-Protocol
caches	I-Protocol
.	O
</s>
<s>
Nearly	O
three-quarters	O
of	O
the	O
URLs	O
accessed	O
from	O
a	O
typical	O
web	B-Protocol
cache	I-Protocol
are	O
"	O
one-hit-wonders	O
"	O
that	O
are	O
accessed	O
by	O
users	O
only	O
once	O
and	O
never	O
again	O
.	O
</s>
<s>
It	O
is	O
clearly	O
wasteful	O
of	O
disk	O
resources	O
to	O
store	O
one-hit-wonders	O
in	O
a	O
web	B-Protocol
cache	I-Protocol
,	O
since	O
they	O
will	O
never	O
be	O
accessed	O
again	O
.	O
</s>
<s>
To	O
prevent	O
caching	O
one-hit-wonders	O
,	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
used	O
to	O
keep	O
track	O
of	O
all	O
URLs	O
that	O
are	O
accessed	O
by	O
users	O
.	O
</s>
<s>
The	O
use	O
of	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
in	O
this	O
fashion	O
significantly	O
reduces	O
the	O
disk	O
write	O
workload	O
,	O
since	O
most	O
one-hit-wonders	O
are	O
not	O
written	O
to	O
the	O
disk	O
cache	B-Protocol
.	O
</s>
<s>
Further	O
,	O
filtering	O
out	O
the	O
one-hit-wonders	O
also	O
saves	O
cache	B-Protocol
space	O
on	O
disk	O
,	O
increasing	O
the	O
cache	B-Protocol
hit	O
rates	O
.	O
</s>
<s>
Kiss	O
et	O
al	O
described	O
a	O
new	O
construction	O
for	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
that	O
avoids	O
false	O
positives	O
in	O
addition	O
to	O
the	O
typical	O
non-existence	O
of	O
false	O
negatives	O
.	O
</s>
<s>
Unlike	O
the	O
typical	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
elements	O
are	O
hashed	O
to	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
through	O
deterministic	O
,	O
fast	O
and	O
simple-to-calculate	O
functions	O
.	O
</s>
<s>
Alternatively	O
,	O
an	O
initial	O
Bloom	B-Algorithm
filter	I-Algorithm
can	O
be	O
constructed	O
in	O
the	O
standard	O
way	O
and	O
then	O
,	O
with	O
a	O
finite	O
and	O
tractably-enumerable	O
domain	O
,	O
all	O
false	O
positives	O
can	O
be	O
exhaustively	O
found	O
and	O
then	O
a	O
second	O
Bloom	B-Algorithm
filter	I-Algorithm
constructed	O
from	O
that	O
list	O
;	O
false	O
positives	O
in	O
the	O
second	O
filter	O
are	O
similarly	O
handled	O
by	O
constructing	O
a	O
third	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
As	O
the	O
universe	O
is	O
finite	O
and	O
the	O
set	O
of	O
false	O
positives	O
strictly	O
shrinks	O
with	O
each	O
step	O
,	O
this	O
procedure	O
results	O
in	O
a	O
finite	O
cascade	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
that	O
(	O
on	O
this	O
closed	O
,	O
finite	O
domain	O
)	O
will	O
produce	O
only	O
true	O
positives	O
and	O
true	O
negatives	O
.	O
</s>
<s>
This	O
construction	O
is	O
used	O
in	O
CRLite	O
,	O
a	O
proposed	O
certificate	O
revocation	O
status	O
distribution	O
mechanism	O
for	O
the	O
Web	O
PKI	O
,	O
and	O
Certificate	B-Protocol
Transparency	I-Protocol
is	O
exploited	O
to	O
close	O
the	O
set	O
of	O
extant	O
certificates	O
.	O
</s>
<s>
Counting	O
filters	O
provide	O
a	O
way	O
to	O
implement	O
a	O
delete	O
operation	O
on	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
without	O
recreating	O
the	O
filter	O
afresh	O
.	O
</s>
<s>
In	O
fact	O
,	O
regular	O
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
considered	O
as	O
counting	O
filters	O
with	O
a	O
bucket	O
size	O
of	O
one	O
bit	O
.	O
</s>
<s>
Arithmetic	B-Algorithm
overflow	I-Algorithm
of	O
the	O
buckets	O
is	O
a	O
problem	O
and	O
the	O
buckets	O
should	O
be	O
sufficiently	O
large	O
to	O
make	O
this	O
case	O
rare	O
.	O
</s>
<s>
If	O
it	O
does	O
occur	O
then	O
the	O
increment	O
and	O
decrement	O
operations	O
must	O
leave	O
the	O
bucket	O
set	O
to	O
the	O
maximum	O
possible	O
value	O
in	O
order	O
to	O
retain	O
the	O
properties	O
of	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Hence	O
counting	O
Bloom	B-Algorithm
filters	I-Algorithm
use	O
3	O
to	O
4	O
times	O
more	O
space	O
than	O
static	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
In	O
contrast	O
,	O
the	O
data	B-General_Concept
structures	I-General_Concept
of	O
and	O
also	O
allow	O
deletions	O
but	O
use	O
less	O
space	O
than	O
a	O
static	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Because	O
the	O
counting	O
Bloom	B-Algorithm
filter	I-Algorithm
table	O
cannot	O
be	O
expanded	O
,	O
the	O
maximal	O
number	O
of	O
keys	O
to	O
be	O
stored	O
simultaneously	O
in	O
the	O
filter	O
must	O
be	O
known	O
in	O
advance	O
.	O
</s>
<s>
introduced	O
a	O
data	B-General_Concept
structure	I-General_Concept
based	O
on	O
d-left	O
hashing	B-Error_Name
that	O
is	O
functionally	O
equivalent	O
but	O
uses	O
approximately	O
half	O
as	O
much	O
space	O
as	O
counting	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
The	O
scalability	O
issue	O
does	O
not	O
occur	O
in	O
this	O
data	B-General_Concept
structure	I-General_Concept
.	O
</s>
<s>
Once	O
the	O
designed	O
capacity	O
is	O
exceeded	O
,	O
the	O
keys	O
could	O
be	O
reinserted	O
in	O
a	O
new	O
hash	B-Algorithm
table	I-Algorithm
of	O
double	O
size	O
.	O
</s>
<s>
introduced	O
a	O
new	O
general	O
method	O
based	O
on	O
variable	O
increments	O
that	O
significantly	O
improves	O
the	O
false	O
positive	O
probability	O
of	O
counting	O
Bloom	B-Algorithm
filters	I-Algorithm
and	O
their	O
variants	O
,	O
while	O
still	O
supporting	O
deletions	O
.	O
</s>
<s>
Unlike	O
counting	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
at	O
each	O
element	O
insertion	O
,	O
the	O
hashed	O
counters	O
are	O
incremented	O
by	O
a	O
hashed	O
variable	O
increment	O
instead	O
of	O
a	O
unit	O
increment	O
.	O
</s>
<s>
shows	O
that	O
false	O
positive	O
of	O
Counting	O
Bloom	B-Algorithm
filter	I-Algorithm
decreases	O
from	O
k	O
=	O
1	O
to	O
a	O
point	O
defined	O
,	O
and	O
increases	O
from	O
to	O
positive	O
infinity	O
,	O
and	O
finds	O
as	O
a	O
function	O
of	O
count	O
threshold	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
organized	O
in	O
distributed	O
data	B-General_Concept
structures	I-General_Concept
to	O
perform	O
fully	O
decentralized	O
computations	O
of	O
aggregate	O
functions	O
.	O
</s>
<s>
Parallel	O
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
implemented	O
to	O
take	O
advantage	O
of	O
the	O
multiple	O
processing	O
elements	O
(	O
PEs	O
)	O
present	O
in	O
parallel	B-Operating_System
shared-nothing	I-Operating_System
machines	I-Operating_System
.	O
</s>
<s>
One	O
of	O
the	O
main	O
obstacles	O
for	O
a	O
parallel	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
the	O
organization	O
and	O
communication	O
of	O
the	O
unordered	O
data	O
which	O
is	O
,	O
in	O
general	O
,	O
distributed	O
evenly	O
over	O
all	O
PEs	O
at	O
the	O
initiation	O
or	O
at	O
batch	O
insertions	O
.	O
</s>
<s>
To	O
order	O
the	O
data	O
two	O
approaches	O
can	O
be	O
used	O
,	O
either	O
resulting	O
in	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
data	O
being	O
stored	O
on	O
each	O
PE	O
,	O
called	O
replicating	O
bloom	B-Algorithm
filter	I-Algorithm
,	O
or	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
data	O
being	O
split	O
into	O
equal	O
parts	O
,	O
each	O
PE	O
storing	O
one	O
part	O
of	O
it	O
.	O
</s>
<s>
For	O
both	O
approaches	O
a	O
"	O
Single	O
Shot	O
"	O
Bloom	B-Algorithm
filter	I-Algorithm
is	O
used	O
which	O
only	O
calculates	O
one	O
hash	B-Error_Name
,	O
resulting	O
in	O
one	O
flipped	O
bit	O
per	O
element	O
,	O
to	O
reduce	O
the	O
communication	O
volume	O
.	O
</s>
<s>
Distributed	O
Bloom	B-Algorithm
filters	I-Algorithm
are	O
initiated	O
by	O
first	O
hashing	B-Error_Name
all	O
elements	O
on	O
their	O
local	O
PE	O
and	O
then	O
sorting	O
them	O
by	O
their	O
hashes	B-Error_Name
locally	O
.	O
</s>
<s>
Bucket	B-Algorithm
sort	I-Algorithm
and	O
also	O
allows	O
local	O
duplicate	O
detection	O
.	O
</s>
<s>
The	O
sorting	O
is	O
used	O
to	O
group	O
the	O
hashes	B-Error_Name
with	O
their	O
assigned	O
PE	O
as	O
separator	O
to	O
create	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
for	O
each	O
group	O
.	O
</s>
<s>
After	O
encoding	O
these	O
Bloom	B-Algorithm
filters	I-Algorithm
using	O
e.g.	O
</s>
<s>
Golomb	B-Algorithm
coding	I-Algorithm
each	O
bloom	B-Algorithm
filter	I-Algorithm
is	O
sent	O
as	O
packet	O
to	O
the	O
PE	O
responsible	O
for	O
the	O
hash	B-Error_Name
values	I-Error_Name
that	O
where	O
inserted	O
into	O
it	O
.	O
</s>
<s>
A	O
PE	O
p	O
is	O
responsible	O
for	O
all	O
hashes	B-Error_Name
between	O
the	O
values	O
and	O
,	O
where	O
s	O
is	O
the	O
total	O
size	O
of	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
data	O
.	O
</s>
<s>
Because	O
each	O
element	O
is	O
only	O
hashed	O
once	O
and	O
therefore	O
only	O
a	O
single	O
bit	O
is	O
set	O
,	O
to	O
check	O
if	O
an	O
element	O
was	O
inserted	O
into	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
only	O
the	O
PE	O
responsible	O
for	O
the	O
hash	B-Error_Name
value	I-Error_Name
of	O
the	O
element	O
needs	O
to	O
be	O
operated	O
on	O
.	O
</s>
<s>
Single	O
insertion	O
operations	O
can	O
also	O
be	O
done	O
efficiently	O
because	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
of	O
only	O
one	O
PE	O
has	O
to	O
be	O
changed	O
,	O
compared	O
to	O
Replicating	O
Bloom	B-Algorithm
filters	I-Algorithm
where	O
every	O
PE	O
would	O
have	O
to	O
update	O
its	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
By	O
distributing	O
the	O
global	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
PEs	O
instead	O
of	O
storing	O
it	O
separately	O
on	O
each	O
PE	O
the	O
Bloom	B-Algorithm
filters	I-Algorithm
size	O
can	O
be	O
far	O
larger	O
,	O
resulting	O
in	O
a	O
larger	O
capacity	O
and	O
lower	O
false	O
positive	O
rate	O
.	O
</s>
<s>
Distributed	O
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
used	O
to	O
improve	O
duplicate	O
detection	O
algorithms	O
by	O
filtering	O
out	O
the	O
most	O
'	O
unique	O
 '	O
elements	O
.	O
</s>
<s>
These	O
can	O
be	O
calculated	O
by	O
communicating	O
only	O
the	O
hashes	B-Error_Name
of	O
elements	O
,	O
not	O
the	O
elements	O
themselves	O
which	O
are	O
far	O
larger	O
in	O
volume	O
,	O
and	O
removing	O
them	O
from	O
the	O
set	O
,	O
reducing	O
the	O
workload	O
for	O
the	O
duplicate	O
detection	O
algorithm	O
used	O
afterwards	O
.	O
</s>
<s>
During	O
the	O
communication	O
of	O
the	O
hashes	B-Error_Name
the	O
PEs	O
search	O
for	O
bits	O
that	O
are	O
set	O
in	O
more	O
than	O
one	O
of	O
the	O
receiving	O
packets	O
,	O
as	O
this	O
would	O
mean	O
that	O
two	O
elements	O
had	O
the	O
same	O
hash	B-Error_Name
and	O
therefore	O
could	O
be	O
duplicates	O
.	O
</s>
<s>
If	O
this	O
occurs	O
a	O
message	O
containing	O
the	O
index	O
of	O
the	O
bit	O
,	O
which	O
is	O
also	O
the	O
hash	B-Error_Name
of	O
the	O
element	O
that	O
could	O
be	O
a	O
duplicate	O
,	O
is	O
sent	O
to	O
the	O
PEs	O
which	O
sent	O
a	O
packet	O
with	O
the	O
set	O
bit	O
.	O
</s>
<s>
All	O
elements	O
that	O
did	O
n't	O
have	O
their	O
hash	B-Error_Name
sent	O
back	O
are	O
now	O
guaranteed	O
to	O
not	O
be	O
a	O
duplicate	O
and	O
wo	O
n't	O
be	O
evaluated	O
further	O
,	O
for	O
the	O
remaining	O
elements	O
a	O
Repartitioning	O
algorithm	O
can	O
be	O
used	O
.	O
</s>
<s>
First	O
all	O
the	O
elements	O
that	O
had	O
their	O
hash	B-Error_Name
value	I-Error_Name
sent	O
back	O
are	O
sent	O
to	O
the	O
PE	O
that	O
their	O
hash	B-Error_Name
is	O
responsible	O
for	O
.	O
</s>
<s>
By	O
allowing	O
a	O
false	O
positive	O
rate	O
for	O
the	O
duplicates	O
,	O
the	O
communication	O
volume	O
can	O
be	O
reduced	O
further	O
as	O
the	O
PEs	O
do	O
n't	O
have	O
to	O
send	O
elements	O
with	O
duplicated	O
hashes	B-Error_Name
at	O
all	O
and	O
instead	O
any	O
element	O
with	O
a	O
duplicated	O
hash	B-Error_Name
can	O
simply	O
be	O
marked	O
as	O
a	O
duplicate	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
false	O
positive	O
rate	O
for	O
duplicate	O
detection	O
is	O
the	O
same	O
as	O
the	O
false	O
positive	O
rate	O
of	O
the	O
used	O
bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
The	O
process	O
of	O
filtering	O
out	O
the	O
most	O
'	O
unique	O
 '	O
elements	O
can	O
also	O
be	O
repeated	O
multiple	O
times	O
by	O
changing	O
the	O
hash	B-Error_Name
function	I-Error_Name
in	O
each	O
filtering	O
step	O
.	O
</s>
<s>
Replicating	O
Bloom	B-Algorithm
filters	I-Algorithm
organize	O
their	O
data	O
by	O
using	O
a	O
well	O
known	O
hypercube	B-Operating_System
algorithm	O
for	O
gossiping	O
,	O
e.g.	O
</s>
<s>
First	O
each	O
PE	O
calculates	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
local	O
elements	O
and	O
stores	O
it	O
.	O
</s>
<s>
By	O
repeating	O
a	O
loop	O
where	O
in	O
each	O
step	O
i	O
the	O
PEs	O
send	O
their	O
local	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
dimension	O
i	O
and	O
merge	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
they	O
receive	O
over	O
the	O
dimension	O
with	O
their	O
local	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
it	O
is	O
possible	O
to	O
double	O
the	O
elements	O
each	O
Bloom	B-Algorithm
filter	I-Algorithm
contains	O
in	O
every	O
iteration	O
.	O
</s>
<s>
After	O
sending	O
and	O
receiving	O
Bloom	B-Algorithm
filters	I-Algorithm
over	O
all	O
dimensions	O
each	O
PE	O
contains	O
the	O
global	O
Bloom	B-Algorithm
filter	I-Algorithm
over	O
all	O
elements	O
.	O
</s>
<s>
Replicating	O
Bloom	B-Algorithm
filters	I-Algorithm
are	O
more	O
efficient	O
when	O
the	O
number	O
of	O
queries	O
is	O
much	O
larger	O
than	O
the	O
number	O
of	O
elements	O
that	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
contains	O
,	O
the	O
break	O
even	O
point	O
compared	O
to	O
Distributed	O
Bloom	B-Algorithm
filters	I-Algorithm
is	O
approximately	O
after	O
accesses	O
,	O
with	O
as	O
the	O
false	O
positive	O
rate	O
of	O
the	O
bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
used	O
for	O
approximate	O
data	B-General_Concept
synchronization	I-General_Concept
as	O
in	O
.	O
</s>
<s>
Counting	O
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
used	O
to	O
approximate	O
the	O
number	O
of	O
differences	O
between	O
two	O
sets	O
and	O
this	O
approach	O
is	O
described	O
in	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
can	O
be	O
adapted	O
to	O
the	O
context	O
of	O
streaming	O
data	O
.	O
</s>
<s>
For	O
instance	O
,	O
proposed	O
Stable	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
which	O
consist	O
of	O
a	O
counting	O
Bloom	B-Algorithm
filter	I-Algorithm
where	O
insertion	O
of	O
a	O
new	O
element	O
sets	O
the	O
associated	O
counters	O
to	O
a	O
value	O
,	O
and	O
then	O
only	O
a	O
fixed	O
amount	O
of	O
counters	O
are	O
decreased	O
by	O
1	O
,	O
hence	O
the	O
memory	O
mostly	O
contains	O
information	O
about	O
recent	O
elements	O
(	O
intuitively	O
,	O
one	O
could	O
assume	O
that	O
the	O
lifetime	O
of	O
an	O
element	O
inside	O
a	O
SBF	O
of	O
counters	O
is	O
around	O
)	O
.	O
</s>
<s>
Another	O
solution	O
is	O
the	O
Aging	O
Bloom	B-Algorithm
filter	I-Algorithm
,	O
that	O
consists	O
of	O
two	O
Bloom	B-Algorithm
filter	I-Algorithm
each	O
occupying	O
half	O
the	O
total	O
available	O
memory	O
:	O
when	O
one	O
filter	O
is	O
full	O
,	O
the	O
second	O
filter	O
is	O
erased	O
and	O
newer	O
elements	O
are	O
then	O
added	O
to	O
this	O
newly	O
empty	O
filter	O
.	O
</s>
<s>
designed	O
a	O
generalization	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
that	O
could	O
associate	O
a	O
value	O
with	O
each	O
element	O
that	O
had	O
been	O
inserted	O
,	O
implementing	O
an	O
associative	B-Application
array	I-Application
.	O
</s>
<s>
Like	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
these	O
structures	O
achieve	O
a	O
small	O
space	O
overhead	O
by	O
accepting	O
a	O
small	O
probability	O
of	O
false	O
positives	O
.	O
</s>
<s>
proposed	O
a	O
lattice-based	O
generalization	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
A	O
compact	O
approximator	O
associates	O
to	O
each	O
key	O
an	O
element	O
of	O
a	O
lattice	O
(	O
the	O
standard	O
Bloom	B-Algorithm
filters	I-Algorithm
being	O
the	O
case	O
of	O
the	O
Boolean	O
two-element	O
lattice	O
)	O
.	O
</s>
<s>
Instead	O
of	O
a	O
bit	B-Data_Structure
array	I-Data_Structure
,	O
they	O
have	O
an	O
array	O
of	O
lattice	O
elements	O
.	O
</s>
<s>
This	O
implementation	O
used	O
a	O
separate	O
array	O
for	O
each	O
hash	B-Error_Name
function	I-Error_Name
.	O
</s>
<s>
This	O
method	O
allows	O
for	O
parallel	O
hash	B-Error_Name
calculations	O
for	O
both	O
insertions	O
and	O
inquiries	O
.	O
</s>
<s>
proposed	O
a	O
variant	O
of	O
Bloom	B-Algorithm
filters	I-Algorithm
that	O
can	O
adapt	O
dynamically	O
to	O
the	O
number	O
of	O
elements	O
stored	O
,	O
while	O
assuring	O
a	O
minimum	O
false	O
positive	O
probability	O
.	O
</s>
<s>
The	O
technique	O
is	O
based	O
on	O
sequences	O
of	O
standard	O
Bloom	B-Algorithm
filters	I-Algorithm
with	O
increasing	O
capacity	O
and	O
tighter	O
false	O
positive	O
probabilities	O
,	O
so	O
as	O
to	O
ensure	O
that	O
a	O
maximum	O
false	O
positive	O
probability	O
can	O
be	O
set	O
beforehand	O
,	O
regardless	O
of	O
the	O
number	O
of	O
elements	O
to	O
be	O
inserted	O
.	O
</s>
<s>
Spatial	O
Bloom	B-Algorithm
filters	I-Algorithm
(	O
SBF	O
)	O
were	O
originally	O
proposed	O
by	O
as	O
a	O
data	B-General_Concept
structure	I-General_Concept
designed	O
to	O
store	O
location	O
information	O
,	O
especially	O
in	O
the	O
context	O
of	O
cryptographic	O
protocols	O
for	O
location	O
privacy	O
.	O
</s>
<s>
However	O
,	O
the	O
main	O
characteristic	O
of	O
SBFs	O
is	O
their	O
ability	O
to	O
store	O
multiple	O
sets	O
in	O
a	O
single	O
data	B-General_Concept
structure	I-General_Concept
,	O
which	O
makes	O
them	O
suitable	O
for	O
a	O
number	O
of	O
different	O
application	O
scenarios	O
.	O
</s>
<s>
A	O
layered	O
Bloom	B-Algorithm
filter	I-Algorithm
consists	O
of	O
multiple	O
Bloom	B-Algorithm
filter	I-Algorithm
layers	O
.	O
</s>
<s>
Layered	O
Bloom	B-Algorithm
filters	I-Algorithm
allow	O
keeping	O
track	O
of	O
how	O
many	O
times	O
an	O
item	O
was	O
added	O
to	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
by	O
checking	O
how	O
many	O
layers	O
contain	O
the	O
item	O
.	O
</s>
<s>
With	O
a	O
layered	O
Bloom	B-Algorithm
filter	I-Algorithm
a	O
check	O
operation	O
will	O
normally	O
return	O
the	O
deepest	O
layer	O
number	O
the	O
item	O
was	O
found	O
in	O
.	O
</s>
<s>
An	O
attenuated	O
Bloom	B-Algorithm
filter	I-Algorithm
of	O
depth	O
D	O
can	O
be	O
viewed	O
as	O
an	O
array	O
of	O
D	O
normal	O
Bloom	B-Algorithm
filters	I-Algorithm
.	O
</s>
<s>
In	O
the	O
context	O
of	O
service	O
discovery	O
in	O
a	O
network	O
,	O
each	O
node	O
stores	O
regular	O
and	O
attenuated	O
Bloom	B-Algorithm
filters	I-Algorithm
locally	O
.	O
</s>
<s>
The	O
regular	O
or	O
local	O
Bloom	B-Algorithm
filter	I-Algorithm
indicates	O
which	O
services	O
are	O
offered	O
by	O
the	O
node	O
itself	O
.	O
</s>
<s>
The	O
i-th	O
value	O
is	O
constructed	O
by	O
taking	O
a	O
union	O
of	O
local	O
Bloom	B-Algorithm
filters	I-Algorithm
for	O
nodes	O
i-hops	O
away	O
from	O
the	O
node	O
.	O
</s>
<s>
Say	O
we	O
are	O
searching	O
for	O
a	O
service	O
A	O
whose	O
id	O
hashes	B-Error_Name
to	O
bits	O
0	O
,	O
1	O
,	O
and	O
3	O
(	O
pattern	O
11010	O
)	O
.	O
</s>
<s>
Since	O
the	O
patterns	O
do	O
n't	O
match	O
,	O
we	O
check	O
the	O
attenuated	O
Bloom	B-Algorithm
filter	I-Algorithm
in	O
order	O
to	O
determine	O
which	O
node	O
should	O
be	O
the	O
next	O
hop	O
.	O
</s>
<s>
By	O
using	O
attenuated	O
Bloom	B-Algorithm
filters	I-Algorithm
consisting	O
of	O
multiple	O
layers	O
,	O
services	O
at	O
more	O
than	O
one	O
hop	O
distance	O
can	O
be	O
discovered	O
while	O
avoiding	O
saturation	O
of	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
by	O
attenuating	O
(	O
shifting	O
out	O
)	O
bits	O
set	O
by	O
sources	O
further	O
away	O
.	O
</s>
<s>
Bloom	B-Algorithm
filters	I-Algorithm
are	O
often	O
used	O
to	O
search	O
large	O
chemical	O
structure	O
databases	O
(	O
see	O
chemical	O
similarity	O
)	O
.	O
</s>
<s>
In	O
the	O
simplest	O
case	O
,	O
the	O
elements	O
added	O
to	O
the	O
filter	O
(	O
called	O
a	O
fingerprint	O
in	O
this	O
field	O
)	O
are	O
just	O
the	O
atomic	O
numbers	O
present	O
in	O
the	O
molecule	O
,	O
or	O
a	O
hash	B-Error_Name
based	O
on	O
the	O
atomic	O
number	O
of	O
each	O
atom	O
and	O
the	O
number	O
and	O
type	O
of	O
its	O
bonds	O
.	O
</s>
<s>
In	O
hash-based	O
fingerprints	O
,	O
a	O
hash	B-Error_Name
function	I-Error_Name
based	O
on	O
atom	O
and	O
bond	O
properties	O
is	O
used	O
to	O
turn	O
a	O
subgraph	O
into	O
a	O
PRNG	B-Algorithm
seed	O
,	O
and	O
the	O
first	O
output	O
values	O
used	O
to	O
set	O
bits	O
in	O
the	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
However	O
,	O
it	O
was	O
n't	O
until	O
around	O
1990	O
that	O
Daylight	O
Chemical	O
Information	O
Systems	O
,	O
Inc	O
.	O
introduced	O
a	O
hash-based	O
method	O
to	O
generate	O
the	O
bits	O
,	O
rather	O
than	O
use	O
a	O
precomputed	O
table	O
.	O
</s>
<s>
Unlike	O
the	O
dictionary	B-Application
approach	O
,	O
the	O
hash	B-Error_Name
method	O
can	O
assign	O
bits	O
for	O
substructures	O
which	O
had	O
n't	O
previously	O
been	O
seen	O
.	O
</s>
<s>
Unlike	O
Bloom	B-Algorithm
filters	I-Algorithm
,	O
the	O
Daylight	O
hash	B-Error_Name
method	O
allows	O
the	O
number	O
of	O
bits	O
assigned	O
per	O
feature	O
to	O
be	O
a	O
function	O
of	O
the	O
feature	O
size	O
,	O
but	O
most	O
implementations	O
of	O
Daylight-like	O
fingerprints	O
use	O
a	O
fixed	O
number	O
of	O
bits	O
per	O
feature	O
,	O
which	O
makes	O
them	O
a	O
Bloom	B-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Even	O
if	O
these	O
are	O
constructed	O
with	O
the	O
same	O
mechanism	O
,	O
these	O
are	O
not	O
Bloom	B-Algorithm
filters	I-Algorithm
because	O
they	O
cannot	O
be	O
used	O
to	O
filter	O
.	O
</s>
