Toggled switches after 100 passes
Question
A row of switches all start in the left position. Person toggles every switch, person toggles switches , person toggles every third switch, and so on up to person , who toggles only switch . How many switches end in the right position?
Short answer
10. Switch is toggled once for each divisor of , so it ends on the right exactly when has an odd number of divisors. Divisors pair up as and except when is a perfect square, and there are squares up to .
Adapted from OpenQuant; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solutionLessons behind this question
- Sample Spaces, Events, and the Probability Axioms
- Conditional Probability, Total Probability, and Bayes' Rule
Start with a free lesson: Probability Fundamentals is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.
Read it free