= Solution
Let $\tau=T_{-a}\wedge T_b$ for the <simple symmetric random walk>. From any interior point, $a+b$ successive $+1$ increments force exit through $b$. The conditional probability of this block is $2^{-(a+b)}$, so a blockwise <geometric tail bound from a uniform escape probability> gives $\tau<\infty$ <almost surely>.
Apply the bounded <optional stopping theorem> to $\tau\wedge n$. Since $S_n$ is a <martingale>, $\mathbb E_0S_{\tau\wedge n}=0$. The stopped positions lie in $[-a,b]$, so the <bounded convergence theorem> gives $\mathbb E_0S_\tau=0$. If $h=\mathbb P_0(T_{-a}<T_b)$, nearest-neighbor jumps ensure $S_\tau=-a$ on that event and $S_\tau=b$ otherwise. Thus
$$
0=-ah+b(1-h),\qquad
\boxed{\mathbb P_0(T_{-a}<T_b)=\frac b{a+b}.}
$$
Next apply the bounded <optional stopping theorem> to the <square-minus-time martingale of a simple symmetric random walk>:
$$
\mathbb E_0(\tau\wedge n)=\mathbb E_0S_{\tau\wedge n}^{,2}.
$$
Again the right side converges by the <bounded convergence theorem>, while the left side increases to $\mathbb E_0\tau$ by the <monotone convergence theorem>. Therefore
$$
\boxed{\mathbb E_0(T_{-a}\wedge T_b)
=a^2\frac b{a+b}+b^2\frac a{a+b}=ab.}
$$
This argument justifies passage to the unbounded <stopping time> rather than applying <optional stopping> without an integrability check.
Back to article page