I'm working on a hash function and I was wondering if there is a function which can tansform a matrix into a natural being bijective. For example:
$A=\begin{bmatrix} 0&0&1\\ 2&0&1\\ 0&1&2 \end{bmatrix}$
I'm trying to find a way to tranform that matrix into $\Bbb N$ with a bijective function. This function has its domain in all the combinations that can be done with the numbers in $A$ (four $0$'s, three $1$'s and two $2$'s) and the image has to be $\{0,\dots, \#\text{Combinations}\}$.
Thanks in advance.