LibraryInterview questions
A fair six sided die is rolled repeatedly.
The rest of the question is for members
Track how much of the pattern the most recent rolls already match, and ask what a failed attempt leaves behind in each case.
A pattern that can overlap itself wastes progress when it fails, and the wasted progress is exactly the extra wait. Density of occurrence is equal for both patterns; the spacing is not.
You have the opening of the question, a hint and the idea. It derives the expected number of rolls for both patterns, and explains whether the two take the same time on average and why.
The full question and its solution are part of Thuztra Learn membership, which is a paid subscription. Install the app to read them: