Monday, May 16, 2011

When the bulb glows ! 

1)Here is a rather well known one ! We have a bulb in a room. There are three switches outside the room, one of which controls the bulb. We need to determine which of the three switches it is. We can configure the three swiches in any state we wish. ( without being able to look at the bulb of course:-) We then enter the room, and after examining the bulb's status, need to give our answer.  Any ideas?


2) Knight on a chessboard - We have a lone knight( horse ) on one corner(where two sides meet) square of a chessboard. Can the knight get to the diagonally opposite corner square after traversing through all other squares on the chessboard exactly once ? If so, propose the route it would need to take. You only need the knowledge of how a knight moves on a chessboard to solve this one.

Hint - If at all it were possible , I believe there should be atleast two routes since the chessboard is symmetric about the starting and the ending positions. But in any case, there are a mindboggling number of possibilities to consider if there did exist a route ; so perhaps it is reasonable to expect that it is not possible. But we need to prove that :-)

7 comments:

  1. I'm surprised I'm the first one to post! :)

    I tried to think "laterally" and came up with something for the bulb problem - a bulb glowed in my head right before I went to sleep ;)

    1. Initially all three switches are in the off position.
    2. Turn on switch 1. Wait for 10 minutes. Turn it off
    3. Tun on switch 2, and enter the room. If the bulb is on, switch 2 is the one that controls it.
    4. If the bulb is not glowing, touch the bulb and feel for any "warmth". If it is warm, it must have been turned on recently by switch 1. Else, by elimination, it must be switch 3 which controls it.

    Am I close? :)

    For the chessboard problem, I started sketching the route, but am not done yet. Hopefully I figure it out soon!

    ReplyDelete
  2. Neeraja,
    Thats's precisely the right solution !! Brilliant that you thought of it on your own !:) Thanks for posting it :-) I was initially wondering whether to add that it involves lateral thinking, but I'm glad you solved it without any hint:-)

    I'm adding a hint for the chessboard problem :-)

    ReplyDelete
  3. For the chess board problem: The horse passes 3 squares every time it moves. There are 64 squares on a chess board. Since the horse is on one corner of the board it has to pass 63 squares to reach the diagonally opposite square. That is basically 21 moves. Every move of the knight I think ends up on an opposite colour. As in if you start on a black you end on a white. But the diagonally opposite squares are of the same colour so you will need even number of moves to do that. 21 is odd. So, I guess it can't be done. Is this true?

    ReplyDelete
  4. Nice answer to the first question Neeraja. :)

    ReplyDelete
  5. Rafiki - That is an excellent solution!:-) A minor point is that it involves 63 moves and not 21 ( we want to land on every square before getting to the one on the opposite corner ). Anyway the key idea is exactly what you've pointed out - Odd number of moves result in a change of colour so it is not possible ! Thank you for posting it :-)

    ReplyDelete
  6. Me and my brute force technique! ;). Awesome answer Rafiki!

    ReplyDelete
  7. Awesome answers everyone :)

    ReplyDelete