Algorithm Search⌘K

Proofs: Fredman-Saks lower bound

These are the human proofs of Fredman-Saks lower bound, at full length.

The chronogram bound for dynamic partial sums full

This proof shows: statement.

We prove Theorem 1. Fix a deterministic structure for partial sums over Z/2δ\mathbb{Z}/2^\delta on positions 1,…,n1, \ldots, n in the cell-probe model with bb-bit cells and at most 2b2^b cells, 4≤δ≤b4 \le \delta \le b, whose updates each probe at most tu≥1t_u \ge 1 cells. Let β\beta be the least power of 2 with β≥32tub/δ\beta \ge 32 t_u b/\delta; then β≥32\beta \ge 32, because b≥δb \ge \delta. Let n=βKn = \beta^K. The memory starts in a fixed state. A query sum(x) is a decision tree: the next cell it reads depends on the contents read so far.

The random input. The updates come in KK epochs, in the time order epoch KK, epoch K−1K - 1, ..., epoch 1. Epoch ii has βi\beta^i updates, at the positions pl(i)=l⋅n/βip^{(i)}_l = l \cdot n/\beta^i for l=1,…,βil = 1, \ldots, \beta^i, in increasing order of ll, with values Δl(i)\Delta^{(i)}_l. All values of all epochs are independent and uniform in Z/2δ\mathbb{Z}/2^\delta. After epoch 1, one query sum(x) is made, with xx uniform in {1,…,n}\{1, \ldots, n\} and independent of the values.

For a cell cc read by the query, its epoch is the epoch of the last update that wrote it, or none if no update wrote it. Let QiQ_i be the event that the query reads at least one cell whose epoch is ii.

Lemma. For each i∈{1,…,K}i \in \{1, \ldots, K\}, Pr⁡[Qi]≥12\Pr[Q_i] \ge \frac12.

Proof. Write x=pJ(i)+yx = p^{(i)}_J + y with J∈{0,…,βi−1}J \in \{0, \ldots, \beta^i - 1\} and y∈{1,…,n/βi}y \in \{1, \ldots, n/\beta^i\}, with p0(i)=0p^{(i)}_0 = 0. For xx uniform, JJ and yy are independent and uniform. It is enough to prove Pr⁡[Qi]≥12\Pr[Q_i] \ge \frac12 conditioned on any fixed yy and any fixed values VV of all epochs other than ii; then average. So fix yy and VV. The only randomness left is D=(Δ1(i),…,Δβi(i))D = (\Delta^{(i)}_1, \ldots, \Delta^{(i)}_{\beta^i}), uniform over 2δβi2^{\delta\beta^i} values, and JJ.

For j∈{0,…,βi−1}j \in \{0, \ldots, \beta^i - 1\} let xj=pj(i)+yx_j = p^{(i)}_j + y. The epoch-ii positions that are at most xjx_j are exactly p1(i),…,pj(i)p^{(i)}_1, \ldots, p^{(i)}_j, because pj+1(i)=pj(i)+n/βi≥xj+1p^{(i)}_{j+1} = p^{(i)}_j + n/\beta^i \ge x_j + 1 when y≤n/βi−1y \le n/\beta^i - 1, and for y=n/βiy = n/\beta^i, xj=pj+1(i)x_j = p^{(i)}_{j+1}, and then the positions are p1(i),…,pj+1(i)p^{(i)}_1, \ldots, p^{(i)}_{j+1}. In both cases the answer to sum(x_j) is Cj+Pj′C_j + P_{j'}, where CjC_j is the sum of the values of the other epochs at positions at most xjx_j, which depends only on VV, and Pj′=Δ1(i)+⋯+Δj′(i)P_{j'} = \Delta^{(i)}_1 + \cdots + \Delta^{(i)}_{j'} with j′=jj' = j or j′=j+1j' = j + 1, an index fixed by yy. As jj runs over 0,…,βi−10, \ldots, \beta^i - 1, the index j′j' runs over a set of βi\beta^i consecutive integers that contains all of 1,…,βi−11, \ldots, \beta^i - 1 and one of 00 or βi\beta^i.

Call jj good if sum(x_j), run after all updates, reads no cell of epoch ii, and bad otherwise. Let GG be the set of good jj, a function of DD.

The message. Given DD (and the fixed yy, VV), the encoder writes:

  1. the mask of GG, βi\beta^i bits;
  2. the number ss of cells written by the updates of epochs 1,…,i−11, \ldots, i - 1, in bb bits, and then, for each such cell, its address and its contents after the last update, 2b2b bits each;
  3. for each bad jj, in increasing order, the value Pj′P_{j'}, δ\delta bits each;
  4. if j′=j+1j' = j + 1 (the case y=n/βiy = n/\beta^i), also PβiP_{\beta^i} is covered; if j′=jj' = j, the value PβiP_{\beta^i} is not an answer, and the encoder adds it, δ\delta bits.

Each update probes at most tut_u cells, so s≤tu∑j=1i−1βj≤2tuβi−1s \le t_u \sum_{j=1}^{i-1} \beta^j \le 2 t_u \beta^{i-1}, because β≥2\beta \ge 2. A cell address fits in bb bits, because the model has at most 2b2^b cells, and so does ss. So part 2 has at most b+4tubβi−1b + 4 t_u b\beta^{i-1} bits.

The message is prefix-free. The decoder reads the mask, which has a fixed length; then ss; then 2bs2bs bits; then δ\delta bits for each bad jj, a number it knows from the mask; then δ\delta more bits or none, which it knows from yy. So no message is a proper prefix of another one.

Decoding. The decoder knows yy and VV. It runs the structure on the updates of epochs K,…,i+1K, \ldots, i + 1, which it knows, and gets the memory MM just before epoch ii. For a good jj, it simulates sum(x_j): when the query reads a cell, it takes the contents from part 2 if the cell is listed there, and from MM otherwise. Let us check that this gives the true contents of every cell that the true query reads. A cell listed in part 2 was last written in epochs 1,…,i−11, \ldots, i - 1, and part 2 gives its final contents. A cell not listed was not written after epoch ii; since jj is good, the cell was not last written in epoch ii either; so its contents are those of MM. By induction over the reads of the decision tree, the simulation follows the true query and returns the true answer Cj+Pj′C_j + P_{j'}. The decoder knows CjC_j, so it gets Pj′P_{j'}. For bad jj, part 3 gives Pj′P_{j'}. With part 4, the decoder knows P0=0P_0 = 0 and P1,…,PβiP_1, \ldots, P_{\beta^i}, so it knows Δl(i)=Pl−Pl−1\Delta^{(i)}_l = P_l - P_{l-1} for all ll, which is DD.

The decoder does not know which simulations would be correct without the mask; that is why the mask is sent.

Counting. The map from DD to the message is injective and prefix-free, and DD is uniform over 2δβi2^{\delta\beta^i} values. By the source coding theorem (Kraft's inequality), the expected length of the message is at least δβi\delta\beta^i. Let B=βi−∣G∣B = \beta^i - |G| be the number of bad jj. Then

δβi≤βi+b+4tubβi−1+δ E[B]+δ.\delta\beta^i \le \beta^i + b + 4 t_u b \beta^{i-1} + \delta\,\mathbb{E}[B] + \delta.

Divide by δβi\delta\beta^i:

E[B]βi≥1−1δ−b+δδβi−4tubδβ.\frac{\mathbb{E}[B]}{\beta^i} \ge 1 - \frac1\delta - \frac{b + \delta}{\delta\beta^i} - \frac{4 t_u b}{\delta\beta}.

Now 1/δ≤1/41/\delta \le 1/4. Next 4tub/(δβ)≤4/32=1/84 t_u b/(\delta\beta) \le 4/32 = 1/8 by the choice of β\beta. And (b+δ)/(δβi)≤2b/(δβ)≤2/(32tu)≤1/16(b + \delta)/(\delta\beta^i) \le 2b/(\delta\beta) \le 2/(32 t_u) \le 1/16. So E[B]/βi≥1−14−18−116>12\mathbb{E}[B]/\beta^i \ge 1 - \frac14 - \frac18 - \frac1{16} > \frac12.

For fixed yy, the event QiQ_i happens exactly when JJ is bad, and JJ is uniform over {0,…,βi−1}\{0, \ldots, \beta^i - 1\} and independent of DD, so Pr⁡[Qi∣y,V]=E[B]/βi>12\Pr[Q_i \mid y, V] = \mathbb{E}[B]/\beta^i > \frac12. Averaging over yy and VV proves the lemma. □\square

The theorem. Each cell that the query reads has at most one epoch, so the number of cells it reads is at least the number of ii for which QiQ_i happens. By linearity of expectation and the lemma, the expected number of cells read is at least ∑i=1KPr⁡[Qi]≥K/2\sum_{i=1}^K \Pr[Q_i] \ge K/2. The expectation is over the values and over xx. So some fixed choice of the values gives a sequence of updates after which the average over xx of the cost of sum(x) is at least K/2=lg⁡n/(2lg⁡β)K/2 = \lg n/(2\lg\beta). Finally β<64tub/δ\beta < 64 t_u b/\delta, so lg⁡β<6+lg⁡(tub/δ)\lg\beta < 6 + \lg(t_u b/\delta). ■\blacksquare

Back to Fredman-Saks lower bound