It is assumed that device fails due to a $k$-th shock with probability $\frac{k^2}{9}$ for $k=1, 2, 3$ and, in this case, it is replaced with a new device. If shocks are spaced by independent time intervals of exponential parameter $9$, what is the generator for the number of shocks to the machine in function?
I know that the generator is the matrix $(a_{ij})$, where $a_{ij} = \begin{cases} \lambda_i q_{ij} & j \not= i \\ -\lambda_i & j=i \end{cases} = \lim_{h \to 0} \frac{P_{ij}(h)-P_{ij}(0)}{h}$
and $q_{ij}=\begin{cases} \frac{P_{ij}}{1-P_{ii}} & j \not= i \\ 0 & j=i \end{cases}$.
So I think we have to figure out the different states; it is $0$, $1$ and $2$. For the rest of the argumentation, I am very stuck.
Is anyone could complete this exercise and explain to me in details what he does?
Let $Z(t)$ be the number of shocks the device currently in use has survived and $S_n$ the time of the $n^{\mathsf{th}}$ shock. The embedded Markov chain $\{X_n:n\geqslant1\}$ has transition probabilities $$ P_{ij} = \begin{cases} \frac19,& i=j=0\\ \frac89,& i=0,j=1\\ \frac13,& i=1, j=0\\ \frac23,& i=1, j=2\\ 1,& i=2, j=0. \end{cases} $$ Conditioned on $Z(0)=i$, let $T_i=\inf\{t>0:Z(t)\ne i\}$ be the holding time in state $i$. Then $T_1$ and $T_2$ have $\mathsf{Exp}(9)$ distribution. For $T_0$, let $\tau=\inf \{n>0: X_n\neq 0 \}$, then $T_0\mid \tau$ has $\mathsf{Erlang}(\tau,9)$ distribution (as $T_0\mid\tau$ is the sum of $\tau$ exponential random variables). It follows that \begin{align} f_{T_0}(t) &= \sum_{n=1}^\infty f_{T_0\mid \tau=n}(t\mid n)\mathbb P(\tau=n)\\ &= \sum_{n=1}^\infty \frac{(9t)^{n-1}}{(n-1)!}9e^{-9t}\left(\frac19\right)^{n-1}\frac89\\ &= 8e^{-9t} \sum_{n=1}^\infty \frac{t^{n-1}}{(n-1)!}\\ &= 8e^{-8t}\quad (t>0), \end{align} so $T_0\sim\mathsf{Exp}(8)$. Let $\tilde P_{00}=0$ and $\tilde P_{ij}=\frac98P_{ij}$, then $\{\tilde X_n\}$ are the jump times of $Z(t)$. Hence we may compute the (nonzero) entries of the generator by \begin{align} a_{01} &= 9\left(\frac98\right)\left(\frac89\right)=9\\ a_{00} &= -9\\ a_{10} &= 9\left(\frac98\right)\left(\frac13\right)=\frac{81}{24}\\ a_{12} &= 9\left(\frac98\right)\left(\frac23\right)=\frac{81}{12}\\ a_{11} &= -\frac{243}{24}\\ a_{20} &= 9\\ a_{22} &= -9. \end{align}