What would Feynman do?

No one I know at Microsoft asks those godawful "lateral-thinking puzzle" interview questions anymore. Maybe someone still does, I don't know. But rumour has it that a lot of companies are still following the Microsoft lead from the 1990s in their interviews. In that tradition, I present a sequel to Keith Michaels' 2003 exercise in counterfactual reasoning. Once more, we dare to ask the question "how well would the late Nobel-Prize-winning physicist Dr. Richard P. Feynman do in a technical interview at a software company?"

Interviewer: Now we come to the part of the interview where we test your creative thinking. Don't think too hard about it; just apply common sense and explain your reasoning. Here's the problem.

You are in a room with three switches that each control a different light fixture in another room. You cannot see from the switch room into the lamp room. Your task is to determine which switches control which light fixtures, but you may only go into the room with the lights once. How do you determine which switch controls which light?

RPF: That seems straightforward. I could obtain a number of large mirrors, and, if necessary, a telescope. I enter the room with the lights once and position the mirror so that it reflects all three lights out the door of the room.  I continue placing mirrors, aligning them as necessary to reflect the photons emitted by the lights until I am back in the room with the switches. Now I can see the lights, possibly through the telescope if the distance is large, and I can toggle the switches on and off so as to determine which light is controlled by which switch.

Interviewer: Um. Yeah, I suppose that would work. But what if you didn't have big mirrors, or couldn't align them well enough?

RPF: Then I could obtain an inexpensive digital video camera and put it on a dolly with a sufficiently long rope attached to it.  I could put the video camera in the room with the lights, turn it on, and then take the other end of the rope back to the room with the switches. I'd then play with the switches for a while and take notes on which switches I flipped at what time.  Then I'd haul the camera on its dolly back into the switch room and review the recording. By correlating my notes of what switches were flipped at what time with the recording of the lights, I could correlate lights to switches.

Interviewer: I forgot to mention that once you enter the room with the lights, you are not allowed to come back to the room with the switches.

RPF: That is an unusual constraint that perhaps you ought to have mentioned earlier, but I'll go with it. In that case I would take a different approach. But first I'll need more information. Can I assume that the lights and the switches are correctly wired according to the National Electric Code of the United States? That is, that the switches interrupt the hots, not the neutrals, that the switches are standard-duty switches rated to interrupt 15 amps of 120 volt alternating current, and so on?

Interviewer: Yeah, I guess so.

RPF: And these are single switches? Or is it possible that the switches are part of a multi-location switch, like you see in houses where there are two light switches for the same light, say, at the top and bottom of the stairs?

Interviewer: Does it matter?

RPF: Certainly it matters! You're asking me a question about correctly deducing the properties of a 120 volt electrical system. The resistance across a well-grounded human being is, I don't know, call it 1000 ohms, and we know that current is equal to voltage divided by resistance. That means that an accidental shock could put a current of 120 milliamps across that human, which is within the range that will stop someone's heart. I presume you know the details of the system you are asking me to diagnose; the safety precautions I'm going to describe will be different depending on the known and unknown aspects of the electrical system.

Interviewer: Right. Suppose they are just normal switches, nothing fancy.

RPF: Great. Are the three switches all in one triple-wide junction box, as those switches over there on your wall that control your lights in your office are, or are there three different junction boxes, one for each switch?

Interviewer: The former.

RPF: As I'm sure you know, there are two standard ways of wiring three single-location switches as you describe. The first is to bring the hot and neutral return wires from the power source to the triple-switch box, then split the hot into three to power each switch, and then run three switched hot wires and three unswitched neutral wires, one pair to each light. The second way is to do the opposite: run the hot and neutral from the panel to each light, and then run a pair of hot wires from each light to its switch. The switch joins together the two hot wires so that one of the hot wires is unswitched and the other is switched. The lights are then energized by the switched hot. Which of these two standard configurations did the electrician who wired this system use?

Interviewer: I don't think it matters. But I don't actually know how to wire a light switch.

RPF: It seems odd that you would ask me a question about deducing properties an electrical system but not know the details of that electrical system.

As a simplifying assumption let's suppose that the system is wired with the first configuration I described. That is, there are "line" hot and neutral wires in the switch box, and that the hot is interrupted by the three switches. This means that when I remove the cover of the light switch, I can easily determine which hot wire is coming from the panel, and which switched hot wires are going to the fixtures. Before I remove the cover of course I would find the electrical panel and de-energize the circuit that powers the switch.  If necessary, I could simply de-energize every circuit, if for some reason I could not reliably determine which breaker corresponded to the circuit I was about to work on. I would also inform everyone in the vicinity that there was a breaker switched off and that I was working on the mains. I'd probably post a sign that said to not turn the power back on, and if it was equipped with a lock, I'd lock the breaker in the off position and pocket the key. I've been shocked enough times already in this life; I'd rather not take a chance on being electrocuted for the purposes of your exercise.

At this point I note that the problem you pose is, in a trivial sense, solved.

Interviewer: What on earth are you talking about?

RPF: The problem was to determine which switch controls which lights. With the mains power turned off, in a sense none of the switches control any of the lights. Any of the switches can be in any position and none of the lights will go on. But I think that's not the sort of solution you had in mind.

Interviewer: You are correct; that's not where I was going with this.

RPF: Now that the power is off I can safely disassemble the light switch junction box and disconnect the three switched hot wires from their switches. I would obtain a piece of standard NM-14/3 copper wire long enough to go from the switch room to the lamp room. Attach the white conductor to the disconnected switched hot wire of the first switch, the black conductor to the second and the red conductor to the third. I'd then carry the other end of my wire to the room with the lights, which should all be off. I'd remove the lamps from the fixtures, and then use the conductor as a continuity tester. By using a nine-volt battery and a DC volt meter, I can determine when each of the three conductors completes a circuit with the hot portion of the light fixture. I'd then know which lamp corresponds to which switch.

Interviewer: What if it was infeasible to obtain a piece of conductor that long?

RPF: By the statement of the problem there already are at least three conductors that long going between the switches and the lights, so it was feasible for someone already. Unless you are implying that the light switches are actually part of some sort of radio control system. Again, this seems like a fact about the system that you ought to have mentioned earlier; you did say that these were "nothing fancy" 120 volt AC switches.

Interviewer: They're just normal switches. But I think you've forgotten something else.

RPF: Yes, I see your objection. I asked earlier if the switches were rated to 15 amps at 120 volts but I did not ask if the light fixtures were. If the light fixtures are low-voltage fixtures then there is an AC transformer sitting between the high-voltage switched hot that I've got my continuity tester on and the low-voltage fixtures. My nine volt direct current continuity tester isn't going to give me a good result in that case.

Interviewer: Actually I was going to say that since you're not allowed to go back into the room with the switches, you'll be leaving this scenario with the switches disassembled and the breaker locked in the off position.

RPF: You make an excellent point. I should come up with a solution that leaves the switches assembled, since I'm not allowed to come back.

Interviewer: Yes, you should. Can you?

RPF: Suppose instead of attaching a continuity tester after I disassemble the light switches, I simply swap out all of the light switches for dimmers. I set the first dimmer to low, the second dimmer to medium and the third dimmer to high. I restore the power, and now when I go to the other room, I know which light corresponds to which switch by observing their relative brightness.

Interviewer, relieved: Now you're getting somewhere. But...

RPF: Yes, again I see the problem you're about to point out. If the lamps are fluorescent then two of them will be off or flickering, only the one on "high" will be on, so I have possibly only determined which light is the "high" dimmer switch. And if the lamps are incandescent, then their brightness could be different depending on their wattage. It was not a condition of the problem scenario that the three lamps all be incandescent bulbs of the same voltage and wattage. I haven't actually solved the problem. Instead I could remove the lamps and test each fixture's hot-to-neutral potential with an AC volt meter to see which one has the high, medium or low voltage. Though that again is assuming that there aren't transformers in there that are changing the voltages.

Interviewer: Forget about measuring the voltage already! Suppose you can't reach the fixture to measure its voltage.

RPF: Again, I must point out that it seems very odd to ask a question about diagnosis of an electrical system while not allowing the diagnostician to use common electrical tools. But anyway, you said that I was on the right track, so let's go with that. We know that modern dimmers do not put a variable resistance across the AC signal; rather, they selectively "cut out" a variable-sized portion of the wave and leave the rest of the cycle in its normal size and shape. We could build a device that works analogously to a dimmer, but much slower. The device could have a couple of rotating cams that flip a switch on and off once a second. Now we need not disassemble any of the switches, or cut the power at the panel. We attach the device to the first switch, flip the second switch off, and the third switch on. Since we have already established that the switches are single-location switches that have been wired correctly according to the NEC, we know that the switch in the "up" position is energizing its lamp and the one in the down position is off.  Now we go into the other room. The lamp that is off is controlled by the third switch, the lamp that is on is controlled by the second, and the one that is flipping on and off every second is controlled by the first. This system will work no matter what kind of lamps are in the fixtures, provided of course that they are good lamps, not burned out.

Interviewer: Well I suppose that would work. All of your solutions so far require some kind of equipment. Could you solve the problem without building anything or using special tools, by taking advantage of some other factor?

RPF: Like what?

Interviewer: Like, that lamps produce effects other than lighting a room.

RPF: For example?

Interviewer, exasperated: You could turn two switches on and one off. Then wait a minute, and turn the third switch off. When you go to the other room, the lamp controlled by the first switch will be on, the lamp controlled by the second switch will be off and cold, and the lamp controlled by the third switch will be off and hot. That seems a lot easier than all this rigamarole about disassembling the switches or building custom equipment.

RPF: How am I to measure the heat of the lamps without special equipment? You just said that I couldn't reach them.

Interviewer: Um. Yes, I suppose I did say that.

RPF: I can see a number of additional problems with your heuristic. You haven't specified how far it is between the rooms, but have several times implied that it is a considerable distance; I can't see the light from the switch room, I can't align my mirrors and I can't bring a conductor that long for continuity testing all imply considerable distance between the switch room and the light room. The time it takes me to get from one room to another can give the third lamp time to cool. The third lamp might not be very hot to begin with; if the fixtures are fluorescent bulbs, as they are in this building, or modern LED bulbs, then their heat output is far lower than an incandescent bulb. We also haven't specified where this scenario takes place. If it is in a very hot climate, like Los Alamos in the summer, both de-energized lamps could reasonably be warm to the touch, and if it is in Alaska in the winter in an uninsulated room then both could reasonably be cool by the time I get there. Your proposed heuristic depends upon a number of conditions that were not given in the problem. And it is in general a bad idea to test whether something is extremely hot by touching it.

Interviewer: Well I think that concludes this portion of the interview. Before we let you go for the day do you have any questions for me about this company, this team or the job?

RPF: Yes. When you build software algorithms, do you build systems using well-established software engineering principles to produce software that conforms to industry standards and practices?

Interviewer: Of course.

RPF: And do you use software analysis tools, like profilers, debuggers, theorem provers, and so on, to facilitate detection and diagnosis of flaws?

Interviewer: Yes, again, of course we do.

RPF: Then why would you ask an interview question that tests my willingness to abandon industry-standard, well-established techniques that use common electrician's tools to determine continuity of a portion of an electrical system? And why is the solution you were clearly driving me towards one which takes advantage of an undocumented and unreliable epiphenomenon? Does your team usually write code whose correctness relies upon undocumented and unreliable correlations, correlations whose magnitudes can vary widely as a result of implementation details?

Interviewer: Thanks for coming in Dr. Feynman. We'll be in touch.

Comments (73)
  1. innesm says:

    Man, Richard Feynman was really annoying! 🙂

  2. Michael says:

    Ha ha! I loved reading "Surely You're Joking, Mr. Feynman!" and I've listened to a few recordings of his lectures… this piece really captures his voice.

    The last paragraph is what really counts. I think we need a tl;dr   😉

  3. Robin Williams says:

    Ha ha, perfect timing for a Monday afternoon (well, it is where I am anyway)

  4. Blake says:

    Absolutely brilliant.  Thank you, Eric.

  5. Matthew Jones says:

    Bravo Eric!  That was brilliant 🙂

  6. KevDog says:

    This might be the funniest piece ever written that contains the word "epiphenomenon".

  7. Andy says:

    This was absolutely fantastic! Many thanks Eric.

  8. Keith J. Farmer says:

    My first software interview I was asked "What is the purpose of art?".  The first response was "Is it necessary for art to have a purpose?".  Tedium ensued and shortly after that point, I gave up on the company.

    That's a great comeback. I would have probably asked a different clarifying question: before I can describe the purpose of 'art' I'll need a clear definition of what art is, and how to know when a particular thing is 'art'. So, give me a precise definition of 'art' and then we can talk about its purpose.

    But what a ridiculous question. Any reason why it would be asked in a technical interview? — Eric

    My tactic leans more toward having the candidate recast a problem they've solved before (or should have) into a technology they're unfamiliar in. One of my best hires was a person who'd worked on heart monitors — I taught him the basics of writing IEnumerable methods, and had him write one that took the input stream and returned the time-stamped pulse peaks.

  9. Awesome..  Well written Eric.

  10. Steven A. Lowe says:


    I hate these kinds of questions. My answer would have been "If I can only go into the room once, why should I care what each switch does? If the knowledge gained is not reusable, then the ROI of the system is zero and the project should be abandoned."

  11. Kevin says:

    I think in many cases these types of questions are still useful and this dialogue, while hilarious, is a great example of why.  

    The interviewer is clearly of the type of interviewer who is only interested in "right" answers and is completely ignoring the fact that the interviewee has a vast array of technical knowledge.  The interviewee is clearly a bad fit for this company, assuming that the interviewer is an actual developer, not some HR person with a list of questions.

    At every point in this dialogue could more interesting discussions had been spun off to discuss the interviewer experience, and approach to solving problems.  Given RPF's depth of knowledge it would have been smart to realize this right away, give away the answer, and then compare and contrast the "clever" (generally accepted answer) with other methods that RPF proposed.  Instead, by the time a conversation had started (at the very end), the interviewer had already formed a negative opinion, and the interviewee was clearly annoyed.

    When I interview, I keep the puzzles to a minimum, and if any, I preface them with a statement that my goal is not to see if a right answer can be reached, but simply to discuss problem solving in a more free-form manner.  It is a good way to lighten the mood after "tell me about a situation when…" type questions.

  12. Ram says:

    Simply amazing!

  13. Joel says:

    Alternative answer by Mr. Feynman, after disassembling the switch plate: "Well, then, I rewire the switch box so that all of the hot wires running to the lights come off of a single switch. Of course, that could present a safety issue with overloading the switch, but a standard multi-tester should have the ability to measure the load placed on each line, and if the total exceeds the rated safety limit of the switch it is a simple enough matter to obtain a higher-rated switch and install it instead. The box has, after all, already established as being sufficient for the total load. But the entire issue is unlikely to occur in the first place, as NEC wiring standards require that switches be rated to the full load of the circuit, not just the portion of the load being used by a single fixture."

  14. Ricardo Herrmann says:

    Excelent! But now let's change the topic to round manhole covers: hebig.org/…/003029.php

  15. Milenski says:

    Not all lamps emit heat… It was funny though..

  16. Markus says:

    Did he get the job?

  17. Gabe says:

    The problem is that the interviewer asked the question in the wrong way. Here's a better way to ask it to get the "correct" answer:

    "Your wife has rented out a gym for the gymnastics show that the class she teaches is putting on. She needs you to figure out which switches operate which lights in the gym. There are three circuits, each of which operates several mercury arc lamps of the sort you see in gyms. These circuits are controlled by circuit breakers in a locked electrical panel several floors away.

    "Your wife has managed to arrange for the guy from Facilities who has the key to the panel to meet you during your lunch break on a day the gym isn't in use. However, the Facilities guy is going on his lunch break as soon as he opens the panel for you, so you can't get back into the panel because you'd have to wait for him to finish his break, by which time you'd already be late getting back to work. You are not allowed to leave the panel open unattended. Since it's a union shop, you're also not allowed to plug or unplug anything, nor even get on a ladder without somebody filing a grievance and you getting your wife in trouble."

    Clearly you aren't going to be running around aligning mirrors and propping open fire doors. You also probably don't want to leave a camera sitting unattended in an unlocked gym. Taking the cover off the panel to mess with the wiring is out of the question and accessing the lights themselves is physically impossible.

    Assuming the lights are all off once you get to the panel, possible answers are:

    1. Turn on two banks of lights. Wait long enough for the lights to be fully warmed up. Turn off one bank. Close the panel and run to the gym. Use an IR thermometer (of the kind with a laser for targeting that you get for $50-100 at a hardware store) to determine which lights you turned off.

    2. Since these are arc lights, you can take advantage of the fact that they take a long time to get to full brightness: Turn on one bank of lights. Wait long enough for the lights to be fully warmed up. Turn on a second bank. Close the panel and run to the gym. Note which lights are still warming up.

    Though I agree that this is a cleverly constructed scenario which might elicit the "correct" answer, in my little fiction the interviewer has actually given no thought to the validity of the question or its "stock" answer, has no knowledge of the actual problem domain (ie, wiring light switches) and mis-states the problem on a couple of occasions. The interviewer is essentially interviewing by rote. If the interviewer were as intellectually engaged in the process as the task of interviewing actually demands then the interviewer wouldn't be asking a canned, cliche brain-teaser with no correlation to success in software development. RPF sees right through this immediately and is having a little fun at the interviewer's expense. Of course, the interviewer character here is deliberately a "straw man"; I'd hope that no real interviewers for software companies would be quite this clueless. — Eric

  18. -dsr- says:

    Gabe: Feynman might say, "So the Facilities guy works there; he probably knows which switches work which lights. I ask him. If he doesn't know, I'll give him $40 to hang around for ten minutes while we figure it out. Then I'll help him label the switches, and everyone will be happy."

  19. dan says:

    Very funny.  Just fyi, I grew up in Los Alamos and it does not get especially hot in the summer.

    Good point; being at 2km elevation, there's not so much atmosphere to retain the heat as in other places in the southern part of the US. I was thinking of Los Alamos because of course Feynman lived there during the Manhattan Project. Perhaps Brazil, where Feynman lived later, would have been a better reference point for a hot climate. — Eric

  20. A sensible coder says:

    I don't think Dr. Feynman talks in such a cryptic language, if you've read his books you would know that he actually talks in a very lucid language. But the person mentioned in the interview does sound like "Sheldon" from the "The Big Bang Theory".

  21. RS says:

    Simply brilliant… I almost rolled off my chair reading and laughing…

  22. Gabe says:

    While I certainly agree that robotic interviewers should only be used for screening out fraudulent resumes (or as straw men in funny stories like yours), and generic brain teasers (e.g. "why are manhole covers round?") are useless for developer positions, this particular question does not strike me as invalid.

    As I see it, you're asking a candidate to reverse-engineer a fairly simple black box. It's just a concrete way of saying "You have three inputs, each of which controls separate outputs; you must figure out which input controls which outputs, but you can only observe the outputs once…" in a way that any regular person can relate to. A bad engineer would say "it's impossible", a good engineer will say "I don't know", and a great engineer like Feynman would have said "look for epiphenomena that have some correlation to the inputs and see if any of them can be used to deduce the answer".

    It's extremely common to have to reverse-engineer problems with unusual constraints — whether it's doing customer support on a system you don't have access to, debugging programs you don't have the source for, or trying to use APIs that behave contrary to their documentation. Indeed, Raymond Chen regularly discusses such situations on his blog.

    I can certainly imagine Raymond being given the task of fixing some popular program that, in the latest version of Windows, crashes every 100th time you do X. The problem never shows up under the debugger, the vendor won't cooperate (so you have no source code), and he has to fix it in time for Windows to RTM. Here's how this real-life debugging problem corresponds to the light switch problem:

    * figure out which switch controls which light -> determine the cause of the crash

    * you cannot come back to the room with the switches -> only crashes every 100th time

    * you can only go the the room with the light room once -> you have to debug from a memory dump

    * you can't open up the switch panel -> you don't have access to source code

    * you can't hook up a meter/continuity tester -> the problem doesn't show up under debugger

    As such, it's actually a perfectly cromulent question when used properly, because it covers a situation that any good developer can expect to encounter.

  23. Siderite says:

    Thumbs up! Haven't laughed so much at a joke in a long time…

  24. Ferdinand Swaters says:

    I assume Feynman was hired. In marketing.

  25. T. says:

    Anyway, concerning: "No one I know at Microsoft asks those godawful "lateral-thinking puzzle" interview questions anymore. Maybe someone still does, I don't know." – I was asked the same question only 2 years ago at Microsoft (Denmark), so the question is still popular there.. 🙂

  26. KMM says:

    Reading your hilarious and brilliant blog is the the second best thing to enjoying your humor in person, Eric. Nicely written post, and hilarious to boot! Indeed, asking people to think outside of the box for an interview when you really want them to conform at work seems fairly counterintuitive. Thanks for posting this!

  27. Brian says:

    Ignoring the fact that the interviewer is horrible and not actually engaged with RPF, I will provide a rebuttal to RPF's final comment:

    If this is a one-off problem and the goal is to solve it quickly, a quick and dirty "hacky" solution relying on the heating properties of the lights would not be so unreasonable.  The RPF solutions might be more robust, but they are also more time consuming.

    There are plenty of real-world problems where some sort of security-related concern (or bureaucracy) will result in arbitrary "stupid" requirements like only entering the room once.

  28. MWF says:


    It's still not a good question for someone interviewing for a software position, because it involves a completely different domain. That *style* of questioning – posing a problem involving determing a non-standard way to analyse a situation that presents unusual black-box behaviours – can be useful, but the actual question should be pertinent to the domain at hand.

    That is, if you want to see what candidates will do in a certain software situation, then ask them about that software situation. Don't ask "similar" questions that, while related in their extermely generalized, high-level form, require specifc knowledge of something else entirely, whether it be light bulbs, weather patterns, sewer maintenance, internal combustion engines, or whatever.

    Don't find a cute way to rephrase what you are after. Just put it out there to begin with.

  29. pgrmdave says:

    When asked this question first ask –

    "Is there any documentation?"  – good software should be well documented (electrical diagram) – maybe even comments on the switches themselves ("north wall lights", "Middle lights", etc.)

    If there's no documentation:

    "Has anybody else done this before that I can ask?" – A good programmer wouldn't reinvent the wheel – chances are somebody else in the office had to work with this before and knows the answer so that you don't have to waste time on it.

    If nobody else worked on it:

    "Is there a standard?  I.E. the left most switch controls the leftmost lights, etc.?"  – Good programming follows standards which are not only easy to find, but intuitive, so that learning an API doesn't require the same amount of specialized knowledge that knowing a language requires.

    If there are no standards:

    "Are there similar light switches I can work with? Maybe there are three switches controlling three lights in the room I'm in?" – often if there's no documentation and nobody else knows the answer and there aren't obvious standards then looking at other similar code can help get a grasp of what you need to do for your own work.

    If there's nothing similar, no standards, no experts, and no documentation:

    "It would probably be best to be rewired, documented, and brought up to standard specifications.  It'll cost more up front, but you'll save a lot in the long run."  

  30. Mark Knell says:

    Bravo.  I'll disagree with an earlier commenter: I think the voice is spot on–not how Feynman talked, but how he might have while putting someone on.

    This is so well done that I'm going to speculate that within 6 weeks it will be circulated by chain letter, attributed to the man himself.  You might as well send a note to Snopes right now.

  31. Jim says:

    Speaking as a Microsoftie, anyone who can pull a Kobayashi Maru on me gets a "hire" designation.

    If an interviewer is unprepared for an interviewee's lateral thinking, the interviewee should feel free to paint the walls with said interviewer. Additionally, interviewees should have the option to bring the interviewer's head to the next person in the loop.

    Interviewees: feel free to go all Klingon on the weak among our herd.

  32. Anthony P says:

    This reminds me of a question I was presented with during an interview last May. It was to the effect of:

    "You're given 9 items and a scale. 1 item weighs more than the others, which are identical. How many inspectiions are required to find the 1 item?"

    The programmer in me said, well, just loop over the items and when I find a heavier item, return. Done. I went through a couple versions of that but they eventually said "forget programming, use the scale, focus on least number of inspections." Eventually I arrived at the answer they were looking for. I realize they were just seeing how I would think about the problem. Yet, even today, I know that if I were presented with the same challenge in code, I would simply loop. The algorithm they desired simply does not translate well to code, but I am willing to admit that maybe it *does* translate and I'm simply not knowledgable enough to do it. I will leave it as an exerice as to what the accepted algorithm and answer was.

  33. Anthony P says:

    And, oh, how I long to be able to edit my typos.

  34. Ojoj the boy-faced dog says:


  35. Duarte Cunha Leão says:

    Who else but you could have invented such an intricate and complex dialogue.

    I would need a parser just to validate the syntax of the text, and an English dictionary to understand it all. And I am an electrical engineer…

    I think people like you Eric have a huge machine in their brains, full of memory and cpu, and, sometimes, you need to put it all out, in posts like this one!

    Any way, I love your blog…

  36. Tanveer Badar says:

    @above commenter

    And it runs OS X.


    Serves you right for asking such a stereotyped question. 😉

  37. Leysh says:

    I am reminded of the story of the exam question: – Given a barometer, how would you measure the height of a very tall building.

    The answer given was marked wrong because the examiner was expecting an answer comparing barometric pressures. When the student protested the result, he pointed out that there were many answers to the question, up to and including using the barometer as a bribe to the building caretaker to tell him the height of the building.

    Moral: not only interviwers ask dumb questions, so do apparently intelligent teachers and professors!

  38. JE says:

    I agree Feynman would not have talked like that to someone he liked, or wanted to instruct.  But I thought it was convincing that he might become so irritated with the stupid interview question that he could talk like that.  The interviewer was clearly smug at the start about having this clever puzzle, so an impromptu and pedantic lecture would be a very tempting revenge.  I loved the comment that it is a very bad idea to test how hot something is by touching it.  

  39. Chip says:

    I would have just gone outside the house and walked around to the other room and looked in the window twice to see which switch turns off the first two bulbs.

  40. cbp says:

    I would have instructed someone to turn one light off, one light off, and flick the other one off and on. Then I would have walked into the room and observed which light was on, which light was flickering, and which light was off.

  41. Random832 says:

    "The algorithm they desired simply does not translate well to code, but I am willing to admit that maybe it *does* translate and I'm simply not knowledgable enough to do it."

    It does translate to code fine. The problem is A) the situation is heavily contrived [you're not looking for the _heaviest_ item, you're looking for the _one different_ item among otherwise identical ones], and B) the rest of the setup violates our usual assumptions about algorithm complexity [for it to translate to code in a reasonable way, we have to at the very least assume that addition of the weights is free but comparison is expensive]

  42. Sohel Rana says:

    Funny and learned the answer

  43. This is so good, I can hear Feynman's voice in my head as I read it. Always entertaining!

    (Encouragingly, the man himself described this phenomenon to an army psychiatrist, who therefore rejected him as insane.)

  44. Nico666 says:

    What really surprised me is notice that Americans make this kind of Question in Job Interviews. Jobs interviews are not like this kind of tests in the rest of the world (well, perhaps in Japan).

    In a normal non-American interview, people ask things about the experience and knowledge of the applicant, who is viewed as a responsible adult who can be evaluated based on his/her merits, formation, education, and experience, and not on the result of a single test-like interview.

  45. Albert Rogers says:

    According to Larry Wall, the linguist who invented/designed the programming language Perl, there are three cardinal virtues of a good programmer. I presume this applies to software engineers.

    1: Laziness;   2:Impatience;   3: Hubris.

    Think about it.

  46. Albert Rogers says:

    My solution to the 9 objects, of identical weight except one heavier than the others, is essentially a binary search. Assuming it's a balance scale, not graduated:

    put four objects on one side, four on the other. If they balance, the heavy one is the one left over. If not, it's one of the four on the heavy side. .split these into two sides of two, compare again. One more stage and you're done. Three steps, right?

  47. a biomed student says:

    the resistance of a human body is 50 to 100 ohms if anyone is curious

  48. Anthony P says:

    @Albert, under your methodology, you can get lucky and find the oddball on the first try, otherwise you'll have to use the 3 steps as you mentioned. Can you think of a way to do it in a guaranteed number of steps less than that?

  49. John says:

    @Anthony, except for the weight difference, is the one object otherwise physically identical to the rest?

  50. Anthony P says:

    @John, yes, assume the only discernible difference to normal senses is the weight.

  51. John says:

    @Anthony – In that case, since the heavier object is otherwise identical to the others – including density – then it would be the largest one of the nine

  52. Justin W says:

    This is one of the greatest blog posts I have ever written.  Feynman is a personal hero of mine, and exactly this sort of thinking is the perfect antidote to these terrible interview questions.

  53. John Wilkins says:

    And of course that last rhetorical question was not so rhetorical after all 🙂

  54. Nikoloff says:

    Anthony, do we know how much heavier the "heavy" object is compared to the others? Is it just a wee bit heavier, twice as heavy or much heavier than the others?

  55. Sergey says:

    Identifying the heaviest object of 9 can be done with two weighting steps.


    in the first step we weigh triplet 1,2,3 against triplet 4,5,6. Thus we find in which of the "triplets" has heaviest object. If the triplets weigh the same, then the heavier object is in the third, unweighed tripled, otherwise it's in the heavier one.

    in the second step we weigh objects A and B from the triplet which was found in step 1, and thus determine, whether A, B or C is the heavier object, using the same reasoning as in step 1.

  56. Anthony P says:

    That's correct.

  57. jono says:

    Very funny, this reminded me of this…e-clecticism.blogspot.com/…/think.html

  58. MBR says:

    >Not all lamps emit heat…

    Sure they do – they *have* to…

  59. qo says:

    >Not all lamps emit heat…

    >> Sure they do – they *have* to…

    What about a magic lamp?  Given an appropriate incantation, it emits genies, supposedly.   Since I don't believe in genies, and we have no proof they exist, I'd have a hard time believing they emit much body heat.

  60. Kardin says:

    Not all lamps emit heat… today.

    This riddle was invented a good long while ago. All lamps emitted heat back then.

  61. tonypujals says:


  62. vedette says:

    Ha ha, perfect timing for a Monday afternoon (well, it is where I am anyway)

  63. EricT says:

    It's a cute story, but it does a disservice to Feynman. He in fact loved these kinds puzzles (his buddy James Randi used to bust them on him all the time). Frankly, spouting off trivia about uncritical details is how a stupid person imagines "smart". Feyman's genius was the ability to do just the opposite, to *see through* all the trivia to the heart of the matter.

  64. Jason Gulledge says:

    That was awesome. I think Neil deGrasse Tyson would be equally aggravating to interview in this manner. But then, knowing him ahead of time, I'm sure he wouldn't require the interview in the first place.  Same with Feynman really.

    Either way, I thought this was an excellent way to describe that scientists like tools to measure things. Our own powers of observation are rather deceitful tools of measurement. I'll get off my architectural soap box and let Niel speak for himself on this matter.

    "We hear, touch, see, smell, and taste the world around us. These are the 5, and the only five ways we obtain information. In spite of the praise they receive, our senses are incomplete. For instance, we have no built-in way to measure magnetic fields, radioactivity, and we're practically blind when you consider all the forms of light we cannot see. Including, infra-red, ultraviolet, and radio waves, even though they're all around us. Often, our senses are often plain unreliable. Eye-witness testimony, though high evidence in the court of law, is the lowest form of evidence in the court of science.

    When we declare a food to be bitter or sweet, we hardly ever recognize that it is an opinion derived from our genetic profile. more typically, we wrongly presume these features to be intrinsic properties of what we tasted. That's why its hard to do science equipped with only our senses. The most successful fields of research, are those rich in methods and tools of measurement that do not depend on the genes of who's doing the measuring. In this way, scientists reveal fundamental truths about the universe, allowing us to decode and even predict the operations of nature. Otherwise, if all you had are your five senses, then all you have are your opinions." – Neil deGrasse Tyson

  65. Sarat says:

    amazing….do more questions man…

  66. guest says:

    Reminds me a bit of Dr. Sheldon Cooper. ^^

  67. Tiny_d says:

    I agree 100% with EricT – Feynman wasn't a an obfuscating pedant as the story suggests – he was a master explainer and his questions were always about cutting through irrelevant details, not adding them.

  68. Job++ says:

    Some else hinted at this story from long ago…

       Some time ago I received a call from a colleague. He was about to give a student a zero for his answer to a physics question, while the student claimed a perfect score. The instructor and the student agreed to an impartial arbiter, and I was selected.

       I read the examination question: "Show how it is possible to determine the height of a tall building with the aid of a barometer." The student had answered: "Take the barometer to the top of the building, attach a long rope to it, lower it to the street, and then bring it up, measuring the length of the rope. The length of the rope is the height of the building."

       The student really had a strong case for full credit since he had really answered the question completely and correctly! On the other hand, if full credit were given, it could well contribute to a high grade in his physics course and certify competence in physics, but the answer did not confirm this.

       I suggested that the student have another try. I gave the student six minutes to answer the question with the warning that the answer should show some knowledge of physics. At the end of five minutes, he hadn't written anything. I asked if he wished to give up, but he said he had many answers to this problem; he was just thinking of the best one. I excused myself for interrupting him and asked him to please go on.

       In the next minute, he dashed off his answer, which read: "Take the barometer to the top of the building and lean over the edge of the roof. Drop the barometer, timing its fall with a stopwatch. Then, using the formula x=0.5*a*t^2, calculate the height of the building." At this point, I asked my colleague if he would give up. He conceded, and gave the student almost full credit.

       While leaving my colleague's office, I recalled that the student had said that he had other answers to the problem, so I asked him what they were.

       "Well," said the student, "there are many ways of getting the height of a tall building with the aid of a barometer.

       For example, you could take the barometer out on a sunny day and measure the height of the barometer, the length of its shadow, and the length of the shadow of the building, and by the use of simple proportion, determine the height of the building."

       "Fine," I said, "and others?"

       "Yes," said the student, "there is a very basic measurement method you will like. In this method, you take the barometer and begin to walk up the stairs. As you climb the stairs, you mark off the length of the barometer along the wall. You then count the number of marks, and this will give you the height of the building in barometer units." "A very direct method."

       "Of course. If you want a more sophisticated method, you can tie the barometer to the end of a string, swing it as a pendulum, and determine the value of g [gravity] at the street level and at the top of the building. From the difference between the two values of g, the height of the building, in principle, can be calculated."

       "On this same tack, you could take the barometer to the top of the building, attach a long rope to it, lower it to just above the street, and then swing it as a pendulum. You could then calculate the height of the building by the period of the precession".

       "Finally," he concluded, "there are many other ways of solving the problem. Probably the best," he said, "is to take the barometer to the basement and knock on the superintendent's door. When the superintendent answers, you speak to him as follows: 'Mr. Superintendent, here is a fine barometer. If you will tell me the height of the building, I will give you this barometer."

       At this point, I asked the student if he really did not know the conventional answer to this question. He admitted that he did, but said that he was fed up with high school and college instructors trying to teach him how to think.

       The name of the student was Niels Bohr." (1885-1962) Danish Physicist; Nobel Prize 1922; best known for proposing the first 'model' of the atom with protons & neutrons, and various energy state of the surrounding electrons — the familiar icon of the small nucleus circled by three elliptical orbits … but more significantly, an innovator in Quantum Theory.


    A slightly different version and background are here – http://www.snopes.com/…/barometer.asp


    Also, all modern lamps emit some heat, even CFL and LED.  We have yet to make a totally loss less light source.  My LED flashlight gets very hot., of course it pumps 200 lumens from an AA, so that is expected.

  69. pratik says:

    That was AWESOME!!!!

  70. David says:

    What about having someone else enter the room and do the job

  71. David says:

    What about having someone else enter the room and do the job

  72. George says:

    Why do you still use 8pt sized fonts at Microsoft? Do you still use 14" monitors? That font size used to make sense back in the 90's when people used 14" monitors. Today I have to increase the font size of my browser in order to read these msdn pages in my 21" monitor. Otherwise I get a headache.

  73. hi says:

    Good stuff, but kind of confusing…

Comments are closed.

Skip to main content