Motivation
A system that processes a stream of tasks can often be configured in several ways, and the configuration affects both the cost of the current task and the cost of switching before the next one: paging schemes, replicated files, server placements. When the future is unknown, the natural worst-case yardstick is competitive analysis, introduced by Sleator and Tarjan for list update and paging (Sleator–Tarjan 1985): an on-line strategy is compared with the optimal strategy that knows the whole input in advance.
Borodin, Linial and Saks (J. ACM 1992; conference version STOC 1987) proposed metrical task systems as a single model containing all such problems, and determined the exact deterministic competitive ratio of every such system. Their theorem is the starting point of the on-line-algorithms literature on metrical task systems, the k-server problem (Manasse–McGeoch–Sleator 1990) and their randomized variants.
Timeline. 1985: Sleator and Tarjan introduce competitive analysis for paging and list update. 1987: Borodin, Linial and Saks prove w(S,d)=2n−1 for every n-state metrical task system (journal version 1992). 1990: Manasse, McGeoch and Sleator extend the task-system model to restricted task sets and pose the k-server conjecture. The randomized ratio of the uniform task system, bounded in the same paper between H(n) and 2H(n), is the subject of the companion mission.
Setting
A task system (S,d) has a finite set S of n states and a transition-cost matrix d with d(i,i)=0, d(i,j)>0 for i=j, and the triangle inequality d(i,j)+d(j,k)≥d(i,k). It is metrical if also d(i,j)=d(j,i).
A task T is a vector of nonnegative processing costs T(s), s∈S. Given a task sequence T=T1⋯Tm and an initial state s0, a schedule is a map σ:{0,…,m}→S with σ(0)=s0; task Ti is processed in state σ(i), and the cost is
c(T;σ)=i=1∑md(σ(i−1),σ(i))+i=1∑mTi(σ(i)).
The off-line optimum c0(T) is the minimum over all schedules. An on-line algorithm A chooses σ(i) knowing only s0 and T1,…,Ti; its cost is cA(T). For w>0, A is w-competitive if there is a constant Kw with cA(T)≤wc0(T)+Kw for every finite task sequence. The competitive ratio of A is w(A)=inf{w:A is w-competitive}, and the competitive ratio of the task system is w(S,d)=infAw(A).
For the upper bound the paper also uses continuous-time schedules, in which task Ti occupies the interval [i,i+1) and the scheduler may change state at any real time, paying ∫ii+1Ti(σ(t))dt for processing. For a general (possibly asymmetric) matrix d, the cycle offset ratio ψ(d) is the maximum over closed walks s0,…,sk=s0 of ∑id(si−1,si)/∑id(si,si−1); it equals 1 when d is symmetric.
Formalization targets
Goal: Theorem 1.1
For every metrical task system (S,d) with n states,
w(S,d)=2n−1.
The value depends on n only, not on the distances.
Milestones
- Lemma 2.1. If c0(T1⋯Tm)→∞ along an infinite task sequence T, then w(A)≥wT(A)=limsupmcA/c0.
- Theorem 2.2. Against the cruel taskmaster M(ε), which charges ε in the state the algorithm currently occupies,
wT(ε)(A)≥1+ε/mini=jd(i,j)2n−1.
- Lemma 3.1. Every on-line continuous-time algorithm is matched, on every task sequence, by an on-line discrete-time algorithm.
- Lemmas 6.3, 6.4, 6.2. Properties of the functions fk that drive the algorithm Ad∗: fk(s)−fk(s′)≤d(s′,s); the identity 2∑s=skfk(s)+fk(sk)=Ck−1+∑i≤kd(si,si−1); and fk≤hk, the off-line cost at the k-th transition time.
- Theorem 6.1 (= Theorem 1.2). For every task system, symmetric or not, Ad∗ has competitive ratio at most (2n−1)ψ(d).
Significance
The theorem settles the deterministic competitive ratio of the whole class of metrical task systems: the lower bound says that no deterministic on-line strategy can beat 2n−1 on any metric, and the upper bound supplies one algorithm that achieves it on every metric. For asymmetric costs the same algorithm gives (2n−1)ψ(d). The 2n−1 lower bound is also the benchmark against which restricted models, such as paging and the k-server problem, measure their improvements, and the randomized question it leaves open drove much of the later work on metrical task systems.
The result was proved in 1987 and is standard; to the best of our knowledge no machine-checked proof exists. A formal development would provide a reusable model of deterministic on-line algorithms and competitiveness (on-line maps from task prefixes, additive competitiveness, infima over algorithms), an adversary construction by mutual recursion with an arbitrary algorithm, and an exact treatment of continuous-time schedules with piecewise-constant task costs. These pieces are reusable for other competitive-analysis results.
Difficulty
The lower bound is not a single bad input: the adversary is built from the algorithm it plays against, so the hard task sequence exists only as a recursion interleaved with the algorithm's choices, and the bound must hold for every deterministic on-line map, including ones that behave erratically. Obtaining the exact constant 2n−1, rather than some Ω(n) bound, requires a sharp estimate of the off-line cost of that sequence.
The upper bound needs an algorithm defined in continuous time, whose transition times are determined by accumulated processing costs; the budgets can be zero, so transitions can be instantaneous, and a formal cost must remain well defined before one knows that only finitely many transitions occur. Relating the off-line cost function at those times to the recursively defined fk (Lemma 6.2) requires reasoning about all continuous-time off-line schedules. Finally, the goal combines both directions through infima over all on-line algorithms, and the discretization of Lemma 3.1 must be composed with the continuous-time algorithm.
Formalization scope
States form a finite type S (Fintype, DecidableEq, Nonempty); the goal is stated for all n≥1, where n=1 gives w(S,d)=1. Task costs are finite nonnegative reals; the paper also allows +∞ entries, which are excluded (this affects neither bound). A task sequence is T : Fin m → S → ℝ, with T i the paper's Ti+1, and a schedule is σ : Fin (m+1) → S. An on-line algorithm is a map sending (s0,[T1,…,Ti]) to σ(i), so on-line behaviour is built into the type. Competitiveness is written additively, cA≤wc0+K, with K independent of the task sequence and of s0.
The competitive ratio competitiveRatio d is the real infimum of the set of all w for which some on-line algorithm is w-competitive. It is not defined as an infimum of per-algorithm real infima: a non-competitive algorithm has WA=∅, whose real infimum is 0, and that would drag w(S,d) to 0 for every system. Since the goal's value 2n−1 is at least 1 while the empty set's real infimum is 0, the goal cannot hold vacuously.
Continuous-time algorithms are given as lists of (state,length) pieces per unit interval; processing integrals are exact finite sums. The algorithm Ad∗ minimizes over states different from the current one, as its proof requires (the printed rule ranges over all states, and would stall); ties are left arbitrary. Its budgets may be 0, its entry times are Option ℝ, and its cost is a sum in [0,∞], so that Theorem 6.1 itself asserts that only finitely many transitions occur. The ratio ψ(d) excludes closed walks that never move, and Theorems 2.2 and 6.1 require n≥2, where mini=jd(i,j) and ψ(d) are defined. Lemma 3.1 is stated comparing A with A′ (the printed statement says "as well as A").
A complete development needs: the discrete model and off-line optimum (finite minimum over schedules), limsup arguments in EReal, continuous-time schedules with piecewise-constant costs, and the recursion defining Ad∗. Proofs of any milestone, including the purely combinatorial Lemmas 6.3 and 6.4, are welcome, as is a formal composition of Lemma 3.1 with Theorem 6.1.
Selected references
- A. Borodin, N. Linial, M. E. Saks, An optimal on-line algorithm for metrical task system, Journal of the ACM 39(4):745–763, 1992. https://doi.org/10.1145/146585.146588
- D. D. Sleator, R. E. Tarjan, Amortized efficiency of list update and paging rules, Communications of the ACM 28(2):202–208, 1985. https://doi.org/10.1145/2786.2793
- M. S. Manasse, L. A. McGeoch, D. D. Sleator, Competitive algorithms for server problems, Journal of Algorithms 11(2):208–230, 1990. https://doi.org/10.1016/0196-6774(90)90003-W