I have written a small note about mapping a multidimensional index into a unique id. An unique id might be useful e.g. when having multiple state variables in an
Markov decision process. Here each state at a stage may be identified using the id.