I was given this riddle that has been bothering my mind for past few hours.

Given the following information:

the weight of coin types:

  • 1p - 1.62g
  • 2p - 2.11g
  • 5p - 2.57g
  • 10p - 2.49g
  • 20p - 3.21g
  • 50p - 3.91g
  • 100p - 5g
  • 200p - 5.11g
  • 500p - 6.51g

Is it possible to develop an algorithm that would allow you to estimate worth of these coins without sorting them or weighting in portions?

If yes, then for up to how many coins? If no, why?

I've come to conclusion that yes, you can but only up to 2 coins - did anyone else arrive to such conclusion?


Assuming the coin weights are within $0.005 g$ and you can weigh within that, yes I believe you can weigh any pair of coins and know the value. You would have to produce a table of all the possible weights and show there were no duplicates.

To show you cannot do it for three coins just show that $1p+100p+100p$ weighs $1.62+5+5=11.62$ and $200p+500p$ weighs $5.11+6.51=11.62$ I didn't find a case where two groups of three coins matched in weight so if you know you have three coins you can still do it.

  • $\begingroup$ I ran a simulation on 10,000 jars, up until 7 coins it's possible, but above that not a single jar out of 1000 had only one solution. I think it's safe to say that above 2 coins we are playing the guessing game, above 7 coins we are playing a lottery. $\endgroup$ – JCode Mar 21 at 20:30
  • $\begingroup$ @JCode: $10,000$ is pretty few for five coins or more. You probably will not cover all the possibilities. Better to list all the combinations, sort the list, and see if the same number appears more than once. $\endgroup$ – Ross Millikan Mar 21 at 20:33
  • $\begingroup$ Ofcourse, but I've also checked only all combinations of 2 coins give unique weight, whereas 3 and higher have increasingly repetetive weights. $\endgroup$ – JCode Mar 21 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.