I want to have a dictionary that assigns a value to a set of integers.
For example key
is [1 2 3]
and value
will have certain
I think what is mentioned in this paper would definitely help:
http://people.csail.mit.edu/devadas/pubs/mhashes.pdf
Incremental Multiset Hash Functions and Their Application to Memory Integrity Checking
Abstract: We introduce a new cryptographic tool: multiset hash functions. Unlike standard hash functions which take strings as input, multiset hash functions operate on multisets (or sets). They map multisets of arbitrary finite size to strings (hashes) of fixed length. They are incremental in that, when new members are added to the multiset, the hash can be updated in time proportional to the change. The functions may be multiset-collision resistant in that it is difficult to find two multisets which produce the same hash, or just set-collision resistant in that it is difficult to find a set and a multiset which produce the same hash.