4 ms·
If I’ve calculated correctly, the expected number of steps to pass n indents is 75((7/5)^n − 1)/4 − 7n/2 for left indents, 7n/2 − 29(1 − (5/7)^n)/4 for right
by anderskaseorg 6y ago
If I’ve calculated correctly, the expected number of steps to pass n indents is
75((7/5)^n − 1)/4 − 7n/2 for left indents,
7n/2 − 29(1 − (5/7)^n)/4 for right indents,
2n²/3 + 2n for unbiased indents.
The constants vary depending on exactly how exactly you count steps and account for edge effects. (I’ve assumed that each indent starts at the middle of a 1 unit section of the main path, and goes 1 unit to the side and 1 unit back.) But the asymptotics are definitely Θ((7/5)^n), Θ(n), and Θ(n²), respectively.