Theorem 7.1 (upper bound) — an expected -competitive randomized algorithm for the uniform task system
ProvedMetricalTaskSystem.Randomized.uniform_expCompetitive_two_harmonicLet be the uniform task system on states (every transition costs ) and let
There is a randomized on-line algorithm and a constant such that, for every initial state and every finite sequence of nonnegative tasks,
This is the upper half of Theorem 7.1: it shows , a logarithmic ratio, whereas every deterministic on-line algorithm has competitive ratio at least .
Formalization Note The statement is the existence of an expected -competitive algorithm, not the inequality alone, which would hold trivially if no algorithm were competitive (the real infimum of the empty set is ). Tasks are finite and nonnegative.
import Mathlib import Definitions.Def_MetricalTaskSystem_Randomized_Model import Definitions.Def_MetricalTaskSystem_Randomized_RandomizedAlgorithm
namespace MetricalTaskSystem.Randomized
/-- **Theorem 7.1, upper bound** (Borodin–Linial–Saks 1992, p. 759). On the uniform task system
with `n = |S|` states there is a randomized on-line algorithm that is expected
`2H(n)`-competitive, where `H(n) = 1 + 1/2 + ⋯ + 1/n`. -/
theorem uniform_expCompetitive_two_harmonic {S : Type} [Fintype S] [DecidableEq S]
[Nonempty S] :
∃ R : RandomizedOnlineAlgorithm S,
IsExpCompetitive (uniformD (S := S)) R (2 * (harmonic (Fintype.card S) : ℝ)) := by sorry
end MetricalTaskSystem.Randomized
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a finite, nonempty type with decidable equality and . Let .
The statement asserts that there exists a randomized on-line algorithm that is expected -competitive for the uniform cost . Here maps an initial state, the tasks seen so far and the states visited so far to a probability distribution on .
Unfolded, this means , and there exist and a real constant such that, for every initial state , every and every task sequence :
In this inequality:
- ;
- is unless , and otherwise is the product over of the probability that , given , and , picks .
Degenerate cases.
- : this is automatic, because gives .
- : both sides reduce to .
- : every schedule is constant. The expected cost and the off-line minimum both equal , which is . The claim then holds with any and .
- Algorithm and constant: no restriction is placed on how is constructed; it need only exist. The constant is not specified.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.