A multipan balance scale depicted below has one pan on the left and five on the right.
-+- -+- -+- -+- -+- -+-
| | | | | |
+----+----+----+----+----+----+
|
|
The pan on the left is a unit distance from the fulcrum. The pans on the right are 1, 2, 3, 4, and 5 units from the fulcrum. The balance scale is operated by placing an unknown weight on the left and placing some or all of a known set of weights on the pans on the right.
If the known weights are 1, 2, 3, 4 and 5, show that any integral weight 1 to 75 can be measured. What is the smallest measurement requiring 3 weights on the right? 4 weights? 5 weights?
If the restriction that only one weight can occupy a pan is added, show that any integral weight 1 to 55 can be measured. What is the smallest measurement requiring 3 weights on the right? 4 weights? 5 weights?
Assuming the materials of the balance scale itself are lighter on the right than on the left so that the scale balances when no weights are on either side:
In the table below, against each total weight to be weighed are shown the number of weights needed on the right, the number of weights needed if no more than one weight can be placed on a pan, and then the ways of accomplishing the weighing in a minimumn number of weights, with and without the 1-weight-per-pan restriction. The latter descriptions list which pan each weight is to be placed in.
For example, the entry
weights
wgt # # 12345 12345
------------------------
48 3 4 155 1254
indicates that the least number of weights for weighing 48 is 3 if allowed to place more than one weight on a pan, but 4 with the 1-weight-per-pan restriction. It's accomplished by placing the 3-weight on pan 1 and the 4- and 5-weights on pan 5. With the restriction, it's done by placing the 2 on pan 1, the 3 on pan 2, the 4 on pan 5 and the 5 on pan 4.
For the unrestricted case, the smallest weight requiring:
2 weights is 7
3 weights is 38
4 weights is 58
5 weights is 69
With the 1-weight-per-pan restriction, the smallest weight requiring:
2 weights is 7
3 weights is 36
4 weights is 48
5 weights is 55
weights weights
wgt # # 12345 12345 wgt # # 12345 12345
---------------------- -------------------------
1 1 1 1 1 39 3 3 144 352
2 1 1 1 1 40 2 2 54 54
3 1 1 1 1 41 2 2 45 45
4 1 1 1 1 42 3 3 244 325
5 1 1 1 1 43 3 3 154 154
6 1 1 2 2 44 3 3 145 145
7 2 2 11 21 45 2 3 55 425
8 1 1 2 2 46 3 3 254 254
9 1 1 3 3 47 3 3 245 245
10 1 1 2 2 48 3 4 155 1254
11 2 2 12 12 49 3 3 354 354
12 1 1 3 3 50 3 3 345 345
13 2 2 21 21 51 3 4 255 1354
14 2 2 12 12 52 3 4 454 1345
15 1 1 3 3 53 3 4 445 2354
16 1 1 4 4 54 3 4 355 2345
17 2 2 31 31 55 3 5 554 12345
18 2 2 22 1 3 56 3 9999 545
19 2 2 13 13 57 3 9999 455
20 1 1 4 4 58 4 9999 1545
21 2 2 41 41 59 4 9999 1455
22 2 2 32 32 60 3 9999 555
23 2 2 23 23 61 4 9999 2455
24 2 2 14 14 62 4 9999 1555
25 1 1 5 5 63 4 9999 3455
26 2 2 42 42 64 4 9999 2555
27 2 2 33 4 3 65 4 9999 4455
28 2 2 24 24 66 4 9999 3555
29 2 2 15 15 67 4 9999 5455
30 2 2 52 52 68 4 9999 4555
31 2 2 43 43 69 5 9999 14555
32 2 2 34 34 70 4 9999 5555
33 2 2 25 25 71 5 9999 15555
34 2 2 3 5 3 5 72 5 9999 25555
35 2 2 53 53 73 5 9999 35555
36 2 3 44 125 74 5 9999 45555
37 2 2 35 35 75 5 9999 55555
38 3 3 153 153
DIM minCt(75), minCt1(75), minarr(75, 5), minarr1(75, 5)
FOR i = 1 TO 75
minCt(i) = 9999
minCt1(i) = 9999
NEXT
OPEN "multipan.txt" FOR OUTPUT AS #2
FOR w1 = 0 TO 5
FOR w2 = 0 TO 5
FOR w3 = 0 TO 5
FOR w4 = 0 TO 5
FOR w5 = 0 TO 5
w = w1 + w2 * 2 + w3 * 3 + w4 * 4 + w5 * 5
PRINT #2, USING "### # # # # #"; w; w1; w2; w3; w4; w5;
REDIM pCt(5)
wCt = 0: ov1 = 0
FOR p = 1 TO 5
IF w1 = p THEN pCt(p) = pCt(p) + 1: wCt = wCt + 1
IF w2 = p THEN pCt(p) = pCt(p) + 1: wCt = wCt + 1
IF w3 = p THEN pCt(p) = pCt(p) + 1: wCt = wCt + 1
IF w4 = p THEN pCt(p) = pCt(p) + 1: wCt = wCt + 1
IF w5 = p THEN pCt(p) = pCt(p) + 1: wCt = wCt + 1
IF pCt(p) > 1 THEN ov1 = 1
NEXT
PRINT #2, wCt;
IF ov1 THEN
PRINT #2, " >1 "
ELSE
PRINT #2, " "
END IF
IF wCt < minCt(w) THEN
minCt(w) = wCt
minarr(w, 1) = w1
minarr(w, 2) = w2
minarr(w, 3) = w3
minarr(w, 4) = w4
minarr(w, 5) = w5
END IF
IF wCt < minCt1(w) AND ov1 = 0 THEN
minCt1(w) = wCt
minarr1(w, 1) = w1
minarr1(w, 2) = w2
minarr1(w, 3) = w3
minarr1(w, 4) = w4
minarr1(w, 5) = w5
END IF
NEXT
NEXT
NEXT
NEXT
NEXT
CLOSE
CLS
col = 1
max1 = 1: max2 = 1
FOR i = 1 TO 75
row = row + 1
LOCATE row, col
IF minCt(i) > max1 OR minCt1(i) > max2 THEN COLOR 14: ELSE COLOR 7
PRINT USING "### ###"; i; minCt(i); minCt1(i);
COLOR 7
FOR j = 1 TO 5
IF minarr(i, j) = 0 THEN PRINT " "; : ELSE PRINT LTRIM$(STR$(minarr(i, j)));
NEXT
PRINT " ";
FOR j = 1 TO 5
IF minarr1(i, j) = 0 THEN PRINT " "; : ELSE PRINT LTRIM$(STR$(minarr1(i, j)));
NEXT
IF minCt(i) > max1 THEN max1 = minCt(i)
IF minCt1(i) > max2 THEN max2 = minCt1(i)
IF row > 75 / 2 THEN col = 35: row = 0
NEXT
LOCATE 40, 1
|
Posted by Charlie
on 2009-01-18 16:54:22 |