Archive for the ‘Interview’ Category

Tennis Puzzles

Sunday, February 7th, 2010

Qn . “There’s a tennis tournament with one hundred twenty-seven players, Shockley began, in measured tones. You’ve got one hundred twenty-six people paired off in sixty-three matches, plus one unpaired player as a bye. In the next round, there are sixty-four players and thirty-two matches. How many matches, total, does it take to determine a winner?”

Ans.  This puzzle requires little math. Look at the second question, and come back to this to solve it fast.

  1. 126 players 63 matches
  2. 64 players 32 matches
  3. 32 players 16 matches
  4. 16 players 8 matches
  5. 8 players 4 matches
  6. 4 players 2 matches
  7. 2 players 1 match
  8. 1 player 0 match

Adding all the matches total to 126. The Bye player should not be considered because the total players are always 126.

Qn. There are 36 players in a single elimination tournament. How many matches to be played to determine the winner?

Ans. Two players require one match to determine the winner. So, 36 players require 35 matches to determine the winner. There is another math to figure this out. Thirty five players have to lose to decide the winner. So, there are thirty five matches.

Microsoft’s Billiard puzzle

Friday, February 5th, 2010

Qn. “Suppose you had eight apparently identical billiard balls, but one of the eight is slightly heavier than the others. The only tool you have to measure is a balance scale. What’s the fewest number of times you’d have to use the scale to find the heavier ball?”

 Ans. Read the puzzle carefully. The puzzle did not say the eight billiard balls are of different weight. It says only one ball is slightly heavier. Comparing one ball to other is not efficient. You will use the scale too many times in that case.

The solution to this problem is by using the “divine and conquer” logic. Divide the 8 balls into three groups. The first group A have 3 balls. The second group B has three balls. The third group C has two balls.

(1) Use the scale once to compare the group A and B.

(2) If the group A weighs heavier than group B, take the group A into consideration. Ignore group B. Take any two balls in the group A and compare each other on the scale. If they are the same, the third ball in the group A is heavier. You don’t have to weigh the third ball to figure this out. If they are different, one of them is heavier. So, you have used the scale only twice to find the heavier – scale is used once in the step 1 and the second time in the step 2.

(3)  Now consider, the groups A and B weigh the same from the step 1. This brings the conclusion that they both don’t have the heavier ball. Take the group C, compare two balls to find the heavier. So, you have used the scale only twice to find the heavier – scale is used once in the step 1 and the second time in the step 3.

In just two steps and using the scale twice, you can find the heavier ball.

Water, Vessel puzzle

Thursday, February 4th, 2010

Qn. “A mother sent her boy to the river and told him to bring back exactly 7 pints of water. She gave him a 3-pint vessel and a 5-pint vessel. Show me how the boy can measure out exactly 7 pints of water, using nothing but these two vessels and not guessing at the amount. You should begin by filling the 5-pint vessel first. Remember, you have a 3-pint vessel and a 5-pint vessel and you must bring back exactly 7 pints.”

Ans. Fill the 5-pint vessel first. Pour the water into the 3-pint vessel. This leaves the first vessel with 2-pint of water. Pour the water in the 3-pint vessel back into the river. Pour the 2 pints of water from the first vessel into the second vessel. Now fill-in the first vessel fully. This will make the first vessel with 5 pints of water and the second vessel with 2 pints of water. Thus the solution.

Riddle: Three Hats

Saturday, January 23rd, 2010

Question:

There are 3 black hats and 2 white hats in a box. Three men reach into the box and place one of the hats on his own head. They can’t see the color of the hat they have chosen.

The men are asked to stand in a way that the first man can see the hats on second and third persons heads, the second man can only see the hat on the third man’s head and third man cannot see any hats.

1. When the first man is asked if he knows the color of the hat he is wearing, he says no.
2. When the second man is asked if he knows the color of the hat he is wearing, he says no.
3. When the third man is asked if he knows the color of the hat he is wearing, he says yes and he is correct.

What color hat the third person was wearing and how could he know?

Answer:

This problem is best suited to solve by using the logic of elimination.

Here is the possible combination we can see for the three men. There are seven (2^3 – 1) of them.

  1. BBB
  2. BBW
  3. BWB
  4. BWW
  5. WBB
  6. WBW
  7. WWB
  8. WWW (Not possible because there are only two White Hats)

Condition One: The first man says he does not know what he wears. This hints the second man and the third man are not wearing two white hats.

This leaves with the following combination:

  1. BBB
  2. BBW
  3. BWB
  4. WBB
  5. WBW
  6. WWB

These combination can be derived to suit for the second and third men.

  1. BB
  2. WB
  3. BW

Condition Two: The second man says he does not know what he wears. To come to this conclusion, he has to reject the third combination from the above which is BW. Why? If the second man sees the third man wearing a W hat, he can be sure that he wears a B hat. It was not the case. He sees third man wears a B hat. So, he can be wearing a B or W hat.

The third man does not have to look at anyone, but can come to the conclusion that he wears a B hat.

This leaves the following combination of hats with this problem was originally started.

  1. BBB
  2. BWB
  3. WBB
  4. WWB