Distribution of the random time for queuing system to change from full to empty.

Question: Find the distribution for the (random) time it takes an $M/M/1/2$ queuing system with $\lambda = \mu = 1$ to change its state from being full to being empty. ($\lambda, \mu$, arrival rate and serivce rate)

I have a hard time understanding this solution, can anyone help me out?:

Let $X_1, X_2, X_3, . . .$ be independent identically distributed random variables each of which is distributed like the sum of two independent random variables that are exponentially distributed with expected values 1 and 1/2, respectively.

Further, let N be a discrete random variable independent of the $X_n$'s such that $P(N = n) = 2^{−n}$ for $n = 1, 2, 3, . . .$

Then the asked for random time is distributed like $\sum_{n=0}^N X_n$.

Let $Y(t)$ be the queue size at time $t$. Each $X_i$ represents the time to get $2$ transitions starting from the state where $Y(t)=0$. The first transition is to $Y(t)=1$ and occurs at exponential rate $\lambda=1$. The next transition, to either $0$ or $2$, occurs at rate $\lambda+\mu=2$.
Each such two-step transition goes to $Y(t)=2$ with probabilty $1/2$ and returns to $Y(t)=0$ with probability $1/2$. So if $N$ is the number of such two-step transitions until we reach $Y(t)=2$, it has $Geom(1/2)$ distribution.
• I understand what you mean but your explaination is from empty to full right? Does not matter,i understand it. And regarding the geometric distribution its like $P(N=n) = (1/2)(1/2)^{n-1}$. Prob. you succeed on the nth try. Why on earth didnt he write it like that or explain it like you did :) So much easier to understand. I got it now but still pretty hard to get your head around a distribution which is a sum of n variables, X_n, which in turn is a sum of two exponential r.v's and the limit of the sum is in it self a geometric r.v. Extra hard when we havent worked with distr.'s much. Ty btw. – JKnecht Jan 8 '16 at 10:04