The k-Kick Tree Balls-to-Slots Scheme ([BenderFarachColtonKuszmaulKuszmaulLiu2022]) #
Formalizes the pure k-kick tree balls-to-slots scheme of Bender, Farach-Colton, J. Kuszmaul,
W. Kuszmaul, and Liu, Proc. 54th ACM STOC, pp. 1284–1297, 2022 (arXiv:2111.00602v2, 4 Nov 2021)
[BFCK+22] (printed p. p = PDF p. p + 1): Section 2.4 (p. 7 /
PDF p. 8) iterated-log bridge; Section 3.1 (pp. 8–10 / PDF pp. 9–11) hierarchy, priority kicks with
switchingCost ≤ k + 1, and kick-depth invariance; Section 5.1 (p. 27 / PDF p. 28) removal-only
deletion (vacating only the deleted ball's slot without moving other balls; Sections 3–3.1 describe
insertions only, and state still depends on insertion order so it is not history-independent); and
Lemma 1 (pp. 10–11 / PDF pp. 11–12) and Theorems 2–3 (p. 12 / PDF p. 13) 3-wise expectation bounds
and 2m-th moment / (1 - δ)-w.h.p. multi-tree concentration.
Namespace Cslib.DataStructure.BallsToSlots (and KickTree) holds this Section 3 pure
balls-to-slots model, while Cslib.DataStructure.Dictionary.KickTree holds the quotient permutation
layers (QuotientPerm, RoundSeed, SmallUniversePerm) and Section 4–5 metadata and multi-tier
cubby saturation pieces (saturation, tail promotion and replacement, and tier-merge capacity
arithmetic; dynamic resizing and the full Word-RAM dictionary realization are tracked in #5186).
Adaptations: (1) XOR probe deduplication g(x) ^^^ (idx % M) over primary slots;
(2) dyadic schedule capExp i = 2 * iterLog (i + 2) M and
binExp (i + 1) = 6 * iterLog (i + 2) M (clamped by effectiveDepth), rounding the paper's
s_d ≈ (log^(d) n)^6 and Pr[depthCap < i + 1] ≈ (log^(i+1) n)^(-2) to powers of two
(where +2 aligns 0-based indexing with Nat.iterLog and Chebyshev's L^4 / L^6 = 1 / L^2
yields a geometric series); (3) 2m-th moment insertion-set snapshot bounds in place of
full-independence Chernoff bounds.
Main definitions #
Cslib.DataStructure.BallsToSlots.KickTree.Params,State,Params.ValidState,effectiveDepth,standardParams,standardInsert,standardRun.
Main results #
max_iterLog_two_le_logLogFactor,logLogFactor_le_two_mul_max_iterLog_two.Params.ValidState.insert,Params.ValidState.delete,Params.ValidState.run,Params.switchingCost_insert_le,Params.assignedDepth_insert_of_mem,State.assignedDepth_delete_of_ne.expect_ballProbeComplexity_standardInsert_le,expect_totalProbeComplexity_standardRun_le,depthSteps_le_binExp,dens_sum_totalProbeComplexity_standardRun_gt_le,dens_sum_totalProbeComplexity_standardRun_gt_le_of_whp.
References #
Lower bound comparing max (Nat.iterLog 2 n) 1 with Dictionary.Dynamic.logLogFactor n.
Upper bound showing Dictionary.Dynamic.logLogFactor n ≤ 2 * max (Nat.iterLog 2 n) 1.
Parameters for a power-of-two depth-kick tree over 2 ^ slotBits slots.
- slotBits : ℕ
- depth : ℕ
Maximum kick depth
k(tree depths are0, 1, …, depth). - capBits : ℕ
Bit-width of the auxiliary hash component used for depth-cap sampling.
Base-2 logarithm of the depth-
ibin size2 ^ binExp i.Negative base-2 logarithm of
Pr[depthCap < i + 1] = 2 ^ (- capExp i).Depth-
0bin spans all2 ^ slotBitsslots.Deeper levels have smaller or equal power-of-two bin sizes (
s_{i+1} ∣ s_i).Deeper levels have larger or equal tail probabilities (
capExpis antitone).Every depth-cap threshold fits within
capBitsbits.
Number of primary slots M = 2 ^ P.slotBits.
State of a P.depth-kick tree over balls of type α.
- assignment : SlotAssignment α P.slotCount
Priority depth associated with each slot (
0by convention when free).
Query the slot currently holding ball x (none if absent).
Priority depth currently associated with ball x (none if x is absent).
Removal-only deletion ([BFCK+22], Section 5.1, printed p. 27
/ PDF p. 28): vacate x's slot without moving or re-depthing any other ball (the resulting state
still depends on insertion order, so it is not history-independent).
Deleting x leaves the assigned depth of every other ball z ≠ x unchanged.
Structural and depth-cap invariant of a k-kick tree state st with respect to hash f.
- inBin_of_occupant ⦃r : Fin P.slotCount⦄ ⦃x : α⦄ : st.assignment.occupant r = some x → P.InBin (f x) (st.slotDepth r) r
Every ball occupies a slot inside its associated priority depth's bin.
- slotDepth_le_depthCap ⦃r : Fin P.slotCount⦄ ⦃x : α⦄ : st.assignment.occupant r = some x → st.slotDepth r ≤ P.depthCap (f x)
Every ball's associated priority depth is bounded by its depth-cap hash
depthCap (f x).
Deleting any ball preserves ValidState without resampling f.
Insert ball x into st under hash f via priority kicks.
Execute an operation sequence ops from State.empty P α under hash f.
Priority-kick insertion preserves ValidState.
Kick-depth invariance: inserting x preserves assignedDepth for every present ball.
Deterministic worst-case switching cost ≤ P.depth + 1 per insertion.
Every insertion displaces at most P.depth already-present balls.
Executing any operation sequence from State.empty maintains ValidState.
Every admissible step of P.step refines BallsToSlots.schemeSpec with switching cost
≤ P.depth + 1.
Insertion-time active-set upper bound on x's probe complexity: depends only on the hash
values on insert x S, independent of slot layout and of later operations not deleting x.
Under 1-wise independence, Pr[depthCap (h θ x) < i + 1] = 1 / 2 ^ P.capExp i.
Under (2m + 1)-wise independence (1 ≤ m), Pr[binLoad ≥ binSize] at depth i + 1 is at
most 2 * (3 * m * 2 ^ (2 * capExp i) / binSize (i + 1)) ^ m.
Under (2m + 1)-wise independence (1 ≤ m), Pr[binSaturated (st θ) (h θ x) (i + 1)] is at
most 2 * (3 * m * 2 ^ (2 * capExp i) / binSize (i + 1)) ^ m (giving 6 * 2 ^ (2 * capExp i) / binSize (i + 1) under 3-wise independence at m = 1).
Clamped kick depth ≤ k (0 if m₀ < 32, else min k (floorLogStar (2 ^ m₀) - 1)).
Canonical k-kick tree parameters ([BFCK+22], §3.1).
Rounds the paper's schedule s_d ≈ (log^(d) n)^6 and Pr[depthCap < i + 1] ≈ (log^(i+1) n)^(-2)
to powers of two via capExp i = 2 * iterLog (i + 2) (2 ^ m₀) and
binExp (i + 1) = 6 * iterLog (i + 2) (2 ^ m₀) (the +2 offset aligns 0-based Fin indexing with
Nat.iterLog, where iterLog 1 (2 ^ m₀) = m₀). Under 3-wise independence, the Chebyshev ratio
L^4 / L^6 = 1 / L^2 gives a failure bound
6 * 2 ^ (2 * capExp i) / 2 ^ (binExp (i + 1)) = 6 / 2 ^ (2 * iterLog (i + 2) (2 ^ m₀))
that decays geometrically against binExp i ≤ 12 * 2 ^ (iterLog (i + 2) (2 ^ m₀)), preserving the
O(max (Nat.iterLog (k + 1) (2 ^ m₀)) 1) bottom-level bound up to an O(1) geometric series.
Insert x under standardParams m₀ k.
Execute ops from empty state under standardParams m₀ k.
Worst-case switching cost of standardInsert m₀ k is at most k + 1.
Schedule inequality on standardParams m₀ k ([BFCK+22] §3.1,
printed p. 9 / PDF p. 10): effectiveDepth m₀ k - d ≤ binExp d.
Lemma 1 of [BFCK+22] (Section 3.1, printed pp. 10–11 / PDF pp. 11–12), proved under 3-wise independence.
Theorem 2 of [BFCK+22] (Section 3.1, printed p. 12 /
PDF p. 13), proved under 3-wise independence over arbitrary-length histories ops.
2m-th moment concentration across partitioned k-kick trees over arbitrary-length
operation histories, adapting [BFCK+22] Theorem 3 (Section 3.1,
printed p. 12 / PDF p. 13) with four explicit deviations: (a) the partition into disjoint-footprint
sub-histories R is assumed as an explicit hypothesis; (b) there are no special slots in this
pure primary-slot model; (c) the tail bound is polynomial (2m-th moment Markov) rather than an
exponential Chernoff bound; and (d) it assumes max 3 (2 * m * 4 ^ m₀)-wise
(max 3 (2 * m * 2 ^ (2 * m₀))-wise) independence rather than full independence.
(1 - δ)-w.h.p. multi-tree probe-complexity concentration for two-stage hash families
h : ι₁ × ι₂ → … whose top seed θ₁ is good outside an event of density ≤ δ.