A barber finishes haircuts at rate $3$, measured in hours, so on average it takes him 20 minutes to cut a person’s hair. Customers arrive at rate 2. There is, however, only a two chair waiting room. When an arriving customer sees that both waiting room chairs are taken, he leaves. What fraction of customers leave without a haircut in the long run?
A state describes the total number of customers in the shop, so the state space is $S = [0, 1, 2,3]$ The detailed balance equations are:
$2\pi_0=3\pi_1$,$2\pi_1=3\pi_2$ and $2\pi_2=3\pi_3$
Can someone explain to me why are those the balance equations?
Then it's easy to simly use $\sum \pi_n=1$ to solve for waiting times.
Definition: $\lim_{t\rightarrow \infty} p_{ij}(t)=\pi_j$
The generator matrix is:
$$ G= \begin{bmatrix} -2 & 2 & 0 & 0 \\ 3 & -5 & 2 & 0 \\ 0 & 3 & -5 & 2 \\ 0 & 0 & 3 & -3 \\ \end{bmatrix} $$ The balance equations in vector form are: $\mathbf{\pi G = 0}$, so, working down each of the four columns in turn:
\begin{align} -2\pi_0 + 3\pi_1 &= 0 \\ 2\pi_0 - 5\pi_1 + 3\pi_2 &= 0 \\ 2\pi_1 - 5\pi_2 + 3\pi_3 &= 0 \\ 2\pi_2 - 3\pi_3 &= 0. \\ \end{align}
Some straightforward manipulation of these equations gives the ones you provided.