Fixed-Capacity Succinct Dynamic Dictionary with Deletions on the Word-RAM #
This module packages the fixed-capacity succinct dynamic dictionary with deletions (insert,
delete, query) over Cslib.WordRAM.Basis.exact and Cslib.WordRAM.Basis.standard as a
reusable Cslib.DataStructure.WordRAM.Randomized.StateTransitionImpl certificate
(Cslib.DataStructure.Dictionary.WordRAM.Succinct.impl and implStandard) for
Cslib.DataStructure.Dictionary.Dynamic.spec U V n_max.
Mathematical and algorithmic design #
This implementation combines the bucket partition and fingerprint-indexed buckets of
Bender, Farach-Colton, J. Kuszmaul, and W. Kuszmaul, SOSA 2024,
Sections 3–4 with one-round Feistel quotienting
(Arbitman, Naor, and Segev, FOCS 2010, Claim 5.7;
Bender, Conway, Farach-Colton, Kuszmaul, and Tagliavini, J. ACM 2023, Section 7, arXiv
pp. 31–33). It uses fixed-width full slabs with a
shared tail pool (Bender, Farach-Colton, J. Kuszmaul, W. Kuszmaul, and M. Liu, STOC 2022,
Sections 5.2 and 6.1, Lemma 24) together with this
formalization's own micro-bucket chains and slab-hysteresis potential.
Unlike Bender, Farach-Colton, J. Kuszmaul, and W. Kuszmaul, SOSA
2024, the capacity n_max is fixed without table resizing.
Hashing uses explicit two-stage 3-wise independent quotient hashing rather than fully random hash
functions (SOSA 2024 Section 2.1). Operations here run in O(1) expected amortized time on
oblivious operation sequences fixed before initialization. By contrast, SOSA 2024 Lemma 4.3 gives
worst-case O(1) queries and deletions and expected O(1) insertions at fixed capacity. SOSA 2024
Sections 5–6 prove with-high-probability bounds and add resizing.
- One-round Feistel quotienting (
FeistelQuotient): splits each keyu : Fin Uinto abucketBits n_max-bit low part and aquotientBits U n_max-bit quotientq, storing onlyqand reconstructinguinjectively within each bucketb = (h₁(q) mod 2 ^ b_bits) ⊕ (u mod 2 ^ b_bits). Storingn_maxquotients ofquotientBits U n_maxbits andn_maxvalues ofvalBits Vbits uses at mostDynamic.optBits U V n_max + 5 * n_max * Dynamic.logLogFactor n_maxbits (quotient_val_bits_le_optBits). We assumen_max ≤ Ubecause keys are distinct elements ofFin U(so at mostUdistinct keys can coexist, andU.choose n_max = 0whenn_max > U). - Slab + tail slot store (
SuccinctSlotInv,SuccinctSlabOps,SuccinctTailOps): stores up ton_maxactive items in a singlen_max-slot array (slotOf), packing full slabs ofslabSize n_max = 2 ^ slabBits n_max((slabScale n_max) ^ 2when0 < bucketBits n_max, else1) items from the low end and individual tail items from the high end undergm 0 * slabSize n_max + gm 1 ≤ n_max(SlotStoreInv.multi_total_le). Per-bucket item counts depend only on the current live set, while the split between full slabs and tail items depends on history.bucketPotentialpays for the lazy promotions and demotions. - Two-stage universe-reduced 3-wise quotient hashing (
ReducedKWise): maps quotients into(bucket, local micro-bucket)pairs usingO(1) + o(n_max) / wwords of seed and bit-packed Four-Russians carryless multiplication tables (hashSpace U w n_max), without anyU ≤ poly(n_max)restriction. Memory.Prog+realizerefinement (SuccinctProg..SuccinctDispatch): all deterministic bucket, slab, tail, and micro-chain operations are written as parameter-freeMemory.Progsubroutines compiled toWordRAM.Codeviarealize. They receive the 36 static parameters in registers loaded by the 36-instructionloadParamsCodeprefix.
Cost model and parameter dependence #
- Program specialization: the five generic
Memory.Progsubroutines do not depend on(U, V, w, n_max). The full programsubroutineCode U V w n_maxdepends on(U, V, w, n_max)only through thespaceconstant inallocSpan, the 36-instructionloadParamsCodeprefix, and the hash code. It does not depend onbase(passed infrontierRegat initialization). No theorem bounds static code size. All time bounds (initSteps,chargeVal,charge) count executed Word-RAM instructions. - Initialization (
initSteps):initSteps U n_max ≤ 31 * n_max + 1091 ≤ 1091 * (n_max + 1)(initSteps_le,initSteps_le_mul). Initialization builds the Four-Russians table and draws one uniform quotient-hash seed (seedSlack = 1,initPotential = 0) that operations keep unchanged. - Space (
space):space U V w n_max ≤ Dynamic.succinctWords 81 213 U V w n_maxwords (space_le_succinctWords) for every0 < wandn_max ≤ UwithFits w U(U < 2 ^ w). - Constant operation charge (
seq_expected_amortized): at theMemory.Proglevel (SuccinctHash),queryWithHashProg_dict_spec,insertWithHashProg_dict_spec, anddeleteWithHashProg_dict_specprove per-seed amortizedmemoryCostbounds of26 + 8 * probeExcess,184 + 8 * probeExcess, and270 + 8 * probeExcesswith potential66 * slotPotential(unchanged onquery). In turn,tsum_uniform_probeExcess_reducedPolyHash_le_fivebounds expectedprobeExcessby5. Because the five genericMemory.Progsubroutines (extractQuotGenProg,queryWithHashGenProg,insertWithHashGenProg,deletePrepWithHashGenProg,deleteFinishWithHashGenProg) do not depend on(U, V, w, n_max), both the register budgetrSuccinctand the operation chargechargeVal = 313 * opFactor + 284725are parameter-freeO(1)constants across all(U, V, w, n_max),base, andops.length.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.Succinct.impl,Cslib.DataStructure.Dictionary.WordRAM.Succinct.implStandard:Randomized.StateTransitionImplcertificates overBasis.exactandBasis.standard.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.Succinct.initTime_impl_le:(impl hw hnU hU hV hfit).initTime ≤ initSteps U n_max + 1andinitSteps U n_max + 1 ≤ 31 * n_max + 1092.Cslib.DataStructure.Dictionary.WordRAM.Succinct.seq_expected_amortized: end-to-end multi-operation distributional correctness and constant expected amortized execution certificate.
References #
- Y. Arbitman, M. Naor, G. Segev, Backyard Cuckoo Hashing: Constant Worst-Case Operations with a Succinct Representation
- M. A. Bender, M. Farach-Colton, J. Kuszmaul, W. Kuszmaul, M. Liu, On the Optimal Time/Space Tradeoff for Hash Tables
- M. A. Bender, A. Conway, M. Farach-Colton, W. Kuszmaul, G. Tagliavini, Iceberg Hashing: Optimizing Many Hash-Table Criteria at Once
- M. A. Bender, M. Farach-Colton, J. Kuszmaul, W. Kuszmaul, Modern Hashing Made Simple
Reusable Randomized.StateTransitionImpl certificate over Basis.exact for the fixed-capacity
succinct dynamic dictionary (Dynamic.spec U V n_max).
Reusable Randomized.StateTransitionImpl certificate over Basis.standard for the
fixed-capacity succinct dynamic dictionary (Dynamic.spec U V n_max).
The total initialization time (impl hw hnU hU hV hfit).initTime is bounded by
initSteps U n_max + 1 ≤ 31 * n_max + 1092.
Headline multi-operation theorem (seq_expected_amortized):
Starting from zeroed memory on [base, base + space U V w n_max), fresh initialization followed by
any valid operation sequence ops : List (Dynamic.Op U) (ValidHistory (Dictionary.empty U) ops)
preserves Rep across ops with expected total instruction count at most
initTime + ops.length * chargeVal for the parameter-free O(1) operation charge chargeVal
(amortized across ops). Companion theorems space_le_succinctWords and
initTime_impl_le / initSteps_le establish the succinct space and linear initialization
bounds.