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!

  • count_dongulus@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    18 days ago

    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.

    • Natanael@infosec.pub
      link
      fedilink
      arrow-up
      1
      ·
      17 days ago

      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

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      1
      ·
      9 days ago

      pull the cables

      LOL.

      the walls are glass

      Or use psychic powers. XD

    • Rivalarrival@lemmy.today
      link
      fedilink
      English
      arrow-up
      0
      ·
      18 days ago

      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?