Construct a perfect word hash function in time independent of the size of integers

We present an algorithm for constructing a perfect word hash function for n integers that takes O(n4log⁡n) time. This time is independent of size of the integers or the number of bits in the integers. We call it a word hash function because we require that the hash function can hash multiple integer...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Information processing letters Jg. 128; S. 5 - 10
1. Verfasser: Han, Yijie
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Elsevier B.V 01.12.2017
Schlagworte:
ISSN:0020-0190, 1872-6119
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:We present an algorithm for constructing a perfect word hash function for n integers that takes O(n4log⁡n) time. This time is independent of size of the integers or the number of bits in the integers. We call it a word hash function because we require that the hash function can hash multiple integers packed in a word in constant time. Previous algorithms for constructing a perfect word hash function have time dependent on the number of the bits in integers. Although an O(n(log⁡log⁡n)2) time algorithm is known for constructing a perfect hash function, the hash function constructed is not a word hash function and it cannot hash multiple integers packed in one word in constant time. The property of word hashing is indispensable in the current best deterministic and randomized algorithms for integer sorting. Our result is achieved via an algorithm of O(n2log2⁡n) time that computes the shift distances for integers of Ω(n2log⁡n) bits. These shift distances can then be used to pack the extracted bits of each integer to O(n) bits. Perfect word hash function constructed with our method using these shift distances allows a batch of mn integers with m integers packed in a word to be hashed in O(n) time. •We construct perfect word hash functions, that is, perfect hash functions that can hash multiple integers packed in a word in constant time.•Word hash property is indispensable in the current best deterministic and randomized algorithms for integer sorting.•This paper presents a method to convert the previous known perfect word hash algorithm with construction time O(n2log⁡m) to a perfect word hash algorithm with construction time O(n4log⁡n). We present a scheme to extract n−1 bits from an integer for any values of log⁡m and a scheme to pack these n−1 bits. Thus we made the construction time for a perfect hash function independent of the number of bits in an integer and it allows multiple integers packed in a word to be hashed in constant time. Although previously O(n(log⁡log⁡n)2) construction time for perfect hash functions is known, it is not a word hash function and it cannot hash multiple integers packed in a word in constant time.
ISSN:0020-0190
1872-6119
DOI:10.1016/j.ipl.2017.07.004