Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found the following puzzle on SO:


A merchant has a 40 kg weight which he used in his shop. Once, it fell from his hands and was broken into 4 pieces. But surprisingly, now he can weigh any weight between 1 kg to 40 kg with the combination of these 4 pieces.

So question is, what are weights of those 4 pieces?

I have recently begun reading about Optimizations so I got curious: Is there an optimization formulation for this question?

share|cite|improve this question
up vote 2 down vote accepted

The more general problem is known as BACHET’S PROBLEM OF WEIGHTS. See the paper here by Edwin O'Shea or look at page $149$ of An Introduction to the Theory of Numbers by G.H. Hardy and E.M. Wright, $6$th edition. ${} {} {}$

share|cite|improve this answer
+1 Amazing! Thank you for the reference. – Legend Jul 16 '12 at 18:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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