Randomized online strategies against an oblivious adversary #
This file adds randomized strategies to the online model of
CslibFrontier.DataStructure.Online.Basic, for the oblivious adversary, which fixes the whole
request sequence before the strategy's coins are tossed. Against such an adversary a randomized
online strategy can be viewed as a probability distribution over deterministic online strategies:
drawing all coins up front and then running the resulting deterministic strategy gives the same
costs as tossing coins online, because the requests do not depend on the outcomes. This is the
standard mixed-strategy view of randomized online algorithms against oblivious adversaries; see
Borodin and El-Yaniv, Online Computation and Competitive Analysis for a
textbook treatment.
A RandStrategy is a PMF, so it covers only discrete (countably supported) mixtures of
deterministic strategies. Nothing is lost for ski rental
(CslibFrontier.DataStructure.Online.SkiRental), where every deterministic strategy acts as a
rent-then-buy threshold in ℕ ∪ {∞}, so every randomized algorithm induces a countably supported
law. Algorithms that toss fresh independent
coins at unboundedly many steps, such as the marking algorithm for paging, generally induce a
non-atomic law on DetStrategy P. They need a behavioural or bounded-horizon variant of this
model.
A RandStrategy P is a PMF (DetStrategy P). Its expected cost on a request sequence is
∑' A, μ A * A.cost s₀ reqs in ℝ≥0∞ (RandStrategy.expectedCost), and (c, b)-competitiveness
(RandStrategy.IsCompetitive) asks for E[ALG] ≤ c * OPT + b against every valid offline schedule,
with c b : ℝ≥0∞ so that irrational ratios such as e / (e - 1) can be stated. Point masses
recover the deterministic notions (RandStrategy.expectedCost_pure,
RandStrategy.isCompetitive_pure_iff).
Lower bounds use the easy direction of Yao's principle [Yao77]
(RandStrategy.exists_le_mul_expectedCost): if, under a distribution ν on request sequences,
every deterministic strategy has mean cost at least the mean of a benchmark g, then every
randomized strategy has a single request sequence on which its expected cost is at least g. The
general averaging lemmas of CslibFrontier.Probability.Minimax bound some outcome above by a
mean;
this one needs a sequence on which the expected cost is at least the benchmark, which is why it is
proved here.
Adaptive adversaries, which choose each request after seeing the strategy's earlier actions, are not modelled.
Main definitions #
Cslib.DataStructure.Online.RandStrategy: randomized online strategies, as distributions over deterministic strategies.RandStrategy.expectedCost: expected online cost on a fixed request sequence.RandStrategy.IsCompetitiveFrom,RandStrategy.IsCompetitive,RandStrategy.IsCompetitiveAnyInit: competitiveness in expectation against an oblivious adversary, withℝ≥0∞ratio and additive constant.
Main results #
RandStrategy.expectedCost_pure,RandStrategy.isCompetitive_pure_iff,RandStrategy.isCompetitiveAnyInit_pure_iff: deterministic strategies as point masses.RandStrategy.expectedCost_map,RandStrategy.expectedCost_bind: expected cost of a strategy drawn through a parametrization or mixture.RandStrategy.exists_le_mul_expectedCost: the easy direction of Yao's principle for online lower bounds.
References #
A randomized online strategy for P against an oblivious adversary: a discrete (countably
supported) probability distribution over deterministic online strategies, all of whose coins are
drawn before the first request.
Expected online cost of the randomized strategy μ from initial configuration s₀ on the
request sequence reqs, which the oblivious adversary fixes before the coins are drawn.
μ is (c, b)-competitive from s₀ against an oblivious adversary when its expected cost on
every request sequence is at most c times any valid offline schedule's cost from s₀, plus
b.
μ is (c, b)-competitive against an oblivious adversary when it is (c, b)-competitive from
every admissible initial state.
μ is (c, b)-competitive across arbitrary initial states when its expected cost from any
admissible s₀ is at most c times any valid offline schedule's cost from any admissible s_off,
plus b.
Competitiveness across arbitrary initial states implies same-initial-state competitiveness.
A deterministic strategy, as a point mass, has its deterministic cost as expected cost.
For natural coefficients, the point mass at A is (c, b)-competitive exactly when A is.
For natural coefficients, the point mass at A is (c, b)-competitive across arbitrary
initial states exactly when A is.
Monotonicity of IsCompetitive in the ratio and the additive constant.
Expected cost of a strategy f a drawn by first sampling the parameter a from ν.
Expected cost of a mixture ν.bind f of randomized strategies.
The easy direction of Yao's principle [Yao77] for online lower bounds against an
oblivious adversary. Let ν be a distribution on indices i, each naming a request sequence
reqs i with a benchmark g i (typically a multiple of the offline optimum on reqs i). If the
ν-mean of g is finite and at most b times the ν-mean cost of every deterministic
strategy, then every randomized strategy μ has an index i that ν can produce with
g i ≤ b * E_μ[cost on reqs i].