Calculate average time to empty the router

384 Views Asked by At

Consider a buffer, in which every second the number of packets increases by 1 with probability $.4$ and decreases by 1 with probability $.6$. Currently there are $n$ packets in the router. Calculate the expected amount of time to empty the buffer.

2

There are 2 best solutions below

0
On BEST ANSWER

A formal argument: Consider a random walk on the integers that jumps to the left with probability $q$ and to the right with probability $p$ where $p+q=1$ and $q>p$.

Let $e$ be the expected number of jumps to hit the state to the left of the starting position. First step analysis says that $e=1+p(e+e)$, so that $e=1/(1-2p)$.

The expected number of steps to hit state 0 starting at $n$ is therefore $n/(1-2p)$. For $p=.4$, this gives the answer $5n$.

6
On

HINT: For every sample, you decrease an average of 0.2 samples (ie: After 10 samples, 4 will add and 6 will subtract, will leave you 2 samples lower). When would you reach 0 in average?