Hi folks, I'm having trouble with figuring out the intensity matrix for a particular birth/death process.

Customers arrive in pairs in a Poisson stream with intensity lambda. There is waiting room for one customer. Service time is exponentially distributed with parameter mu. If the server is busy and the waiting room is empty when a pair arrives, one person stays and the other person leaves.

So the state space is {0,1,2} corresponding to the number of customers in the shop. I've figured out some entries of the intensity matrix (could be wrong, but hope not), it's the entries on the the second row (state 1) that I'm having trouble with.

| -lambda 0 lambda |
| mu ? ? |
| 0 mu -mu |

As for the stationary distribution, I have no idea what to do there.
Any help would be greatly appreciated.

To find the intensity matrix for this birth/death process, we need to determine the rates at which the system transitions between states.

For the first row of the matrix, we can see that the only transition possible is from state 0 to state 1, which occurs when a pair of customers arrives. The rate of this transition is λ, so the first entry of the first row is -λ. All other entries in the first row will be 0 since there are no other transitions from state 0.

For the second row, we need to consider the transitions from both state 0 and state 2. From state 0 to state 1, the rate is λ (as explained above). From state 2 to state 1, the rate is μ, which is the rate at which a customer is served and leaves the system. Therefore, the second entry of the second row is λ + μ.

Now, we need to determine the third entry of the second row, which represents the transition rate from state 1 to state 2. This transition can occur when a customer arrives and the server is busy (state 1) and the waiting room is empty. Since there is no waiting room available, the arriving customer has to leave. The rate at which this transition occurs is λ. Therefore, the third entry of the second row is -λ.

For the third row, there are no transitions from state 0, so the first entry is 0. From state 1 to state 2, the rate is μ as explained above. From state 2 to state 0, the rate is μ since a customer is served and leaves the system. Therefore, the second and third entries of the third row are μ and -μ respectively.

The intensity matrix is now as follows:

| -λ 0 λ |
| μ λ+μ -λ |
| 0 μ -μ |

To find the stationary distribution, we need to solve the system of balance equations:

πQ = 0

where π is the stationary distribution and Q is the intensity matrix.

Substituting the values of the intensity matrix, we get the following equations:

-λπ0 + μπ1 = 0
λπ0 + (λ+μ)π1 + μπ2 = 0
λπ1 - μπ2 = 0

Solving these equations will give us the probabilities of being in each state in the long run, which is the stationary distribution.