diff --git a/06-hash/hash.tex b/06-hash/hash.tex index 593478fbb6e2f7683ad17a8b0330001a56dd6a51..55675d66ef9672d115108c81f63649f57cecab97 100644 --- a/06-hash/hash.tex +++ b/06-hash/hash.tex @@ -815,7 +815,7 @@ Bloom filters are a~family of data structures for approximate representation of in a~small amount of memory. A~Bloom filter starts with an empty set. Then it supports insertion of new elements and membership queries. Sometimes, the filter gives a~\em{false positive} answer: it answers {\csc yes} even though the element is not in the set. -We will calculate the probability of false positves and decrease it at the expense of +We will calculate the probability of false positives and decrease it at the expense of making the structure slightly larger. False negatives will never occur. \subsection{A trivial example} @@ -900,7 +900,7 @@ If we set~$p$, it follows that $m \approx -n / \ln p$. Since all bands must fit of memory, we want to use $k = \lfloor M/m\rfloor \approx -M/n \cdot \ln p$ bands. False positives occur if we find~1 in all bands, which has probability $$ - (1-p)^k \approx + (1-p)^k = \e^{k\ln(1-p)} \approx \e^{-M/n \cdot \ln p \cdot \ln(1-p)}. $$