Solution (source code)

= Solution

The queue length is an <M M 1 queue> and hence a <birth-death process> with birth rate $\lambda$ and death rate $\mu$ away from zero. The <detailed balance for a birth-death process>[detailed-balance] equations are
$$
\pi_n\lambda=\pi_{n+1}\mu,
\qquad n\geq0.
$$
Writing $\rho=\lambda/\mu$, they give $\pi_n=\pi_0\rho^n$. Since $\rho<1$, this measure is summable and normalization yields
$$
\boxed{\pi_n=(1-\rho)\rho^n,\qquad n\geq0}.
$$
The existence of this invariant probability distribution for the irreducible nonexplosive chain proves <positive recurrence of an M-M-1 queue>[positive recurrence].