1 / 7

Probabilistic counting

Probabilistic counting. A n-bit register can count up to 2 n events (0..2 n -1). init(c) ; reset tick(c) ; increment count(c) ; return count value. Skip some value to count farther. tick(c) flip a coin if head increment count(c) return value x 2

rjolliff
Download Presentation

Probabilistic counting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Probabilistic counting A n-bit register can count up to 2n events (0..2n-1) init(c) ; reset tick(c) ; increment count(c) ; return count value Skip some value to count farther Prabhas Chongstitvatana

  2. tick(c) flip a coin if head increment count(c) return value x 2 Expected value after call count() t time is exactly t. Prabhas Chongstitvatana

  3. tick(c) flip a coin if head increment count(c) return value x 2 Expected value after call count() t time is exactly t. Count exponentially farther (8-bit count more than 5 x 1076 events) count(c) return 2c – 1 Prabhas Chongstitvatana

  4. Estimate number of tick 2c+1 – 1 with probability p 2c – 1 with prob. (1- p) Expected value (2c+1 – 1 ) p + (2c – 1 ) ( 1 – p ) = 2c + 2c p – 1 p = 2-c will get the correct expected value of count(c) Prabhas Chongstitvatana

  5. init(c) c = 0 tick(c) For i = 1 to c do if coinflip = head then return c = c + 1 count(c) Return 2c – 1 Prabhas Chongstitvatana

  6. Variance of count after m ticks is m(m-1)/2. The standard deviation is 70%. This means it cannot distinguish between one million and two million but it can distinguish between one million and 100 million. Prabhas Chongstitvatana

  7. Count logarithmic farther count(c) = when e is small e = 1/30 count up to > 125000 events in 8-bit register with less than 24% relative error with confidence 95%. What is probability that tick(c) increment ? Prabhas Chongstitvatana

More Related