I\'m looking for a function that maps a multi-set of integers to an integer, hopefully with some kind of guarantee like pairwise independence.
Ideally, memory usage woul
The Knuth touches on this on TAoCP, and this is a near duplicate of What integer hash function are good that accepts an integer hash key?.
For your situation, turning your multi-set into a single integer and then performing the hash described in the linked post may be what you want to do. Turning a collection into a number is trivial; a concatenation of the digits will do.
For more info on Knuth's method, search for 'Knuth's Multiplicative Method'
-tjw