From 52f63cca7597e58add5ac9fe547691fee3de1a2f Mon Sep 17 00:00:00 2001 From: Martin Mares <mj@ucw.cz> Date: Fri, 21 Feb 2020 17:04:38 +0100 Subject: [PATCH] Hashing: Fixed a couple of typos in notation --- 06-hash/hash.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/06-hash/hash.tex b/06-hash/hash.tex index a038b92..51ae449 100644 --- a/06-hash/hash.tex +++ b/06-hash/hash.tex @@ -198,7 +198,7 @@ Now, we turn back to the original linear family~$\cal L$. \theorem{The family~${\cal L}$ is $(2,4)$-independent.} \proof -We fix $x,y\in [p]$ distinct and $i,j\in [p]$. To verify $(2,4)$-independence, +We fix $x,y\in [p]$ distinct and $i,j\in [m]$. To verify $(2,4)$-independence, we need to prove that $\Pr[h_{a,b}(x) = i \land h_{a,b}(y) = j] \le 4/m^2$ for a~random choice of parameters $(a,b)$. @@ -251,7 +251,7 @@ For 2-independence, we proceed in a~similar way. We are given two items $x_1\ne and two buckets $j_1,j_2\in [m]$. We are bounding $$ \Prsub{h}[h(x_1) \bmod m = j_1 \land h(x_2) \bmod m = j_2] = - \sum_{i_1\equiv j_1\atop i_2\equiv j_2} \Pr[h(x_1) = i_1 \land h(h_2) = i_2]. + \sum_{i_1\equiv j_1\atop i_2\equiv j_2} \Pr[h(x_1) = i_1 \land h(x_2) = i_2]. $$ Again, each term of the sum is at most $c/r^2$. There are at most $\lceil r/m\rceil \le (r+m-1)/m$ choices of~$i_1$ and independently also of~$i_2$. The sum is therefore bounded by @@ -936,7 +936,7 @@ This filter can be analysed similarly to the $k$-band version. We will assume th all hash functions are perfectly random and mutually independent. Insertion of $n$~elements sets $kn$ bits (not necessarily distinct), so the -probability that a~fixed bit $B[i]$ is set is $(1-1/m)^{nk}$, which is approximately +probability that a~fixed bit $B[i]$ is unset is $(1-1/m)^{nk}$, which is approximately $p = \e^{-nk/m}$. We will find the optimum value of~$p$, for which the probability of false positives is minimized. For fixed~$m$, we get $k = -m/n\cdot\ln p$. -- GitLab