Randomized Cell-Probe Trees, Schemes, and Zero-Error Yao Averaging #
This file extends Cslib.CellProbe ([Mil99]) with internal-coin randomized cell-probe trees
(RandProbeTree S w α := ProbOracleComp (@ProbeOp.Result S w) α), randomized cell-probe schemes
(Randomized.Scheme), and the averaging (coin-fixing) argument, the easy direction of Yao's
principle [Yao77], for zero-error (Las Vegas) randomized schemes.
Private coin draws (unifSpec) incur 0 cell probes, while each cell read or write incurs 1
probe; in Randomized.Scheme, init : PMF (Mem cells w) is an uncharged initial-memory
distribution (which operations can inspect only by probing cells). Because every ProbeOp.Result q
is finite (Fin (2 ^ w) or PUnit), ProbOracleComp.coinLaw and ProbOracleComp.fixCoins
represent any RandProbeTree as a finite mixture of deterministic ProbeTrees
(RandProbeTree.run_eq_coinLaw_bind_fixCoins).
Averaging over coin-fixed deterministic schemes via
Cslib.RandomizedCost.exists_mem_support_of_coinFixing and
Cslib.RandomizedCost.exists_mem_support_tsum_mul_le_of_coinFixing (the easy direction of Yao's
principle [Yao77]) converts any zero-error (Las Vegas) randomized scheme P (hcorr requires
every supported transcript on correctSeqs to satisfy Good, so bounded-error Monte Carlo schemes
and adaptive sequence adversaries are out of scope) into a deterministic scheme preserving
correctness across correctSeqs while incurring at most P's expected probes under a fixed
oblivious sequence distribution hardDist:
exists_det_indexedScheme_le_expectedSeqProbesfixes independent per-step coins and therefore returns anIndexedScheme(the time-aware relaxation of the cell-probe model whosestepreceives the global step indext : ℕas a free clock outside cell memory); deterministic lower bounds paired with it must hold against step-indexedIndexedSchemes.exists_det_scheme_le_expectedSeqProbesis the random-initial-memory / coin-free-step specialization (IsCoinFree), returning a time-invariantCellProbe.Schemewithout needingopsAlphabetorhorizon.
Main definitions #
Cslib.CellProbe.RandProbeTree,Cslib.CellProbe.RandProbeTree.read,Cslib.CellProbe.RandProbeTree.write,Cslib.CellProbe.RandProbeTree.sample,Cslib.CellProbe.RandProbeTree.ofProbeTree,Cslib.CellProbe.RandProbeTree.run,Cslib.CellProbe.RandProbeTree.expectedProbes,Cslib.CellProbe.RandProbeTree.IsCoinFree,Cslib.CellProbe.RandProbeTree.toProbeTree,Cslib.CellProbe.RandProbeTree.padCells: adaptive cell-probe trees with private finite-uniform coins, joint(output, postMem, probes)semantics,ℝ≥0∞expected probes, coin-free projection, and cell padding.Cslib.CellProbe.Randomized.Scheme,Cslib.CellProbe.Randomized.Scheme.ofDeterministic,Cslib.CellProbe.Randomized.Scheme.runFrom,Cslib.CellProbe.Randomized.Scheme.runSeq,Cslib.CellProbe.Randomized.Scheme.expectedProbesFrom,Cslib.CellProbe.Randomized.Scheme.expectedSeqProbes,Cslib.CellProbe.Randomized.Scheme.padCells: randomized cell-probe schemes with initial memory distributioninit : PMF (Mem cells w)and per-operationRandProbeTrees.Cslib.CellProbe.Randomized.Scheme.fixIndexedScheme,Cslib.CellProbe.Randomized.Scheme.indexedSchemeLaw,Cslib.CellProbe.Randomized.Scheme.schemeLaw: coin-fixed deterministic scheme laws over a finitehorizonand finite operation alphabetopsAlphabet : Finset Op(or coin-free steps).
Main results #
Cslib.CellProbe.RandProbeTree.run_eq_coinLaw_bind_fixCoins,Cslib.CellProbe.RandProbeTree.expectedProbes_eq_coinLaw_tsum: fixing private coins of aRandProbeTreereproduces its exact joint(output, postMem, probes)law and expected probes.Cslib.CellProbe.Randomized.Scheme.runSeq_eq_indexedSchemeLaw_bind,Cslib.CellProbe.Randomized.Scheme.expectedSeqProbes_eq_indexedSchemeLaw_tsum: multi-step coin-fixing equivalence overFin horizon × ↥opsAlphabet.Cslib.CellProbe.Randomized.Scheme.exists_det_indexedScheme_le_expectedSeqProbes,Cslib.CellProbe.Randomized.Scheme.exists_det_indexedScheme_tsum_mul_le,Cslib.CellProbe.Randomized.Scheme.exists_det_indexedScheme_le_expectedSeqProbes_of_fintype: averaging (coin-fixing) argument, the easy direction of Yao's principle [Yao77], for zero-error schemes against oblivious operation sequences, producing a step-indexedIndexedSchemein the coin-law support satisfyingGood ops (D_det.runSeq ops).1for allops ∈ correctSeqsand incurring at mostP's expected probes overhardDist.Cslib.CellProbe.Randomized.Scheme.exists_det_scheme_le_expectedSeqProbes: random-initial-memory / coin-free-step specialization producing a time-invariant deterministicCellProbe.Schemewithout needingopsAlphabetorhorizon(where randomness lives only ininitand operations observe it only by probing cells).
References #
Internal-coin randomized cell-probe trees #
Adaptive cell-probe tree on S cells of w-bit words with private finite-uniform coin draws
(unifSpec), defined as ProbOracleComp (@ProbeOp.Result S w) α.
Read cell i : Fin S (1 probe).
Embed a closed ProbComp sampler (0 probes).
Embed a deterministic ProbeTree into RandProbeTree with zero coin draws.
Joint distribution of ((result, postMem), probeCount) executed from pre-memory m, charging
0 probes for private coin samples (.inl n) and 1 probe per cell read/write (.inr q).
Expected number of cell probes executed from pre-memory m, valued in ℝ≥0∞.
Coin-fixing, coin-free projection, and cell padding for RandProbeTree #
Fixing private coins ω ← ProbOracleComp.coinLaw t reproduces the exact joint
((result, postMem), probes) distribution of t.run m.
Expected probe count of t from m equals the coinLaw t-average of
ProbeTree.probes (fixCoins t ω) m.
Predicate that a RandProbeTree makes no private coin draws (Sum.inl).
Project a coin-free RandProbeTree to a deterministic ProbeTree.
Lift a RandProbeTree S w α to S' cells (S ≤ S') via Fin.castLE.
Randomized cell-probe schemes and Yao averaging for zero-error schemes #
Randomized cell-probe scheme with cells cells of w-bit words, consisting of an initial
memory distribution init : PMF (Mem cells w) (0 probes) and per-operation internal-coin probe
trees step : (o : Op) → RandProbeTree cells w (Result o).
Initial cell memory distribution (
0probes; persistent state lives incellswords).- step (o : Op) : RandProbeTree cells w (Result o)
Adaptive randomized cell-probe decision tree executed for each operation
o : Op.
Embed a deterministic CellProbe.Scheme as a Randomized.Scheme.
Joint distribution of ((transcript, postMem), probeCount) executed across ops starting from
pre-memory m.
Pad a Randomized.Scheme from cells cells to cells' cells (cells ≤ cells').
Fix an initial memory m₀ and an array Ω of step-and-operation-indexed private coin trees
over Fin horizon × ↥opsAlphabet into a deterministic IndexedScheme (returning pure default
outside horizon or outside opsAlphabet).
Product distribution over deterministic IndexedSchemes obtained by sampling m₀ ← P.init
and independent private coins ProbOracleComp.coinLaw (P.step o) for each (t, o) in
Fin horizon × ↥opsAlphabet.
Sampling D ← P.indexedSchemeLaw horizon opsAlphabet and running D deterministically on any
sequence ops of length ≤ horizon over opsAlphabet reproduces the exact (transcript, probes)
distribution P.runSeq ops.
Expected sequence probes of P on ops equals the indexedSchemeLaw-average of
D.seqProbes ops whenever ops.length ≤ horizon and ∀ o ∈ ops, o ∈ opsAlphabet.
Averaging (coin-fixing) argument, the easy direction of Yao's principle [Yao77], for
zero-error schemes (IndexedScheme over explicit finite opsAlphabet): Suppose
opsAlphabet : Finset Op is a finite set of admissible operations, correctSeqs is any set of
oblivious operation sequences of length ≤ horizon over opsAlphabet on which every supported
transcript of P.runSeq ops satisfies Good ops (zero-error / Las Vegas correctness;
bounded-error Monte Carlo schemes are out of scope), and hardDist : PMF (List Op) is any fixed
sequence distribution supported on sequences of length ≤ horizon over opsAlphabet.
Then there exists a single deterministic D_det : IndexedScheme Op Result cells w (in the
time-aware step-indexed relaxation) in the support of P.indexedSchemeLaw horizon opsAlphabet that
satisfies Good ops (D_det.runSeq ops).1 for every ops ∈ correctSeqs and incurs expected probes
over hardDist at most that of P.
Uniform-budget Yao averaging (easy direction) for zero-error schemes against oblivious
operation sequences (Cslib.RandomizedCost.exists_mem_support_tsum_mul_le_of_coinFixing): if
P.expectedSeqProbes ops ≤ ε for every ops ∈ hardDist.support, then some
D_det ∈ (P.indexedSchemeLaw horizon opsAlphabet).support satisfies Good on correctSeqs and
has average probe count ≤ ε under hardDist.
[Fintype Op] convenience wrapper for exists_det_indexedScheme_le_expectedSeqProbes,
instantiating opsAlphabet := Finset.univ.
Distribution over time-invariant deterministic CellProbe.Schemes induced by P.init when
every per-operation probe tree P.step o makes no private coin draws (IsCoinFree).
Random-initial-memory / coin-free-step averaging argument [Yao77] (CellProbe.Scheme):
when randomness lives only in initial memory P.init and per-operation trees draw no private coins
(∀ o, (P.step o).IsCoinFree, so operations observe P.init only by probing cells), zero-error
averaging against oblivious operation sequences yields a time-invariant deterministic
D_det : CellProbe.Scheme Op Result cells w in (P.schemeLaw hstep).support preserving Good on
all ops ∈ correctSeqs and incurring at most P's expected probes over hardDist — without
requiring [DecidableEq Op], opsAlphabet, or horizon (bounded-error Monte Carlo schemes are
out of scope).