vector hashing function having collisions for permutations let's consider vectors in space dim=3 and values {0,1,2,...,99} on each dimension I would like to create hash function but with special trait: collisions only for permutations on input

$\forall_{x, y \in N^3} (y = permutation(x) &lt;=&gt; hash(x) == hash(y))$

is it even possible but without sorting? if so please attach example :)


one idea is to sort these values and then just create a key like $x_1*10e4 + x_2*10e2 + x_3$, for higher dimensions sorting would slow down solving a bit, so is it possible without sorting?
With your limitations, you put all values into about 166,000 or so buckets, so yes, easily. If x, y, z are arbitrarily large, of course not.