Brokered Bulb 64's Fate
Light Bulb Switching Puzzle is an easy quant interview question on Brain Teasers.
This brain teaser describes a sequence of people toggling switches for a line of numbered light bulbs according to a simple divisibility rule. The candidate is asked to determine the final on/off state of a particular bulb after all passes are complete. The setting looks elementary and almost mechanical, but the twist is that a very large number of operations are compressed into a short verbal description, and the candidate must see through the narrative to the underlying numerical pattern that governs each bulb's fate.
Solving it leans on basic number theory ideas about divisors and parity, together with the ability to translate a story into a clean mathematical model. Interviewers watch for whether the candidate can systematically relate each participant's action to properties of the bulb's label, instead of trying to simulate the process. They also look for recognition of special structure in the labels that breaks the usual pattern, and for a clear, concise argument rather than an empirical or guess-based answer.
What it tests
The key structure in this class of problems is that the final state of each `bulb` depends on the number of times its switch is flipped, which is exactly the number of positive divisors of its `label`. Each broker corresponds to a divisor, flipping the switch if their number divides the bulb's number. Most numbers have divisors that come in pairs, so the total number of divisors is usually even, leading to an even number of flips and the bulb ending as it started. However, perfect squares have an odd number of divisors because one divisor is repeated (the square root), resulting in an odd number of flips and a change in state. This is why only bulbs labeled with perfect squares end up in the opposite state from where they started.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free