3 ms·
Many of these are "think outside the box" type problems. For example, the one about the lightbulbs makes you think that the only information you get is binary -
by selven 17y ago
Many of these are "think outside the box" type problems. For example, the one about the lightbulbs makes you think that the only information you get is binary - on or off. There are 4 possibilities - 0,1,2,3 on (position doesn't matter) but 6 configurations (123,132,213,231,312,321) making the problem impossible. The actual solution is to turn 1 on, turn a second on but turn it off just before you open the box, and leave a third off. Then it's a simple matter of checking which one's on, which one's hot and which one's off.
- sailormoon 17y agoInteresting. I did not even think of that. I don't see many incandescent bulbs these days; the idea that a recently-switched-off light bulb was hot had begun to fade from my memory. I suppose that at the time of the question's heyday, however, your assumption of this second channel of information would have been a reasonable one. Thanks for sating my curiosity though - I was reading this thread just to see if anyone had an answer to that seemingly impossible question. So that was the answer.
- ams6110 17y agoOf course they are relying on you to intuit some property of the situation that they don't mention. If they had said the box has three incandescent bulbs which become hot after they are switched on, most people would "get" the answer easily. In a real application development situation, however, solving a problem based on what you assume to be true rather than what the customer asked for is usually a mistake.