How long between charging sessions?
A phone is either charging or unplugged each hour, and the next hour depends only on this one:
- If charging now, it becomes unplugged next hour with probability (and stays charging with probability ).
- If unplugged now, it becomes charging next hour with probability (and stays unplugged with probability ).
The phone is charging now.
On average, how many hours until it is charging again (its expected return time to the charging state)?
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
- No full solutions here. Hints and approaches only.
- Complexity, edge cases and intuition are the point.
- Interview experiences are welcome. Respect your NDAs.
Loading discussion…
Learn the concepts
The theory behind this question.
Related questions
Gas molecules shuffling between two chambersHow long until the machine restocks?How long until the server is back up?How long between green days?How long until the inbox is empty again?
All questions →