You can use a sequence of increasing prime numbers for this purpose: sig(A) = \Sigma_{i=1..n} (Prime[i] ^ A[i])
where Prime[] = (2, 3, 5, 7, 11, 13, ...). For example, for the permutation A = (2, 3, 1) the Sig(A) would be 2^2 + 3^3 + 5^1 = 4 + 27 + 5 = 36. The signature proves to be different for any different permutation.
Best regards,
KB
--
You received this message because you are subscribed to the Google Groups "MiniZinc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minizinc+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minizinc/597024ef-04f3-44c3-97bb-26a1d6ad8c0an%40googlegroups.com.