Problem

With a b-bit counter, we can ordinarily only count up to 2b ‒ 1. With R. Morris's  pro...

With a b-bit counter, we can ordinarily only count up to 2b ‒ 1. With R. Morris's  probabilistic counting, we can count up to a much larger value at the expense of some loss of precision.

We let a counter value of i represent a count of ni for i =0, 1,…, 2b ‒ 1, where the ni form an increasing sequence of nonnegative values. We assume that the initial value of the counter is 0, representing a count of n0 = 0. The INCREMENT operation works on a counter containing the value i in a probabilistic manner. If i= 2b ‒ 1, then an overflow error is reported. Otherwise, the counter is increased by 1 with probability 1/(ni+1ni,), and it remains unchanged with probability 1 ‒ 1/(ni+1ni).

If we select ni = i for all i ≥ 0, then the counter is an ordinary one. More interesting situations arise if we select, say, ni = 2i-1 for i > 0 or ni = Fi (the ith Fibonacci number—see Section 3.2).

For this problem, assume that  is large enough that the probability of an overflow error is negligible.

a. Show that the expected value represented by the counter after n INCREMENT operations have been performed is exactly n.


b. The analysis of the variance of the count represented by the counter depends on the sequence of the ni. Let us consider a simple case: ni= 100i for all i ≥ 0. Estimate the variance in the value represented by the register after n INCREMENT operations have been performed.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 5.P