model with markov chain

62 Views Asked by At

Suppose to have the following situation: At a bar at each time unit arrives a certain number of customer with probabilities $p_1,p_2,...,p_n$. In the bar there are 3 bartenders so 3 customer can be served together.

My idea is to model with a DTMC with states=0,1,2,...

  • Starting from state i I can go to state i+1,i+2,... with probabilities $p_1,p_2,...,$
  • Starting from state i (i>2) I can go to state i-3,... with probabilities $1-(p_1 +p_2+...+p_n)$
  • If i=2 I can go back to state 0 with probabilty $1-(p_1 +p_2+...+p_n)$
  • If i=1 I can go back to state 0 with probabilty $1-(p_1 +p_2+...+p_n)$

Is this formulation correct?

My doubt is about the probability to come back, $p_1+p_2+...p_n=1$ I don't know how to express that probability

1

There are 1 best solutions below

0
On BEST ANSWER

Let's introduce $p_0$, the probability that no customer enters the bar during a time unit. So, we have the following probabilities: $p_0,p_1,p_2,..., p_n$. The states of the chain is $\{0,1,2,...\}$ corresponding to the possible number of customers waiting for service at the beginning of a unit after the next group has arrived.

Assuming that during a time unit $3$ customer get served, the state transition matrix will be

$$\begin{bmatrix} &\color{red}0&\color{red}1&\color{red}2&\color{red}{\cdots}&\color{red}{n-3}&\color{red}{n-2}&\cdots&\\ \color{blue}0&p_0+p_1+p_2+p_3&p_4&p_5&\cdots& p_n&0&\cdots\\ \color{blue}1&p_0+p_1+p_2&p_3&p_4&\cdots&p_{n-1}&p_n\\ \color{blue}2&p_0+p_1&p_2&p_3&\cdots&p_{n-2}&p_{n-1}&\cdots\\ \color{blue}3&p_0&p_1&p_2&\cdots&p_{n-3}&p_{n-2}&\cdots\\ \color{blue}4&0&p_0&p_1&\cdots&p_{n-4}&p_{n-3}&\cdots\\ \color{blue}5&0&0&p_0&\cdots&p_{n-5}&p_{n-4}&\cdots\\ \color{blue}\vdots\\ \color{blue}n&0&0&0&\cdots&p_0&p_1&\cdots\\ \color{blue}\vdots \end{bmatrix}$$

where the red numbers refer to the next state and the blue numbers refer to the current state.