May 12, 2006 at 5:49 am
If the point of the question, from a SQL interview perspective, is how do you think, then why not ask for a wiring diagram?
After all, you would not begin to make structural changes to a database without knowing the relationships between the tables, right? So the first thing you want is a relationship diagram ala SQL 2000 so you can have a chance of predicting outcomes.
------------
Buy the ticket, take the ride. -- Hunter S. Thompson
May 12, 2006 at 5:57 am
I agree with you, Bryant. Asking for a diagram is the most obvious solution and I should have mentioned it. Same regarding the wiring, if it is done properly, then there is no chance to find out anything by pulling the wire, no matter how hard.
May 12, 2006 at 6:17 am
Well, this isn't a good answer, but it is the first one that came to mind.
You're in windowless room with 12 inch thick solid steel walls and the door is welded shut. You have a small table and a hacksaw. How do you get out?
Cut the table into pieces. Start a fire using by rubbing two sticks together. When you die of smoke inhalation they will come get you.
Nah, I didn't think so either.
-- J.T.
"I may not always know what I'm talking about, and you may not either."
May 12, 2006 at 6:19 am
Let's make an assumption here: The doors are all open or have windows in them.
Go into the first switch room, then leave. The door locks. Big deal. You go look in through each of the open doors/windows where the bulbs are and see which one is on now. Repeat the process and you don't even have to go into the last room.
-- J.T.
"I may not always know what I'm talking about, and you may not either."
May 12, 2006 at 6:40 am
We are all assuming that these are working light bulbs, and that there is no chance they will burn out.
May 12, 2006 at 6:41 am
Prop the doors open and try switches to your hearts delight.
May 12, 2006 at 6:57 am
Ooh, wait! Maybe this is a team building test.
Get 4 co-workers with cellphone or walkie-talkies and put one in each room with a bulb. Instruct them to call you when their light bulb goes on. Now, go into the first switch room and flip the switch. And so on...
The point here, I think, is that there are several "right" answers. It is more about how you get from point A to point B.
Similiarly, How many quarters would you have to stack to make a pile as tall as the Empire State building? also has several answers. The person asking the question is just trying to figure out how you think and approach problems.
For example, if you answered the bulb question with:
"I'd get 4 sticks of dynamite and blow up the walls between the rooms so I could see the bulbs and the switches." then you may not be the right person to hire to head up the customer service department but may be the right candidate for CFO.
"I'd hire four engineers to trace the wires" might make you a good candidate for CEO but not for a CFO.
"I'd go into each room with a bulb, unscrew it, screw a home-made device I created which consists of a voltmeter and a wireless LAN adapter which sends the voltage information to my laptop into each socket. Then I'd go flip each switch and check the readouts on my web site." you're probably a good candidate for DBA (or some other geeky position)
-- J.T.
"I may not always know what I'm talking about, and you may not either."
May 12, 2006 at 7:13 am
I heard about this question when my son was in 3rd grade. He is in 10th grade now. The teacher said the question came from Bill Gates. Bill Gate said if someone could answer this question in less than 5 minutes, then the person had the potential to work for him. My son (7 years old then) spent half a day to get the answer by himself. But I didn't think Bill Gate would hire him !
May 12, 2006 at 7:14 am
With the description given its possible none of the switches or even only one switch controls all the light bulbs.
These might be glib answers but:
1) I'd call the building inspector, light bulbs need be controlled by a switch within the room they exist in.
2) I'd replace each bulb with four different bells with a bulb socket adapter. Then by going into each room I'd be able to hear which distinct bell was sounded by each thrown switch. Similar to the wireless lan one above I know.
3) I'd kidnapp eight people, drug them, put tape recordings and players in each of there pockets..put one in each room each of them starting with "I would like to play game... you have wasted your life Mr. / Ms......" the four would be wired up to the bulb sockets while the other four would be told they could only open the door by throwing the switches. Then let the wackiness ensue.
4) Find the wiring plans for the rooms, report back with improvements to wiring as necessary.
5) Ask myself, "What would Chuck Norris do?"
6) Take a bigger jug fill that full of water, then pour it into the smaller jug till it was full, empty the big jug, fill the big jug from the small jug, Refill the smaller jug, then fil the rest of the big jug from the smaller jug. Ooops, sorry wrong riddle.
May 12, 2006 at 7:28 am
Firstly I will have to find out minimum way to get to answer so I will
Steps
a) I will put on 1st switch for long hr and then off it
b) 2ndly I will on second switch and then go and check the bulbs
Findings will be
a) for finding the first result of the first which which I kept on bulb for long time I will find that bulb very hot
b) for second step I will find the bulb on ,
so according to this finding
May 12, 2006 at 7:35 am
My 2 cents:
The description never said the doors, when shut, are "light" tight. In other words, you should be able to see the light through the cracks of the door.
So you can turn on a switch, go to the light doors, and check the cracks until you see the light.
And thinking out loud, it'd be very hard to find the switches in a dark room, wouldn't it?
Maybe it too simple a solution, but it's Friday.
May 12, 2006 at 7:36 am
Go to first switch flip it. Leave room. Go to lightbulb rooms open all the doors but not enter. See with one is on. Go back and turn on next switch. Go back to light bulb rooms, repeat. Just don't enter and exit the light bulb rooms.
Two halves make a 'hole', climb through the hole. (someone eles submitted)
Shoot the lawyer...twice.
May 12, 2006 at 7:45 am
"These might be glib answers but:
1) I'd call the building inspector, light bulbs need be controlled by a switch within the room they exist in."
Equally glib response - that depends on which country you're in. In most Commonwealth countries, wall sockets and light switches for bathrooms are always located outside the room as an extra precaution against electrocution through flooding or water coming into contact with live wires.
You're in a pit with Saddam Hussein, a deadly cobra and a lawyer. You have a gun with two bullets. What do you do?
That's an old one - shoot the lawyer twice to make sure.
-----------------
C8H10N4O2
May 12, 2006 at 7:54 am
Computer people always make things so complicated... I think that's why I love the job Someone already posted the generally accepted answer, but in reality there isn't a perfect solution. All those loopholes were intentionally left in to test each reader's creativity If you came up with a way to determine which light bulb is connected to which light switch - and your way works - then you got it right.
BTW, looks like the correct answers to the other questions were posted as well
1) Cut the table in half. Two halves make a whole. Crawl through the hole to freedom.
2) Shoot the lawyer twice.
Congrats! Too bad I just ran out of prizes...
May 12, 2006 at 7:55 am
I did not see any toilets in any of the rooms or a bucket and window to throw it out.
Now had there been a moon on the doors ....
More glibness
...7) google search ... "light bulb room riddle"
8) google search "lights on but noone home"
9) google search... "'I want to play a game', jugs, SQL, carpet tacks, mindy, shooshie, jedi council, pez dispenser"
Viewing 15 posts - 16 through 30 (of 77 total)
You must be logged in to reply to this topic. Login to reply