布隆过滤器优化算法double—hashing论文原文(二)

引言

本论文来自leveldb源码中bloom.cc下布隆过滤器实现的代码注释中推荐的论文。论证了一种布隆过滤器的优化方式,带有详细的证明。是不可多得的好文章。其中的许多公式会对布隆过滤器相关的文章有所帮助。所以博主将原文和其中的海量公式转化为了可编辑的markdown和Latex,方便大家引用。如有转载,望注明论文出处和本文出处,谢谢!

论文原文出处:论文原文

本文作者:csdn账号个人空间 - AcWing

受平台字数限制,只好将论文分成多段,望理解

上接布隆过滤器优化算法double—hashing论文原文(一)

6. Rate of Convergence

In the previous sections, we identified a broad class of non-standard Bloom filter schemes that have the same asymptotic false positive probability as a standard Bloom filter. Unfortunately, these results are not particularly compelling in settings with very limited space, since it is reasonable to think that the rate of convergence in the conclusion of Theorem 4.1 might be fairly slow. This problem is compounded by the fact that Bloom filters are particularly attractive in applications where space is extremely limited (for example, see [3]), since they give a fairly small error rate while using only a small constant number of bits per item. Thus, with these applications in mind we provide a detailed analysis of the rate of convergence in Theorem 4.1. Before proceeding with the results, we introduce some useful notation. For functions f ( n ) f(n) f(n) and

g ( n ) g(n) g(n) , we use f ( n ) ∼ g ( n ) f(n)\sim g(n) f(n)g(n) to denote that lim ⁡ n → ∞ f ( n ) / g ( n ) = 1 \operatorname*{lim}_{n\to\infty}f(n)/g(n)=1 limnf(n)/g(n)=1 .Similarly, we use f ( n ) ≲ g ( n ) f(n)\lesssim g(n) f(n)g(n) to denote that lim: sup ⁡ n → ∞ f ( n ) / g ( n ) ≤ 1 \operatorname*{sup}_{n\to\infty}f(n)/g(n)\leq1 supnf(n)/g(n)1 and f ( n ) ≳ g ( n ) f(n)\gtrsim g(n) f(n)g(n) to denote that lim ⁡ inf ⁡ n → ∞ f ( n ) / g ( n ) ≥ 1 \operatorname*{lim}\operatorname*{inf}_{n\to\infty}f(n)/g(n)\geq1 liminfnf(n)/g(n)1 We are now ready to prove the main technical result of this section

Theorem 6.1.Under the same conditions as in Theorem 4.1
P r ( F ) − ( 1 − e − λ / k ) k ∼ n ϵ ( n ) , \mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)^{k}\sim n\epsilon(n), Pr(F)(1eλ/k)knϵ(n),
where
ϵ ( n ) = d e f ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) k + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( 1 − e − λ k ) k − 1 + ∑ j = 2 k P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j . \begin{aligned}\epsilon(n)&\stackrel{def}{=}\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\\&+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\\&+\sum_{j=2}^{k}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}.\end{aligned} ϵ(n)=def(Pr(C(x)=0)1+nλ)(1ekλ)k+(Pr(C(x)=1)nλ)(1ekλ)k1+j=2kPr(C(x)=j)(1ekλ)kj.
Remark. This result is intuitively pleasing, since it says that the portion of the false positive probability represented by the asymptotic error term is essentially the probability that ∥ C ( x , z ) ∥ > 1 \|C(x,z)\|>1 C(x,z)>1 for exactly one x ∈ S x\in S xS and Z 's other k − ∥ C ( x , z ) ∥ k-\|C(x,z)\| kC(x,z) hash locations are hit by the other elements of S S S in the “asymptotic" filter (that is, in the limit as n − 1 → ∞ n-1\to\infty n1 ),which happens with probability ( 1 − e − λ / k ) k − ∥ C ( x , z ) ∥ (1-\mathrm{e}^{-\lambda/k})^{k-\|C(x,z)\|} (1eλ/k)kC(x,z) .(This almost follows from Theorem 4.1. The difference is that now z z z has only k − ∥ C ( x , z ) ∥ k-\|C(x,z)\| kC(x,z) hash locations, while the elements of S − { x } S-\{x\} S{x} each have k k k hash locations; however, it should be clear from the proof of Theorem 4.1 that the limiting false positive probability in this case is ( 1 − e − λ / k ) k − ∥ C ( x , z ) ∥ (1-\mathrm{e}^{-\lambda/k})^{k-\|C(x,z)\|} (1eλ/k)kC(x,z) )

Proof. We begin along the same lines as in the proof of Theorem 4.1. First, we adopt the convention introduced there that allows us to associate the elements of H ( z ) H(z) H(z) (with multiplicity) with the elements of [ k ] [k] [k] . Next, for i ∈ [ k ] i\in[k] i[k] and x ∈ S x\in S xS , we define X i ( x ) = 1 X_{i}(x)=1 Xi(x)=1 if i ∈ C ( x ) i\in C(x) iC(x) and X i ( x ) = 0 X_{i}(x)=0 Xi(x)=0 otherwise, X i = d e f ∑ x ∈ S X i ( x ) X_{i}\stackrel{\mathrm{def}}{=}\sum_{x\in S}X_{i}(x) Xi=defxSXi(x) ,and X = d e f ( X 0 , … , X k − 1 ) X\stackrel{\mathrm{def}}{=}(X_{0},\ldots,X_{k-1}) X=def(X0,,Xk1) .Finally, we define P = d e f ( P 0 , … , P k − 1 ) P\stackrel{\mathrm{def}}{=}(P_{0},\ldots,P_{k-1}) P=def(P0,,Pk1) to be a vector of k k k independent Po ⁡ ( λ / k ) \operatorname{Po}(\lambda/k) Po(λ/k) random variables Define
f ( n ) = d e f P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n g i ( n ) = d e f P r ( i ∈ C ( x ) , ∥ C ( x ) ∥ = 1 ) − λ k n f o r   i ∈ [ k ] h T ( n ) = d e f P r ( C ( x ) = f H ( z ) − 1 ( T ) ) f o r   T ⊆ [ k ] : ∣ T ∣ > 1 , \begin{aligned}&f(n)\stackrel{\mathrm{def}}{=}\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\\&g_{i}(n)\stackrel{\mathrm{def}}{=}\mathbf{Pr}(i\in C(x),\|C(x)\|=1)-\frac{\lambda}{kn}\quad\mathrm{for}\:i\in[k]\\&h_{T}(n)\stackrel{\mathrm{def}}{=}\mathbf{Pr}(C(x)=f_{H(z)}^{-1}(T))\quad\mathrm{for}\:T\subseteq[k]:|T|>1,\end{aligned} f(n)=defPr(C(x)=0)1+nλgi(n)=defPr(iC(x),C(x)=1)knλfori[k]hT(n)=defPr(C(x)=fH(z)1(T))forT[k]:T>1,
and note that they are all o ( 1 / n ) o\left(1/n\right) o(1/n) by the hypotheses of the lemma.For T ⊆ [ k ] T\subseteq[k] T[k] ,we may now


write

P r ( ⋂ i ∈ T X i = 0 ) = ∏ x ∈ S P r ( { i ∈ [ k ] : i ∈ C ( x ) } ⊆ T ‾ ) = ( P r ( ∥ C ( x ) ∥ = 0 ) + ∑ i ∈ T P r ( i ∈ C ( x ) , ∥ C ( x ) ∥ = 1 ) + ∑ T ≤ T : ∣ T ′ ∣ > 1 P r ( C ( x ) = f H ( z ) − 1 ( T ′ ) ) = ( 1 − λ ∣ T ∣ k n + f ( n ) + ∑ i ∈ T g i ( n ) + ∑ T ′ ⊆ T ∣ T ′ ∣ > 1 h T ′ ( n ) ) n ∼ exp ⁡ [ − λ ∣ T ∣ k + n f ( n ) + ∑ i ∈ T n g i ( n ) + ∑ T ′ ⊆ T : ∣ T ′ ∣ > 1 n h g i ′ ( n ) ] = e − λ ∣ T ∣ k ( exp ⁡ [ n f ( n ) + ∑ i ∈ T n g i ( n ) + ∑ T ′ ⊆ T : ∣ T ′ ∣ > 1 n h g i ′ ( n ) ] ) ∼ e − λ ∣ T ∣ k ( 1 + n f ( n ) + ∑ i ∈ T n g i ( n ) + ∑ T ′ ⊆ T : ∣ T ′ ∣ > 1 n h g i ′ ( n ) ) , \begin{aligned}\mathbf{Pr}\left(\bigcap_{i\in T}X_i=0\right)&=\prod_{x\in S}\mathbf{Pr}\left(\{i\in[k]:i\in C(x)\}\subseteq\overline{T}\right)\\&=\left(\mathbf{Pr}(\|C(x)\|=0)+\sum_{i\in T}\mathbf{Pr}(i\in C(x),\|C(x)\|=1)\right.\\&+\sum_{T\leq T:|T^{\prime}|>1}\mathbf{Pr}(C(x)=f_{H(z)}^{-1}(T^{\prime}))\\&=\left(1-\frac{\lambda|T|}{kn}+f(n)+\sum_{i\in T}g_i(n)+\sum_{T^{\prime}\subseteq T|T^{\prime}|>1}h_{T^{\prime}}(n)\right)^n\\&\sim\exp\left[-\frac{\lambda|T|}k+nf(n)+\sum_{i\in T}ng_i(n)+\sum_{T^{\prime}\subseteq T:|T^{\prime}|>1}nhg_i^{\prime}(n)\right]\\&=\mathrm{e}^{-\frac{\lambda|T|}k}\left(\exp\left[nf(n)+\sum_{i\in T}ng_i(n)+\sum_{T^{\prime}\subseteq T:|T^{\prime}|>1}nhg_i^{\prime}(n)\right]\right)\\&\sim\mathrm{e}^{-\frac{\lambda|T|}k}\left(1+nf(n)+\sum_{i\in T}ng_i(n)+\sum_{T^{\prime}\subseteq T:|T^{\prime}|>1}nhg_i^{\prime}(n)\right),\end{aligned} Pr(iTXi=0)=xSPr({i[k]:iC(x)}T)=(Pr(C(x)=0)+iTPr(iC(x),C(x)=1)+TT:T>1Pr(C(x)=fH(z)1(T))= 1knλT+f(n)+iTgi(n)+TTT>1hT(n) nexp kλT+nf(n)+iTngi(n)+TT:T>1nhgi(n) =ekλT exp nf(n)+iTngi(n)+TT:T>1nhgi(n) ekλT 1+nf(n)+iTngi(n)+TT:T>1nhgi(n) ,
where the first two steps are obvious, the third step follows from the definition of f f f ,the y i y_{i} yi 's, and

the h T ′ hT^{\prime} hT 's, and the fourth and sixth steps follow from the assumption that all of those functions are o ( 1 / n ) o\left(1/n\right) o(1/n) (since e t ( n ) ∼ 1 + t ( n ) \mathrm{e}^{t(n)}\sim1+t(n) et(n)1+t(n) if t ( n ) = o ( 1 ) t(n)=o(1) t(n)=o(1)

Thus, the inclusion/exclusion principle implies that

( F ) − P r ( ∀ i : P i > 0 ) = − ( P r ( ∃ i : X i = 0 ) − P r ( ∃ i : P i = 0 ) ) = − ∑ ∅ ⊂ T ⊆ [ k ] ( − 1 ) ∣ T ∣ + 1 ( P r ( ⋂ i ∈ T X i = 0 ) − P r ( ⋂ i ∈ T P i = 0 ) ) = ∑ ∅ ⊂ T ⊆ [ k ] ( − 1 ) ∣ T ∣ ( P r ( ⋂ i ∈ T X i = 0 ) − e − λ ∣ T ∣ k ) ∼ n ∑ ∅ ⊂ T ⊆ [ k ] ( − 1 ) ∣ T ∣ e − Δ ∣ T ∣ k ( f ( n ) + ∑ i ∈ T g i ( n ) + ∑ T ′ ⊆ T ‾ : [ T ′ ] > 1 h T ′ ( n ) ) . \begin{aligned}(\mathcal{F})-\mathbf{Pr}(\forall i:P_{i}>0)&=-\left(\mathbf{Pr}(\exists i:X_{i}=0)-\mathbf{Pr}(\exists i:P_{i}=0)\right)\\&=-\sum_{\emptyset\subset T\subseteq[k]}(-1)^{|T|+1}\left(\mathbf{Pr}\left(\bigcap_{i\in T}X_{i}=0\right)-\mathbf{Pr}\left(\bigcap_{i\in T}P_{i}=0\right)\right)\\&=\sum_{\emptyset\subset T\subseteq[k]}(-1)^{|T|}\left(\mathbf{Pr}\left(\bigcap_{i\in T}X_{i}=0\right)-\mathrm{e}^{-\frac{\lambda|T|}{k}}\right)\\&\sim n\sum_{\emptyset\subset T\subseteq[k]}(-1)^{|T|}\mathrm{e}^{-\frac{\Delta|T|}{k}}\left(f(n)+\sum_{i\in T}g_{i}(n)+\sum_{T^{\prime}\subseteq\overline{T}:[T^{\prime}]>1}h_{T^{\prime}}(n)\right).\end{aligned} (F)Pr(i:Pi>0)=(Pr(i:Xi=0)Pr(i:Pi=0))=T[k](1)T+1(Pr(iTXi=0)Pr(iTPi=0))=T[k](1)T(Pr(iTXi=0)ekλT)nT[k](1)TekΔ∣T f(n)+iTgi(n)+TT:[T]>1hT(n) .


Toevaluatethe sum on thelast line,we write

M = d e f ∑ ∅ ⊂ T ⊆ [ k ] ( − 1 ) ∣ T ∣ e − λ ∣ T ∣ k ( f ( n ) + ∑ i ∈ T ‾ g i ( n ) + ∑ T ′ ⊆ T ‾ : ∣ T ′ ∣ > 1 h T ′ ( n ) ) = ∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : [ T ∣ = j f ( n ) + ∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : ∣ T ∣ = j ∑ i ∈ T ‾ g i ( n ) + ∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : ∣ T ∣ = j ∑ T ⊆ T ‾ : ∣ T ′ ∣ > 1 h T ′ ( n ) , \begin{aligned}M&\stackrel{\mathrm{def}}{=}\sum_{\emptyset\subset T\subseteq[k]}(-1)^{|T|}\mathrm{e}^{-\frac{\lambda|T|}{k}}\left(f(n)+\sum_{i\in\overline{T}}g_{i}(n)+\sum_{T^{\prime}\subseteq\overline{T}:|T^{\prime}|>1}h_{T^{\prime}}(n)\right)\\&=\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:[T|=j}f(n)\\&+\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:|T|=j}\sum_{i\in\overline{T}}g_{i}(n)\\&+\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:|T|=j}\sum_{T\subseteq\overline{T}:|T^{\prime}|>1}h_{T^{\prime}}(n),\end{aligned} M=defT[k](1)TekλT f(n)+iTgi(n)+TT:T>1hT(n) =j=1k(ekλ)jT[k]:[T=jf(n)+j=1k(ekλ)jT[k]:T=jiTgi(n)+j=1k(ekλ)jT[k]:T=jTT:T>1hT(n),

and evaluate each term separately. First, we compute

∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : [ T ] = j f ( n ) = f ( n ) ∑ j = 1 k ( k j ) ( − e − λ k ) j = ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( ( 1 − e − λ k ) k − 1 ) \begin{aligned}\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:[T]=j}f(n)&=f(n)\sum_{j=1}^{k}\binom{k}{j}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\\&=\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}-1\right)\end{aligned} j=1k(ekλ)jT[k]:[T]=jf(n)=f(n)j=1k(jk)(ekλ)j=(Pr(C(x)=0)1+nλ)((1ekλ)k1)

Next, we see that

∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : [ T ] = j ∑ i ∈ T ‾ g i ( n ) = ∑ j = 1 k ( − e − λ k ) j ∑ i ∈ [ k ] g i ( n ) ∣   { T ⊆ [ k ]   :   ∣ T ∣ = j , i ∉ T } = ( ∑ i ∈ [ k ] g i ( n ) ) ∑ j = 1 k ( k − 1 j ) ( − e − λ k ) j = ( ∑ i ∈ [ k ] g i ( n ) ) ( ( 1 − e − λ k ) k − 1 − 1 ) = ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( ( 1 − e − λ k ) k − 1 − 1 ) , \begin{aligned}\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:[T]=j}\sum_{i\in\overline{T}}g_{i}(n)&=\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{i\in[k]}g_{i}(n)|\:\{T\subseteq[k]\::\:|T|=j,i\not\in T\}\\&=\left(\sum_{i\in[k]}g_{i}(n)\right)\sum_{j=1}^{k}\binom{k-1}{j}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\\&=\left(\sum_{i\in[k]}g_{i}(n)\right)\left(\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}-1\right)\\&=\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\left(\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}-1\right),\end{aligned} j=1k(ekλ)jT[k]:[T]=jiTgi(n)=j=1k(ekλ)ji[k]gi(n){T[k]:T=j,iT}= i[k]gi(n) j=1k(jk1)(ekλ)j= i[k]gi(n) ((1ekλ)k11)=(Pr(C(x)=1)nλ)((1ekλ)k11),

where we have used the convention that ( k − 1 k ) = 0 \binom{k-1}k=0 (kk1)=0 .Now, for the last term, we compute

∑ T ⊆ [ k ] : ∣ T ∣ = j ∑ T ′ ⊆ T ‾ : ∣ T ′ ∣ > 1 h T ′ ( n ) = ∑ ℓ = 2 k − j ∑ T ′ ⊆ [ k ] : ∣ T ′ ∣ = ℓ h T ′ ( n ) ∣ { T ⊆ [ k ]   :   ∣ T ∣ = j , T ′ ⊆ T ‾ } ∣ = ∑ ℓ = 2 k − j ( k − ℓ j ) Pr ⁡ ( ∥ C ( x ) ∥ = ℓ ) , \begin{aligned}\sum_{T\subseteq[k]:|T|=j}\sum_{T^{\prime}\subseteq\overline{T}:|T^{\prime}|>1}h_{T^{\prime}}(n)&=\sum_{\ell=2}^{k-j}\sum_{T^{\prime}\subseteq[k]:|T^{\prime}|=\ell}h_{T^{\prime}}(n)|\left\{T\subseteq[k]\::\:|T|=j,T^{\prime}\subseteq\overline{T}\right\}|\\&=\sum_{\ell=2}^{k-j}\binom{k-\ell}{j}\Pr(\|C(x)\|=\ell),\end{aligned} T[k]:T=jTT:T>1hT(n)==2kjT[k]:T=hT(n){T[k]:T=j,TT}==2kj(jk)Pr(C(x)=),


so

∑ j = 1 k ( − e − λ k ) j ∑ T ⊆ [ k ] : [ T ] = j ∑ T ′ ⊆ T ‾ : ∣ T ′ ∣ > 1 h T ′ ( n ) = ∑ j = 1 k ( − e − λ k ) j ∑ ℓ = 2 k − j ( k − ℓ j ) Pr ⁡ ( ∥ C ( x ) ∥ = ℓ ) = ∑ j = 1 k ∑ ℓ = 2 k − j ( − e − λ k ) j ( k − ℓ j ) Pr ⁡ ( ∥ C ( x ) ∥ = ℓ ) = ∑ j = 1 k ∑ r = j k − 2 ( − e − λ k ) j ( r j ) P r ( ∥ C ( x ) ∥ = k − r ) = ∑ r = 1 k − 2 ∑ j = 1 r ( − e − λ k ) j ( r j ) P r ( ∥ C ( x ) ∥ = k − r ) = ∑ r = 1 k − 2 P r ( ∥ C ( x ) ∥ = k − r ) ∑ j = 1 r ( r j ) ( − e − λ k ) j = ∑ r = 1 k − 2 P r ( ∥ C ( x ) ∥ = k − r ) ( ( 1 − e − λ k ) r − 1 ) = ∑ j = 2 k − 1 P r ( ∥ C ( x ) ∥ = j ) ( ( 1 − e − λ k ) k − j − 1 ) . \begin{aligned} \sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{T\subseteq[k]:[T]=j}\sum_{T^{\prime}\subseteq\overline{T}:|T^{\prime}|>1}h_{T^{\prime}}(n)& =\sum_{j=1}^{k}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\sum_{\ell=2}^{k-j}\binom{k-\ell}{j}\Pr(\|C(x)\|=\ell) \\ &=\sum_{j=1}^{k}\sum_{\ell=2}^{k-j}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\binom{k-\ell}{j}\Pr(\|C(x)\|=\ell) \\ &=\sum_{j=1}^{k}\sum_{r=j}^{k-2}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\begin{pmatrix}r\\j\end{pmatrix}\mathbf{Pr}(\|C(x)\|=k-r) \\ &=\sum_{r=1}^{k-2}\sum_{j=1}^{r}\left(-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{j}\begin{pmatrix}r\\j\end{pmatrix}\mathbf{Pr}(\|C(x)\|=k-r) \\ &=\sum_{r=1}^{k-2}\mathbf{Pr}(\|C(x)\|=k-r)\sum_{j=1}^r\begin{pmatrix}r\\j\end{pmatrix}\begin{pmatrix}-\mathrm{e}^{-\frac{\lambda}{k}}\end{pmatrix}^j \\ &=\sum_{r=1}^{k-2}\mathbf{Pr}(\|C(x)\|=k-r)\left(\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^r-1\right) \\ &=\sum_{j=2}^{k-1}\mathbf{Pr}(\|C(x)\|=j)\left(\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}-1\right). \end{aligned} j=1k(ekλ)jT[k]:[T]=jTT:T>1hT(n)=j=1k(ekλ)j=2kj(jk)Pr(C(x)=)=j=1k=2kj(ekλ)j(jk)Pr(C(x)=)=j=1kr=jk2(ekλ)j(rj)Pr(C(x)=kr)=r=1k2j=1r(ekλ)j(rj)Pr(C(x)=kr)=r=1k2Pr(C(x)=kr)j=1r(rj)(ekλ)j=r=1k2Pr(C(x)=kr)((1ekλ)r1)=j=2k1Pr(C(x)=j)((1ekλ)kj1).

Adding the terms together gives
M = ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) k + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( 1 − e − λ k ) k − 1 + ∑ j = 2 k − 1 P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j − ( P r ( ∥ C ( x ) ∥ = 0 ) + P r ( ∥ C ( x ) ∥ = 1 ) + ∑ j = 2 k − 1 P r ( ∥ C ( x ) ∥ = j ) − 1 ) . \begin{aligned}\text{M}&=\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(1-\mathbf{e}^{-\frac{\lambda}{k}}\right)^{k}\\&+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\left(1-\mathbf{e}^{-\frac{\lambda}{k}}\right)^{k-1}\\&+\sum_{j=2}^{k-1}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}\\&-\left(\mathbf{Pr}(\|C(x)\|=0)+\mathbf{Pr}(\|C(x)\|=1)+\sum_{j=2}^{k-1}\mathbf{Pr}(\|C(x)\|=j)-1\right).\end{aligned} M=(Pr(C(x)=0)1+nλ)(1ekλ)k+(Pr(C(x)=1)nλ)(1ekλ)k1+j=2k1Pr(C(x)=j)(1ekλ)kj(Pr(C(x)=0)+Pr(C(x)=1)+j=2k1Pr(C(x)=j)1).
Of course,
− ( P r ( ∥ C ( x ) ∥ = 0 ) + P r ( ∥ C ( x ) ∥ = 1 ) + ∑ j = 2 k − 1 P r ( ∥ C ( x ) ∥ = j ) − 1 ) = P r ( ∥ C ( x ) ∥ = k -\left(\mathbf{Pr}(\|C(x)\|=0)+\mathbf{Pr}(\|C(x)\|=1)+\sum_{j=2}^{k-1}\mathbf{Pr}(\|C(x)\|=j)-1\right)=\mathbf{Pr}(\|C(x)\|=k (Pr(C(x)=0)+Pr(C(x)=1)+j=2k1Pr(C(x)=j)1)=Pr(C(x)=k
80
M = ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) k + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( 1 − e − λ k ) k − 1 + ∑ j = 2 k − 1 P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j + P r ( ∥ C ( x ) ∥ = k ) = ϵ ( n ) . \begin{aligned}\text{M}&=\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\\&+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\\&+\sum_{j=2}^{k-1}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}\\&+\mathbf{Pr}(\|C(x)\|=k)\\&=\epsilon(n).\end{aligned} M=(Pr(C(x)=0)1+nλ)(1ekλ)k+(Pr(C(x)=1)nλ)(1ekλ)k1+j=2k1Pr(C(x)=j)(1ekλ)kj+Pr(C(x)=k)=ϵ(n).


Since
P r ( F ) − ( 1 − e − λ / k ) k = P r ( F ) − P r ( ∀ i : P i > 0 ) ∼ n M = n ϵ ( n ) , \mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)^{k}=\mathbf{Pr}(\mathcal{F})-\mathbf{Pr}(\forall i:P_{i}>0)\sim nM=n\epsilon(n), Pr(F)(1eλ/k)k=Pr(F)Pr(i:Pi>0)nM=nϵ(n),
the result follows.

Unfortunately,the schemes that we discuss in this paper are often too messy to apply Theo rem 6.1 generally; the values P r ( ∥ C ( x ) ∥ = j \mathbf{Pr}(\|C(x)\|=j Pr(C(x)=j )depend on the specifics of the hash functions being use. For example, whether the size of the range is prime or not affects P r ( ∥ C ( x ) ∥ = j ] \mathbf{Pr}(\|C(x)\|=j] Pr(C(x)=j] 0.The result can be applied in cases to examine specific schemes; for example,in the partitioned scheme, when m ′ m^{\prime} m is prime, Pr ⁡ ( ∥ C ( x ) ∥ = j ) = 0 \Pr(\|C(x)\|=j)=0 Pr(C(x)=j)=0 for j = 2 , … , k − 1 j=2,\ldots,k-1 j=2,,k1 ,and so the expression becomes easily computable.To achieve general results,we derive some simple bounds that are sufficient to draw some interesting conclusions.

Lemma 6.1. Assume the same conditions as in Theorem 4.1. Furthermore, suppose that fo x ∈ S x\in S xS ,it is possible to define events E 0 , … , E ℓ − 1 E_{0},\ldots,E_{\ell-1} E0,,E1 such that
I .   P r ( ∥ C ( x ) ∥ ≥ 1 ) = P r ( ⋃ i ∈ [ ℓ ] E i ) 2.   ∑ i ∈ [ ℓ ] P r ( E i ) = λ / n 3.   P r ( ∥ C ( x ) ∥ ≥ 2 ) ≤ ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) . h e n n [ P r ( ∥ C ( x ) ∥ ≡ k ) − ( 1 − e − λ k ) k − 1 ( 1 + e − λ k ) ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) ] ⩽ P r ( F ) − ( 1 − e − λ / k ) ⩽ n ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) \begin{aligned}&I.\:\mathbf{Pr}(\|C(x)\|\geq1)=\mathbf{Pr}\left(\bigcup_{i\in[\ell]}E_{i}\right)\\&2.\:\sum_{i\in[\ell]}\mathbf{Pr}(E_{i})=\lambda/n\\&3.\:\mathbf{Pr}(\|C(x)\|\geq2)\leq\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j}).\\&hen\\&n\left[\mathbf{Pr}(\|C(x)\|\equiv k)-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(1+\mathrm{e}^{-\frac{\lambda}{k}}\right)\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j})\right]&\leqslant\mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)\\&&\leqslant n\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j})\end{aligned} I.Pr(C(x)1)=Pr i[]Ei 2.i[]Pr(Ei)=λ/n3.Pr(C(x)2)i<j[]Pr(EiEj).henn Pr(C(x)k)(1ekλ)k1(1+ekλ)i<j[]Pr(EiEj) Pr(F)(1eλ/k)ni<j[]Pr(EiEj)

Proof.As in Theorem

6.1

,we define
ϵ ( n ) = d e f ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) k + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( 1 − e − λ k ) k − 1 + ∑ j = 2 k P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j , \begin{aligned}\epsilon(n)&\stackrel{\mathrm{def}}{=}\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\\&+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\\&+\sum_{j=2}^{k}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j},\end{aligned} ϵ(n)=def(Pr(C(x)=0)1+nλ)(1ekλ)k+(Pr(C(x)=1)nλ)(1ekλ)k1+j=2kPr(C(x)=j)(1ekλ)kj,
So that
P r ( F ) − ( 1 − e − λ / k ) k ∼ n ϵ ( n ) . \mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)^k\sim n\epsilon(n). Pr(F)(1eλ/k)knϵ(n).
Now,
M = ⁡ d e f ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) k + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ( 1 − e − λ k ) k − 1 = ( 1 − e − λ k ) k − 1 ( ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 + λ n ) ( 1 − e − λ k ) + ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ) = ( 1 − e − λ k ) k − 1 ( ( P r ( ∥ C ( x ) ∥ = 0 ) + P r ( ∥ C ( x ) ∥ = 1 ) − 1 ) − e − λ k ( ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 ) + ( P r ( ∥ C ( x ) ∥ = 0 ) − 1 ) ) = ( 1 − e − λ k ) k − 1 ( − P r ( ∥ C ( x ) ∥ ≥ 2 ) − e − λ k ( − P r ( ∥ C ( x ) ∥ ≥ 2 ) − P r ( ∥ C ( x ) ∥ = 1 ) + λ n ) ) = − ( 1 − e − λ k ) k P r ( ∥ C ( x ) ∥ ≥ 2 ) + e − λ k ( 1 − e − λ k ) k − 1 ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) . \begin{aligned} &\text{M}&&\overset{\mathrm{def}}{\operatorname*{=}}\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac\lambda n\right)\left(1-\mathrm{e}^{-\frac\lambda k}\right)^k+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac\lambda n\right)\left(1-\mathrm{e}^{-\frac\lambda k}\right)^{k-1} \\ &&&=\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(\left(\mathbf{Pr}(\|C(x)\|=0)-1+\frac{\lambda}{n}\right)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)+\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\right) \\ &&&=\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left((\mathbf{Pr}(\|C(x)\|=0)+\mathbf{Pr}(\|C(x)\|=1)-1)-\mathrm{e}^{-\frac{\lambda}{k}}\right.\left((\mathbf{Pr}(\|C(x)\|=0)-1)+(\mathbf{Pr}(\|C(x)\|=0)-1)\right) \\ &&&=\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(-\mathbf{Pr}(\|C(x)\|\geq2)-\mathrm{e}^{-\frac{\lambda}{k}}\left(-\mathbf{Pr}(\|C(x)\|\geq2)-\mathbf{Pr}(\|C(x)\|=1)+\frac{\lambda}{n}\right)\right) \\ &&&=-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\mathbf{Pr}(\|C(x)\|\geq2)+\mathrm{e}^{-\frac{\lambda}{k}}\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right). \end{aligned} M=def(Pr(C(x)=0)1+nλ)(1ekλ)k+(Pr(C(x)=1)nλ)(1ekλ)k1=(1ekλ)k1((Pr(C(x)=0)1+nλ)(1ekλ)+(Pr(C(x)=1)nλ))=(1ekλ)k1((Pr(C(x)=0)+Pr(C(x)=1)1)ekλ((Pr(C(x)=0)1)+(Pr(C(x)=0)1))=(1ekλ)k1(Pr(C(x)2)ekλ(Pr(C(x)2)Pr(C(x)=1)+nλ))=(1ekλ)kPr(C(x)2)+ekλ(1ekλ)k1(Pr(C(x)=1)nλ).


In particular, we have that M ≤ 0 M\leq0 M0 since

P r ( ∥ C ( x ) ∥ = 1 ) ≤ P r ( ∥ C ( x ) ∥ ≥ 1 ) = P r ( ⋃ i ∈ [ ℓ ] E i ) ≤ ∑ i ∈ [ l ] P r ( E i ) = λ / n . \mathbf{Pr}(\|C(x)\|=1)\leq\mathbf{Pr}(\|C(x)\|\geq1)=\mathbf{Pr}\left(\bigcup_{i\in[\ell]}E_i\right)\leq\sum_{i\in[l]}\mathbf{Pr}(E_i)=\lambda/n. Pr(C(x)=1)Pr(C(x)1)=Pr i[]Ei i[l]Pr(Ei)=λ/n.

Therefore

ϵ ( n ) = M + ∑ j = 2 k P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j ≤ P r ( ∥ C ( x ) ∥ ≥ 2 ) ≤ ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) \epsilon(n)=M+\sum_{j=2}^{k}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}\leq\mathbf{Pr}(\|C(x)\|\geq2)\leq\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j}) ϵ(n)=M+j=2kPr(C(x)=j)(1ekλ)kjPr(C(x)2)i<j[]Pr(EiEj)

establishing the upper bound in thelemma For the lower bound, we note that

P r ( ∥ C ( x ) ∥ = 1 ) − λ n = P r ( ∥ C ( x ) ∥ ≥ 1 ) − P r ( ∥ C ( x ) ∥ ≥ 2 ) − λ n = P r ( ⋃ i ∈ [ t ] E i ) − P r ( ∥ C ( x ) ∥ ≥ 2 ) − λ n ≥ ∑ i ∈ [ t ] P r ( E i ) − ∑ i < j ∈ [ t ] P r ( E i ∩ E j ) − P r ( ∥ C ( x ) ∥ ≥ 2 ) − λ n = − ∑ i < j ∈ [ t ] P r ( E i ∩ E j ) − P r ( ∥ C ( x ) ∥ ≥ 2 ) ≥ − 2 ∑ i < j ∈ [ t ] P r ( E i ∩ E j ) , \begin{aligned}\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}&=\mathbf{Pr}(\|C(x)\|\geq1)-\mathbf{Pr}(\|C(x)\|\geq2)-\frac{\lambda}{n}\\&=\mathbf{Pr}\left(\bigcup_{i\in[t]}E_{i}\right)-\mathbf{Pr}(\|C(x)\|\geq2)-\frac{\lambda}{n}\\&\geq\sum_{i\in[t]}\mathbf{Pr}(E_{i})-\sum_{i<j\in[t]}\mathbf{Pr}(E_{i}\cap E_{j})-\mathbf{Pr}(\|C(x)\|\geq2)-\frac{\lambda}{n}\\&=-\sum_{i<j\in[t]}\mathbf{Pr}(E_{i}\cap E_{j})-\mathbf{Pr}(\|C(x)\|\geq2)\\&\geq-2\sum_{i<j\in[t]}\mathbf{Pr}(E_{i}\cap E_{j}),\end{aligned} Pr(C(x)=1)nλ=Pr(C(x)1)Pr(C(x)2)nλ=Pr i[t]Ei Pr(C(x)2)nλi[t]Pr(Ei)i<j[t]Pr(EiEj)Pr(C(x)2)nλ=i<j[t]Pr(EiEj)Pr(C(x)2)2i<j[t]Pr(EiEj),

SO

M = − ( 1 − e − λ k ) k P r ( ∥ C ( x ) ∥ ≥ 2 ) + e − λ k ( 1 − e − λ k ) k − 1 ( P r ( ∥ C ( x ) ∥ = 1 ) − λ n ) ≥ − ( 1 − e − λ k ) k P r ( ∥ C ( x ) ∥ ≥ 2 ) − e − λ k ( 1 − e − λ k ) k − 1 2 ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) ≥ − ( 1 − e − λ k ) k ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) − e − λ k ( 1 − e − λ k ) k − 1 2 ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) = − ( 1 − e − λ k ) k − 1 ( 1 + e − λ k ) ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) . \begin{aligned}\text{M}&=-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\mathbf{Pr}(\|C(x)\|\geq2)+\mathrm{e}^{-\frac{\lambda}{k}}\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(\mathbf{Pr}(\|C(x)\|=1)-\frac{\lambda}{n}\right)\\&\geq-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\mathbf{Pr}(\|C(x)\|\geq2)-\mathrm{e}^{-\frac{\lambda}{k}}\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}2\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j})\\&\geq-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k}\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j})-\mathrm{e}^{-\frac{\lambda}{k}}\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}2\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j})\\&=-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(1+\mathrm{e}^{-\frac{\lambda}{k}}\right)\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j}).\end{aligned} M=(1ekλ)kPr(C(x)2)+ekλ(1ekλ)k1(Pr(C(x)=1)nλ)(1ekλ)kPr(C(x)2)ekλ(1ekλ)k12i<j[]Pr(EiEj)(1ekλ)ki<j[]Pr(EiEj)ekλ(1ekλ)k12i<j[]Pr(EiEj)=(1ekλ)k1(1+ekλ)i<j[]Pr(EiEj).

Therefore,

ϵ ( n ) = ∑ j = 2 k P r ( ∥ C ( x ) ∥ = j ) ( 1 − e − λ k ) k − j + M ≥ P r ( ∥ C ( x ) ∥ = k ) − ( 1 − e − λ k ) k − 1 ( 1 + e − λ k ) ∑ i < j ∈ [ ℓ ] P r ( E i ∩ E j ) , \begin{aligned}\epsilon(n)&=\sum_{j=2}^{k}\mathbf{Pr}(\|C(x)\|=j)\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-j}+M\\&\geq\mathbf{Pr}(\|C(x)\|=k)-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(1+\mathrm{e}^{-\frac{\lambda}{k}}\right)\sum_{i<j\in[\ell]}\mathbf{Pr}(E_{i}\cap E_{j}),\end{aligned} ϵ(n)=j=2kPr(C(x)=j)(1ekλ)kj+MPr(C(x)=k)(1ekλ)k1(1+ekλ)i<j[]Pr(EiEj),

completing the proof.

Lemma 6.1 is easily applied to the schemes discussed in Sections 5.1 and 5.2

Theorem 6.2. For the partition scheme discussed in Section 5.1

k 2 c 2 n [ 1 − ( 1 − e − λ k ) k − 1 ( 1 + e − λ k ) k 3 2 ] ≲ P r ( F ) − ( 1 − e − λ / k ) k   ≲ k 5 2 c 2 n \frac{k^2}{c^2n}\left[1-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(1+\mathrm{e}^{-\frac{\lambda}{k}}\right)\frac{k^3}{2}\right]\lesssim\mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)^k\:\lesssim\frac{k^5}{2c^2n} c2nk2[1(1ekλ)k1(1+ekλ)2k3]Pr(F)(1eλ/k)k2c2nk5

Proof. We wish to apply Lemma 6.1.To this end,we fix x ∈ S x\in S xS ,and for i ∈ [ k ] i\in[k] i[k] ,we define E i E_{i} Ei to be the event that i ∈ C ( x ) i\in C(x) iC(x) (once again, we use the convention introduced in the proof of Theorem 4.1 that allows us to associate the elements of H ( z ) H(z) H(z) with the elements of [ k ] [k] [k] ). Then

P r ( ∥ C ( x ) ∥ ≥ 1 ) = P r ( ⋃ i ∈ [ k ] E i ) . \mathbf{Pr}(\|C(x)\|\ge1)=\mathbf{Pr}\left(\bigcup_{i\in[k]}E_i\right). Pr(C(x)1)=Pr i[k]Ei .

Recall from the proof of Theorem 5.1 that the partition scheme satisfies the conditions of Theo rem 4.1 with λ = k 2 / c \lambda=k^{2}/c λ=k2/c .Furthermore, (as we saw in the proof of Theorem 5.1)

∑ i ∈ [ k ] P r ( E i ) = ∑ i ∈ [ k ] 1 m ′ = λ n . \begin{aligned}\sum_{i\in[k]}\mathbf{Pr}(E_i)=\sum_{i\in[k]}\frac{1}{m'}=\frac{\lambda}{n}.\end{aligned} i[k]Pr(Ei)=i[k]m1=nλ.

The proof of Theorem 5.1 also tells us that for i ≠ j ∈ [ k ] i\neq j\in[k] i=j[k]

P r ( E i ∩ E j ) ≤ k ( m ′ ) 2 = k 3 c 2 n 2 , \mathbf{Pr}(E_i\cap E_j)\leq\frac{k}{(m')^2}=\frac{k^3}{c^2n^2}, Pr(EiEj)(m)2k=c2n2k3,

SO

Pr ⁡ ( ∥ C ( x ) ∥ ≥ 2 ) ≤ ∑ i < j ∈ [ k ] P r ( E i ∩ E j ) ≤ k 5 2 c 2 n 2 , \Pr(\|C(x)\|\ge2)\le\sum_{i<j\in[k]}\mathbf{Pr}(E_i\cap E_j)\le\frac{k^5}{2c^2n^2}, Pr(C(x)2)i<j[k]Pr(EiEj)2c2n2k5,

where we have used the (obvious) fact that every u ∈ U u\in U uU is assigned k k k distinct hash locations in the partition scheme. Finally, we note that ∥ C ( x ) ∥ = k \|C(x)\|=k C(x)=k if h 1 ( x ) = h 1 ( z ) h_{1}(x)=h_{1}(z) h1(x)=h1(z) and h 2 ( x ) = h 2 ( z ) h_{2}(x)=h_{2}(z) h2(x)=h2(z) ,SC

P r ( ∥ C ( x ) ∥ = k ) ≥ 1 ( m ′ ) 2 = k 2 c 2 n 2 . \mathbf{Pr}(\|C(x)\|=k)\geq\frac{1}{(m')^2}=\frac{k^2}{c^2n^2}. Pr(C(x)=k)(m)21=c2n2k2.

Plugging these bounds into the result from Lemma 6.1 gives the result.

Theorem 6.3. For the double hashing schemes discussed in Section 5.2.

1 c 2 n [ 1 − ( 1 − e − λ k ) k − 1 ( 1 + e − λ k ) k 5 2 ] ≲ P r ( F ) − ( 1 − e − λ / k ) k   ≲ k 5 2 c 2 n \frac{1}{c^{2}n}\left[1-\left(1-\mathrm{e}^{-\frac{\lambda}{k}}\right)^{k-1}\left(1+\mathrm{e}^{-\frac{\lambda}{k}}\right)\frac{k^{5}}{2}\right]\lesssim\mathbf{Pr}(\mathcal{F})-\left(1-\mathrm{e}^{-\lambda/k}\right)^{k}\:\lesssim\frac{k^{5}}{2c^{2}n} c2n1[1(1ekλ)k1(1+ekλ)2k5]Pr(F)(1eλ/k)k2c2nk5

Proof. We wish to apply Lemma 6.1. First, recall from the proof of Theorem 5.2 that every double hashing scheme satisfies the conditions of Theorem 4.1 with λ = k 2 / c \lambda=k^{2}/c λ=k2/c Now fix x ∈ S x\in S xS We reintroduce some notation from the proof of Theorem 5.2. For u ∈ U u\in U uU and i ∈ [ k ] i\in[k] i[k] ,we define

g i ( u ) = h 1 ( u ) + i h 2 ( u ) + f ( i ) g_i(u)=h_1(u)+ih_2(u)+f(i) gi(u)=h1(u)+ih2(u)+f(i)

(where we continue to use the convention that all arithmetic involving the hash functions h 1 h_{1} h1 anc h 2 h_{2} h2 is done modulo 7 / l 7/l 7/l ) Proceeding, for i , j ∈ [ k ] i,j\in[k] i,j[k] , we define E i , j E_{i,j} Ei,j to be the event that g j ( x ) = g i ( z ) g_{j}(x)=g_{i}(z) gj(x)=gi(z) .Then

P r ( ∥ C ( x ) ∥ ≥ 1 ) = P r ( ⋃ i , j ∈ [ k ] E i , j ) , \mathbf{Pr}(\|C(x)\|\ge1)=\mathbf{Pr}\left(\bigcup_{i,j\in[k]}E_{i,j}\right), Pr(C(x)1)=Pr i,j[k]Ei,j ,


and,as we saw in the proof of Theorem 5.2

∑ i , j ∈ [ k ] P r ( E i , j ) = ∑ i , j ∈ [ k ] P r ( g j ( x ) = g i ( z ) ) = ∑ i , j ∈ [ k ] 1 m = λ n . \sum\limits_{i,j\in[k]}\mathbf{Pr}(E_{i,j})=\sum\limits_{i,j\in[k]}\mathbf{Pr}(g_j(x)=g_i(z))=\sum\limits_{i,j\in[k]}\frac{1}{m}=\frac{\lambda}{n}. i,j[k]Pr(Ei,j)=i,j[k]Pr(gj(x)=gi(z))=i,j[k]m1=nλ.

Furthermore, fixing any ordering 《 on [ k ] 2 [k]^{2} [k]2

P r ( ∥ C ( x ) ∥ ≥ 2 ) = P r ( ∃ i 1 , i 2 , j 1 , j 2 ∈ [ k ] : ∀ ℓ ∈ { 1 , 2 } , g j ℓ ( x ) = g i ℓ ( x ) ) = P r ( ⋃ ( i 1 , j 1 ) < ( i 2 , j 2 ) ∈ [ k ] 2 E i 1 , j 1 ∩ E i 2 , j 2 ) ≤ ∑ ( i 1 , j 1 ) < ( i 2 , j 2 ) ∈ [ k ] 2 P r ( E i 1 , j 1 ∩ E i 2 , j 2 ) , \begin{aligned}\mathbf{Pr}(\|C(x)\|\geq2)&=\mathbf{Pr}(\exists i_{1},i_{2},j_{1},j_{2}\in[k]:\forall\ell\in\{1,2\},g_{j_{\ell}}(x)=g_{i_{\ell}}(x))\\&=\mathbf{Pr}\left(\bigcup_{(i_{1},j_{1})<(i_{2},j_{2})\in[k]^{2}}E_{i_{1},j_{1}}\cap E_{i_{2},j_{2}}\right)\\&\leq\sum_{(i_{1},j_{1})<(i_{2},j_{2})\in[k]^{2}}\mathbf{Pr}(E_{i_{1},j_{1}}\cap E_{i_{2},j_{2}}),\end{aligned} Pr(C(x)2)=Pr(i1,i2,j1,j2[k]:{1,2},gj(x)=gi(x))=Pr (i1,j1)<(i2,j2)[k]2Ei1,j1Ei2,j2 (i1,j1)<(i2,j2)[k]2Pr(Ei1,j1Ei2,j2),

so the conditions of Lemma 6.1 are satisfied. To complete the proof, we note that for any ( i 1 , j 1 ) , ( i 2 , j 2 ) ∈ [ k 2 ] (i_{1},j_{1}),(i_{2},j_{2})\in[k^{2}] (i1,j1),(i2,j2)[k2]

P r ( E i 1 , j 1 ∩ E i 2 , j 2 ) = P r ( g j 1 ( x ) = g i 1 ( z ) , g j 2 ( x ) = g i 2 ( z ) ) ≤ 1 m ⋅ k m = k c 2 n 2 , \begin{aligned}\mathbf{Pr}(E_{i_{1},j_{1}}\cap E_{i_{2},j_{2}})&=\mathbf{Pr}(g_{j_{1}}(x)=g_{i_{1}}(z),g_{j_{2}}(x)=g_{i_{2}}(z))\\&\leq\frac{1}{m}\cdot\frac{k}{m}\\&=\frac{k}{c^{2}n^{2}},\end{aligned} Pr(Ei1,j1Ei2,j2)=Pr(gj1(x)=gi1(z),gj2(x)=gi2(z))m1mk=c2n2k,

where the computation in the second step was done in the proof of Theorem 5.2. Therefore

∑ ( i 1 , j 1 ) < ( i 2 , j 2 ) ∈ [ k ] 2 Pr ⁡ ( E i 1 , j 1 ∩ E i 2 , j 2 ) ≤ ∑ ( i 1 , j 1 ) < ( i 2 , j 2 ) ∈ [ k ] 2 k c 2 n 2 ≤ k 5 2 c 2 n 2 . \sum_{(i_{1},j_{1})<(i_{2},j_{2})\in[k]^{2}}\Pr(E_{i_{1},j_{1}}\cap E_{i_{2},j_{2}})\leq\sum_{(i_{1},j_{1})<(i_{2},j_{2})\in[k]^{2}}\frac{k}{c^{2}n^{2}}\leq\frac{k^{5}}{2c^{2}n^{2}}. (i1,j1)<(i2,j2)[k]2Pr(Ei1,j1Ei2,j2)(i1,j1)<(i2,j2)[k]2c2n2k2c2n2k5.

Finally,

P r ( ∥ C ( x ) ∥ = k ) ≥ P r ( h 1 ( x ) = h 1 ( z ) , h 2 ( x ) = h 2 ( z ) ) = 1 m 2 = 1 c 2 n 2 . \mathbf{Pr}(\|C(x)\|=k)\geq\mathbf{Pr}(h_1(x)=h_1(z),h_2(x)=h_2(z))=\frac{1}{m^2}=\frac{1}{c^2n^2}. Pr(C(x)=k)Pr(h1(x)=h1(z),h2(x)=h2(z))=m21=c2n21.

Plugging these bounds into the result of Lemma 6.1 yields the result

It remains to investigate whether the error term analyzed in Theorems 6.2 and 6.3 is negligible in practice.Recall that for all of the schemes considered so far, the asymptotic false positive probability is ( 1 − exp ⁡ [ − k / c ] ) k (1-\exp[-k/c])^{k} (1exp[k/c])k ,the same as for a standard Bloom filter. We would like to minimize this probability.The easiest way to do this is to maximize t t t given the applicationspecific constraints on the size of the filter, and then optimize k k k subject to that value of t t t which results in setting k = c ln ⁡ 2 k=c\ln2 k=cln2 (this is a standard result for Bloom filters which is easily obtained using calculus; see, for example,[3l), yielding an asymptotic false positive probability of 2 − c ln ⁡ 2 2^{-c\ln2} 2cln2 Applying Theorems 6.2 and 6.3,we have that for all of the examined schemes, this setting of k k k results in
P r ( F ) − 2 − c ln ⁡ 2 ≲ ( ln ⁡ 2 ) 5 2 c 3 n a s   n → ∞ . \mathbf{Pr}(\mathcal{F})-2^{-c\ln2}\lesssim\frac{(\ln2)^{5}}{2}\frac{c^{3}}{n}\quad\mathrm{as}\:n\to\infty. Pr(F)2cln22(ln2)5nc3asn∞.

We now give a heuristic argument that the above error term is negligible in practice. Suppose that the asymptotic inequality above held for every 7 l . 7l. 7l. , and not just in the limit as T l → 0 Tl\rightarrow0 Tl0 .Then

for any ϵ > 0 \epsilon>0 ϵ>0
Pr ⁡ ( F ) − 2 − c ln ⁡ 2 ≥ ϵ 2 − c ln ⁡ 2 ⇒ ( ln ⁡ 2 ) 5 2 c 3 n ≥ ϵ 2 − c ln ⁡ 2 ⇒ ( ln ⁡ 2 ) 5 2 c 3 n ≥ ϵ 2 − c ⇒ 2 c + 3 ln ⁡ c ≥ 2 n ϵ ( ln ⁡ 2 ) 5 ⇒ 2 2 c + 1 ≥ 2 n ϵ ( ln ⁡ 2 ) 5 ⇒ c ≥ 1 2 log ⁡ 2 ( n ϵ ( ln ⁡ 2 ) 5 ) . \begin{aligned}\Pr(\mathcal{F})-2^{-c\ln2}\geq\epsilon2^{-c\ln2}&\Rightarrow\frac{(\ln2)^5}{2}\frac{c^3}{n}\geq\epsilon2^{-c\ln2}\\&\Rightarrow\frac{(\ln2)^5}{2}\frac{c^3}{n}\geq\epsilon2^{-c}\\&\Rightarrow2^{c+3\ln c}\geq\frac{2n\epsilon}{(\ln2)^5}\\&\Rightarrow2^{2c+1}\geq\frac{2n\epsilon}{(\ln2)^5}\\&\Rightarrow c\geq\frac{1}{2}\log_{2}\left(\frac{n\epsilon}{(\ln2)^{5}}\right).\end{aligned} Pr(F)2cln2ϵ2cln22(ln2)5nc3ϵ2cln22(ln2)5nc3ϵ2c2c+3lnc(ln2)52nϵ22c+1(ln2)52nϵc21log2((ln2)5nϵ).
The first step is the only non-rigorous step, and it follows from the assumption that the asymptotic inequality aboveholds for every T L TL TL .The second step holds since ln ⁡ 2 < 1 \ln2<1 ln2<1 ,the third step is simple algebra, the fourth step follows from the fact that 3 ln ⁡ c < c + 1 3\ln c<c+1 3lnc<c+1 for all C > 0 C>0 C>0 ,and the fifth step is also simple algebra. From this heuristic argument, we conclude that the asymptotic error term analyzed above is negligible unless c ≳ log ⁡ 2 n c\gtrsim\log_{2}n clog2n .In these cases, however, it might be more appropriate to use a hash table or fingerprints rather than a Bloom filter (see, for example, [12, Section 5.5]).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值