Original Question:- The standard weights available with a shopkeeper are 1 kg, 2 kg, 4 kg, 8 kg, 16 kg,.... and so on. If the shopkeeper has to weigh 3240 kg, using not more than one weight of each kind and using only one pan of the weighing scale to place the weights, find the number of standard weights required.
So this was the original problem , which I solved by converting 3240 into binary form (110010101000) and checking how many 1's are there to arrive at the required weights combination.
But my question is what if the restriction of putting weights on only 1 pan is removed, and we can use both pans simultaneously to put the weights, how would we able to solve it then ?
When you are able to place weights on either side, we become able to both add and subtract powers of two. This allows for some interesting realizations.
Due to the unique nature of powers of 2, $2^n = 2^{n-1}$. This means that any run of 1s can be replaced by two weights that will subtract to the same value.
This method is fruitless for a run of two, and detrimental even when carried to the extreme with singular 1s being included. However, for any run of 3 1s or more, we can save on weights by using this alternate solution.
For the problem given, there are no runs of length 3 or greater, so there is no way to improve on our count. But in certain circumstances, it can improve our situation.