Professional Documents
Culture Documents
Massivedata14 Slidesxx
Massivedata14 Slidesxx
References
. The Problem
. AMS Algorithm
√
A (O(1), 2/3)-algorithm to approximate d
zeros(p) = max{i : 2i |p}
. Analysis
For given r, j, let Xr,j be an indicator random variable for the
event “zeros(h(j)) ≥ r”
Let Yr = ∑j:fj >0 Xr,j
Observation: Yr > 0 ⇔ t ≥ r where t is the value of z when the
algorithm finishes the stream (or Yr = 0 ⇔ t ≤ r − 1)
E(Xr,j ) = Pr(zeros(h(j)) ≥ r) = Pr(2r |h(j)) = 1/2r
E(Yr ) = ∑j:fj >0 E(Xr,j ) = d/2r
Var(Yr ) = ∑j:fj >0 Var(Xr,j ) ≤ ∑j:fj >0 E(Xr,j
2 )=
∑j:fj >0 E(Xr,j ) =
d/2r
. Analysis
. Analysis
. Median Trick
. References