Deterministic k-competitive lower bound for online paging #
This file formalizes Theorem 5 of
Sleator and Tarjan, Amortized Efficiency of List Update and Paging Rules, Section 4 ("Paging"),
p. 207 at equal online and offline fast-memory capacity (n_A = n_MIN = k,
0 < k): no deterministic online paging strategy can achieve a competitive ratio strictly smaller
than k (neither any rational ratio p / q < k via exists_ratio_violation_of_lt, nor any
integer factor c < k via not_isCompetitiveFrom_of_lt), regardless of the additive constant
b : Nat and even when restricted to starting from the empty cache ∅.
Source statement and proof structure #
In [ST85a], Section 4 ("Paging"), p. 207, Theorem 5 shows for fast-memory capacities
n_MIN ≤ n_A that against a universe of n_A + 1 pages, for any deterministic online paging
algorithm A there exist arbitrarily long request sequences on which A incurs at least
n_A / (n_A - n_MIN + 1) times as many faults (up to initial-cache warmup) as an offline algorithm
of capacity n_MIN. Specializing to n_A = n_MIN = k:
- Explicit computable adversary (
missingPage,adversaryRequests): Givenk + 1distinct pagespages : List α(pages.Nodup,pages.length = k + 1),A's current cachesholds at mostkpages, somissingPagecomputably selects the first page ofpagesabsent froms. SteppingDetStrategy.adaptiveRequestsfornsteps produces a concrete request listreqsof lengthndrawn frompageson whichAfaults at every single step (A.cost s₀ reqs = n). - Computable offline lookahead schedule (
offlineLookahead): On any request sequence drawn frompages, whenever the offline caches(s.card = k,s ⊆ pages.toFinset) misses a pagep,insert p s = pages.toFinsetcovers the entire(k + 1)-page universe. Lookahead overwindow := (rest.take (k - 1)).toFinset(window.card ≤ k - 1 < k) computably selects a resident pageevict ∈ s \ windowto evict. Becauses' = pages.toFinset.erase evictcontains every page inpagesother thanevict, the offline schedule serves the nextk - 1requests with zero faults, establishingk * optCost ≤ reqs.length + (k - 1) * (k - s₀.card) + (k - 1). - Impossibility for any ratio
p / q < k(p < k * q) and integerc < k: Settingn = k * (p * k + b + 1)forcesA.cost s₀ reqs = nwhilep * optCost + b < q * n(exists_ratio_violation_of_lt), refuting every rational competitive ratio< k(including ratios< 1atk = 1). Specializing toq = 1, p = crefutesIsCompetitiveFrom s₀ c b(includings₀ = ∅),IsCompetitive c b, andIsCompetitiveAnyInit c b. SpecializingpagestoList.finRange (k + 1)gives parameter-free corollaries onFin (k + 1).
Main definitions #
Cslib.DataStructure.Paging.missingPage: computable selection of a page inpagesoutsides.Cslib.DataStructure.Paging.adversaryRequests: explicit length-nadversarial request sequence against a deterministic online paging strategy.Cslib.DataStructure.Paging.offlineLookahead: computable(k - 1)-step lookahead offline schedule over a(k + 1)-page universe.
Main results #
cost_adversaryRequests:Afaults on every request ofadversaryRequests(cost = n).validSchedule_offlineLookahead,scheduleCost_offlineLookahead_bound:offlineLookaheadis a valid demand-paging schedule faulting at most once perkrequests after warmup.exists_witness_of_card_eq: from a full cache (s₀.card = k),Aincursk * mfaults whileofflineLookaheadincurs at mostmfaults.exists_ratio_violation_of_lt,fin_exists_ratio_violation_empty_of_lt: no deterministic online paging strategy over≥ k + 1pages achieves any rational competitive ratiop / q < k(p < k * q) with any additive constantb.not_isCompetitiveFrom_of_lt,not_isCompetitive_of_lt,not_isCompetitiveAnyInit_of_lt: integer-factor specializations refuting(c, b)-competitiveness forc < k.fin_not_isCompetitiveFrom_empty_of_lt,fin_not_isCompetitive_of_lt,fin_not_isCompetitiveAnyInit_of_lt: canonical lower bounds onFin (k + 1).
References #
Computable pigeonhole page selection and adversarial requests #
Return the first element of pages not belonging to s, falling back to p₀ if none exists.
When pages.Nodup and s.card < pages.length, the fallback is never reached.
Pigeonhole selection: if pages is duplicate-free and s has strictly fewer elements than
pages, then missingPage p₀ pages s belongs to pages and lies outside s.
Explicit adversarial request sequence of length n generated against deterministic online
paging strategy A from initial cache s₀, repeatedly requesting missingPage p₀ pages on A's
current cache.
Every request in adversaryRequests belongs to pages when pages.Nodup,
pages.length = k + 1, and s₀.card ≤ k.
Any deterministic online strategy A faults on every single request of adversaryRequests,
incurring exact cost n.
Computable (k - 1)-lookahead offline schedule over k + 1 pages #
Structural helper for offlineLookahead: when skip = n + 1, holds s across the next warm
request before resuming lookahead at skip = 0.
Computable offline schedule over a (k + 1)-page universe pages: hits keep s unchanged,
misses when s.card < k insert p, and misses when s.card = k evict a cached page absent from
the next k - 1 requests and hold the resulting cache across those k - 1 requests.
offlineLookahead produces a valid demand-paging schedule whenever 0 < k, s is a valid
subset of pages, and all requests come from pages.
Fault bound for offlineLookahead: k times the offline fault count is at most
reqs.length + (k - 1) * (k - s.card) + (k - 1).
Exact factor-k witness from a full initial cache s₀ (s₀.card = k, s₀ ⊆ pages.toFinset):
for any m : Nat and deterministic online strategy A, there is a request sequence of length
k * m and a valid offline schedule offStates from s₀ such that A.cost s₀ reqs = k * m
while (problem α k).scheduleCost s₀ reqs offStates ≤ m.
Rational-ratio deterministic k-competitive lower bound ([ST85a], Theorem 5 at
n_A = n_MIN = k): over any universe containing k + 1 distinct pages pages, from any valid
initial cache s₀ ⊆ pages.toFinset (including s₀ = ∅), for any p, q : Nat with p < k * q
(representing any rational competitive ratio p / q < k, including ratios < 1 at k = 1) and any
additive slack b : Nat, there exist a request sequence reqs and a valid offline schedule
offStates from s₀ such that p * scheduleCost s₀ reqs offStates + b < q * A.cost s₀ reqs.
Deterministic k-competitive lower bound from a fixed initial cache ([ST85a],
Theorem 5 at n_A = n_MIN = k): over any universe containing k + 1 distinct pages pages, from
any valid initial cache s₀ ⊆ pages.toFinset (including s₀ = ∅), no deterministic online paging
strategy is (c, b)-competitive for any integer c < k and b : Nat.
No deterministic online paging strategy over a universe containing k + 1 distinct pages is
(c, b)-competitive for any c < k and b : Nat.
No deterministic online paging strategy over a universe containing k + 1 distinct pages is
(c, b)-competitive across arbitrary initial caches for any c < k and b : Nat.
Over Fin (k + 1) (0 < k), from the empty initial cache ∅, no deterministic online paging
strategy achieves any rational competitive ratio p / q < k (p < k * q) with any additive slack
b : Nat.
Over Fin (k + 1) (0 < k), no deterministic online paging strategy is (c, b)-competitive
even from the empty initial cache ∅ when c < k.
Over Fin (k + 1) (0 < k), no deterministic online paging strategy is (c, b)-competitive
for any c < k and b : Nat.
Over Fin (k + 1) (0 < k), no deterministic online paging strategy is (c, b)-competitive
across arbitrary initial caches for any c < k and b : Nat.