Solution (source code)

= Solution

For $0<i<N$, the total rate out of $i$ is $\lambda_i$. The <holding time> of the <continuous-time Markov chain> and its next state satisfy
$$
\boxed{J_i\sim\operatorname{Exp}(\lambda_i),\qquad
\mathbb P_i(X_{J_i}=i-1)=\mathbb P_i(X_{J_i}=i+1)=\frac12.}
$$
The <holding time> is <independent> of the direction of this jump: the conditional probability of destination $j$ is the rate $q_{ij}$ divided by the total rate $\lambda_i$, independently of the elapsed holding duration. This is the exponential-clock construction of a <continuous-time Markov chain> with the given <infinitesimal generator matrix>.

At $i=0$ or $i=N$, all rates out are zero. These are <absorbing states>; the path remains at its initial endpoint and $J_i=\infty$ <almost surely>. There is no next visited state, so $X_{J_i}$ is not a finite-time jump value at either endpoint. If one separately uses $X_\infty$ for the limiting state, that limit is the same endpoint.

The embedded jump chain in the interior is a <simple symmetric random walk> on $\{0,\ldots,N\}$, stopped at the endpoints. From any interior state it has probability at least $2^{-N}$ of hitting a boundary in the next $N$ jumps, by following successive leftward choices. Thus its number of jumps before absorption is finite <almost surely>. Each of this finite number of <holding times> is finite <almost surely>, so absorption also occurs in finite continuous time. The finite set of positive interior rates causes no explosion; in particular their maximum bounds the total jump rate. When $N=1$, the chain starts at an already absorbing endpoint.

The rates alter the clock but not the sequence of visited states. The <gambler's ruin> calculation from part (a), translated to an initial state $i$ between endpoints $0,N$, therefore gives
$$
\boxed{\mathbb P_i(E)=\frac{N-i}{N}\qquad(0\leq i\leq N).}
$$
This includes probability one at zero and probability zero at $N$.