Perfect hash functions give unique "names" to arbitrary keys requiring only a few bits per key. This is an essential building block in applications like static hash tables, databases, or bioinformatics. This paper introduces the PHast approach that combines the fastest available queries, very fast construction, and good space consumption (below 2 bits per key). PHast improves bucket-placement which first hashes each key k to a bucket, and then looks for the bucket seed s such that a placement function maps pairs (s,k) in a collision-free way. PHast can use small-range hash functions with linear mapping, fixed-width encoding of seeds, and parallel construction. This is achieved using small overlapping slices of allowed values and bumping to handle unsuccessful seed assignment. A variant we called PHast+ uses additive placement, which enables bit-parallel seed searching, speeding up the construction by an order of magnitude.
Perfect hash functions मनमाने कुंजियों को अद्वितीय "नाम" देते हैं जिनमें प्रति कुंजी केवल कुछ बिट्स की आवश्यकता होती है। यह static hash tables, डेटाबेस, या बायोइनफॉर्मेटिक्स जैसे अनुप्रयोगों में एक आवश्यक निर्माण खंड है। यह पेपर PHast दृष्टिकोण प्रस्तुत करता है जो सबसे तेज़ उपलब्ध क्वेरीज़, बहुत तेज़ निर्माण, और अच्छी स्पेस खपत (प्रति कुंजी 2 बिट्स से कम) को जोड़ता है। PHast bucket-placement में सुधार करता है जो पहले प्रत्येक कुंजी k को एक bucket में hash करता है, और फिर bucket seed s को खोजता है ताकि एक placement function जोड़े (s,k) को collision-free तरीके से map कर सके। PHast छोटी-range hash functions को linear mapping, fixed-width seed encoding, और parallel construction के साथ उपयोग कर सकता है। यह छोटे overlapping slices के साथ और unsuccessful seed assignment को handle करने के लिए bumping का उपयोग करके प्राप्त किया जाता है। PHast+ नामक एक variant additive placement का उपयोग करता है, जो bit-parallel seed searching को सक्षम करता है, निर्माण को एक order of magnitude से तेज़ करता है।
Perfect Hash Function (PHF) एक ऐसा फ़ंक्शन है जो कुंजियों के समुच्चय {k₁, ..., kₙ} को {0, ..., m-1} में map करता है। जब m = n हो, तो इसे Minimal Perfect Hash Function (MPHF) कहा जाता है। यह डेटाबेस, text indexing और बायोइनफॉर्मेटिक्स जैसे अनुप्रयोगों में एक महत्वपूर्ण निर्माण खंड है।
Bucket placement विधि: CHD, FCH, PTHash, PHOBIC आदि को non-linear bucket allocation functions या variable-length seed encoding की आवश्यकता होती है, जो query speed को प्रभावित करता है
Recursive splitting विधि: हालांकि space-efficient है, लेकिन query time धीमा है, navigation information को decode करने की आवश्यकता है
Fingerprinting विधि: कम से कम e bits per key की आवश्यकता है, और query के लिए bit vector के rank operation की आवश्यकता है
Parallel construction overhead: मौजूदा विधियों के parallel construction को offset values को retrieve करने के लिए अतिरिक्त query steps की आवश्यकता है
Linear bucket mapping: छोटे overlapping slices में linear mapping के माध्यम से, non-linear bucket allocation से बचता है, cache-friendly multi-threaded construction को सक्षम करता है
Bumping mechanism: छोटी-range hash functions और fixed-width seed encoding का उपयोग करने की अनुमति देता है, complex local search से बचता है
Heuristic seed allocation: सबसे कम function values को occupy करने वाले seed को चुनकर space consumption को कम करता है
PHast+ variant: additive placement function का उपयोग करके bit-parallel seed searching को सक्षम करता है, construction speed को एक order of magnitude से बढ़ाता है
व्यापक प्रायोगिक मूल्यांकन: मौजूदा विधियों के साथ विस्तृत performance comparison
PHast bumping mechanism के माध्यम से variable-length encoding और complex local search से बचता है, जबकि linear bucket allocation की सरलता को बनाए रखता है।
Fredman & Komlós: Perfect hash function की theoretical lower bound
Belazzougui et al.: Bucket placement विधि का foundational कार्य
PHast पेपर algorithm engineering के क्षेत्र में दिखाता है कि समस्या के सार को गहराई से समझकर और आधुनिक hardware characteristics को ध्यान में रखकर, सरल विधियां optimization के माध्यम से complex विधियों के performance को achieve या exceed कर सकती हैं। यह data structure design के लिए एक महत्वपूर्ण insight प्रदान करता है: कभी-कभी समस्या को हल करने की कुंजी complexity को बढ़ाना नहीं है, बल्कि सही सरलीकरण दिशा को खोजना है।