Puzzle | Weight of Heavy Ball

There are 2187 balls, out of them 1 is heavy. Find the minimum number of attempts the balls have to be weighed for finding out the heavy ball.


Solution :

7 times.
2187 = 3^7

First, divide the group of 2187 into 3 groups of 729. Take two arbitrary groups and weigh them. Either they will be imbalanced (in which case you’ve identified the group with the heaviest ball), or they are equal, in which case you know the 3rd group has the heaviest ball. Split the heaviest group of 729 into 3 groups of 243, and continue on. So first test 2187 balls, then 729, then 243, then 81, then 27,then 9, then 3 balls remain. You can deduce which one is heaviest at this (7th) step in which 3 balls remain.

This article is contributed by Shubham Singh. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.