Vegetable Weighing

You work in a shop that sells fresh vegetables and fruits. You sell your merchandise by pounds, using a two-sided scale. To measure X pounds of some fruit, you put the bag of fruits on the scale, and put X pounds worth of weights in the other side of the scale. Or alternately, you put Y pounds on the other side, and Y-X pounds on the same side as the fruits. This should be pretty trivial to everybody who has lived in the early 90ies.

One day, a vicious bastard has stole all of your weighs. Your boss has ordered you to buy new weights, and he said "don't disappoint me". You know that your boss is very demanding, and by that he meant that he wants the absolute minimum number of weights that he can do his job with. You know that none of your customers ever buys more than 40 pounds of vegetables or fruits, nor do they buy halves of pounds. What is the minimal set of weights you can do the job with?

Solution

Password:
Back to Index