# Sort numbers with minimum comparison

We have 6 balls of 1,2,3,4,5 and 6 grams. How to find each one's weight using a 2 sides balance (a side can take many balls).

• Is there any criterion? Do we only get a limited number of weighings or something? Because a bubble sort is simple, and fast enough with this few balls (only $15$ weighings, and I think the theoretical minimum is $9$, so it's not bad). – Arthur Dec 9 '16 at 15:25
• @Arthur Thanks for your answer. Yes the goal is to find the minimum number of weighings. The theoretical minimum is 10 for sorting algorithms of 6 elements. This is a rather specific case and I wonder if we can't do it in less. – loop Dec 10 '16 at 12:33
• I misspoke. The theoretical minimum is $6$, actually. The idea is this: There are $720$ different possibilities. For each weighing, there are three outcomes: either one side is heavier, or the other side is heavier, or they are in balance. That means that if we're clever about how we lay up the balls, we may be able to narrow it down to $240$ different possibilities with one weighing. Once more, and we can narrow it down to $80$ different possibilities. And so on. Whether there actually is such an optimal strategy, I don't know. – Arthur Dec 10 '16 at 12:46
• Can you develop more on how you get these numbers and what method to follow to implement the strategy? – loop Dec 10 '16 at 23:21
• And why 6 is the minimum when decreasing the different possibilities by weighing? – loop Dec 10 '16 at 23:38