My first instinct was Monte Carlo and I basically said so out loud, which was a mistake.
Model the process as a Markov chain or recurrence relation where the probability of winning from position i depends on the probabilities from positions i+1 through i+K. Derive a linear recurrence and solve it analytically, possibly using generating functions or matrix exponentiation, to get a closed-form expression for the probability starting at 0.
Pro tip: Emphasize that the recurrence can be solved efficiently with dynamic programming in O(mx) time, but the analytical solution reveals the structure and avoids simulation. Mention that for large mx, matrix exponentiation or generating functions give O(K^3 log mx) or closed forms.
Let P(i) be the probability of winning starting from position i. For i in [mn, mx], P(i)=1; for i > mx, P(i)=0. For i < mn, P(i) = (1/K) * sum_{d=1}^K P(i+d).
Note that for i >= mn, P(i)=1. Thus for i < mn, the sum includes terms where i+d >= mn, which contribute 1. This gives a recurrence with known constants.
The recurrence is linear with constant coefficients. Solve the characteristic equation: K*x^K = sum_{j=1}^K x^{K-j}? Actually, rearrange: P(i) - (1/K) sum_{d=1}^K P(i+d) = 0. Assume solution of form r^i, leading to characteristic equation: K = sum_{d=1}^K r^d? Wait, careful: P(i) = (1/K) sum P(i+d) => K P(i) - sum P(i+d)=0. Substitute P(i)=r^i: K r^i - sum_{d=1}^K r^{i+d} = 0 => K - sum_{d=1}^K r^d = 0. So characteristic equation: sum_{d=1}^K r^d = K. One root is r=1. Other roots can be found. General solution is linear combination of r^i for each root, with coefficients determined by boundary conditions.
Use the known values P(mn)=1, P(mn+1)=1, ..., P(mx)=1, and P(mx+1)=0, etc., to set up equations for the coefficients. Since the recurrence holds for i < mn, we need enough boundary values to determine the solution.
Plug i=0 into the general solution to get the winning probability. Discuss that the analytical solution may involve solving a polynomial of degree K, which is not always closed-form for large K, but can be computed numerically or via matrix methods.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.