Article ID Journal Published Year Pages File Type
4950846 Information Processing Letters 2017 14 Pages PDF
Abstract
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.
Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics
Authors
,