Linear Hashing
- Linear hashing are dynamic file-expansion schemes based on incremental bucket splitting in databases, linear probing methods in data structures, and affine algebraic hash families in theoretical computer science.
- Key methods of linear hashing include affine modular hashing, needed for prime modulus p, binary linear hashing which chooses a random linear map and linear probing, scanning the table linearly to resolve collisions.
- A method known as dynamic linear hashing, is a database scheme which utilizes incremental bucket splitting and refers to another usage of hash families.
Linear hashing denotes several distinct families and mechanisms in hashing theory. In database systems, linear hashing is a dynamic file-expansion scheme based on incremental bucket splitting; in classical data structures, the term is also used for linear probing, an open-addressing collision-resolution method. In theoretical computer science, it commonly refers to compact algebraic hash families such as affine modular hashing, , or random linear maps over finite fields. Related uses include linear sketching, supervised linear hashing of feature vectors, and linear-code hashing for randomness extraction. These notions share linear or affine algebraic structure but have different models, guarantees, and unresolved problems.
1. Terminology and mathematical models
Affine modular hashing
The canonical affine modular family chooses a prime , random parameters , and maps keys to buckets by
The first operation is affine over ; the final reduction modulo generally is not a field operation. For a key set of size , the maximum load is
The standard worst-case question maximizes 0 over fixed, adversarially chosen sets 1. The family is compact—its seed requires 2 bits—and evaluation takes constant time. Before final range reduction, the affine maps form a pairwise-independent, 3-universal family; after reduction, bin marginals are only nearly uniform, although distinct-key collision probabilities remain 4 (Bakshi et al., 25 Aug 2026).
Two representations are frequently distinguished. Strided hashing uses reduction modulo 5, whereas blocked hashing partitions 6 into consecutive intervals of length approximately 7. In the standard prime-modulus setting, their expected maximum loads differ by at most a factor of 8. Removing the additive shift produces Simple Linear Hashing, which is likewise equivalent up to constant factors in the relevant prime-modulus analysis (Westover, 2023).
Binary linear hashing
A different family chooses a uniformly random linear map
9
represented by an 0 random binary matrix. The 1 bins are the elements of 2. For a fixed set 3 with 4,
5
The fibers of a surjective map are affine cosets of a random 6-dimensional kernel. Although this family is universal and has strong algebraic dependencies—it is not even 7-wise independent—the maximum-load behavior is optimal up to the leading and dominant second-order terms (Jaber et al., 20 May 2025, Bshouty, 18 May 2026).
This result should not be conflated with the affine modular family. The former is linear as a map between vector spaces over 8; the latter applies an affine finite-field transformation followed by an incompatible reduction modulo an arbitrary bucket count. Their maximum-load behavior is now known to be substantially different.
Linear probing
Linear probing is an open-addressing method rather than a hash-family specification. A key whose home location is 9 scans
0
until it finds the key, an empty location, or the first available location for insertion. The cost of an operation is controlled by the occupied run containing the home location. Under fully random hashing, or under suitable limited-independence assumptions, this produces a cluster-based performance problem distinct from maximum bin load.
The term linear hashing in linear-probing papers therefore denotes a collision-resolution process, not necessarily an affine hash family. Dynamic Linear Hashing, in turn, is a database scheme based on incremental bucket splitting and is a third, unrelated usage (Janson et al., 2014, Sanders, 2018).
2. Linear probing, clusters, and operational cost
For bucket capacity 1, a table consists of 2 cyclically ordered buckets, each holding at most 3 keys. If 4 is the number of keys whose home address is bucket 5, 6 the number trying bucket 7, 8 the overflow passed to bucket 9, and 0 the final occupancy, then
1
The load factor is 2). In the Poisson model, the home occupancies are independent with
3
The overflow profile is a reflected random walk with increments 4. Its drift is 5, negative whenever 6. This representation connects local occupancy, cluster formation, overflow, and search cost.
A cluster, or block, is a maximal sequence of full buckets followed by a non-full bucket. If 7 is the block length in the one-sided infinite model, then
8
The probability-generating function is
9
where 0 on the specified branch of the tree function 1. The mean block length satisfies
2
where 3 is the limiting probability that a bucket is non-full. A uniformly selected bucket sees a size-biased block distribution, so the block containing a random bucket is not distributed like a randomly selected block.
For unsuccessful search, 4 denotes the number of full buckets inspected. Its tail is the residual-block relation
5
The total number of inspected buckets is 6. For first-come-first-served insertion, the displacement of a newly inserted key equals 7. The expected displacement of a random stored key is policy-independent because the total displacement equals the total bucket overflow:
8
This conservation identity applies to FCFS, LCFS, Robin Hood, and other insertion policies, although their displacement distributions and variances differ.
The classical bucket-size-one case, 9, gives ordinary linear probing. For fixed 0, expected search costs remain bounded as the table grows, but the constants diverge as 1. At full occupancy, the behavior changes qualitatively: total displacement has order 2 and converges after normalization to the area under a standard Brownian excursion. Near full occupancy, long clusters and finite-size effects dominate fixed-load asymptotics (Janson et al., 2014, Klein et al., 2016).
3. Independence requirements and deletion without relocation
The quality of linear probing depends not only on the collision-resolution rule but also on the hash family. A hash function is 3-independent if the hash values of every 4 distinct keys are mutually independent and individually uniform. A random degree-5 polynomial over a prime field supplies a standard construction.
Five-wise independence is sufficient for expected constant-time search, insertion, and deletion when the load is bounded away from one. The proof conditions on the query hash value; the remaining stored-key indicators are then 6-wise independent. A fourth-moment bound shows that a dyadic interval of length 7 is near-full with probability 8. Summing over dyadic scales yields expected occupied-run length 9, and hence expected 0 operation cost. The simplified theorem assumes 1, or 2, while the sharper statement gives expected cost 3 at load 4 (Thorup, 2015).
Four-wise independence does not suffice in general. Simple tabulation hashing, although formally only 5-independent, can satisfy the relevant fourth-moment estimate after conditioning. By contrast, ordinary affine transformations can generate pathological clustering. These guarantees are expectations over the randomly selected hash function and do not imply a simultaneous high-probability bound for every key and every operation.
A separate variant addresses deletion under referential integrity. Ordinary backward shifting preserves probe reachability by moving subsequent elements, but invalidates pointers to their table locations. The tombstone-minimizing variant never moves live elements. Each slot is logically one of EMPTY, TOMBSTONE, or LIVE. A tombstone is retained only if a surviving element’s probe path requires it; otherwise it is changed to empty during deletion. This maintains search correctness while preserving references.
The structural guarantees are local: every retained tombstone has a live witness, and every removed tombstone is unnecessary for the current set of live elements. Deletion may scan a substantial cluster and can take 6 time in the worst case. The reported bounded long-run search overhead is experimental rather than a formal amortized theorem; no worst-case bound on tombstone counts or deletion cost is established. Ordinary resizing remains problematic because rehashing changes element addresses (Sanders, 2018).
4. Hashing with chaining and affine arithmetic structure
Affine modular hashing is often used with separate chaining rather than linear probing. In that setting, the load of a bucket is exactly its chain length, and the maximum load is the longest chain. The family
7
uses only two random parameters, so outputs are highly dependent. For 8, fully random hashing has expected maximum load 9, whereas the previously known upper bound for affine modular hashing was 0. A 2017 analysis established
1
for fixed key sets, improving generic 2 bounds for broad 3-independent families (Knudsen, 2017).
The proof converts a heavy bucket into a short interval containing many transformed keys. Carefully selected multipliers, often indexed by primes, force many pairs of original keys to have unusually small modular differences. A technical interval-overlap lemma supplies a lower bound on such pairs, while random multiplication gives an upper bound for each fixed pair. The resulting tail estimate has cubic decay,
4
which integrates to the cube-root expected maximum-load bound.
Composite moduli require additional care because nonzero elements need not be invertible. Smart Linear Hashing chooses multipliers from 5. For ordinary composite hashing, conditioning on 6 partitions the input into components corresponding to Smart Linear Hashing modulo 7. The resulting loss is bounded by the divisor function
8
Blocked and strided variants, real multipliers, random moduli, and the two-bin case are closely related, but the equivalences preserve only specified approximation factors or asymptotic orders (Westover, 2023).
5. Optimality and failure of different linear families
Binary linear hashing has a markedly stronger theorem. For every fixed 9 with 0, a uniformly random linear map satisfies
1
In particular, its leading term matches fully independent hashing, whose expected maximum load is
2
The proof exposes the random kernel one dimension at a time. If 3 is the partial kernel and 4, define the exponential potential
5
The central inequalities are
6
and
7
The first controls conditional growth under pairwise coset mergers; the second gives deterministic excess-potential doubling. Optimizing the base 8 according to the target load yields a refined tail bound. For 9 satisfying the stated threshold condition,
00
A 2026 refinement integrates this optimized tail to recover the dominant second-order correction, showing that binary linear hashing nearly matches fully independent hashing beyond the leading scale (Jaber et al., 20 May 2025, Bshouty, 18 May 2026).
Affine modular hashing has a different status. Recent arithmetic-combinatorial constructions produce, for 01 and sufficiently large prime modulus, an 02-element key set with expected maximum load
03
In one formulation, the same key set causes this load for every affine multiplier, not merely in expectation. The construction uses small sets containing long arithmetic progressions in many differences. Under a real multiplier, two of the points 04 must be close on the unit circle; a progression with that difference is consequently compressed into an interval meeting at most two bins. A reduction transfers this phenomenon to modular hashing (Bakshi et al., 25 Aug 2026, Zamir, 24 Aug 2026).
The lower bound is super-polylogarithmic but subpolynomial. Thus, for affine modular hashing with 05, the current gap is between
06
and approximately
07
This contrasts directly with binary random linear hashing: “linear hashing is optimal” applies to the binary vector-space family, not to the canonical affine modular family.
6. Arithmetic Kakeya connections and open problems
The affine modular maximum-load problem admits a density arithmetic Kakeya formulation. For 08, define the richness in direction 09 at progression length 10 by
11
With 12 and 13, the maximum load and directional richness satisfy
14
Therefore, constructing key sets with large rich progressions in many directions constructs bad hashing inputs. Green–Ruzsa constructions supply relatively small sets containing long arithmetic progressions for every difference in an initial interval. Difference amplification converts these progressions into rich subsets for a constant fraction of modular directions, yielding the super-polylogarithmic lower bound (Zamir, 24 Aug 2026).
The same viewpoint applies to real linear hashing,
15
If a set contains a 16-term progression for every difference 17 with 18, then for every real seed 19 two of 20 lie within circular distance 21. The corresponding progression is mapped into an interval of length less than 22, so at least 23 keys occupy one bin. This gives a pointwise, every-seed lower bound.
The arithmetic Kakeya connection also yields conditional barriers. A uniform 24 upper bound for real or modular linear hashing over polynomial-size universes would imply the polynomial-length arithmetic Kakeya conjecture, which in turn implies the Kakeya conjecture for upper Minkowski dimension. Conversely, any substantial improvement over the cube-root upper bound would imply new results for arithmetic Kakeya-type sets. The current lower-bound construction does not establish a polynomial lower bound; whether the true worst-case expected load is 25 for some absolute 26 remains open (Zamir, 24 Aug 2026, Bakshi et al., 25 Aug 2026).
Other linear-hashing applications pose different questions. In supervised discrete hashing, S2DHMLR learns a linear feature-to-code map
27
while using a single shared projection 28 for code-to-label and label-to-code regression. Its optimization combines discrete binary codes, mutual regression, feature regression, alternating minimization, Sylvester-equation solution, and discrete cyclic coordinate descent. Experiments on CIFAR-10, MS-COCO, and NUS-WIDE report improved mean average precision relative to several supervised linear baselines, with a boosting procedure selecting balanced bits (Liu et al., 2019).
In randomized numerical linear algebra, hashing matrices provide sparse subspace embeddings. An 29-hashing matrix has 30 signed nonzeros per column, each of magnitude 31. For sufficiently low coherence, sketch dimension 32 is possible, where 33 is the input rank. Increasing 34 permits coherence larger by approximately 35; randomized Hadamard preprocessing further reduces coherence. These embeddings yield well-conditioned preconditioners for linear least squares, implemented in Ski-LLS for dense and sparse problems (Cartis et al., 2021).
Finally, linear-code hashing uses a parity-check matrix 36 to map 37 to its syndrome 38. For integer 39, a random linear code extracts nearly uniform 40-ary symbols when
41
with an ensemble-average Rényi-divergence and normalized 42 guarantee. Reed–Muller parity-check matrices achieve the full 43-Rényi intrinsic-randomness rate for memoryless Bernoulli sources, while the corresponding full Shannon-order claim remains unresolved (Pathegama et al., 2024). These extraction, sketching, supervised-retrieval, chaining, probing, and algebraic-load problems all use “linear hashing,” but their objectives—uniformity, embedding, semantic similarity, operation cost, or maximum occupancy—are mathematically distinct.