As far as my knowledge, this has something to do with the combinatorial number system and lexicographical order, but I can't tell exactly what it is.
An example: let $x = (x_1,x_2,x_3,x_4,x_5)$, in which $x_1 \in \{1,2,3\}$,$x_2 \in \{1,2,3\}$,$x_3 \in \{1,2,3,4,5\}$,$x_4 \in \{1,2,3,4\}$,$x_5 \in \{1,2,3,4,5,6\}$
The total possible choices is $3\times 3\times 5 \times 4 \times 6$. I want to order them this way (when the last possible choice hits the max, then the one before increases 1 and start counting again):
1,1,1,1,1
1,1,1,1,2
$\cdots$
1,1,1,1,6
1,1,1,2,1
$\cdots$
Say I would like to calculate if I order this way, given a random ordering (1,2,4,3,2), what is the index of this tuple?
An inverse problem is given the index, and a set of numbering: $x_1 \in \{1,2,3\}$,$x_2 \in \{1,2,3\}$,$x_3 \in \{1,2,3,4,5\}$,$x_4 \in \{1,2,3,4\}$,$x_5 \in \{1,2,3,4,5,6\}$, can we reconstruct the tuple?