Unique solution to $T=a_1b_1 + a_2b_2 ... a_{10}b_{10}$ for some set of $a_i$?

27 Views Asked by At

If I have 10 types of objects of unique weights, and I know the sum of their weights and the total number of objects, and I know for each type of object, there is somewhere from 0 to 1000 of that that object type, is it possible to determine how many of each object I have?

In other words, is there a set $A=\{a_1, a_2, ... a_{10}\}$, such that for all $T=a_1b_1 + a_2b_2 ... a_{10}b_{10}$ and $0 \leq b_i \leq 1000$ and $b_i$ is unique integer for all $i$?

1

There are 1 best solutions below

0
On

Yes, there is. The simplest way would be to chose $$a_i = 1001^{i-1}$$ This means that the $1001$-adic representation of $T$ contains the digits $b_1$ to $b_{10}$ from least to most significant.

$$T = \sum_{i=1}^{10} b_i 1001^{i-1}$$

To see how this works you may want to restrict to $0\le b_i\le 9$ and have $a_i = 10^{i-1}$. This means you just concatenate the $b_i$ from $b_{10}$ to $b_1$ and use $T$ as that number. For example chosing $b_i = i-1$ you will end up with $T = 9876543210$ immediately telling you $b_{10}, \ldots, b_1 = 9, \ldots, 0$. The 1001-adic representation works the same, only that 1001 fills up multiple decimal digits so the "reading off" isn't directly possible with the usual base 10 representation.

If you want to be able to read off the $b_i$ from the 10-adic representation of $T$, you must chose a larger base wich is a power of $10$, i.e. at least $10000$. This will waste a lot of space, though. If $b_{10}, \ldots, b_1 = 1000, 999, \ldots, 991$, $T$ will be $$T = 1000\ 0999\ 0998\ 0997\ 0996\ 0995\ 0994\ 0993\ 0992\ 0991$$ where I've added the spaces for readability.