I have a problem where I have several objects and several properties, I need a number which represent each of them so if I do an addition of those number I can dismantle those numbers.
for example lets say that I have 4 people , and 4 hats. I can represent the people with numbers 0-3. and I can represent the hats with numbers 10,20,30,40. So if I'm getting the number 42, I know that I have person number three with hat number 4.
Now in this case I need the minimum number value for each class so it would still be separable.
Now my specific problem : I have 6 persons , each one has 7 different classes (hat/shirt/etc') , and each class has 4 types (for example 4 possible hats, 4 possible shirt,etc'). in a case that a person doesn't has a shirt the value of shirt is 0(same case for no hat and etc..)
Please let me know if there is any need for any further explanation.
Thanks
Caution: I have limited experience with radix-conversion so there may be one or more errors here. However, the principle (enumerating all possible combinations) is sound.
For each integer $0\le n< 6\cdot5^7$ let $n_0,\ldots, n_7$ be the unique sequence such that...
$$n=\sum_{i=0}^7n_{i}\cdot5^{7-i}\qquad:\qquad 0\le n_0<6,\quad 0\le n_1,\ldots, n_7<5$$
Use $n_0$ to indicate the person, and $n_1,\ldots,n_7$ to indicate each of the seven properties. If I've done everything correctly (and I'm not sure that I have), then the string of digits $n_0n_1\cdots n_7$ will give person, hat, shirt, etc.
This is basically representing each combination as an eight-digit mixed-radix number, then converting that into decimal. In principal the highest such number should equal the total number of possible combinations, minus one ($``54444444"=6\cdot5^7-1$). This is necessarily the smallest maximum value that can be used.