Qm

How many steps to reach the trail's end?

A hiker moves among trail markers 00, 11, and the End (marker 22). Each step:

  • From marker 00: stay at 00 with probability 0.50.5, or move to marker 11 with probability 0.50.5.
  • From marker 11: reach the End with probability 0.50.5, or slip back to marker 00 with probability 0.50.5.

The End stops the hike. The hiker starts at marker 00.

On average, how many steps until the hiker reaches the End?

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

How many steps until the puzzle is solved?How long until the vacuum docks?How many days until recovery?How long until the drone lands?How often is the charging station full?
All questions →