Documentation

CslibFrontier.DataStructure.ListUpdate.Comb

The COMB algorithm is 8/5-competitive for list update #

This file formalizes the randomized COMB list-update algorithm of Albers, von Stengel, and Werchner, A Combined BIT and TIMESTAMP Algorithm for the List Update Problem (see also Borodin and El-Yaniv, Online Computation and Competitive Analysis, Chapter 1) in ListUpdate.problem α and Online.RandStrategy.

Algorithm #

Before the request sequence begins, COMB draws an index uniformly from Fin 5: with probability 4 / 5 it runs BIT (CslibFrontier.DataStructure.ListUpdate.bit), and with probability 1 / 5 it runs Timestamp(0) (CslibFrontier.DataStructure.ListUpdate.timestamp0).

Proof outline #

The proof combines BIT and Timestamp(0) on every initially ordered pair (x, y) ∈ orderedPairs m₀ through the shared 6-state automaton PairPhase (xx, yx, xxy, yyx, xy, yy) from CslibFrontier.DataStructure.ListUpdate.Timestamp:

  1. Exact 4-bit law of BIT on pairs (BitPairRel): On any pair (x, y) initially ordered x before y, the relative order of x and y in bitDet is an exact Boolean function PairPhase.bitInv ph (b x) (b y) of the current phase ph and the current bits (b x, b y) (BitPairRel.step). Averaging over all 2^n bit vectors via four_mul_sum_bit_pair gives the exact 4-sum partial cost PairPhase.bitCost.
  2. Simultaneous 12-state pairwise potential (combPairPotential): For every (ph, optInv) in PairPhase × Bool, the integer potential (0, 8), (1, 5), (3, 3), (3, 3), (5, 1), (8, 0) satisfies bitCost + tsCost + ΔΦ ≤ 8 * pairOffCost on all 60 single-step transitions (including offline swaps on requests outside {x, y}).
  3. Telescoping and competitiveness: Summing over orderedPairs m₀ and dividing by 5 * 2^n yields E[COMB] + (3 / 5) * |reqs| ≤ (8 / 5) * scheduleCost + (8 / 5) * inversions m₀ s₀ (expectedCost_comb_add_le), establishing (8 / 5, 0)-competitiveness from a common initial arrangement (comb_isCompetitive) and (8 / 5, (4 / 5) * n * (n - 1))-competitiveness across arbitrary initial arrangements (comb_isCompetitiveAnyInit).
  4. Separation from deterministic strategies: By not_det_isCompetitive_of_lt_rat, no deterministic strategy is (8 / 5, b)-competitive for any additive constant b once Fintype.card α ≥ 5 (not_det_isCompetitive_eight_fifths).

The primary journal text of [AvSW95] was not inspected firsthand; no internal theorem or section numbers are claimed.

Main definitions #

Main results #

References #

The randomized COMB strategy ([AvSW95]): with probability 4 / 5 run bit α, and with probability 1 / 5 run timestamp0 α.

theorem Cslib.DataStructure.ListUpdate.expectedCost_comb_eq {α : Type} [DecidableEq α] [Fintype α] (s₀ reqs : List α) :
(comb α).expectedCost s₀ reqs = 4 / 5 * (bit α).expectedCost s₀ reqs + 1 / 5 * ↑((timestamp0 α).cost s₀ reqs)

Expected cost of comb α is (4 / 5) * E[BIT] + (1 / 5) * cost(TS(0)).

Exact 4-bit pairwise law of BIT #

12-state pairwise potential for COMB #

Telescoping bound and 8/5-competitiveness #

theorem Cslib.DataStructure.ListUpdate.expectedCost_comb_add_le {α : Type} [DecidableEq α] [Fintype α] {m₀ s₀ : List α} (hm₀ : IsArrangement m₀) (hs₀ : IsArrangement s₀) {reqs : List α} {states : List (List α)} (hv : (problem α).ValidSchedule s₀ reqs states) :
(comb α).expectedCost m₀ reqs + 3 / 5 * ↑reqs.length ≤ 8 / 5 * ↑((problem α).scheduleCost s₀ reqs states) + 8 / 5 * ↑(inversions m₀ s₀)

Expected-cost COMB bound ([AvSW95]): for every valid offline schedule states serving reqs from s₀, COMB started from m₀ satisfies E[COMB] + (3 / 5) * |reqs| ≤ (8 / 5) * scheduleCost + (8 / 5) * inversions m₀ s₀.

COMB is (8 / 5, 0)-competitive against an oblivious adversary from a common initial arrangement ([AvSW95]).

COMB is (8 / 5, (4 / 5) * n * (n - 1))-competitive across arbitrary initial arrangements, where n = Fintype.card α.

For Fintype.card α ≥ 5, no deterministic strategy is (8 / 5, b)-competitive for any additive constant b, whereas comb α is (8 / 5, 0)-competitive (comb_isCompetitive).