I found the following puzzle on SO:
Puzzle:
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?