Sobes.tech
Junior — Middle

How to determine the minimum number of weighings needed to detect a counterfeit among 9 coins?

sobes.tech AI

Answer from AI

A problem with 9 coins and one counterfeit among them is a classic puzzle. You need to determine the minimum number of weighings on a balance scale without weights to find the counterfeit coin (which is lighter or heavier).

For 9 coins, the minimum number of weighings is 2.

Justification:

  • Each weighing can have 3 outcomes: left pan heavier, right pan heavier, or equality.
  • With k weighings, you can distinguish up to 3^k possibilities.
  • You need to distinguish 2n possibilities (each coin can be lighter or heavier), so 2*9=18 possibilities.
  • 3^2=9 < 18, not enough.
  • 3^3=27 >= 18, so 3 weighings are sufficient.

However, for 9 coins with an unknown type of counterfeit (lighter or heavier), the minimum number of weighings is 3.

If it is known that the counterfeit coin is lighter (or heavier), then 2 weighings are enough.

Example strategy for 3 weighings:

  • Divide 9 coins into 3 groups of 3.
  • Weigh two groups.
  • Depending on the result, select the suspicious group and repeat the procedure.

Thus, the minimum number of weighings for 9 coins with an unknown type of counterfeit is 3.

How to determine the minimum number of weighings… - sobes.tech