Solution (source code)

= Solution

While the queue is nonempty, service completions occur at rate $\mu$. A completion reduces the queue length only when the customer leaves, which has probability $1-p$. Thinning therefore makes $L$ a birth--death chain with birth rate
$$
\lambda
$$
and effective death rate
$$
\delta=\mu(1-p).
$$
The standard birth--death classification gives
$$
\boxed{
L\text{ is transient if }\lambda>\mu(1-p),
\quad
L\text{ is recurrent if }\lambda\leq\mu(1-p).}
$$
At equality it is null recurrent.