Fredman–Saks lower bound for dynamic prefix parity #
Dynamic prefix parity maintains an array A : Fin n → ZMod 2, initially zero, under the operations
update i b (set A i to b) and query i (return A 0 + ⋯ + A i). This is the partial-sums
problem of [PD06], §2.1, over ZMod 2. Section 3.1 (p. 5) of that paper credits
Fredman and Saks [FS89] with the first dynamic cell-probe lower bounds for this problem,
via the chronogram method, including the trade-off t_q = Ω(lg n / (lg b + lg t_u)) for word size
b, update time t_u and query time t_q.
This file proves that trade-off for deterministic step-indexed cell-probe schemes
D : Cslib.CellProbe.IndexedScheme (Op n) Result S w, with worst-case depth bounds t_u on updates
and t_q on queries. If S ≤ 2 ^ w, then log_β n ≤ 128 t_q + 1 for
β = max 4 (8 t_u (2 w + 1)), i.e. t_q = Ω(log n / log (t_u (w + 1))).
Proof outline #
The hard instance has L epochs. Epoch j < L writes β ^ (L - j) bits X j k at positions
k β ^ j L + j, and query q < β ^ L at position q L + L - 1 then answers
Σ_j (X j 0 + ⋯ + X j (q / β ^ j)) (prefixParity_hardUpdates). Fix every epoch except j.
- A query whose probes avoid the cells last probed by epoch
j(Cslib.CellProbe.IndexedScheme.lastCells) answers identically on the overlay: the memory before epochj, overwritten with the final contents of the cells probed by later epochs. - The later epochs perform at most
t_u · 2 β ^ (L - j - 1)probes, so the overlay ranges over at most(S 2 ^ w + 1) ^ (2 t_u β ^ (L - j - 1))memories. This is at most2 ^ (β ^ (L - j) / 4)when(S 2 ^ w + 1) ^ (8 t_u) ≤ 2 ^ β. - If two values of epoch
jeach leave fewer thanβ ^ L / 32queries bad (meeting the last-probed cells), and they have the same overlay, then their prefix-sum vectors differ in at mostβ ^ (L - j) / 16places. A volume bound then shows that at most half of the2 ^ β ^ (L - j)values are of this kind, so on averageβ ^ L / 64queries are bad for epochj. - The last-probed sets of distinct epochs are disjoint, so a query that is bad for
eepochs makes at leasteprobes. Summing over theLepochs, the average query makes at leastL / 64probes.
Scope #
- The schemes are deterministic and the update bound
t_uis worst-case. Amortized update times and Las Vegas randomization, which [PD06], Theorem 2.1, handles for its strongerΩ(lg n)trade-offs, are not covered. - Updates assign a bit, as in [PD06], §2.1. The scheme sees the global step index
(
IndexedScheme), so the bound also applies to time-invariant schemes viaCslib.CellProbe.Scheme.toIndexed. - The constants
64,128and8 t_u (2 w + 1)are not optimized. The hard-instance formscard_mul_le_sum_probes,exists_le_mul_probesandle_mul_of_answersQueriesneed only(S 2 ^ w + 1) ^ (8 t_u) ≤ 2 ^ β, with no relation betweenSandw.
Main definitions #
Cslib.DataStructure.PrefixSums.CellProbe.Op,Cslib.DataStructure.PrefixSums.CellProbe.Result,Cslib.DataStructure.PrefixSums.CellProbe.applyOp,Cslib.DataStructure.PrefixSums.CellProbe.arrayOf,Cslib.DataStructure.PrefixSums.CellProbe.prefixParity: dynamic prefix parity.Cslib.DataStructure.PrefixSums.CellProbe.AnswersQueries: correctness of a cell-probe scheme.Cslib.DataStructure.PrefixSums.CellProbe.hardPos,Cslib.DataStructure.PrefixSums.CellProbe.hardQueryPos: the positions of the hard instance.Cslib.DataStructure.PrefixSums.CellProbe.HardInput,Cslib.DataStructure.PrefixSums.CellProbe.hardSeg,Cslib.DataStructure.PrefixSums.CellProbe.hardUpdates,Cslib.DataStructure.PrefixSums.CellProbe.hardTime,Cslib.DataStructure.PrefixSums.CellProbe.hardQueryIdx: the inputs, epochs, update sequence, its length, and the queries of the hard instance.Cslib.DataStructure.PrefixSums.CellProbe.hardAnswer: the answer formula on the hard instance.
Main results #
Cslib.DataStructure.PrefixSums.CellProbe.prefixParity_hardUpdates: the answers on the hard instance.Cslib.DataStructure.PrefixSums.CellProbe.card_mul_le_sum_probes: on the hard distribution, the average query makes at leastL / 64probes.Cslib.DataStructure.PrefixSums.CellProbe.exists_le_mul_probes: some hard input and query forceL / 64probes.Cslib.DataStructure.PrefixSums.CellProbe.le_mul_of_answersQueries:L ≤ 64 t_q.Cslib.DataStructure.PrefixSums.CellProbe.log_le_of_answersQueries: the Fredman–Saks boundlog_β n ≤ 128 t_q + 1forβ = max 4 (8 t_u (2 w + 1))andS ≤ 2 ^ w.
References #
Dynamic prefix parity #
The prefix parity as a sum over the natural numbers k ≤ i.
A bit vector is determined by its prefix parities.
A cell-probe scheme answers prefix-parity queries correctly: after any operation sequence
ops, a query at i returns the prefix parity of the current array.
If every update of ops to bit i writes v, then after ops bit i is v if some update
wrote it, and unchanged otherwise.
The hard instance #
Epoch j < L writes β ^ (L - j) bits X j k at positions hardPos β L j k = k β ^ j L + j,
and the query q < β ^ L asks for the prefix parity up to hardQueryPos L q = q L + (L - 1).
Bit k of epoch j lies in the prefix of query q iff k β ^ j ≤ q, so the answer of query
q is the sum over epochs of the prefix parities of X j up to q / β ^ j.
Position of bit k of epoch j.
Position queried by query q.
Inputs of the hard instance: epoch j < L carries β ^ (L - j) bits.
Arithmetic #
The number of updates of the hard sequence.
The first L' epochs together have Σ_{k < L'} |hardSeg k| operations.
Changing the bits of epoch j changes only the j-th summand of the answer.
The encoding argument #
The lower bound #
Fredman–Saks lower bound, average form. Let D be a deterministic step-indexed cell-probe
scheme for dynamic prefix parity on n bits with S cells of w bits, every update of which has
depth at most tu. If L β ^ L ≤ n, β ≥ 4 and (S 2 ^ w + 1) ^ (8 tu) ≤ 2 ^ β, then over a
uniformly random input X of the hard instance and a uniformly random query q < β ^ L, the query
after the hard update sequence of X makes at least L / 64 probes on average.
Fredman–Saks lower bound, hard-instance form. Under the hypotheses of
card_mul_le_sum_probes, for some input X of the hard instance and some query q, the query
after the hard update sequence of X makes at least L / 64 probes.
Fredman–Saks lower bound, depth form. Under the hypotheses of exists_le_mul_probes, if
every query has depth at most tq then L ≤ 64 tq.
Fredman–Saks lower bound [FS89] for dynamic prefix parity, in the form
t_q = Ω(log n / log (t_u (w + 1))): a deterministic step-indexed cell-probe scheme with
S ≤ 2 ^ w cells of w bits whose updates have depth at most t_u and whose queries have depth at
most t_q satisfies log_β n ≤ 128 t_q + 1 for β = max 4 (8 t_u (2 w + 1)).