P959
projecteuler.net

Asymmetric Random Walk

ℹ️Published on Saturday, 6th September 2025, 11:00 pm; Solved by 238;
Difficulty level: 22

A frog is placed on the number line. Every step the frog jumps either $a$ units to the left or $b$ units to the right, both with $1/2$ probability.

Define $f(a, b)$ as the limit $\lim_{n \to \infty} \frac{c_n}n$ where $c_n$ is the expected number of unique numbers visited in the first $n$ steps. You are given $f(1, 1) = 0$ and $f(1, 2) \approx 0.427050983$.

Find $f(89, 97)$. Give your answer rounded to nine digits after the decimal point.



Soluzione

Last modified: February 25, 2026. Website built with Franklin.jl and the lovely Julia programming language.