基于多级相关图的大规模词典完美哈希函数构造算法
收稿日期: 2009-07-14
修回日期: 2010-01-15
网络出版日期: 2010-12-25
A Perfect Hash Function for LargeScale Dictionaries Based on MultiStage Dependency Graphs
Received date: 2009-07-14
Revised date: 2010-01-15
Online published: 2010-12-25
李海涛 . 基于多级相关图的大规模词典完美哈希函数构造算法[J]. 计算机工程与科学, 2010 , 32(12) : 128 -133 . DOI: 10.3969/j.issn.1007130X.2010.
In the hash function, if there are two different words are mapped into the same slot, we call it a conflict. When the hash function appears in the conflict, it slows the dictionary’s finding speed. Since the perfect hash function completely avoids the conflict, it is used popularly in the application of high function demands. So a perfect hash function based on multistage dependency graphs is presented in this paper. Each character (except for the first one) of a key is smoothed into two smoothed characters using two different smoothing functions. A multistage dependency graph is constructed. The degree of the vertices in the multistage dependency graph of the smoothed keyset is much more evenly distributed, so that a perfect hash function is easier to obtain. The perfect hash function is promising to give solution to large keysets. The load factor remains still high even for huge keysets over large charactersets. Experiments indicate that the load factor is competitive, and meanwhile its working space is less than that of the existing hash functions.
/
| 〈 |
|
〉 |