Weighing Trouble

You have a weighing balance, which you can place weights on both sides of. You need to measure all weights between 1 and 1000.

For example if you have weights 1 and 3, you can measure test objects of weights 1, 3 or 4. You can also measure objects of weight 2, by placing 3 on one side and 1 on the side which contain the object to be weighed.

What is the minimum number of weights that you would need to be able to measure all (integral) weights from 1 kg to 1000 kg?


The answer is 7.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Ivan Koswara
Jun 30, 2014

Note that 7 7 weights work. Let the weights be 1 , 3 , 9 , 27 , 81 , 243 , 729 1,3,9,27,81,243,729 --the powers of 3 3 . We can represent the weight we want to measure in balanced ternary --a positional numeral system that uses the digits 1 , 0 , 1 -1,0,1 instead of the usual 0 , 1 , 2 0,1,2 for ternary. Then, for every digit 1 1 , we put the appropriate weight on the opposite side, while for every digit 1 -1 , we put the appropriate weight on the same side.

For example, 2 3 10 = 10 T T b t 23_{10} = 10TT_{bt} , where b t bt stands for "balanced ternary" and T T stands for the digit 1 -1 . Thus to measure a weight of 23 23 units, we put the 1 1 -unit weight on the same pan (because the first digit from the right is T T ); we put the 3 3 -unit weight also on the same pan (the second digit is T T ); we don't use the 9 9 -unit weight (the third digit is 0 0 ); and we put the 27 27 -unit weight on the opposite pan (the fourth digit is 1 1 ). Checking that this is a correct measurement is left to the reader.

The largest weight that can be measured is 111111 1 b t = 109 3 10 1111111_{bt} = 1093_{10} , so we can measure up to 1093 1093 units.This is more than enough.

Now, suppose that we have only 6 6 weights. Then there are at most 3 6 = 729 3^6 = 729 cases that we can distinguish: each weight has 3 3 places to put (on the same pan, on the opposite pan, or not on the balance), and there are 6 6 weights. But we need to distinguish 1000 1000 cases, impossible. Thus 6 6 weights don't suffice, and clearly neither do a smaller number of weights. Thus we have proven that 7 \boxed{7} weights is the minimum.

Further reading: Wikipedia

that's nice

Daanish bansal - 2 years, 11 months ago
Poonayu Sharma
Jun 28, 2014

The weights are

1,3,9,27,84,243,729

So a total of 7

The weights intrestingly come out to be a GP of common ratio 3 with the first term as 1

Please post your solution if u could do it via computer program or algebraically :)

Poonayu Sharma - 6 years, 11 months ago

Log in to reply

We all agree that using weights that are powers of 3 are to be used, i.e.

3 0 = 1 3^0 = 1 , 3 1 = 3 3^1 = 3 , 3 2 = 9 3^2 = 9 , etc...

We need as many weights such that:

k = 0 n 3 k 1000 \sum_{k=0}^n 3^k \geq 1000 \Rightarrow

3 n + 1 1 3 1 1000 \frac{3^{n+1} - 1}{3 - 1} \geq 1000 \Rightarrow

n log 3 ( 2 1000 + 1 ) 1 5.919 n \geq \log_3 (2 \cdot 1000 +1) - 1 \approx 5.919

Therefore the smallest integer n that satisfies the inequality is n = 6 n = 6 .

However that means that we need weights that weigh:

3 0 , 3 1 , 3 2 , , 3 6 3^0, 3^1, 3^2, \ldots, 3^{6}

This means that a total of 6 + 1 = 7 6 + 1 = 7 weights are required.

Patrick Heebels - 6 years ago

The answer is 7 7 , it's okay.

But with 1 , 3 , 9 , 27 , 84 , 243 , 729 1,3,9,27,84,243,729 , you won't be able to make 41 41 kg, 42 42 kg and 43 43 kg.

Muhammad Rasel Parvej - 4 years, 6 months ago

Log in to reply

It's 81 not 84.

X X - 3 years ago

We can generalize the problem for 1 1 to n n , then have the solution to the generalized problem as follows.

Consider the recurrence relation f p = 3 f p 1 + 1 f_p=3f_{p-1}+1 , for p 1 p\geq1 , with the initial condition f 0 = 0 f_0=0 .

Then it can be proved that

The minimum number of weights that you would need to be able to measure all (integral) weights from 1 kg to n n kg is the minimum positive integer p p such that f p n f_p\geq n ; suggesting the a a th weight (in increasing order) is ( 2 f a 1 + 1 ) \left({2f_{a-1}+1}\right) kg, for ( a 1 a\geq1 ).

As here n = 1000 n=1000 , with 3 6 < n < 3 7 3^6<n<3^7 , I didn't bother to find a closed form of the recurrence relation.

Now, f 0 = 0 f_0=0 , f 1 = 1 f_1=1 , f 2 = 4 f_2=4 , f 3 = 13 f_3=13 , f 4 = 40 f_4=40 , f 5 = 121 f_5=121 , f 6 = 364 f_6=364 , f 7 = 1093 f_7=1093 ... ... ...

7 \boxed{7} is the answer.

And the weights are: w 1 = 1 w_1=1 , w 2 = 3 w_2=3 , w 3 = 9 w_3=9 , w 4 = 27 w_4=27 , w 5 = 81 w_5=81 , w 6 = 243 w_6=243 , w 7 = 729 w_7=729 , but for n = 1000 n=1000 , any value of w 7 w_7 with 517 w 7 729 517\leq w_7 \leq 729 works.

The closed form is log n log b \left\lceil\frac{\log n}{\log b}\right\rceil where b the base (3 in this case).

Ron van den Burg - 3 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...