How many weighings of a balance scale are needed to find a c
How many weighings of a balance scale are needed to find a counterfeit coin among eight coins if the counterfeit coin is either heavier or lighter than the others? Describe an algorithm to find the counterfeit coin using this number of weighings.
Solution
Ans)
step:1 Divide the pile of coins into two equal piles and weigh them against each other.
The heavier or lighter pile contains the counterfeit coin.
step 2) a)If the number of coins is odd remove one coin.
b)If : the weighing is equal the removed coin is the counterfeit
else : it can be discarded from the search.
step 3) Repeat the step 1 and 2 with the heavier or lighter pile.
This will find the suspect coin in n steps
where C/2^n < 2 [ here C is the number of coins]
For eight coins 8/2^3 =1.
Using the above process to eliminate the 2 that would have one counterfeit. Then you weigh each of them. This gives total three weightings.
so 3 steps are needed
