11.07.2015 Views

A Deterministic Algorithm for Summarizing Asynchronous Streams ...

A Deterministic Algorithm for Summarizing Asynchronous Streams ...

A Deterministic Algorithm for Summarizing Asynchronous Streams ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

assigned to each of the subsequent nodes of p ′ , we get:|X 1 | ≤ 2 i · (|p ′ | − 1) + 2 i+1 = 2 i · |p| ≤ 2 i · (1 + log W ). (2)With a similar analysis (the details are omitted due to space constraints) incan be shown that:|X 2 ∪ X 3 | ≤ 2 i · (1 + log W ). (3)Combining Equations 1, 2, and 3 we can bound s t − e i t :−2 i · (1 + log W ) ≤ −|X 1 | ≤ s t − e i t ≤ |X 2 ∪ X 3 | ≤ 2 i · (1 + log W ).There<strong>for</strong>e, |s t − e i t | ≤ 2i · (1 + log W ). In case S i ′ = ∅, ei t = s t − |X 3 | = 0, and thesame bound follows immediately.⊓⊔Lemma 2. When asked <strong>for</strong> an estimate of the number of timestamps in [c−w, c](1)There exists a level i ∈ [0, M] such that T i < c − w, and(2)<strong>Algorithm</strong> 3 returns e l c−w where l ∈ [0, M] is the smallest level such thatT l < c − w.The proof of Lemma 2 is omitted due to space constraints, and can be foundin the full version [3]. Let l denote the level used by <strong>Algorithm</strong> 3 to answer aquery <strong>for</strong> the number of timestamps in [c − w, c]. From Lemma 2 we know lalways exists.Lemma 3. If l > 0, then s c−w ≥(1+log W )·2lɛ.Proof. If l > 0, it must be true that T l−1 ≥ c − w, since otherwise level l − 1would have been chosen. Let t = T l−1 + 1. Then, t > c − w, and thus s c−w ≥ s t .From Lemma 1, we know s t ≥ e l−1t − (1 + log W ) · 2 l−1 . Thus we have:s c−w ≥ e l−1t − (1 + log W ) · 2 l−1 (4)We know that <strong>for</strong> each bucket b ∈ S l−1 , l(b) ≥ t. Further we know that eachbucket in S l−1 has a weight of at least 2 l−1 (only the initial bucket in S l−1may have a smaller weight, but this bucket must have split, since otherwise T l−1would still be −1). Since there are α buckets in S l−1 , we have:e l−1t ≥ α2 l−1 ≥ (1 + log W ) · 2 + ɛ · 2 l−1ɛ(5)The lemma follows from Equations 4 and 5.⊓⊔Theorem 1. The answer returned by <strong>Algorithm</strong> 3 is within an ɛ relative errorof s c−w .Proof. Let X denote the value returned by <strong>Algorithm</strong> 3. If l = 0, it can beverified that <strong>Algorithm</strong> 3 returns exactly s c−w (proof omitted due to space constraints).If l > 0, from Lemmas 1 and 2, we have |X − s c−w | ≤ (1 + log W ) · 2 l .Using Lemma 3, we get |X − s c−w | ≤ ɛ · s c−w as needed.⊓⊔

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!