# Stochastic process of a sequence of machine operations in a given sequence

Say an automobile part needs three operations performed by three machines in a given sequence. The part is fed to the first machine, where the operation takes an $$Exp(\mu_1)$$ amount of time. Then it moves to machine 2, where the operation takes an $$Exp(\mu_2)$$ amount of time. Then it moves to machine 3, where the operation takes an $$Exp(\mu_3)$$ amount of time.

Note that if machine 2 is working, then the part from machine 1 can't be removed even if the operation at machine 1 complete. We say that machine 1 is blocked in this case.

There is an ample supply of unprocessed parts available so that machine 1 is always working or blocked.

I want to model this system as a CTMC. I've already defined the state $$X(t)=(X_1(t),X_2(t),X_3(t))$$ where $$X_1(t),X_2(t),X_3(t)$$ represent the status of each machine. Let $$X_i(t)=0$$ denote "working", $$X_i(t)=1$$ "blocked" and $$X_i(t)=2$$ "idle"

So there can be 8 states in total: $$X(t)=\{(0,0,0),(0,0,2),(0,1,0),(0,2,0),(0,2,2),(1,0,0),(1,0,2),(1,1,0)\}$$

How can I find the rate of transferring from one state to another?

The key is to recall the following properties of exponentially distributed random variables:

$$\mathbb{P}[E(\mu_i)>E(\mu_j)] = \frac{\mu_j}{\mu_i + \mu_j}$$

$$\mathbb{P}[\min(E(\mu_i),E(\mu_j))>x] = e^{-(\mu_i + \mu_j)x}$$

The former equation allows you to determine the transition probabilities from one state to another, while the latter allows you to calculate the holding time between states.

Combine this with some intuition about which states communicate with each other, and you have all the ingredients to construct the continuous-time Markov chain.