Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2, p. 12 — the uniform algorithm GGG is β\betaβ-competitive against any oblivious adversary in the mates game

Proved
OnlineRandomization.Tightness.oblivious_competitive

by mikedeng1 · Oct 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-analysisonline-algorithmsp2o-batch-pfp1bp2o-gran-per-chapterp2o-plan-paperp2o-v1randomized-algorithms

Let t≥1t \ge 1t≥1 be an integer and let m,M≥1m, M \ge 1m,M≥1. In the mates game with parameters t,m,Mt, m, Mt,m,M, let GGG be the randomized algorithm that draws its first answer a1a_1a1​ uniformly from the 2t2t2t answers, and put

β=(2t−2)m+M+12t.\beta = \frac{(2t-2)m + M + 1}{2t}.β=2t(2t−2)m+M+1​.

Then GGG is β\betaβ-competitive against any oblivious adversary: for every request sequence r‾\underline rr​,

Ea1[fn(r‾,G(r‾))]≤β⋅c(r‾),\mathbb E_{a_1}\bigl[f_n(\underline r, G(\underline r))\bigr] \le \beta \cdot c(\underline r),Ea1​​[fn​(r​,G(r​))]≤β⋅c(r​),

where c(r‾)c(\underline r)c(r​) is the off-line optimum.

For n≥2n \ge 2n≥2, whatever r2r_2r2​ is, GGG pays 111 with probability 12t\frac1{2t}2t1​, MMM with probability 12t\frac1{2t}2t1​ and mmm with probability 2t−22t\frac{2t-2}{2t}2t2t−2​, so its expected cost is β\betaβ, while the optimum is 111. This is the first half of the first bullet of the tightness claim.

Formalization Note. Competitiveness is with the ratio function x↦βxx \mapsto \beta xx↦βx (no additive constant). The hypotheses m,M≥1m, M \ge 1m,M≥1 are what the page's "the oblivious adversary's cost is at least 1" needs. The game uses the disclosed pin f0=0f_0 = 0f0​=0, f1≡1f_1 \equiv 1f1​≡1; the case n=1n = 1n=1 then needs β≥1\beta \ge 1β≥1, which follows from m,M≥1m, M \ge 1m,M≥1. The page prints the probability of cost mmm as 2t−2t\frac{2t-2}{t}t2t−2​; the expected cost it then computes uses 2t−22t\frac{2t-2}{2t}2t2t−2​, which is the correct value.

Preamble
import Mathlib
import Definitions.Def_OnlineRandomization_Tightness_Model
import Definitions.Def_OnlineRandomization_Tightness_MatesGame
Formal statement
namespace OnlineRandomization.Tightness

/-- Manuscript p. 12: if `m, M ≥ 1` and `β = ((2t − 2)m + M + 1)/(2t)`, the uniform algorithm
`G` is `β`-competitive (ratio `x ↦ β·x`) against any oblivious adversary in the mates game. -/
theorem oblivious_competitive (t : ℕ) [NeZero t] (m M β : ℝ) (hm : 1 ≤ m) (hM : 1 ≤ M)
    (hβ : β = ((2 * (t : ℝ) - 2) * m + M + 1) / (2 * (t : ℝ))) :
    IsCompetitiveObl (matesGame t m M) (fun x => β * x) (unifAlg t) := by sorry

end OnlineRandomization.Tightness
Source
Ben-David, Borodin, Karp, Tardos and Wigderson, On the power of randomization in on-line algorithms, Algorithmica 11 (1994), manuscript p. 12, §2 ("To see that G is β-competitive against any oblivious adversary ...")
Human review
  • Endorsed by Shuze Chen · Oct 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 4, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me