= Solution
{c}
With probability $2/3$, the chain starts at $+1$ and $T=1$. Conditional on starting at $-1$, it takes a geometric number $G$ of transitions to first reach $+1$, with success probability $1-p$, so $T=1+G$. The <probability generating function> is therefore
$$
\boxed{\mathbb E[s^T]=\frac23s+\frac13s\frac{(1-p)s}{1-ps}
=\frac23s+\frac{(1-p)s^2}{3(1-ps)}.}
$$
The parameter $q$ is absent because the process stops at its first visit to $+1$. At $s=1$ the expression equals one, confirming eventual hitting with probability one.
Back to article page