# Ariel Rosenfeld 1. 2 1 0 1 1 1 0 1 0 0 1 1 Network Traffic Engineering. Call Record Analysis. Sensor Data Analysis. Medical, Financial Monitoring. Etc,

## Presentation on theme: "Ariel Rosenfeld 1. 2 1 0 1 1 1 0 1 0 0 1 1 Network Traffic Engineering. Call Record Analysis. Sensor Data Analysis. Medical, Financial Monitoring. Etc,"— Presentation transcript:

Ariel Rosenfeld 1

2 1 0 1 1 1 0 1 0 0 1 1 Network Traffic Engineering. Call Record Analysis. Sensor Data Analysis. Medical, Financial Monitoring. Etc, etc, etc.

3 ….1 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 1 0 0 1 1… Time Increases Current Time Window Size = N

 Count the number of ones in N size window.  Exact Solution: Θ(N) memory.  Approximate Solution: ? ◦ Good approx with o(N) memory? 4

 Exponential Histogram (EH): ◦ 1 + ε approximation. (k = 1/ε) ◦ Space: O(1/ε(log 2 N)) bits. ◦ Time: O(log N) worst case, O(1) amortized. 5

6

7 Bucket sizes = 4,2,2,2,1.Bucket sizes = 4,4,2,1.Bucket sizes = 4,2,2,1,1,1.Bucket sizes = 4,2,2,1,1.Bucket sizes = 4,2,2,1. ….1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 1… k/2 = 1. Element arrived this step. Future

 Error in last (leftmost) bucket.  Bucket Sizes (left to right): C m,C m-1, …,C 2,C 1  Absolute Error <= C m /2.  Answer >= C m-1 +…+C 2 +C 1 +1.  Error <= C m /2(C m-1 +…+C 2 +C 1 +1).  Maintain: C m /2(C m-1 +…+C 2 +C 1 +1) <= 1/k. 8

 Every Bucket will become last bucket in future.  New elements may be all zeros.  Bucket Sizes (left to right): C m,C m-1, …,C 2,C 1  For every bucket i, ◦ C i /2(C i-1 +…+C 2 +C 1 +1) <= 1/k. 9

 Maintain C i /2(C i-1 +…+C 2 +C 1 +1) <= 1/k.  Exponentially increasing bucket sizes from right to left.  At least k/2 buckets (at most k/2 +1)of each size(1,2,4,8,…,2 i,...). 10

 Error Guarantee: ◦ Error <= C m /2(C m-1 +…+C 2 +C 1 ) <= 1/k.  Number of buckets: O(k log N).  Buckets require O(log N) bits.  Total memory: O(k log 2 N) bits. 11

 If exact size of bucket is not “a must”.  Number of buckets: O(k log N).  Buckets require O(loglog N) bits.  Total memory: O(k logN loglogN) bits. 12

Download ppt "Ariel Rosenfeld 1. 2 1 0 1 1 1 0 1 0 0 1 1 Network Traffic Engineering. Call Record Analysis. Sensor Data Analysis. Medical, Financial Monitoring. Etc,"

Similar presentations