Recent content by rossj81
-
R
Perfect Hash Table Lookup with Unknown Keys?
Jeff Actually, the upper limit would be based on the alpha key. I don't remember, so I looked on Wikipedia. If I understand correctly, 27 different possible characters in 40 places would be P(n,r) = n! / (n - r)! = 40! / 13! I'm not even going to try simplify, but I think it's even...- rossj81
- Post #13
- Forum: Programming and Computer Science
-
R
Perfect Hash Table Lookup with Unknown Keys?
Thanks for all the suggestions. While non-perfect hashes are a good way to reduce the required number of probes, in my case I don't believe it's worth the effort. The table isn't big enough to justify the added complexity. I just thought it would be cool to reduce the look-up to O(1). Ross- rossj81
- Post #11
- Forum: Programming and Computer Science
-
R
Perfect Hash Table Lookup with Unknown Keys?
Thanks for the fast responses, guys. I was afraid that the index size was too small, but I wanted someone to confirm my suspicions. O(n) it is, then - brute force search to the rescue! Thanks again for your help.- rossj81
- Post #6
- Forum: Programming and Computer Science
-
R
Perfect Hash Table Lookup with Unknown Keys?
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. The function must be deterministic, i.e. if a key maps to an index, it must always map to the same index. The...- rossj81
- Thread
- Table
- Replies: 15
- Forum: Programming and Computer Science