Proposition 5 — first-come, first-served has competitive ratio r
ProvedRobustBooking.TwoFare.fcfs_ratioConsider the continuous two-fare booking problem with capacity and fares . The first-come, first-served policy (accept every request in full while capacity remains) has competitive ratio exactly the discount ratio:
Since for , FCFS is strictly worse than the best nested policy.
import Mathlib import Definitions.Def_RobustBooking_TwoFare_Booking import Definitions.Def_RobustBooking_TwoFare_BookingPolicies
namespace RobustBooking.TwoFare
/-- Proposition 5 (Ball–Queyranne 2009, p. 955). For the continuous two-fare booking problem with
fares `f₁ > f₂ > 0` and capacity `n > 0`, first-come first-served has competitive ratio exactly
`r = f₂ / f₁`. -/
theorem fcfs_ratio (f₁ f₂ n : ℝ) (hf₂ : 0 < f₂) (hf₁₂ : f₂ < f₁) (hn : 0 < n) :
competitiveRatio f₁ f₂ n fcfs = f₂ / f₁ := by sorry
end RobustBooking.TwoFare
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Hypotheses. Let be real numbers with
The policy. The statement is about the first-come first-served policy. For every history and every current request it proposes , the full requested quantity.
Running the policy. Run it with capacity on a finite instance , where each is high or low and each is real. Requests are processed in order with . The accepted amounts are
So requests are accepted in full until the remaining capacity is too small. Then one request is partially accepted, and all later requests get .
Revenues. The online revenue is
The optimal offline revenue is the supremum of over real vectors with and .
Claim. The theorem asserts the exact equality
It is not claimed that the infimum is attained.
Degenerate cases. The hypotheses rule out each default value:
- , so the division is genuine.
- With positive fares and , exactly the non-empty instances have . The empty instance is excluded, and the set of ratios is non-empty.
- All ratios are , so the infimum is genuine rather than the default value .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.