MarketLinear hashing
Company Profile

Linear hashing

Linear hashing (LH) is a dynamic data structure which implements a hash table and grows or shrinks one bucket at a time. It was invented by Witold Litwin in 1980. It has been analyzed by Baeza-Yates and Soza-Pollman. It is the first in a number of schemes known as dynamic hashing such as Larson's Linear Hashing with Partial Extensions, Linear Hashing with Priority Splitting, Linear Hashing with Partial Expansions and Priority Splitting, or Recursive Linear Hashing.

Algorithm details
Records in LH or LH* consists of a key and a content, the latter basically all the other attributes of the record. Hash functions The hash function h_i(c) returns the 0-based index of the bucket that contains the record with key c. When a bucket which uses the hash function h_i is split into two new buckets, the hash function h_i is replaced with h_{i+1} for both of those new buckets. At any time, at most two hash functions h_l and h_{l+1} are used; such that l corresponds to the current level. The family of hash functions h_i(c) is also referred to as the dynamic hash function. Typically, the value of i in h_i corresponds to the number of rightmost binary digits of the key c that are used to segregate the buckets. This dynamic hash function can be expressed arithmetically as h_i(c) \mapsto (c \bmod 2^i) . Note that when the total number of buckets is equal to one, i=0. Complete the calculations below to determine the correct hashing function for the given hashing key c. An uncontrolled split occurs when a split is performed whenever a bucket overflows, in which case that bucket would be split into two separate buckets. File contraction occurs in some LH algorithm implementations if a controlled split causes the load factor to sink below a threshold. In this case, a merge operation would be triggered which would undo the last split, and reset the file state. == Other properties ==
Other properties
File state calculation The file state consists of split pointer s and level l. If the original file started with N=1 buckets, then the number of buckets n and the file state are related via n = 2^l+s . ==Adoption in language systems==
Adoption in language systems
Griswold and Townsend discussed the adoption of linear hashing in the Icon language. They discussed the implementation alternatives of dynamic array algorithm used in linear hashing, and presented performance comparisons using a list of Icon benchmark applications. ==Adoption in database systems==
Adoption in database systems
Linear hashing is used in the Berkeley database system (BDB), which in turn is used by many software systems, using a C implementation derived from the CACM article and first published on the Usenet in 1988 by Esmond Pitt. ==References==
tickerdossier.comtickerdossier.substack.com