Tuesday, August 7, 2007

Minimum Weights to Calculate all

Find the minimum no. of weights and there weighing, needed to evaluate all the weights from 1Kg. till some weight let say 243 Kg, with integral multiple of 1Kg.
Lets workout for the objective...

The statement in concern is similar to –“Create each no. betw
een 1 to 243”

Since we know that a number system is capable of doing so, thus any number system can build such a family to weigh all the weights between any two weights.

Like if we have weights:

1, 2, 4, 8 … or

1, 3, 9, 27 … or

1, 4, 16, 64 … etc.

We can weigh each weight between

Now a big question how can we create each and every weigh with any one of these combinations.


*Thus we need (k-1) no. of each weight for k base option.

Thus total no. of weights used in first case for calculating 1 to 10 Kg.

= 1(1Kg) + 1(2Kg) + 1(4Kg) + 1(8Kg) = 5

And in 2nd case no. of weights used for calculating 10 Kg

= 2(1Kg) + 2(3Kg) + 1(9Kg) = 5

For generalizing the question, if we take k-base family of weights for calculating 1 to n Kg. We need floor (log k n) no. of different weights.

Cost associated with using different kind of weights = floor (log k n).

And number of weights needed of a particular measure is (k-1).

Then weights used are, f(k) = floor (log k n) * (k-1)

So, for particular n we want to minimize f (k) = (k-1) * floor (log k n).

Assuming f (k) = (k-1) * log n / log k

k-1/ log k is an increasing function for all k > = 2.

Thus f(k) is increasing function for all k >= 2, thus has a minima at 2

But our function is discrete and may not behave as we assume, but for sufficiently large “n” information stored in bits “binary digits” is cheapest as compared to any other number system

(****if some body needs the plot of graph pls. comment here your mail id so that i can mail you)

But incase of balance we can put weights at either side.

This actually maps the situation like that putting a negative value of same magnitude at any position does not actually contribute to additional cost.

So the cost, g(k) = ceiling ((k-1)/2 ) * ceiling(log k (n)) , k > 2

g(k) = g(k) = ceiling ((k-1)/2 ) * floor(log k (n)) , k = 2 (as there is no need of putting weight onto other side of balance)

(****if some body needs the plot of graph pls. comment here your mail id so that i can mail you)

This very much clears the doubt that now 3 base weight family out performs anything.


**One more notable thing is that in base 3 family weights, any combination of weight will correspond to a net weight which can not be weighed in any other way. This also assures that this has minimized the no. of weights.


But this also arises a question in my mind:
Do we have no other way of representing numbers without any number system :)
Well for now thats it....
Soon will write more!!