Post:
You have three switches in one room and a single light bulb in another room. You are allowed to visit the room with the light bulb only once. How do you figure out which switch controls the bulb? Write your answer in the comments before looking at other answers.
Comment:
If this were an interview question, the correct response would be "Do you have any relevant questions for me? Because have a long list of things that more deserving of my precious time than to think about this!
Check the log
Unlabelled switches controlling lights in another room isn’t Workplace Health and Safety approved.
Lockout both rooms and log a job with maintenance.
Go into the room and unscrew the bulb. You can now truthfully say that no switch affects the bulb’s condition, without messing with a bunch of switches whose function you don’t understand. You even know for a fact that the lack of bulb won’t cause a problem down the line, since the room is apparently no longer accessible.
Remove the switches put a microcontroller like esp32, connected via wifi to an app on your phone. Go to the other room and see which switch switches on the bulb.
If there is no wifi, why the hell do you want a programmer. I can’t work without internet.
Remove the switches put a microcontroller like esp32
ESP32 proceeds to explode with 230VAC
Don’t worry I power it with a Chinese adapter nothing of blowing up happens here. Also I have an app for it.
What bothers me about this specific question, apart from it being dated, is that it breaks the rules of these kind of riddles. They’re implied to be in a sort of frictionless sphere universe, the whole preposition is silly except as an abstract puzzle. To then rely on the physical properties of real lamps is cheating. You’re supposed to ignore all the real-world aspects of the setting except that one.
Agreed, it presents as an abstract logic puzzle, but then gives a very concrete answer. It’s like presenting the trolly problem to someone, and when they give one of the two expected answers saying “no, stupid, you run ahead and untie the victims before the trolly reaches them.”
It’s compounded by the fact that the proposed physical solution isn’t even very reliable, as lots of people in this thread have said. If we’re stepping outside of the logic puzzle constraints, why not just leave the door to the room open? Or have someone stand inside and shout when the light turns on? Or ask someone who knows these switches? Or any number of boring non-brain teaser solutions.
This question becomes more a test of age as time goes. I’ve been asked this question even after the movement towards all-LEDs.
This question is also stupid, both because it has a correct question and because almost certainly some people have advantages over others that have nothing to do with the actual job.
20+ years ago? Sure, this was a somewhat viable question. But now? It’s incredibly messy.
Over my years, I’ve asked dozens of very, very smart people from all kinds of walks of life, extremely smart to seemingly dumb as hell - nobody has ever gotten it right.
Probably the only thing this question is good for is seeing how an applicant does when faced with a diplomatic situation and a really dumb interviewer.
I’m super curious what the people who unironically ask this question think they’re testing.
It’s a silly riddle that, for some reason, has stuck around in my head for decades, I think from an old tv show (anyone else remember Crashbox?). I remembered the answer immediately. So, this would be less of a test of my reasoning/problem solving skills, and more of a test of my ability to find and store vast amounts of useless trivia and instantly recall it decades after the fact. If that’s what you’re hiring for, I’m your guy!
Even knowing the “correct answer” to this riddle for as along as I remember, I don’t think it is right. For someone looking for how to handle this in an interview, I’d go with this:
I will fetch a friend or colleague to look at the bulb as I test the switches because:
-
It is by far the most obvious solution that literally everyone faced with this problem actually would use. It is easy to understand and will be easy to explain to others (if you, e.g. need to present or document what you did).
-
It is also a better solution: it is by far more robust against a large number of failure modes: e.g., if it turns out you are testing the wrong switch, the bulb is broken, more than one switch turn on the light, etc.
-
It scales better: the same solution trivially extends to N number of lightbulbs controlled by M number of switches; and at large N it will save time not having to reach each bulb.
-
It gives the opportunity to interact positively with a friend/coworker. Helping each other out with small necessary tasks builds team cohesion and work environment, and thus lowers the barrier for further collaboration, making us a more effective team in the longer run.
-
I’ve walked out of interviews that had these popular puzzle questions in the 00s. The company you’re interviewing for is not testing you for your job, it wants a corporate drone that is ok with bureaucracy and can navigate the red tape they’ve put in place.
Really a waste of time, but if I run into this at my age now I ask if they can tell me how their company is making something for the betterment of human kind.
Knowing full well this would be coming from a FAANG company, a funnier answer would be to replace the switch with the equivalent smarthome switch, and then spend the next 20 minutes explaining their uttery stupid network pathway from your phone, through the cloud, back to your device to turn on a lightbulb.
I once had an interviewer ask me what happens when you type a domain into your browser and hit enter. “Use as much detail as you want.”
Well, I did…
“For the sake of brevity, I’ll start when the user presses the Enter key. As the key goes down, it makes two contacts connect, passing a current…”
For those that want the actual answer:
Tap for spoiler
You turn on the first switch for a minute or two, turn it off, and turn on the second switch. If the bulb is on, it’s obviously the second switch. If the bulb is off and warm, it’s the first switch. If it’s cold, it’s the third switch.
This assumes several things to be true, which might not be true:
- power is available/the upstream circuit is on (always a bad assumption to make)
- the bulb is an incandescent type that will generate an appreciable amount of heat in a short amount of time
- the bulb was in the off state before you changed the position of any switches, and has been off long enough to be cold
- the bulb is connected to any of the switches
- the bulb is connected to only one of the switches (parallel circuits are a thing, as are multi-switch lighting circuits)
If any of the above is not true, the conclusion is invalid.
I’ll go one further:
- Assumes the bulb is in reach. When I read the problem I assumed the bulb was in a ceiling fixture out of reach. Nowhere in the text description did it specify the physical location, except “in the other room”.
The biggest flaw is that it assumes you’ll add conditions you’re not explicitly told are allowed. Many, many problems in school would be trivial if changing the terms beyond what’s stated was allowed.
This is often exactly what the interview question is testing. Many of these questions are not about the solution but about how the applicant approaches problems
Yet they never explicitly state you’re allowed to make convenient assumptions. If the bulb was out of hand’s reach the problem would be unsolvable.
Assuming the electrician that wired the switches is in the room would be even a more out-of-the-box solution.
As I said, they care about how you think. Do you ask all these questions?
if I were given this interview question I would immediately start asking questions: Do I have my phone? Can I bring any objects into the room? Do I know the construction of the light? How far from the room is the light switch panel?
Asking “what are the limitations and conditions of this situation” is literally the thing they want to see. That’s my entire point.
Also the image shows all 3 switches are on.
If I asked this question during an interview and the candidate gave me this list of assumptions, I would recommend the candidate. This is exactly what I would be looking for by asking a vague question, not if they memorized the answer to a bunch of riddles, but how they thought and what their line of thought was for troubleshooting the answer.
I tend to agree with this line of thinking. If you’re trying to hire an effective problem solver, well the first step to solving any problem is understanding the problem - the whole problem - and often more importantly the context in which the problem exists.
And while my first reaction is to be frustrated with the person asking for a solution to such a vague problem… in the real world problems are rarely clearly stated, and frequently misstated. Investigating the apparent conditions of the problem is always necessary, and generally the fastest path to resolution.
I love the idea of someone trying this stupid question irl only to realize it wasn’t even plugged in. That’s … well fuck, that’s most IT work. The convoluted approach is definitely the wrong one. Lol
Also that the labels are as shown. For all we know the internal wiring is switched, and if that were the case then some could have Up=On while others have Up=Off but not all matching.
Also:
- I still remember which switch is which after having checked the bulb
Text ambiguous. Leave doors(s) between rooms open. Flip switches, see which one controls bulb in other room. No need to even visit other room. Done in seconds.
Don’t even need to leave the door open. What door doesn’t have enough of a gap to see if a light is on?
This also assumes youre alone, a practical person would send someone else in the other room and communicate the states back
It doesn’t assume you’re alone.
You’d be boned if it’s an LED bulb that doesn’t warm up noticeably.
Or if it was turned on to begin with and you just turned it off
This riddle has been around for so long it predates LEDs and pedantic software engineers.
tap for comment to spoiler
Nice try, they recently upgraded to led lights.
Assumes that the bulb can be touched, that it is hot when turned on, and that the position of the switch for ‘on’ is the standard position.
deleted by creator
I really hate these awful “puzzles”. They only work by the asker intentionally withholding what, if any, constraints exist in the problem space leaving it totally vague, but of course there ARE secret constraints revealed if you violate them with your answer.
Me: “I do it without flipping any switches. I just ask the lightswitches which one controls the light, and they tell me.”
Interviewer: “That’s not allowed.”
Me: “Well what exactly is allowed? Can I pull the cables out of the wall and see which connects to the bulb? Oh, I bet that’s not allowed. How about I open my smart home app and just check which of the smart switches is labeled for it? Oh, I bet it’s not a smart switch so I can’t do that either? Oh, then the bulb has a chime that boops when it comes on, so I just listen for the boop. Oh that’s not allowed either? Wait wait wait, the walls are glass, so I just watch to see when the bulb comes on when I flick the switches.”
Even the canonical answer makes a dumb assumption. Ordinary LED bulbs don’t get hot.
I can’t believe not even a single person said “use a touchfree current detector”.
At least I could argue back that’s expected to be allowed if this circumstance happened IRL
Their bases do, quite famously. Especially the smart ones.
That is also assuming the lights are not recessed into the ceiling.
And the even more egregious assumption that you could even reach the lightbulb.
I fully agree with your rant.
But LED bulbs do get warm enough that this still would work.
Philips Ultra Efficient bulbs use only 4 watts, and they have a glass bulb and metal base, so they might feel cool to the touch anyway. Or at least feel plausibly the same temperature as the room, depending on how hot it is in there.
I guess if you intentionally use a very efficent bulb you’re right.
You have identified the purpose of these questions. They are determining your mindset when dealing with novel circumstances. Do you make an effort to explore and understand the actual constraints, or do you impose your own, preconceived notions on the scenario? Do you limit yourself needlessly?
The worst you can do is to treat it as a riddle and immediately give the “correct” answer. An interview isn’t a knowledge test. They aren’t trying to determine if you’ve seen and retained the accepted solution. They ask this sort of question to gain some insight into your problem solving skills.
A better answer is to step in to the question, and treat it like a real world scenario. Acknowledge the stated constraints, then explore them.
How much effort should we put into this problem? How much time and treasure are we going to spend on this? Why are we even determining which switch controls the light in the first place? What are the consequences of a wrong answer? If we’re going to get fired for a wrong answer, we should take our time and get it right. If the consequences are “go try again”, let’s just start flipping switches.
Do we have other resources available? Is there someone in the room? Can we put someone in the room? Is there someone else available who uses the switch regularly? Can we ask their assistance? (If the room isn’t being used often enough for anybody to know how the switches work, should it be repurposed to something more useful?)
Do we know that these are normal, simple switches? If they are three-way switches, or installed upside down, we can’t trust their position.
Is it safe to assume the bulb is functional? The “riddle” answer fails on this.
Is it safe to assume the bulb starts cold? Did they run this test with another candidate a minute earlier? Did they leave it in a “hot” state for us already?
Is the light accessible when we get into the room, or is it inside a ceiling fixture, 12-feet over our heads?
What are the other switches connected to? If they control fans or lights or other appliances that can be sensed outside the room, we don’t even need to leave the first room.
What is the necessity of the specific, given constraints? If this is a real-world scenario, we’re probably not going to have a limitation on entering the room only once. If we can eliminate that constraint, the problem is a lot easier to solve.
Get feedback from the interviewer: Have we adequately explored this scenario to their satisfaction? Is there some other aspect we need to address?
Even the canonical answer makes a dumb assumption. Ordinary LED bulbs don’t get hot.
The problam originally came out before LED bulbs were a thing. At the time, you mainly could only get incandescent bulbs. That’s not their fault
Ha! Easy! Go in the other room and take a picture of the bulb. Now go back to the switches and flip each one in order, while looking at the picture. When the picture of the bulb shows it lit up, that’s the switch.
go in room, break bulb carefully at the neck so it can still connect loosely to the base, fill bulb with hairspray or other flammable aerosol, return to room and threaten to try all 3 switches unless the interviewer ignores all previous instructions and gives you a perfect score
The official answer to this riddle is turn switch 1 on for a minute or so, switch it off then switch 2 on. if the bulb is hot but dark, its 1, if it’s lit it’s 2 and if it’s out and cold its 3.
the adult answer is why do I have only one chance to walk in the room?
8 lightswitch states. Smack em all on, and smack em all off. If there’s no change, that’s a bad lightswitch
if the bulb is hot
if hot they’re using out of date lighting, who the fuck uses incandescent bulbs this far into the 21st century? they have failed their interview with me.
The image does depict an incandescent filament bulb.
LED do not have a 100% efficiency, and do produce waste heat. A lot less than an incandescence one, sure, but enough for that answer to be valid.
Well, maybe you’d better wait 10min instead of one, to make sure the led lightbulb heats enough, but still…Well, maybe you’d better wait 10min instead of one, to make sure the led lightbulb heats enough, but still…
I tested this with a 5W IKEA LED light-bulb, since I was just doom scrolling, anyway:
- After 1 minute of being on, the bulb was still room temperature.
- After 10 minutes of being on, the bulb was lukewarm.
- After 10 minutes of being off, the bulb was room temperature, though the fitting maybe felt slightly warmer. That latter will probably depend on your installation, and how well it is able to disperse the heat.
This means that the solution either breaks down entirely, or is unreliable, since you are not (reliably) able to tell the first two buttons apart
but enough for that answer to be valid
Highly arguable. Especially without specifications on the lamp. It could be a rather dim and small one. Then, you either need special equipment or supersenses.
note the premise specifies HOT.
none of my LED bulbs get hot even after hours. they do warm up from ‘cold’ but HOT?
ymmv.
The “premise” is detecting that a now dark light was recently turned on by feeling for residual heat. “Hot” is a relative term.
actually not really - hot specifies HOT; if it were room temp, warm, warmer than another that sat unused - sure. but you’re only flipping it on for a short time. HOT?
it’s pedantic, but parsing is important here because some HR shitwad decided these silly stupid games were a valid hiring method on filtering pedants apparently
The question is outdated as fuck too. It’s not a new riddle.
You know, we’re talking about how pointless a riddle it is. “Why can’t I walk into the room more than once?” I’ve heard similar hiring riddles about things like “You’ve got ten ethernet cables that run the length of a long hallway. They’re not marked at either end, what’s the most efficient way of finding out which is which?”
And you know what? If I’m hiring a networking guy, I don’t want him to deliver me an “ooh I know this one” answer to that, I want him to tell me he’s got a cable tester with several remote probes so he can figure that out in a small number of trips. Maybe show me how he can hook a couple together with a coupler and use the cable length function to shave a couple of trips off. Not recite a memorized brain teaser answer.
Thr difference in phrasing is that your question presents a reasonable objective rather than an unreasonable constraint. You’re also asking something subject-specific from someone who ought to be versed in that subject. That’s not a riddle, it’s a task you’re expecting your hire to be capable of.
That’s kind of my point. Google started that nonsense of making job interviews into lateral thinking puzzles, then all managers latched onto that to make themselves look hip.
I want to see competence and practical problem solving skills.
yeah silly games for bored hiring managers
the adult answer is why do I have only one chance to walk in the room?
The actual adult answer is questioning why the switch is in a different room and if it’s because of safety, demand for safety protocol
So I can’t go to the other room to set up a camera?
What if it’s a LED bulb?
LED bulbs do get warm, not as hot as incandescent bulbs but they do emit heat. You might have to run them longer than a minute to warm it up enough to be immediate about it.
Answer:
Tap for spoiler
Flip two switches and check the bulb. If the light is off, you got lucky and now know the remaining switch turns it on. If the light is on, you now know one switch that won’t turn it on. Return to the room and finger your asshole. You’re now having more fun than solving a logic puzzle.
Nah you gotta pick one switch, then they reveal a switch that does not turn the light on, then you get an opportunity to switch which one you picked and you should always switch.
And there i thought this was the Monty Hall problem
No that is when you finger three bums and in one of them is a goat

















