On the Power of Randomization in On-Line Algorithms 4: Restarting a Bounded-Cost Algorithm Is (1+ε)α-Competitive in Games of Finite DiameterResearch Paper
Motivation
Competitive analysis compares an online algorithm, which must answer each request before seeing the next, with the optimal off-line solution of the same request sequence. Ben-David, Borodin, Karp, Tardos and Wigderson (Algorithmica 11, 1994) set up a general framework, request-answer games, in which paging, the -server problem and metrical task systems are all instances, and used it to compare the power of randomized algorithms against several kinds of adversaries.
One of their results (Theorem 2.1) says that if a randomized algorithm is -competitive against every adaptive off-line adversary, then some deterministic algorithm is already -competitive. The argument is a game-theoretic existence proof: it says nothing about how to compute the deterministic algorithm. Section 4 of the paper, "A Constructive Version of Theorem 2.1", answers the natural follow-up question for a large class of games: under monotonicity, locality and a finite diameter, a deterministic algorithm that loses only a factor can be assembled from a finite object.
Setting
A request-answer game has a request set , a finite answer set , and cost functions , ; is the cost of the empty play. The off-line optimum of a request sequence of length is . A deterministic online algorithm answers the -th request by a function of the requests so far; its cost on is . It is -competitive if for every .
The game is monotone if always, and local if for every only finitely many request sequences have . The discrepancy of two request-answer sequences is
and the diameter is the supremum of over all pairs.
For a real , the set consists of the request sequences all of whose proper prefixes have off-line optimum at most . Given a deterministic algorithm , the restart algorithm simulates and, as soon as the request sequence leaves , starts over as if it had received no previous requests. This cuts every request sequence into segments , each a longest prefix in of what remains.
Formalization targets
Goal: Theorem 4.1 through its construction
Let be monotone and local, with finite nonempty and , , and diameter at most . Let with , , and
Then is finite; the restart algorithm depends on only through its values on ; and for every with on ,
Milestones (proof of Theorem 4.1, pp. 17–18)
- is finite.
- The restart rule produces the greedy decomposition into longest prefixes in .
- The restart algorithm answers .
- for .
- .
- .
Significance
Theorem 2.1 shows that, against adaptive off-line adversaries, randomization gives no advantage, but only as an existence statement. Theorem 4.1 turns it into a recipe: a deterministic algorithm need only be good on the finite set , which can be prepared in advance, and restarting extends it to all inputs at a loss of . The paper illustrates this with -server problems on finite graphs, where is a finite table and each step of the resulting algorithm costs one dynamic-programming evaluation of an off-line optimum.
The restart construction is of independent use: it is a general way to turn a guarantee on bounded-cost inputs into a guarantee on all inputs when the cost is nearly additive over concatenation.
To our knowledge neither the abstract request-answer game model nor this theorem has a machine-checked proof. The mission produces a formal model of request-answer games with the monotonicity, locality and diameter conditions, the restart algorithm as an explicit definition, and the full chain of inequalities of the proof.
Difficulty
The individual inequalities are elementary; the work lies in the bookkeeping of the construction. The algorithm is defined online, one request at a time, while the analysis is phrased through the decomposition of the whole sequence. Relating the two requires showing that the online rule produces exactly the decomposition into longest prefixes in , and that the answers produced on each segment are those of run from scratch, so that the cost of the whole play can be compared with the costs on the segments. The constants must close exactly: with the additive losses at the cuts, on both the algorithm's side and the optimum's side, must be absorbed by the factor , and they do so only for ratios .
A tempting shortcut is to conclude Theorem 4.1 from Theorem 2.1 directly: a deterministic -competitive algorithm is trivially -competitive when costs are nonnegative. This proves the sentence of the theorem without its point, and is ruled out below.
Formalization scope
- Request and answer sequences are Lean
Lists, oldest first; isF.cost r awithr.length = a.length. Costs are real-valued (the paper allows ; real costs are a special case). - The answer set is a
Fintypeand nonempty; in the goal the request set is aFintypeand nonempty. - A deterministic algorithm is one function
List R → A. Competitiveness of a deterministic algorithm against adaptive off-line adversaries is stated as competitiveness on every request sequence, which is equivalent for deterministic algorithms (p. 8). - Finite diameter is a real bound with for all pairs, and every statement holds for every such , in particular ; no real supremum is taken.
- is assumed in the goal; with monotonicity it makes every cost nonnegative. It holds in the paper's examples.
- with in the goal; the cost bound for the restart algorithm (milestone 6) holds for an arbitrary .
- is fixed to the paper's value .
- The restart algorithm is a definition (a left fold over the requests), not a hypothesis. The paper's assumption of a randomized algorithm competitive against adaptive off-line adversaries is used only, through Theorem 2.1, to obtain ; the goal quantifies over every that is -competitive on . "Computable" has no precise meaning for real costs; its content is the finiteness of together with the fact that the restart algorithm reads only on . A formalization that proves only the existence of a deterministic -competitive algorithm, without the construction, does not meet the goal.
- Milestones 5 and 6 are stated for nonempty request sequences, so that ; milestone 5 is stated for every decomposition into consecutive pieces.
Contributions welcome: proofs of the milestones, and a connection to the other missions of this series, where the randomized model and Theorem 2.1 are formalized.
Selected references
- S. Ben-David, A. Borodin, R. Karp, G. Tardos, A. Wigderson, On the power of randomization in on-line algorithms, Algorithmica 11 (1994). https://doi.org/10.1007/BF01294260
- M. Chrobak, H. Karloff, T. Payne, S. Vishwanathan, New results on server problems, SIAM Journal on Discrete Mathematics 4 (1991), 172–181. https://doi.org/10.1137/0404017