Solution
= Solution
Use a two-state <continuous-time Markov chain> with uninfected state $S$ and infected state $I$:
$$
S\xrightarrow{a}I,
\qquad
I\xrightarrow{b}S.
$$
The generator is $Q=\begin{pmatrix}-a&a\\b&-b\end{pmatrix}$. Exponential holding times give expected time from recovery to the next infection $1/a$ and expected infection duration $1/b$.