A walker starts at 0 and each step moves by an amount drawn uniformly from
[-3, -2, -1, 1, 2, 3]. Return the expected number of steps until
.
Let be the expected remaining steps from position x. For every interior
position:
That is a linear system in the interior states, so build it and solve it rather than iterating to convergence.
Input
5
Output
6.725490196078429