Resizable Succinct Dynamic Dictionary on the Resizable Word RAM #
This module packages the resizable succinct dynamic dictionary supporting insert, delete, and
query over Cslib.WordRAM.Basis.exact and Cslib.WordRAM.Basis.standard on the word-granular
Resizable Word RAM (Cslib.WordRAM.Resizable), certified as reusable
Cslib.DataStructure.WordRAM.Resizable.Randomized.ObliviousSequenceImpl certificates
(obliviousImpl and obliviousImplStandard) for
(Cslib.DataStructure.Dictionary.Dynamic.spec U V U).toObliviousSequenceSpec (Dictionary.empty U).
Mathematical and algorithmic design #
This synthesis—combining expected amortized O(1) oblivious instructions, explicit stored 3-wise
independent quotient hashing, and strict 1 · OPT(U, V, n) single-tape resting and migration-peak
space on the Resizable Word RAM—is original to this formalization (deamortized high-probability
bounds remain open under #3167). It draws on the bucket partition and fingerprint-indexed buckets
of Bender, Farach-Colton, J. Kuszmaul, and W. Kuszmaul, SOSA 2024,
Sections 3–4 and 6, 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), 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), and word-granular frontier resizing
(.grow and .shrink) on the Resizable Word RAM
(Kuszmaul, Liang, and Zhou, SODA 2026, Section 5.1):
- Metadata-first compacted epoch layout and
U - 1/V - 1root header (Params,InEpoch):- When empty (
n_t = 0), the dictionary occupies only the 8-word persistent root header[U - 1, V - 1, w, keyBits U, valBits V, 0, 0, 0]at[base, base + 8)(initCoderuns ininitSteps = 68deterministic instructions). StoringU - 1andV - 1supports full-word value rangesV = 2 ^ wwithout overflowingw-bit words. - When active (
1 ≤ n_t ≤ N ≤ min (4 * n_t) U), metadata (HashParams,CompParams,ReducedKWiseseed and Four-Russians table,LocalMeta,GlobalMeta,TailToDense, andDenseToTail) sits at[base, base + offCompItems U w N)below a dense[0, n_t)stream of(quotient, value)pairs packed intocompactedItemWords U V w N n_twords, linked to physical slab/tail coordinates via the circular-window bijectiondenseOfCirc. Resting memory abovebasenever exceedsDynamic.succinctWords 1355 441 U V w n_twords (1 · OPT: at mostDynamic.optBits U V n_t + 1355 * n_t * Dynamic.logLogFactor n_t + 442 * wbits).
- When empty (
- Single-tape
1 · OPTcapacity-doubling and capacity-halving rebuilds (Migration):- An
insertatn_t = N < Uor adeleteat2 ≤ n_twith4 * (n_t - 1) < NtriggersmigrateActiveCode, which shifts the existing[0, n_t)packed item stream into a shared upper arena, initializes fresh metadata forN' = targetCap U n_t = min (2 * n_t) U, samples a fresh uniform 3-wise independent quotient-hash seed (QuotHashSeed U N') in place viaresampleHashCode(RInstr.rand), streams alln_titems left-to-right into[0, n_t)without holding two separate item arrays, and shrinks any trailing arena slack viashrinkCode. - Across every intermediate machine step—both in-epoch and during capacity migrations—the active
hardware frontier above
basenever exceedsDynamic.succinctWords 2699 888 U V w (max n_t n_{t+1})words (1 · OPT, never2 · OPT), sharpening toDynamic.succinctWords 1355 441 U V w (max n_t n_{t+1})words on non-migrating operations.
- An
- Self-contained hashing, oblivious operation model, and expected amortized
O(1)time:- No external hash or prime hypotheses: all quotient-hash seeds and Four-Russians carryless
multiplication tables (
RuntimeReducedKWise) are sampled and built internally by the program. - Oblivious operation sequence vs. adaptive
.growadversary: the operation sequenceops : List (Dynamic.Op U)is oblivious (fixed before initialization randomness, as specified byObliviousSequenceImpl). Independently, withinExecRCodeDist, every newly allocated word returned by.growis chosen by an adaptive demonic allocation adversary (RAdv/DemonicGrow), whichgrowZeroCodezeroes immediately upon allocation. - Expected amortized
O(1)vs. SOSA 2024 WHP: operations run inO(1)expected amortized Resizable Word RAM instructions (resizableCharge : ℕ, a parameter-free universal constant independent ofU,V,w,base, andops.length) via explicit two-stage 3-wise independent quotient hashing combined with slab-hysteresis and epoch-distance potentials (resizablePotential). By contrast, Bender, Farach-Colton, J. Kuszmaul, and W. Kuszmaul, SOSA 2024, Sections 5–6 prove deamortized with-high-probability bounds under idealized fully random hash functions.
- No external hash or prime hypotheses: all quotient-hash seeds and Four-Russians carryless
multiplication tables (
- Program specialization:
- The operational dispatcher
(subroutineCode U V w).code = resizableOpCodedoes not depend on(U, V, w, base). The initializerinitCode U V wdepends on(U, V, w)only through the five header constants written to[base, base + 5), and neither program inspects the ambient word width viaOp.width(¬(subroutineCode U V w).ReadsWidth). No theorem bounds static code size; all time bounds count executed Resizable Word RAM instructions.
- The operational dispatcher
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.initSteps,initCode: 68-instruction empty-dictionary initializer allocating and populating the 8-word root header at[base, base + 8).Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.subroutineCode,subroutineCodeStandard: relocatableResizable.SubroutineCodepackages overBasis.exactandBasis.standard.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.obliviousImpl,obliviousImplStandard:Resizable.Randomized.ObliviousSequenceImplcertificates overBasis.exactandBasis.standard.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.stepSuccinctPeakWords: pureDynamic.succinctWords 2699 888 U V w (max #(dom s) #(dom s'))1 · OPTpeak-word function.
Main results #
not_readsWidth_initCode,not_readsWidth_subroutineCode,not_readsWidth_subroutineCodeStandard: width-independence (¬ReadsWidth) ofinitCodeandsubroutineCode.initCode_demonicExec: deterministicRDemonicExecspecification forinitCode.epochSpaceBound_le_succinctWords,w_mul_epochSpaceBound_le_bits: resting1 · OPTword and bit footprint bounds (Dynamic.succinctWords 1355 441 U V w n_t) along any valid prefix.epochPeakSpaceBound_le_succinctWords,epochPeakSpaceBound_inEpoch_le_succinctWords,w_mul_epochPeakSpaceBound_le_bits: stepwise1 · OPTpeak word and bit bounds (Dynamic.succinctWords 2699 888 U V w (max n_t n_{t+1}),1355, 441in-epoch; never2 · OPT).obliviousPeakFits_of_succinctWords: dischargesObliviousPeakFitsfrom purePeakFitsHistoryoverstepSuccinctPeakWords.seq_expected_amortized,seq_expected_amortized_standard: end-to-endO(|ops| + 1)expected instruction time, resting and stepwise-peak1 · OPTspace, caller[0, base)preservation, and distributional correctness theorems overBasis.exactandBasis.standard.
References #
- Y. Arbitman, M. Naor, and G. Segev, Backyard Cuckoo Hashing: Constant Worst-Case Operations with a Succinct Representation, Claim 5.7
- M. A. Bender, M. Farach-Colton, J. Kuszmaul, W. Kuszmaul, and M. Liu, On the Optimal Time/Space Tradeoff for Hash Tables, Sections 5.2 and 6.1
- M. A. Bender, A. Conway, M. Farach-Colton, W. Kuszmaul, and G. Tagliavini, Iceberg Hashing: Optimizing Many Hash-Table Criteria at Once, Section 7
- M. A. Bender, M. Farach-Colton, J. Kuszmaul, and W. Kuszmaul, Modern Hashing Made Simple, Sections 3–4 and 6
- W. Kuszmaul, J. Liang, and R. Zhou, Succinct Dynamic Rank/Select: Bypassing the Tree-Structure Bottleneck, Section 5.1
Exact instruction budget (68 steps) for initCode U V w.
Initializer (RCode .exact rResize) growing and zeroing the 8-word root header at
[base, base + 8) (base = x₀.frontier), recording base in mBase, and writing
[U - 1, V - 1, w, keyBits U, valBits V, 0, 0, 0].
initCode U V w does not inspect the ambient word width via Op.width.
Deterministic RDemonicExec specification for initCode U V w: from any w-bounded state
x₀ at x₀.frontier = base with Fits w (base + 8), initCode U V w runs in initSteps = 68
instructions within peak frontier base + 8, establishes EpochRep for EpochState.empty U and
LatentSeed.empty U, and preserves caller memory [0, base).
Relocatable Resizable.SubroutineCode over Basis.exact for the resizable succinct dynamic
dictionary (k_init = 0 runtime register parameters; code = resizableOpCode).
Standard-basis (Basis.standard) relocatable SubroutineCode obtained via basis simulation.
subroutineCode U V w does not inspect the ambient word width (¬ReadsWidth).
subroutineCodeStandard U V w does not inspect the ambient word width (¬ReadsWidth).
Section 2: 1 · OPT Resting and Peak Space Bounds Along Operation Trajectories #
1 · OPT Resting Word-Footprint Bound (epochSpaceBound_le_succinctWords):
After any admissible prefix prefOps reaching n_t = #(Dictionary.dom s_t) keys, the resting
hardware frontier above base uses at most Dynamic.succinctWords 1355 441 U V w n_t words.
1 · OPT Resting Bit-Space Bound (w_mul_epochSpaceBound_le_bits):
After any admissible prefix prefOps reaching n_t active keys, w * epochSpaceBound U V w prefOps ≤ Dynamic.optBits U V n_t + 1355 * n_t * Dynamic.logLogFactor n_t + 442 * w bits.
Pure specification-level 1 · OPT stepwise peak-word bound
Dynamic.succinctWords 2699 888 U V w (max #(dom s) #(dom s')).
1 · OPT Stepwise Peak Word-Footprint Bound (epochPeakSpaceBound_le_succinctWords):
Across every admissible operation o after prefix prefOps (including single-tape capacity
doubling and halving rebuilds), the intermediate hardware frontier above base never exceeds
stepSuccinctPeakWords V w s_t o = Dynamic.succinctWords 2699 888 U V w (max n_t n_{t+1}) words
(never 2 · OPT).
In-Epoch 1 · OPT Peak Word-Footprint Bound
(epochPeakSpaceBound_inEpoch_le_succinctWords):
On any operation o that does not trigger active capacity migration, epochPeakSpaceBound is
bounded by Dynamic.succinctWords 1355 441 U V w (max n_t n_{t+1}) words.
1 · OPT Stepwise Peak Bit-Space Bound (w_mul_epochPeakSpaceBound_le_bits):
Across every admissible operation o after prefix prefOps, w * epochPeakSpaceBound U V w prefOps o ≤ Dynamic.optBits U V m + 2699 * m * Dynamic.logLogFactor m + 889 * w bits, where
m = max n_t n_{t+1} (never 2 · OPT).
Discharges ObliviousPeakFits from the pure 1 · OPT specification-level PeakFitsHistory
condition Fits w (base + Dynamic.succinctWords 2699 888 U V w (max n_t n_{t+1})) along ops.
Section 3: ObliviousSequenceImpl Certificates and End-to-End Headline Theorems #
Reusable Resizable.Randomized.ObliviousSequenceImpl certificate over Basis.exact for the
resizable succinct dynamic dictionary (initTime = 68, initPotential = 0, constant per-operation
charge resizableCharge, resting space epochSpaceBound, peak space epochPeakSpaceBound).
Standard-basis (Basis.standard) ObliviousSequenceImpl certificate obtained via basis
simulation (ObliviousSequenceImpl.toStandard).
End-to-End Expected-Amortized Resizable Succinct Dictionary (seq_expected_amortized):
For any key universe 0 < U < 2 ^ w, value range 0 < V ≤ 2 ^ w, word width w with Fits w 2,
caller base address base with Fits w (base + 8), initial w-bounded state x₀ at
x₀.frontier = base, and oblivious admissible operation sequence ops whose 1 · OPT stepwise
peak footprint stepSuccinctPeakWords (Dynamic.succinctWords 2699 888 U V w (max n_t n_{t+1}))
fits above base:
initCode U V wexecutes ininitSteps = 68instructions withinbase + 8words;subroutineCode U V w(code = resizableOpCode) executesopsunderExecStepswithin stepwise peak frontierbase + epochPeakSpaceBound ≤ base + stepSuccinctPeakWords;- Every final state
t ∈ ν_final.supportisw-bounded, rests at frontier≤ base + Dynamic.succinctWords 1355 441 U V w n_fin(1 · OPT), keepsregs mBase = base, preserves caller memory[0, base), and outputs exact canonical transcript((Dynamic.spec U V U).run (Dictionary.empty U) ops).2; - Total expected executed instructions satisfy
initSteps + T_ops ≤ initSteps + ops.length * resizableCharge(O(|ops| + 1)).
Standard-Basis End-to-End Expected-Amortized Resizable Succinct Dictionary
(seq_expected_amortized_standard):
Transports seq_expected_amortized to Basis.standard via obliviousImplStandard.