I need to construct a perfect hash function that maps a set of integer [1..2^64 - 1] to itself (this function is actually some some complex permutation).
To explain this problem suppose that we have sequence of integer primary keys in database. We need to show construct a number (which we show to users) in a way that close numbers corresponds to primary keys that as far from one another as possible.
So, basically I need a bijective function for large set of integers. E.g.
- 1 -> X1
- 2 -> X3
- 3 -> X3
- ...
- 2^64 - 1 -> X2^64 - 1
Any suggestions or references will be appreciated.