-1

My research group is trying to implement a hash table to reduce the effects of a very costly step in our calculations.

Basically, it can take more than an hour to go from A to B, and B is something ridiculously simple, like a number between 1 and 100.

A in this case is an integer array with the following attributes:

- any entry can be either positive or negative
- average of 20 entries per array
- all entries are even
- with k elements in an array, values range from (+/-)2...2k, with no repeats

Examples:

- {4, -2, 6, 10, -8}
- {-2, -4, -6}
- {6, 4, -2}

I don't have an exact figure, but I think we have around 5 million distinct arrays to hash here.

What is a good hashing function that would work and still be reversible?

Thanks,

natnit