Switches Bulbs Room Riddle
Light switches and bulbs puzzle is an easy quant interview question on Brain Teasers.
This puzzle describes a closed room with several identical light sources and matching switches that you cannot see while you are operating them. You are allowed to interact with the switches in any sequence beforehand, but you only get one chance to inspect the bulbs inside afterward, without touching anything else. The challenge is to design a procedure that lets you infer the hidden wiring, uniquely pairing each external control with its corresponding bulb using only what you can observe during that single visit to the room.
Solving it leans on thinking beyond the obvious on/off snapshot and using additional observable dimensions such as time and lingering physical effects. It connects to state encoding, information theory ideas about maximizing distinguishable outcomes, and careful experimental design under constraints. Interviewers use it to see whether candidates naturally search for extra variables, construct a simple but complete mapping strategy, and clearly explain how each step contributes information. They also watch how methodically the candidate reasons about state changes, persistence, and what can or cannot be observed in the final inspection.
What it tests
This class of problems is governed by the principle of exploiting all available state variables or observable properties, not just the most obvious one. When a system has more possible states than you can directly observe in a single snapshot, you can often create a mapping by introducing time or another dimension (like temperature) to increase the information you can extract. The key is to recognize that each action you take can leave a trace or signature in the system, which can be detected later even if the direct link (like a visible connection) is hidden. This allows you to uniquely identify or distinguish between otherwise indistinguishable elements by encoding information in secondary effects. The pattern holds because physical systems often have latent states (such as residual heat) that persist after the primary state (on/off) changes, and these can be used as additional signals.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free