The visited points always form an arc, and the frog is at one end of it right after reaching a new point. With k points visited, it randomly walks until it steps just beyond either end, which is a gamblers ruin problem with barriers k + 1 apart, starting one step from a barrier. The expected time is k(N - k) where N = k + 1, so it simplifies to k * 1 = k. Adding up the stages from 1 to 19 visited points gives 1 + 2 + … + 19 = 190 seconds to visit every point. To get back to point 1, we use a known property of random walks on a cycle; the last new point visited is equally likely to be any of the other 19 points. Returning is another gambler's-ruin problem with N = 20. From a point k steps clockwise from point 1 (where k is one less than the number the frog is standing on), the expected time is k(20 − k). Averaging over k = 1 to 19 gives 70 seconds. Altogether, the expected time is 190 + 70 = 260 seconds.
3
u/justhereforfighting 21h ago
The visited points always form an arc, and the frog is at one end of it right after reaching a new point. With k points visited, it randomly walks until it steps just beyond either end, which is a gamblers ruin problem with barriers k + 1 apart, starting one step from a barrier. The expected time is k(N - k) where N = k + 1, so it simplifies to k * 1 = k. Adding up the stages from 1 to 19 visited points gives 1 + 2 + … + 19 = 190 seconds to visit every point. To get back to point 1, we use a known property of random walks on a cycle; the last new point visited is equally likely to be any of the other 19 points. Returning is another gambler's-ruin problem with N = 20. From a point k steps clockwise from point 1 (where k is one less than the number the frog is standing on), the expected time is k(20 − k). Averaging over k = 1 to 19 gives 70 seconds. Altogether, the expected time is 190 + 70 = 260 seconds.