Find the steady state and time dependent probabilities of G/M/1/2 and M/G/1/2. Find the steady state and time dependent probabilities of G/M/1/2 and M/G/1/2.   Assume that G follows Erlang distribution with parameters 2 and 1/3.       Also, assume that, for G/M/1/2, µ = 2 and for M/G/1/2,
λ = 2.
The course in Stochastic processes. 
I know M/M/c/k  very well, but I am new to M/G/1 or G/M/1 .  Any help would be appreciated. Especially transition probability matrix.   Thanks
 A: Consider the $M/G/1$ queue. Let $X_n$ be the number of customers in the system after the $n^{\mathsf{th}}$ departure. Let $N_t$ be the number of customers that arrive in $(0,t]$. For each nonnegative integer $k$, the probability that $k$ customers enter the system during a service time is
$$
\alpha_j = \int_0^\infty \mathbb P(N_t=j)\ \mathsf dF_S(t),
$$
where $F_S$ is the distribution of the service time. Since the arrivals are i.i.d. $\mathsf{Exp}(\lambda)$, $N_t$ has $\mathsf{Pois}(\lambda t)$ In our example, $F_S(t) = 1 - e^{-\mu t}(1+\mu t)$ so
$$
\alpha_j = \int_0^\infty \frac{(\lambda t)^j}{j!} e^{-\lambda t}\mu(\mu t)e^{-\mu t}\ \mathsf dt = \frac{(j+1)\lambda^j\mu^2}{(\lambda+\mu)^{j+2}}.
$$
Since the system has a finite buffer of size $2$, we have $\alpha_2=1-(\alpha_0+\alpha_1)$.  It follows that the transition probabilities are
$$
P_{ij} = \pmatrix{\alpha_0&\alpha_1&\alpha_2\\\alpha_0&\alpha_1&\alpha_2\\0&\alpha_0&1-\alpha_0} =
\pmatrix{
\frac{\mu^2}{(\lambda+\mu)^2}& \frac{2\lambda\mu^2}{(\lambda+\mu)^3}& \frac{\lambda^2(\lambda+3\mu)}{(\lambda+\mu)^3}\\
\frac{\mu^2}{(\lambda+\mu)^2}& \frac{2\lambda\mu^2}{(\lambda+\mu)^3}& \frac{\lambda^2(\lambda+3\mu)}{(\lambda+\mu)^3}\\
0&\frac{\mu^2}{(\lambda+\mu)^2} & \frac{\lambda  (\lambda +2 \mu )}{(\lambda +\mu )^2}.
}
$$
Substituting $\lambda=2$ and $\mu=\frac13$ gives
$$
P_{ij} = 
\frac1{343}\left(
\begin{array}{ccc}
 7 & 12 & 324 \\
 7 & 12 & 324 \\
 0 & 7 & 336 \\
\end{array}
\right).
$$
Solving $\pi P=\pi$ and $\pi_0+\pi_1+\pi_2=1$ yields
$$
\pi = \left(\frac1{2317},\frac{48}{2317},\frac{324}{331}\right).
$$
The $G/M/1$ queue can be analyzed similarly, instead using instants at which customers arrive in the system.
