Open In App

Puzzle | 10 Stack of 10 Coins

Given 10 stacks of 10 coins each. One of these stacks of coins contains only counterfeit coins, the other stacks do not. A genuine coin has a weight of 10 grams. The weight of a fake coin is 11 grams. You have a contemporary scale with a precise reading. How many balances are required to determine whether the stack is fake? What if you had eleven stacks?

10 stacks of 10 coins puzzle

Answer:

Naive Approach: The first solution that hits the mind, is to check one coin from each stack and measure the weight in a balance. In this way, in the worst case, we have to weigh the coins 10 times.



Efficient Solution: 

Step 1: Instead of weighing one element from each stack at a time, we can take one coin from each stack and break it into 2 groups of size 5 each (1 group with coins from 1st to 5th stack and the other coins form the other group).



First partitioning of stacks

Step 2: If all weigh the same, then the weight of the group will be 5*10 = 50 otherwise, 4*10 + 11 = 51. Now when any 5 is weighed, there can be 2 cases:

Second partitioning of stacks

Step 3: Now weigh the group of 2 coins.

Third Partitioning of stacks

Step 4: Now weigh the two coins.

Fourth partitioning of stacks

Step 5: To decide the fake one between two coins, weigh any of them.

Final result check

From the above approach, we can see, that we need to weigh at most 4 times in the worst case to find the fake coin.

Optimal Solution: Here we can use the concept of mathematics and the sum of the first N natural numbers. 

What we can do is, we can select 1 coin from the 1st stack, 2 coins from the 2nd stack, 3 coins from the 3rd stack, and so on. In this way, we will have total of 55 coins. If all the coins were real, the weight would be 55*10 = 550.

Now consider, that the Kth stack has fake coins.

So the reading of the scale will be: 
11*K + (55 – K)*10 [because we have picked K coins from Kth stack].
= 11*K + 550 – 10*K = K + 550.

So the amount of extra weight will be the same as the stack number. Therefore, we can get the stack with only a single balance.

How to check the same if there are 11 stacks of 10 coins?

We can continue the same process as the optimal one. The extra pile is simply treated as pile 0. Then the earlier stated rule still applies (0 coins from 0th stack, 1 coin from the 1st stack, and so on) and the stack number is determined by subtracting the expected weight from the actual weight. The sole modification is that we now consider the probability of the expected weight and observed weight to be equal, which indicates pile 0.

Article Tags :