Geometric-arrival single-service queue (source code)

= Geometric-arrival single-service queue
{title2=$X_{n+1}=\max(X_n-1,0)+G_n$}

Let the independent arrivals satisfy $\Pr(G_n=j)=qp^j$, with $p+q=1$. During a <busy period>, each served customer produces $G_n$ further customers, so the total number served has the total-progeny law of a <Galton-Watson process> with mean $p/q$. Its extinction probability solves $s=q/(1-ps)$ and is the smaller of $1$ and $q/p$. The queue is positive recurrent for $p<1/2$, null recurrent for $p=1/2$, and transient for $p>1/2$. In the positive recurrent case its <stationary distribution> is $\pi_j=(1-p/q)(p/q)^j$.