- #1
rossj81
- 4
- 0
Hi all
Basically, I'm looking for a fingerprinting or perfect hash function.
The key is 40 alpha characters, specifically \b[A-Z_]{40}\b.
The index is a 12-digit integer.
Firstly, is it even possible to map this many keys to a maximum of 1x10^12 indexes?
If it is, I would appreciate any help on working out the algorithm. The end product has to be in Natural, but I should be able to translate from any C-style language.
Thanks so much!
Ross
Basically, I'm looking for a fingerprinting or perfect hash function.
The key is 40 alpha characters, specifically \b[A-Z_]{40}\b.
The index is a 12-digit integer.
- The function must be deterministic, i.e. if a key maps to an index, it must always map to the same index.
- The function must not be surjective, i.e. only one key must map to each index, but there may be some indexes which do not have corresponding keys.
- The function does not need to be cryptographic.
Firstly, is it even possible to map this many keys to a maximum of 1x10^12 indexes?
If it is, I would appreciate any help on working out the algorithm. The end product has to be in Natural, but I should be able to translate from any C-style language.
Thanks so much!
Ross