Multi-Tier Facility Layer for the k-Kick Tree Dynamic Dictionary #
This module formalizes the multi-tier facility architecture and cubby layout of the STOC 2022
k-kick tree dynamic dictionary of Bender, Farach-Colton, J. Kuszmaul, W. Kuszmaul, and Liu
([BFCK+22], arXiv:2111.00602v2, Section 5.2, pp. 30–32):
- Multi-tier full cubbies (Section 5.2, pp. 30–32): $j$-tiered 100% full cubbies with tier
capacities $r_j$ and target ratios $t_j \cdot r_j = r_{j+1}$ for $0 \le j < k_{\text{eff}}$,
with capacity arithmetic behind tier merging
merge_tier_length(§5.2, p. 31; compare Lemma 19, p. 29 for $O(K)$ cubby construction). - Single tail cubby and saturation architecture: all non-tail cubbies are strictly 100% full
(zero empty slots, statically enforced via
FullCubby), while a single partially filled base tail cubby of capacity $r_1$ (TailCubby) absorbs insertions, with full-tail promotion steppromoteFullTailopening a fresh empty tail. - Non-hash tail replacement on deletion (Section 5.2, p. 31): deletion from a full cubby is
refilled by popping an element from the tail cubby (in the full algorithm, drawn with fresh
per-operation non-hash randomness independent of hash seed $\theta$), maintaining full-cubby
100% saturation with item count conservation theorem
totalItems_tailReplace. Note: deletion directly from the tail cubby and full tail elimination (when the tail is empty) are deferred to subsequent stages. - Tracked extensions: dynamic resizing, deamortization, physical Word-RAM slab directories
(
SlabDirectory), background fallback healing (FallbackHealer), and remaining §5.2 distribution invariants ($t_j / 2 \le \text{count} \le 3 t_j$, $j$-creation/destruction rebuilds) are tracked in issue #5186.
Source attribution #
- [BFCK+22] (
arXiv:2111.00602v2):- Section 5.1 (printed pp. 27–29 / PDF pp. 28–30): fixed-capacity cubbies, local query routers, and Lemma 19 linear-time cubby construction.
- Section 5.2 (printed pp. 30–32 / PDF pp. 31–33): dynamic resizing, distribution invariant with target ratios $t_j = (\log^{(j)} n)^2 / (\log^{(j+1)} n)^2$, saturation invariant, non-hash randomness for tail replacement, and Theorem 20 dynamic dictionary.
Main definitions #
FacilityConfig: multi-tier capacity configuration with target ratios $t_j \cdot r_j = r_{j+1}$.FacilityConfig.r1: base capacity of tier 0 (and tail cubby).FullCubby: 100% full cubby of exact capacity $r_j$.TailCubby: partially filled base tail cubby of capacity at most $r_1$.Facility: multi-tier facility state consisting of full cubbies and a single tail cubby.Facility.totalItems: total count of items across all full cubbies and the tail cubby.Facility.insertIntoTail: insert an item into the tail cubby.Facility.promoteFullTail: promote a full tail cubby to a tier-0 full cubby.Facility.tailReplace: replace an item in a full cubby with an element popped from the tail cubby.
Main results #
totalItems_insertIntoTail: item count conservation under tail insertion.totalItems_promoteFullTail: item count conservation under full tail promotion.merge_tier_length: capacity arithmetic for tier merging ($\sum_{i=1}^{t_j} r_j = r_{j+1}$).totalItems_tailReplace: item count conservation under tail replacement on deletion.
References #
- [M. A. Bender, M. Farach-Colton, J. Kuszmaul, W. Kuszmaul, M. Liu, Dynamic Dictionaries with Worst-Case Optimal Operations and Space] [BFCK+22], arXiv:2111.00602.
1. Multi-Tier Facility Configuration #
Multi-tier facility configuration parameters. Tiers are 0-indexed $0 \le j \le k_{\text{eff}}$
(corresponding to paper tiers $1 \le j \le k_{\text{eff}} + 1$, with index $j$ corresponding to
paper tier $j + 1$), where index 0 has base capacity r1 := r 0 and adjacent tiers satisfy
$t_j \cdot r_j = r_{j+1}$.
- kEff : ℕ
Largest tier index $k_{\text{eff}} \ge 1$ (providing $k_{\text{eff}} + 1$ total tiers).
Effective depth positivity.
Capacity of a tier-$j$ cubby $r_j > 0$ for $0 \le j \le k_{\text{eff}}$.
Tier capacity is positive.
Target ratio $t_j$ of tier-$j$ cubbies forming a tier-$(j+1)$ cubby.
Target ratio equation $t_j \cdot r_j = r_{j+1}$.
Base tier-1 capacity $r_1$.
2. Cubby Representation #
Full cubby storing exactly cfg.r tier elements (100% full, zero empty slots).
Tier index $0 \le \text{tier} \le k_{\text{eff}}$.
- items : List α
Stored items.
Instances For
Initial empty tail cubby.
3. Facility State and Item Count Conservation Theorems #
Pure multi-tier facility state.
Statically enforces the saturation invariant: all cubbies in fullCubbies are strictly 100%
full (FullCubby), and tail is a valid bounded tail cubby (TailCubby).
Ordered list of 100% full cubbies (across all tiers).
- tail : TailCubby cfg α
Single designated tail cubby of capacity $r_1$.
Instances For
Total number of items stored across the entire facility.
Insert an item into the facility tail.
Inserting into tail increments the total item count by 1.
Promote a saturated full tail cubby to a tier-0 full cubby and open a fresh empty tail.
Promoting a full tail preserves the total item count.
Capacity arithmetic behind tier merging in the $j$-destruction rebuild (arXiv:2111.00602
§5.2, p. 31; compare Lemma 19, p. 29 for linear-time cubby construction): merging t_j full
cubbies of tier j forms a valid full cubby of tier j + 1. Full dynamic ratio maintenance
and deamortization across dictionary operations are tracked in issue #5186.
4. Non-Hash Tail Replacement on Deletion (arXiv:2111.00602 §5.2, p. 31) #
Non-hash tail replacement: when deleting element at slotIdx from full cubby cubbyIdx,
refill the hole by popping a caller-selected item at randIdx from the tail cubby, keeping
the full cubby 100% full.
Returns none if cubbyIdx is out of bounds, slotIdx is out of bounds, or randIdx is out
of bounds (e.g. if the tail cubby is empty).
Note: deletion directly from the tail cubby and full tail elimination (underflow handling)
are deferred to subsequent stages.
Tail replacement decrements the total item count by 1 (the deleted element is removed, and the hole in the full cubby is filled from the tail).