Wednesday, March 17, 2010

How to solve a counterfeit coin problem?

Second problem:
You have 9 coins.1 is counterfeit and is heavier.
Weight using balance weighing scale at most twice.Find the fake coin.
Solution:
Split 9 coins into 3 groups.Group A(3 coins),B(3 coins) and C(3 coins).
1. weight A against B
a)If equal, Fake coin is in C.
-balance any 2 coins in C.
-if balance,third coin is fake
-if not balance,heavier coin is counterfeit.
b)If A or B is heavier,
-balance any 2 coins in heavier group.
-if balance,third coin is fake
-if not balance,heavier coin is counterfeit.


No comments:

Post a Comment