Elsevier

Theoretical Computer Science

Volume 475, 4 March 2013, Pages 59-65
Theoretical Computer Science

Unique permutation hashing

https://doi.org/10.1016/j.tcs.2012.12.047 Get rights and content
Under an Elsevier user license
open archive

Abstract

We propose a new hash function, the unique permutation hash function, and a performance analysis of its hash computation. We denote the cost of a hash function h by C h ( k , N ) , which stands for the expected number of table entries that are checked when inserting the ( k + 1 ) s t key into a hash table of size N , where k out of N table entries are filled by previous insertions. A hash function maps a key to a permutation of the table locations. A hash function, h , is simple uniform if items are equally likely to be hashed to any table location (in the first trial). A hash function, h , is random or strong uniform if the probability of any permutation to be a probe sequence, when using h , is 1 N ! , where N is the size of the table.

We show that the unique permutation hash function is not only a simple uniform hash function but also a random hash function, i.e., strong uniform, and therefore has the optimal cost. Namely, each probe sequence is equally likely to be chosen when the keys are uniformly chosen. Our hash function ensures that each empty table location has the same probability to be assigned by a uniformly chosen key. We also show that the expected time for computing the unique permutation hash function is O ( 1 ) and the expected number of table locations that are checked before an empty location is found during insertion (or search) is also O ( 1 ) for constant load factors α < 1 , where the load factor α is the ratio between the number of inserted items and the table size.

Cited by (0)

Partially supported by IBM faculty award NSF grant, the Israeli Ministry of Defense (MAFAT), the Israeli Ministry of Science (Russia Israel grant), Rita Altura Trust Chair in Computer Sciences, Lynne and William Frankel Center for Computer Sciences, Israel Science Foundation (grant number 428/11), Cabarnit Cyber Security MAGNET Consortium, Grant from the Technion’s Institute for Future Defense Technologies Research named for the Medvedi, Shwartzman and Gensler families, and the Israeli Internet Association. A brief announcement on this work has been presented in SSS 2009. Experiment results appear in Gichuiri (2010) [9] and Suriana (2011) [12].