回復 1# GeoGaLaXY 的帖子
設\(f\left( k \right)\)是從\(y=k\)到\(y=24\)的移動次數期望值
則
\(\begin{align}
& \left\{ \begin{align}
& f\left( k \right)=\frac{1}{4}f\left( k+1 \right)+\frac{1}{2}f\left( k \right)+\frac{1}{4}f\left( k-1 \right)+1 \\
& f\left( 0 \right)=\frac{1}{3}f\left( 1 \right)+\frac{2}{3}f\left( 0 \right)+1 \\
& f\left( 24 \right)=0 \\
\end{align} \right. \\
& \left\{ \begin{align}
& f\left( k+1 \right)=2f\left( k \right)-f\left( k-1 \right)-4 \\
& f\left( 1 \right)=f\left( 0 \right)-3 \\
\end{align} \right. \\
\end{align}\)
令\(f\left( 0 \right)=a\)
\(\begin{align}
& f\left( 1 \right)=a-3,f\left( 2 \right)=a-10,f\left( 3 \right)=a-21,f\left( 4 \right)=a-36,\cdots \cdots ,f\left( n \right)=a-\sum\limits_{i=1}^{2n}{i} \\
& f\left( 24 \right)=a-\frac{\left( 1+48 \right)\times 48}{2}=0 \\
& a=1176 \\
& f\left( 21 \right)=1176-\frac{\left( 1+42 \right)\times 42}{2}=273 \\
\end{align}\)