# Weigh 15 boxes with a digital scale, but you can’t understand the number system

This puzzle is inspired by the puzzle 14 coins problem but you can't understand the scale.

In this weighing puzzle, you have 15 boxes, each one weighing 1, 2, 3, and so on until 15 arbitrary units. You also have a digital scale which you can put zero or more boxes on to determine their total weight in said units. It will display the weight as a number (only a number, no name of the unit or anything else).

However, there is a catch: the numbers displayed by the scale is written in another number system, and you have no idea what any of the digits look like until you put some weights on. Also, the numbers are written in a base at least 2 but no more than 10, but you don’t know exactly what.

The digits are written from left to right with no separator, and the most significant digit is on the left. All the digits are easily distinguishable from each other, and there is no ambiguity even when written without a separator (for example if 5 is "&" and 7 is "@", no single digit is "&@"). Also, none of the digits are just whitespace and nothing else.

For example, if base 2 is used, the integers zero and up could be &, @, @&, @@, @&&, @&@ and so on.

Question: how can you sucessfully find out which box has which weight (in our ordinary decimal numbers: 1, 2, 3 etc) in as few weighings as possible? (If you put on multiple boxes at once and only check the total weight of all boxes, it counts as one weighing, but if you check the total weight of all boxes, then add or remove boxes and check the new total weight, this counts as two weighings).

• Obvious $2^{15}=32768$ weighings is sufficient. Commented Jul 31 at 0:28
• @BenjaminWang I think the sum of all the weights is 120. $\sum_{n=1}^{15}n = \frac{n(n+1)}2 = \frac{15(16)}2 = \frac{240}2 = 120$. And if you have weighed every possible combination of weights, it should be trivial to determine the number base and weight of each individual box (remember that those 32768 weighings include weighing each individual box, as well as no boxes). Using the strategy given by JS1 in their answer below, you could easily determine the weight of each box. Commented Aug 1 at 16:04
• My summation notation is totally wrong, but hopefully it's obvious what is meant. Commented Aug 1 at 21:35

It can be done in:

At most 18 weighings in the worst case

Step 1:

Weigh all boxes individually (15 weighings).

The base can be determined by how many single digit weights there are. For example, base 2 has 1 single digit weight, base 3 has 2 single digit weights, etc.

For any base, digit 0 can be determined as it is the only digit to not appear in a single digit weight.

Base 2: 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111
Base 3: 1 2 10 11 12 20 21 22 100 101 102 110 111 112 120
Base 4: 1 2 3 10 11 12 13 20 21 22 23 30 31 32 33
Base 5: 1 2 3 4 10 11 12 13 14 20 21 22 23 24 30
Base 6: 1 2 3 4 5 10 11 12 13 14 15 20 21 22 23
Base 7: 1 2 3 4 5 6 10 11 12 13 14 15 16 20 21
Base 8: 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17
Base 9: 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16
Base 10: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Step 2a:

Base 2 is trivial because digit 1 is the single digit weight.
Base 3 is trivial because the triple digit weight gives digit 1, which gives digit 2 as the last remaining unknown.
Total weighings = 15

Step 2b:

For base 4, digits [123] are unknown.
Weigh the three single digit weights (1,2,3) with total weight 6 (12 in base 4). This gives digits 1 and 2, with 3 being the last remaining digit.
Total weighings = 16

Step 2c:

For base 5, digits 3 and 4 can be determined because 3 only appears once in the tens digit, and 4 never appears in the tens digit (digits 1 and 2 appear 5 times each). Thus, only digits [12] remain unknown.
Weigh the single digit weights other than 3: (1,2,4) with total weight 7 (12 in base 5). This gives digits 1 and 2.
Total weighings = 16

Step 2d:

For base 6, digits 1 and 2 can be determined because 1 appears in the tens digit for 6 numbers and 2 appears in the tens digit for 4 numbers. Thus, digits [345] are unknown.
Weigh boxes 8 and 14 (12 and 22 in base 6) with total weight 22 (34 in base 6). This gives digits 3 and 4, with 5 being the last remaining digit.
Total weighings = 16

Step 2e:

For base 7, digits 1 and 2 can be determined because 1 appears in the tens digit for 7 numbers and 2 appears in the tens digit for 2 numbers. Thus, digits [3456] are unknown.
Weigh boxes 1,9,15 (1,12,21 in base 7) with total weight 25 (34 in base 7). This gives digits 3 and 4, leaving [56] unknown.
Weigh boxes 1 and 4 to give digit 5, with 6 being the remaining digit.
Total weighings = 17

Step 2f:

For base 8, digit 1 can be determined as the only tens digit. Thus digits [234567] are unknown.
Weigh all the one digit boxes (1,2,3,4,5,6,7) with total weight 28 (34 in base 8). This gives digits 3 and 4, leaving [2567] unknown.
Weigh boxes 11 and 12 (13 and 14 in base 8) with total weight 23 (27 in base 8). This gives digits 2 and 7, leaving [56] unknown.
Weigh boxes 1 and 4 to give digit 5, with 6 being the remaining digit.
Total weighings = 18

Step 2g:

For base 9, digit 1 can be determined as the only tens digit. Additionally, digits 7 and 8 do not appear in any two digit weights. Thus digits [23456] and digits [78] are unknown in separate sets.
Weigh all the one digit boxes except for 1: (2,3,4,5,6,7,8) with total weight 35 (38 in base 9). This gives digits 3 and 8, with 7 also being found as the only remaining in the [78] set. This leaves [2456] unknown.
Weigh boxes 10 and 12 (11 and 13 in base 9) with total weight 22 (24 in base 9). This gives digits 2 and 4, leaving [56] unknown.
Weigh boxes 1 and 4 to give digit 5, with 6 being the remaining digit.
Total weighings = 18

Step 2h:

For base 10, digit 1 can be determined as the only tens digit. Additionally, digits 6,7,8,9 do not appear in any two digit weights. Thus digits [2345] and digits [6789] are unknown in separate sets.
Weigh all the two digit boxes except for 11: (10,12,13,14,15) with total weight 64. This gives digits 4 and 6, leaving [235] and [789] unknown.
Weigh boxes 11 and 14 with total weight 25. This gives digits 2 and 5, and also reveals 3 as the last digit in the [235] set. This leaves [789] unknown.
Weigh 3,10,11,12,13,14,15 with total weight 78. This gives digits 7 and 8, and also reveals 9 as the last digit in the [789] set.
Total weighings = 18