Sunday, April 30, 2006

Survivor of the pirates

There are 5 pirates on an island. They have a big box of treasure stashed (1000 diamonds) on the island and now they must distribute the treasure amongst themselves. They are extremely greedy pirates and they do not agree for an even split as each one wants to have more treasure. So they play a game - SURVIVOR! The senior most pirate proposes a methodology to split the treasure and everyone votes. If the senior most pirate can get at least 1/2 votes for his porposal, then they split the coins that way. If the senior most pirate cannot get majority for his proposal then, they kill the senior most pirate and start over with the next senior most pirate. The process continues until one proposal by one surviving senior pirate is accepted. So how does this game amongst the pirates proceed? Who gets to keep the stash and how much? What would be an intelligent proposal by "a senior" pirate? Can you then tell how this will work for an 'n' pirate scheme? Assume that the pirates are all very mathematical and logical for the sake of this question.

Level: Medium

Village 'Adultery'

There is a village of 50 couples. Every man in the village has been unfaithful to his wife. Every woman will know when a man other than her husband has committed adultery. The rule of the village - if a woman knows her husband has been unfaithful, then she must kill him that very night itself. Life goes on in Village Adultery and one day, the queen, who always tells the truth, announces that at least one husband in the village has committed adultery. Does this change anything in the village? You would need to explain clearly what happens if anything at all changes in Village Adultery.

Level: Medium

Saturday, April 29, 2006

The drunken jail guard

There is a circular jail with 100 cells numbered from 1 to 100 consectively. Each cell has an inmate and all the doors are locked to begin with. One night the jailor gets drunk and starts running around the jail in circles. In his first round he opens every door. In his second round he visits every 2nd door (2,4,6,...) and shuts the door. In the 3rd round he visits every 3rd door (3,6,9,...) and if the door is shut he opens it, if it is open he shuts it. This process of crazy drunken-ness continues for 100 rounds and finally the jailor gets exhausted and falls down. Let us assume the prisoners are all kind enough to wait until the crazy jailor stops and finally they decide to escape. Now how many prisoners find their doors open and can you also tell which cells' these prisoners belong to? People who post the answer should also post the logic behind their answers!

Level: Medium

Friday, April 28, 2006

The crazy juror

We have a 3-person jury. I know jury is not a 3-person team, but lets just stick to our problem for now. In this 3-person jury, there are 2 jurors who are very serious. However there is a crazy juror, the third juror, who likes to flip a coin and based on the outcome agree with either juror's decision. Now, each of the serious jurors can independently give the correct decision with a probability of 'p'. You are called to inspect this jury and make suggestions. You wonder if a single-person-jury with a correct-decision making probability of 'p' is better off than this 3-person jury with the crazy flippant juror. What is your observation and what do you say to the judge about the 3-person jury?

Level: Easy

Thursday, April 27, 2006

Second best as runner up

Let us take a little turn today - Probability! Lets try a question on chance in a tennis match. There are 8 players for a tennis tournament. They are to play in pairs with one other player in the first round and the winners play in the next round and so on until we have a winner and a runner up. There is a player amongst these 8 who is the best and the odds of him winning the tournament is very high. There is another player who is considered the second best. The players draw numbers to take on their counter players for the first round. What is the chance (probability) that the second best player can be the runner up when the tournament is over? Once you get the probability, work a generic mechanism to find the chance for a 'm' player tournament. Substitute m = 8 in that equation and see if you get the same answer as you worked out.

Level: Easy to Medium

Wednesday, April 26, 2006

Bulb dropping

You need to figure out how high a bulb can fall from a 1000 story building before it breaks. What is the minimum # of bulbs you will ever need for this and what is the largest number of drops you would ever have to do to find the right floor where the bulb would break? Lets say you are given an unlimited supply of the bulbs. But figure out how much you will actually ever need and how many drops you will ever have to make to figure out the right floor. Lets take this a little further - For a 's' story building and 'b' # of bulbs, find the optimal strategy that will minimize (worst case scenario) the number of drops required to determine the floor on which the bulb will break.

Level: Medium to Hard

9 balls yet again...

Ok lets revisit the 9 ball question again - only this time lets make it a tricky - we do not know if the faulty ball is heavier or lighter. So how many weighings are required to find out the faulty one (minimum # of weighings) and, and can you find out if the faulty one is lighter or heavier?

Level: Medium to Hard

Water and Milk

You have two containers. One contains 1 gallon of milk and the other contains a gallon of water. If you were to take one cup of milk from the first one and pour it to the second one and after mixing, you were to pour one cup of the mixture from the second to the first one, which containers now have a pure concentration of their original contents?

Level: Medium

Tuesday, April 25, 2006

The bad king's wine cellar

A bad king has 1000 bottles of wine. A neighboring king plots to kill the bad king, and sends a servant to poison the wine. the servant is able to poison only one of them before he is caught. The guards don't know which bottle was poisoned, but they do know that the poison is so potent that even if it was diluted 1,000,000 times, it would still be fatal. Furthermore, the effects of the poison take one month to surface. The king decides he will get some of his prisoners in his vast dungeons to drink the wine. At a minimum how many servants does he need to kill to find out the poisioned bottle of wine and will still be able to drink the rest of the wine in 5 weeks time? As an added note, he does not want to bring in 1000 of his servants as he knows there are a lot lesser number of prisoners he can bring in to begin with.

Level: Hard

9 balls and only 2 weighings

You are given 9 balls and they look exactly the same in color and physical appearance. You are also given a scale. To make things easy you are given that one of the balls amongst these 9 balls is heavy. With ONLY 2 weighings how can you find out which ball it is.

Level: Easy

Monday, April 24, 2006

Hourglasses

You have two hourglasses: A 7 minute one and an 11 minute one. Using just these 2 hourglasses, accurately time 15 minutes.

A more wordy version of this - A baker has only 2 timers that can measure 7 minutes and 11 minutes. How can he set a timer for 15 minutes to bake a cookie?

Level: Easy (introduction)