Monday, 2 July 2007

Interview questions/riddlers - Answers

Question: Suppose we have 8 coins that look/smell/taste/roll exactly the same and a balance like the one in the picture. One of the coins is fake, it weights less than the rest. How can we find the fake coin with only two weightings.

Answer:
  1. We weight 6 coins - 3 on each side.
  2. If their weight is the same
    1. We weight the remaining two to find the fake coin (the lighter one)
  3. If 3 coins are lighted than the rest
    1. We pick two of them and weight them on the scale (one on each side)
    1. If their weight equals then the lighter is the remaning coin
    1. Else the lighted in the scale is the fake one


Question: Suppose there is a rope of certain length and a lighter. How can someone find the exact midpoint of the rope?

Answer: We light the rope from each side. Where the fire meets then thats the middle of the rope

No comments: