How Much Lookahead is Needed to Win Infinite Games?

Delay games are two-player games of infinite duration in which one player may delay her moves to obtain a lookahead on her opponent's moves. For omega-regular winning conditions, it is known that such games can be solved in doubly-exponential time and that doubly-exponential lookahead is sufficient. We improve upon both results by giving an exponential time algorithm and an exponential upper bound on the necessary lookahead. This is complemented by showing EXPTIME-hardness of the solution problem and by tight exponential lower bounds on the lookahead. Both lower bounds already hold for safety conditions. Furthermore, solving delay games with reachability conditions is shown to be PSPACE complete.


Introduction
Many of today's problems in computer science are no longer concerned with programs that transform data and then terminate, but with non-terminating reactive systems which have to interact with a possibly antagonistic environment for an unbounded amount of time.The framework of infinite two-player games is a powerful and flexible tool to verify and synthesize such systems.The seminal theorem of Büchi and Landweber [1] states that the winner of an infinite game on a finite arena with an ω-regular winning condition can be determined and a corresponding finite-state winning strategy can be constructed effectively.
1.1.Delay Games.In this work, we consider an extension of the classical framework: in a delay game, one player can postpone her moves for some time to obtain a lookahead on her opponent's moves.This allows her to win some games which she would loose without lookahead, e.g., if her first move depends on the third move of her opponent.Nevertheless, there are winning conditions that cannot be won with any finite lookahead, e.g., if her first move depends on every move of her opponent.Delay arises naturally if transmission of data in networks or components equipped with buffers are modeled.
From a more theoretical point of view, uniformization of relations by continuous functions [25,26] can be expressed and analyzed using delay games [9,24].We consider games in which two players pick letters from alphabets Σ I and Σ O , respectively, thereby producing two infinite sequences α and β.Thus, a strategy for the second player induces a mapping τ : Σ ω I → Σ ω O .It is winning for her if (α, τ (α)) is contained in the winning condition L ⊆ Σ ω I ×Σ ω O for every α.If this is the case, we say that τ uniformizes L. In the classical setting, in which the players pick letters in alternation, the n-th letter of τ (α) depends only on the first n letters of α.A strategy with bounded lookahead, i.e., only finitely many moves are postponed, induces a Lipschitz-continuous function τ (in the Cantor topology on Σ ω ) and a strategy with unbounded lookahead induces a continuous function (equivalently, a uniformly continuous function, as Σ ω is compact (see, e.g., [9])).
1.2.Related Work.Hosch and Landweber proved that it is decidable whether a delay game with an ω-regular winning condition can be won with bounded lookahead [10].Later, Holtmann, Kaiser, and Thomas revisited the problem and showed that if the delaying player wins such a game with unbounded lookahead, then she already wins it with doubly-exponential bounded lookahead, and gave a streamlined decidability proof yielding an algorithm with doubly-exponential running time [9].Thus, the delaying player does not gain additional power from having unbounded lookahead, bounded lookahead is sufficient.
Going beyond ω-regularity by considering context-free winning conditions leads to undecidability and non-elementary lower bounds on the necessary lookahead, even for very weak fragments [6].Nevertheless, there is another extension of the ω-regular winning conditions where one can prove the analogue of the Hosch-Landweber Theorem: it is decidable whether the delaying player wins a delay game with bounded lookahead, if the winning condition is definable in weak monadic second order logic with the unbounding quantifier (WMSO+U) [27].Furthermore, doubly-exponential lookahead is sufficient for such winning conditions, provided the delaying player wins with bounded lookahead at all.However, bounded lookahead is not always sufficient to win such games, i.e., the analogue of the Holtmann-Kaiser-Thomas Theorem does not hold for WMSO+U winning conditions.In contrast, if the delaying player wins such a game, then she wins no matter how slowly the lookahead grows [28].
Due to these negative results for WMSO+U winning conditions, delay games with winning conditions in Prompt-LTL [15] have been considered: this logic extends LTL [20] with temporal operators whose scope is bounded in time.Determining the winner of such a game is 3ExpTime-complete and triply-exponential bounded lookahead is necessary in general and always sufficient [14].Furthermore, all lower bounds already hold for the special case of LTL.
Finally, all delay games with Borel winning conditions are determined, since they were shown to be reducible to delay-free games with Borel winning conditions [13].
Stated in terms of uniformization, Hosch and Landweber proved decidability of the uniformization problem for ω-regular relations by Lipschitz-continuous functions and Holtmann et al. proved the equivalence of the existence of a continuous uniformization function and the existence of a Lipschitz-continuous uniformization function for ω-regular relations.Furthermore, uniformization of context-free relations is undecidable, even with respect to Lipschitzcontinuous functions, but uniformization of WMSO+U relations by Lipschitz-continuous functions is decidable.
In another line of work, Carayol and Löding considered the case of finite words [3], and Löding and Winter [17] considered the case of finite trees, which are both decidable.However, the non-existence of MSO-definable choice functions on the infinite binary tree [2,8] implies that uniformization fails for such trees.
Although several extensions of ω-regular winning conditions for delay games have been studied, several gaps remain open, even for ω-regular winning conditions.Holtmann et al. proved that such games can be solved in doubly-exponential time, but only trivial lower bounds are known.Similarly, their algorithm yields a doubly-exponential upper bound on the necessary lookahead, but only straightforward linear lower bounds are known.Also, only deterministic parity automata were used to specify winning conditions, and the necessary lookahead and the solution complexity are measured in their size.It is open whether weaker automata models like reachability or safety automata have smaller lookahead requirements and allow for faster algorithms.
1.3.Our Contribution.We close these gaps and improve upon both results of Holtmann et al. by determining the exact complexity of ω-regular delay games and by giving tight bounds on the necessary lookahead, both for winning conditions specified by deterministic parity automata and for weaker models.
First, we present an exponential time algorithm for solving delay games with ω-regular winning conditions, an exponential improvement over the original doubly-exponential time algorithm.Both algorithms share some similarities: given a deterministic parity automaton A recognizing the winning condition of the game, a parity game is constructed that is won by the delaying player if and only if she wins the delay game with winning condition L(A).Furthermore, both parity games are induced by equivalence relations that capture the behavior of A. However, our parity game is of exponential size while the one of Holtmann et al. is doubly-exponential.Also, they need an intermediate game, the so-called block game, to prove the equivalence of the delay game and the parity game, while our equivalence proof is direct.Thus, our algorithm and its correctness proof are even simpler than the ones of Holtmann et al.
Second, we show that solving delay games is ExpTime-complete by proving the first non-trivial lower bound on the complexity of ω-regular delay games.The lower bound is proved by a reduction from the acceptance problem for alternating polynomial space Turing machines [4], which results in delay games with safety conditions.Thus, solving delay games with safety conditions is already ExpTime-hard.Our reduction is inspired by the ExpTime-hardness proof for continuous simulation games [11], a simulation game on Büchi automata where Duplicator is able to postpone her moves to obtain a lookahead on Spoiler's moves.However, this reduction is from a two-player tiling problem while we directly reduce from alternating Turing machines.
Third, we determine the exact amount of lookahead necessary to win delay games with ω-regular winning conditions.From our algorithm we derive an exponential upper bound, which is again an exponential improvement.This upper bound is complemented by the first non-trivial lower bound on the necessary lookahead: there are reachability and safety conditions that are winning for the delaying player, but only with exponential lookahead, i.e., our upper bound is tight.
Fourth, we present the first results for fragments of ω-regular winning conditions.As already mentioned above, our lower bounds on complexity and necessary lookahead already hold for safety conditions, i.e., safety is already as hard as parity.Thus, the complexity of the problems manifests itself in the transition structure of the automaton, not in the acceptance condition.For reachability conditions, the situation is different: we show that solving delay games with reachability conditions is equivalent to universality of non-deterministic reachability automata and therefore PSpace-complete.Thus, there is a gap between the complexity of solving delay games with reachability conditions and delay games with safety conditions (unless PSpace = ExpTime).Furthermore, as both reachability and safety already require exponential lookahead and are of high computational complexity it is natural to search for more tractable fragments.One such fragment is the class of winning conditions that are both reachability and safety, the so-called clopen languages.Here, we again prove tight bounds on the complexity and on the necessary lookahead for delay games with ω-regular clopen winning conditions: linear lookahead is necessary and sufficient and determining the winner is co-NP-complete.
Our results are summarized in Figure 1, where an asterisk * denotes cases where the lower bounds hold for deterministic automata while the upper bounds hold for nondeterministic automata.All bounds are tight.

Preliminaries
The set of non-negative integers is denoted by N.An alphabet Σ is a non-empty finite set of letters, Σ * the set of finite words over Σ, Σ n the set of words of length n, and Σ ω the set of infinite words.The empty word is denoted by ε and the length of a finite word w by |w|.
For w ∈ Σ * ∪ Σ ω we write w(n) for the n-th letter of w.

2.1.
Automata.An automaton A = (Q, Σ, q I , ∆, ϕ) consists of a finite set Q of states with initial state q I ∈ Q, an alphabet Σ, a non-deterministic transition function ∆ : Q × Σ → 2 Q \ {∅}, and an acceptance condition ϕ, which is either a set F ⊆ Q of accepting states, depicted by doubly-lined states, or a coloring Ω : Q → N. Note that we require automata to be complete, i.e., every state has at least one outgoing transition labeled by a for every a ∈ Σ.
We discuss this restriction after introducing the different acceptance conditions.The size of A, denoted by |A|, is the cardinality of Q.A run of A on an infinite word α(0)α(1)α(2) • • • over Σ is a sequence q 0 q 1 q 2 • • • such that q 0 = q I and q n+1 ∈ ∆(q n , α(n)) for every n.Runs on finite words are defined analogously.An automaton is deterministic, if |∆(q, a)| = 1 for every q and a.In this case, we denote ∆ by a function δ : Q × Σ → Q.A deterministic automaton has a unique run on every finite or infinite word.A state q of A is a sink, if ∆(q, a) = {q} for every a ∈ Σ.
Given an automaton A over Σ with some set F of accepting states or with some coloring Ω, we consider the following acceptance conditions and their induced languages: • L * (A) ⊆ Σ * denotes the set of finite words over Σ accepted by A, i.e., the set of words that have a run ending in F .• L ∃ (A) ⊆ Σ ω denotes the set of infinite words over Σ that have a run visiting an accepting state at least once, called reachability acceptance.Due to completeness, we have denotes the set of infinite words over Σ that have a run only visiting accepting states, called safety acceptance.• L p (A) ⊆ Σ ω denotes the set of infinite words that have a run such that the maximal color visited infinitely often during this run is even.This is the classical (max)-parity acceptance condition.A reachability (winning) condition is a language that is accepted by an automaton with reachability acceptance, called a reachability automaton.Safety (winning) conditions and parity (winning) conditions and safety and parity automata are defined similarly.Every (deterministic) reachability automaton can be turned into a (deterministic) parity automaton of the same size that recognizes the same language by turning the accepting states into sinks and by then defining an appropriate coloring.Similarly, one can turn a (deterministic) safety automaton into a (deterministic) parity automaton of the same size that recognizes the same language by turning the rejecting states into sinks.Deterministic parity automata recognize exactly the ω-regular languages.
Recall that we require automata to be complete.For safety and parity acceptance this is no restriction, since we can always add a fresh rejecting sink, i.e., one that is not in F in the case of safety and one with odd color in the case of parity, and lead all missing transitions to this sink.However, incomplete automata with reachability acceptance are strictly stronger than complete ones, as incompleteness can be used to check safety properties.We impose this restriction since we are interested in pure reachability conditions.
Given a language L ⊆ (Σ I × Σ O ) ω we denote by pr I (L) its projection to the first component, i.e., pr Similarly, given an automaton A over Σ I × Σ O , we denote by pr I (A) the automaton obtained by projecting each letter to its first component, i.e., we replace the alphabet Σ I × Σ O by Σ I and ∆ by ∆ ′ , where ∆ ′ (q, a) = b∈Σ O ∆(q, a b ) for all q ∈ Q and all a ∈ Σ I .Remark 2.1.Let acc ∈ { * , ∃, ∀, p}, then pr I (L acc (A)) = L acc (pr I (A)).

Games with Delay.
A delay function is a mapping f : N → N \ {0}, which is said to be constant, if f (i) = 1 for every i > 0. Given an ω-language L ⊆ (Σ I × Σ O ) ω and a delay function f , the game Γ f (L) is played by two players, the input player "Player I" and the output player "Player O" in rounds i = 0, 1, 2, . . .as follows: in round i, Player I picks a word u i ∈ Σ f (i) I , then Player O picks one letter v i ∈ Σ O .We refer to the sequence (u 0 , v 0 ), (u 1 , v 1 ), (u 2 , v 2 ), . . .as a play of Γ f (L), which yields two infinite words for every i ∈ N. A strategy τ for Player P ∈ {I, O} is winning, if every play that is consistent with τ is winning for Player P .We say that a player wins Γ f (L), if she has a winning strategy.
We continue with two examples of delay games with ω-regular winning conditions.
Examples 2.2.Note that both conditions can be accepted by safety automata.
(1) Consider L 1 over {a, b, c} × {b, c} with α(0) where n is the smallest position with α(n) = a.Intuitively, Player O wins, if the letter she picks in the first round is equal to the first letter other than a that Player I picks.Also, Player O wins, if there is no such letter.
We claim that Player I wins Γ f (L 1 ) for every delay function f : Player I picks a f (0) in the first round and assume Player O picks b afterwards (the case where she picks c is dual).Then, Player I picks a word starting with c in the second round.The resulting play is winning for Player I no matter how it is continued.Thus, Player I has a winning strategy in Γ f (L 1 ).
(2) Now, consider L 2 over {a, b, c} × {a, b, c} where α(0) for every n ∈ N, i.e., Player O wins if the input is shifted two positions to the left.
Player O has a winning strategy for Γ f (L 2 ) for every f with f (0) ≥ 3.In this case, Player O has at least three letters lookahead in each round, which suffices to shift the input of Player I two positions to the left.On the other hand, if f (0) < 3, then Player I has a winning strategy, since Player O has to pick β(0) before α(0 + 2) has been picked by Player I.
Note that if a language L is recognizable by a (deterministic) parity automaton, then Γ f (L) is determined, i.e., exactly one of the players has a winning strategy, as a delay game with parity condition can be expressed as an explicit parity game in a countable arena, which is determined [5,19].This result has been recently generalized to the class of Borel winning conditions [13].
Also, note that universality of pr I (L) is a necessary condition for Player O to win Γ f (L).Otherwise, Player I could pick a word from Σ ω I \ pr I (L), which is winning for him, no matter how Player O responds.We are interested in solving delay games: given an automaton A recognizing a language L ⊆ (Σ I × Σ O ) ω , determine whether Player O wins Γ f (L) for some delay function f .Furthermore, we are interested in upper and lower bounds on the lookahead induced by such an f .We measure the complexity and the bounds in the size of the automation A.

Lower Bounds on the Lookahead
In this section, we prove lower bounds on the necessary lookahead for Player O to win delay games.We first give an exponential lower bound for reachability conditions, then we extend this idea to provide an exponential lower bound for safety conditions.Consequently, the same bounds hold for more expressive acceptance conditions like Büchi, co-Büchi, and parity.They are complemented by an exponential upper bound for parity conditions in the next section.Note that both lower bounds already hold for deterministic automata.
Theorem 3.1.For every n > 1 there is a language L n such that Proof.Let Σ I = Σ O = {1, . . ., n}.We say that w in Σ * I contains a bad j-pair, for j ∈ Σ I , if there are two occurrences of j in w such that no j ′ > j occurs in between.The automaton B j , depicted in Figure 2(a), accepts exactly the words with a bad j-pair.Now, consider the language L over Σ I defined by First, we show that every w ∈ L satisfies |w| < 2 n .To this end, we prove the stronger statement |w| < 2 m , where m is the maximal letter occurring in w, by induction over m.The induction base m = 1 is trivial, so let m > 1.There cannot be two occurrences of m in w, as they would constitute a bad m-pair.Accordingly, there is exactly one m in w, i.e., we can decompose w into w = w ⊳ m w ⊲ such that w ⊳ and w ⊲ contain no occurrence of m.Thus, the induction hypothesis is applicable and shows Dually, there is a word The winning condition L n is defined as follows: α(0) Player O wins Γ f (L n ) for every delay function with f (0) > 2 n .In the first round, Player I has to pick a word u 0 such that u 0 without its first letter is not in L, as it is too long for being in L. This allows Player O to find a bad j-pair for some j, i.e., she wins the play no matter how it is continued.
However, for f with f (0) ≤ 2 n , Player I has a winning strategy by picking the prefix of 1w n of length f (0) in the first round.Player O has to answer with some j ∈ Σ O .In this situation, Player I continues by playing some j ′ = j ad infinitum, which ensures that the resulting sequence does not contain a bad j-pair.Thus, the play is winning for Player I.
For safety conditions, we use the same idea as in the reachability case, but we need to introduce a new letter # to give Player I the possibility to reach a non-accepting state.Theorem 3.2.For every n > 1 there is a language L ′ n such that . ., n, #} and let w n be defined as above.We introduce a new automaton B ′ # and extend every automaton B j from the previous proof to B ′ j as depicted in Figure 3.The automaton A ′ n is constructed as in the previous proof using the automata B ′ j and B ′ # instead of the B j .
For f (0) > 2 n , Player O wins the game: assume Player I picks u 0 in the first round and let u ′ 0 be u 0 without its first letter.If u ′ 0 contains a # preceded by at most one n, then Player O answers with # in the first round.If there is more than one n before the first # in u ′ 0 , then she answers with n.Finally, if there is no # in u ′ 0 , she can pick a j such that u ′ 0 contains a bad j-pair.All outcomes are winning for Player O.
Player I still wins the game for a constant delay function f with f (0) ≤ 2 n by picking the prefix of 1w n of length f (0) in the first round: if Player O picks some j ∈ Σ O \ {#} in the first round, then Player I just has to answer with #.Otherwise, if Player O picks # in the first round, then Player I continues with n ω .He wins in both situations.
The aforementioned constructions also work for constant-size alphabets, if we encode every j ∈ {1, . . ., n} in binary with the most significant bit in the first position.Then, the natural ordering on {1, . . ., n} is exactly the lexicographical ordering on the corresponding bit-string representation.Accordingly, we can encode every B j , B ′ j , and B ′ # in logarithmic size in n, as deciding whether the input represents j, is larger than j, or smaller than j can be checked bit-wise.Together with a binary decision tree of size O(n) for the initial choice of Player O we obtain deterministic automata A n and A ′ n whose sizes are in It is open whether linear-sized automata and a constant-sized alphabet can be achieved simultaneously.

Computational Complexity of Delay Games
In this section, we determine the computational complexity of solving delay games.First, we consider the special case of reachability conditions and prove such games to be PSpacecomplete.Then, we show that games with safety conditions are ExpTime-hard.The latter bound is complemented by an ExpTime-algorithm for solving delay games with parity conditions.From this algorithm, we also deduce an exponential upper bound on the necessary lookahead for Player O, which matches the lower bounds given in the previous section.
4.1.Reachability Conditions.Recall that universality of the projection to the first component of the winning condition is a necessary condition for Player O for having a winning strategy in a delay game.Our first result in this section states that universality is also sufficient in the case of reachability winning conditions.Thus, solving delay games with reachability conditions is equivalent, via linear time reductions, to the universality problem for non-deterministic reachability automata, which is PSpace-complete (see Appendix A).Therefore, solving delay games with reachability conditions is PSpace-complete as well.Also, our proof yields an exponential upper bound on the necessary lookahead.Let pr I (L) be universal.First, recall that the projection automaton pr I (A) recognizes pr I (L) and that L ∃ (pr Using a pumping argument, we show that on every input pr I (A) has a run reaching an accepting state after at most 2 |A| steps.Thus, given the first move α(0) • • • α(f (0) − 1) of Player I with f (0) ≥ 2 |A| , Player O wins by picking a suitable completion that forces the run of A into an accepting state.
To formalize this, we assume w.l.o.g. that the accepting states of A are sinks, which implies that L * (pr for every w ′ ∈ Σ * I .Furthermore, let A c be an automaton recognizing the complement of L * (pr I (A)), which is prefix-closed, as it is the complement of a suffix-closed language.We can choose A c such that We claim that L * (A c ) is finite.Assume it is infinite.Then, by König's Lemma there is an infinite word α whose prefixes are all in L * (A c ). Due to universality, we have α ∈ L ∃ (pr I (A)), i.e., there is a prefix of α in L * (pr I (A)).Thus, the prefix is in L * (pr I (A)) and in the complement L * (A c ) yielding the desired contradiction.An automaton with n states with a finite language accepts words of length at most n − 1.Thus, w ∈ L * (pr I (A)) for every w ∈ Σ * I with |w| ≥ 2 |A| .Using this, we show that Player O wins Γ f (L) if f (0) ≥ 2 |A| .Player I has to pick f (0) letters with his first move, say . By picking β(0), . . ., β(f (0) − 1) in the first f (0) rounds, Player O wins the play, no matter how it is continued.Hence, she has a winning strategy.
The exponential upper bound on the necessary lookahead to win delay games with reachability conditions matches the lower bound presented in the previous section.
Theorem 4.1 shows that solving delay games with reachability conditions is equivalent to universality of non-deterministic reachability automata, which is PSpace-complete (see Appendix A).Thus, we obtain the complexity of solving delay games with reachability conditions as a corollary of Theorem 4.1.
Corollary 4.2.The following problem is PSpace-complete: Given a non-deterministic reachability automaton A, does Player O win Γ f (L ∃ (A)) for some f ?Another consequence of the proof of Theorem 4.1 concerns the strategy complexity of delay games with reachability conditions: if Player O wins for some delay function, then she has a winning strategy that receives exponentially many input letters and answers by also giving exponentially many output letters and thereby already guarantees a winning play, i.e., all later moves are irrelevant.Thus, the situation is similar to classical reachability games on graphs, in which positional attractor strategies allow a player to guarantee a win after a bounded number of moves.The strategy described above can be implemented by a lookup table that maps all minimal words in L * (pr I (A)) to a word in Σ * O of the same length such that the combined word is accepted by A.
Finally, note that both upper bounds, the one on the lookahead and the one on the complexity, hold for non-deterministic automata while the lower bounds already hold for deterministic automata.4.2.Safety Conditions.Unsurprisingly, Example 2.2.1 shows that Theorem 4.1 does not hold for safety conditions: the projection pr I (L 1 ) is universal, but Player O has no winning strategy for any delay function.It turns out that safety conditions are even harder than reachability conditions (unless PSpace equals ExpTime): we show solving delay games with safety conditions to be ExpTime-hard by a reduction from the acceptance problem for alternating polynomial space Turing machines [4].
is the transition relation, and let x ∈ Σ * be an input.For technical reasons, we assume the accepting state q A and the rejecting state q R to be equipped with a self-loop.Furthermore, let p be a polynomial that bounds M's space consumption.We construct a safety automaton A of polynomial size in |∆| and p(|x|) such that M rejects x if and only if Player O wins Γ f (L ∀ (A)) for some f .This is sufficient, since APSpace = ExpTime [4] is closed under complement.Thus, we give Player I control over the existential states while Player O controls the universal ones.Additionally, Player I is in charge of producing all configurations with his moves.He can copy configurations in order to wait for Player O's choices for the universal transitions, which are delayed due to the lookahead.
Formally, the input alphabet Σ I contains Σ ∪ Q and two separators N and C while the output alphabet Σ O contains ∆ and two signals ✗ and ✓.Intuitively, Player I produces configurations of M of length p(|x|) preceded by either C or N to denote whether the configuration is a copy of the previous one or a new one.Copying configurations is necessary to bridge the lookahead while waiting for Player O to determine the transition that is applied to a universal configuration.Player I could copy a configuration ad infinitum, but this will be losing for him, unless it is an accepting one.Player O chooses universal transitions at every separator1 by picking a letter from ∆.At every other position, she has to pick a signal: ✗ allows her to claim an error in the configurations picked by Player I while ✓ means that she does not claim an error at the current position.
The automaton A is the product of safety automata checking the following properties of an input word α(0) where Conf is the set of encodings of configurations of length p(|x|), i.e., words of length p(|x|) + 1 over Σ ∪ Q that contain exactly one letter from Q.If this is not the case, then the product automaton A goes to an accepting sink, i.e., in order to win, Player I has to produce an α that satisfies the requirement.
(2) β ∈ (∆ • {✓, ✗} p(|x|)+1 ) ω .If this is not the case, then the product automaton A goes to a rejecting sink, i.e., in order to win, Player O has to produce a β that satisfies the requirement.(3) The first configuration picked by Player I is the initial one of M on x.If this is not the case, the product automaton A goes to an accepting sink.(4) If β contains a ✗, then the automaton checks whether there is indeed an error by doing the following at the first occurrence of ✗: it stores the previous, the current, and the next input letter, the transition picked by Player O at the last separator N , and whether the current configuration is existential or universal.Some of this information has to be stored continuously, since these letters appear before the first ✗.This is possible using a set of states whose size is polynomial in Then, the automaton processes p(|x|) + 1 letters (and remembers whether it traverses the separator N or C), and then checks whether the letter just reached is updated correctly or not: • If the separator is C, then the current letter is updated correctly, if it is equal to the marked one.• If the separator is N and the configuration in which the error was marked is existential, then the letter is updated correctly, if there is a transition of M that is compatible with the current letter and the marked one.• If the separator is N and the configuration in which the error was marked is universal, then the letter is updated correctly, if it is compatible with the transition picked by Player O at the last separator N before the ✗, which is stored by the automaton.If she has picked a transition that is not applicable to the current configuration, the product automaton A goes to a rejecting sink.If the update is not correct, i.e., Player O has correctly claimed an error, then A goes to an accepting sink.Otherwise, it goes to a rejecting sink, i.e., in order to win, Player O should only claim an error at an incorrect update of a configuration, but she wins if she correctly claims an error.All subsequent claims by Player O are ignored, i.e., after the first claim is evaluated, the play is either accepted or rejected, no matter how it is continued.
(5) Finally, if α contains the accepting state of M, then A goes to a rejecting sink, unless Player O correctly claimed an error in a preceding configuration.All these properties can be checked by deterministic safety automata whose sizes are polynomial in the size of M and p(|x|).All non-sink states of A are accepting, i.e., as long as both players stick to their requirements on the format, Player I starts with the initial configuration, Player O does not incorrectly claim an error, and the accepting state of M is not reached, then the input is accepted.
It remains to prove that M rejects x if and only if Player O wins Γ f (L ∀ (A)) for some f ."⇒": Assume M rejects x and let f be the constant delay function with f (0) = p(|x|)+3.We show that Player O wins Γ f (L ∀ (A)).At every time, Player O has enough lookahead to correctly claim the first error introduced by Player I, if he introduces one.Furthermore, she has access to the whole encoding of each universal configuration whose successor she has to determine.This allows her to simulate the rejecting run of M on x, which does not reach the accepting state q A , no matter which transitions Player I picks.Thus, he has to introduce an error in order to win, which Player O can detect using the lookahead.If Player I does not introduce an error, the play proceeds ad infinitum by repeating a rejecting configuration forever.In every case, A accepts the resulting play, i.e., Player O wins.Thus, Player O has a winning strategy for Γ f (L ∀ (A)).
"⇐": We show the contrapositive.Assume that M accepts x and let f be an arbitrary delay function.We show that Player I wins Γ f (L ∀ (A)).Player I starts with the initial configuration and picks the successor configuration of an existential one according to the accepting run, and copies universal configurations as often as necessary to obtain a play prefix in which Player O has to determine the transition she wants to apply in this configuration.Thus, he will eventually produce an accepting configuration of M without ever introducing an error.Hence, either Player O incorrectly claims an error or the play reaches an accepting state.In either case, Player I wins the resulting play, i.e., he has a winning strategy for It is noteworthy that the lower bound just proven does not require the full exponential lookahead that is in general necessary to win delay games with safety conditions: Player O wins the game constructed above with sublinear lookahead, as p(|x|) + 3 is smaller than the size of A. Thus, determining the winner of a delay game with safety condition with respect to linearly bounded delay is already ExpTime-hard.
Finally, the lower bound just proven already holds for deterministic safety automata.

Parity Conditions.
In the previous two subsections, we showed solving delay games with reachability conditions to be PSpace-complete and solving games with safety conditions to be ExpTime-hard.To conclude this section, we complement the latter with an exponential time algorithm for solving delay games with parity conditions.Thus, delay games with safety or parity conditions are ExpTime-complete.Also, we derive an exponential upper bound of the form 2 (nk) 2 on the necessary lookahead from the algorithm, where n is the size and k the number of colors of the automaton.Finally, we lower the upper bound to 2 nk via a direct pumping argument, which matches the lower bound from the previous section.Note that all results only hold for deterministic automata.We proceed by constructing an exponentially-sized, delay-free parity game with the same number of colors as A, which is won by Player O if and only if she wins Γ f (L p (A)) for some delay function f .Intuitively, we assign to each potential lookahead w ∈ Σ * I the behavior it induces on A, which is given by a function r : Q → 2 Q×Ω(Q) .If (q ′ , c) ∈ r(q), then A has a run from q to q ′ with maximal color c on a word over Σ I × Σ O whose projection to Σ I is w.Having the same behavior gives rise to an equivalence relation over Σ * I of exponential index.In the parity game we construct, Player I picks equivalence classes of this relation and Player O constructs a run on representatives.Player O wins, if this run is accepting.To account for the delay in the original game, Player I is always one move ahead.This gives Player O a lookahead of one equivalence class, which can be stored in the state space of the parity game.
First, we adapt A to keep track of the maximal color visited during a run.
In the following, we work with partial functions from Q C to 2 Q C , where we denote the domain of each such function r by dom(r).Intuitively, we use r to capture the information encoded in the lookahead provided by Player I. Assume Player I has picked α(0) • • • α(j) and Player O has picked β(0) • • • β(i) for i < j such that the lookahead is w = α(i + 1) • • • α(j).Then, we can determine the state q that C reaches after processing α(0) β(0) • • • α(i) β(i) , but the automaton cannot process w, since Player O has not yet picked β(i + 1) • • • β(j).However, we can determine the states Player O can enforce by picking an appropriate completion, which will be the ones contained in r(q).
To formalize the functions capturing the lookahead picked by Player I, we define b ), i.e., δ P is the transition function of the powerset automaton of pr I (C).As usual, we extend δ P to δ * P : 2 Q C × Σ * I → 2 Q C via δ * P (S, ε) = S and δ * P (S, wa) = δ P (δ * P (S, w), a).Let D ⊆ Q C be non-empty and let w ∈ Σ * I .We define the function r D w with domain D as follows: for every (q, c) ∈ D, we have r D w (q, c) = δ * P ({(q, Ω(q))}, w).Note that we apply δ * P to {(q, Ω(q))}, i.e., the second component is the color of q and not the color c from the argument to r D w .If (q ′ , c ′ ) ∈ r D w (q, c), then there is a word w ′ whose projection is w and such that the run of A on w ′ leads from q to q ′ and has maximal color c ′ .Thus, if Player I has picked the lookahead w, then Player O could pick an answer such that the combined word leads A from q to q ′ with maximal color c ′ .
We call w a witness for a partial function r : . Thus, we obtain a language W r ⊆ Σ * I of witnesses for each such function r.We define R = {r | dom(r) = ∅ and W r is infinite}.Lemma 4.6.Let R be defined as above.
(3) Let r be a partial function from Q C to 2 Q C with non-empty domain.Then, W r is recognized by a deterministic finite automaton with at most 2 n 2 states.( 4) Let D ⊆ Q C be non-empty and let w ∈ Σ * I be such that |w| ≥ 2 n 2 .Then, there exists some r ∈ R with dom(r) = D and w ∈ W r .
Proof.The first statement follows from completeness of the automata A, C, and P while the second one follows from the definition of r D w , which is uniquely determined by w and D. Hence, a fixed w cannot witness two different functions r and r ′ with the same domain.
For proving the last statement, we fix some non-empty D and some w of length at least 2 n 2 .Define r = r D w , which implies w ∈ W r by definition.As just shown, there exists an automaton recognizing W r with at most 2 n 2 ≤ |w| many states.Thus, the accepting run of the automaton on w contains a state-repetition.Hence, W r is infinite, i.e., r ∈ R. Now, we are able to define the equivalent delay-free parity game.As already alluded to, Player I picks elements from R while Player O produces a run on witnesses, which corresponds to picking suitable completions to witnesses of the functions picked by Player I.She wins, if the constructed run is accepting.Finally, to account for the lookahead, Player I is always one move ahead.
To keep the equivalence proof between the two games simple, we first give an abstract description of the delay-free game.Then, in the proof of our main theorem, we show how to model this game as a classical graph based parity game, which is solvable in exponential time.
Formally, the game G(A) is played between Player I and Player O in rounds i = 0, 1, 2, . . .as follows: in each round, Player I picks a function from R and Player O answers by a state of C subject to the following constraints.In the first round, Player I has to pick r 0 ∈ R such that dom(r 0 ) = {q C I } (C1) and Player O has to answer by picking a state q 0 ∈ dom(r 0 ), which implies q 0 = q C I .Now, consider round i > 0: Player I has picked functions r 0 , r 1 , . . ., r i−1 and Player O has picked states q 0 , q 1 , . . ., q i−1 with q i−1 ∈ dom(r i−1 ).Next, Player I has to pick a function r i ∈ R such that dom(r i ) = r i−1 (q i−1 ).(C2) Afterwards, Player O picks some state q i ∈ dom(r i ).
Both players can always move: Player I can move, as r i−1 (q i−1 ) is always non-empty (Lemma 4.6.1)and thus the domain of some r ∈ R (Lemma 4.6.4),Player O can move, as the domain of every r ∈ R is non-empty by construction.The resulting play of G(A) is the sequence r 0 q 0 r 1 q 1 r 2 q 2 • • • , which is won by Player O if the maximal color occurring infinitely often in Ω C (q 0 )Ω C (q 1 )Ω C (q 2 ) • • • is even.Otherwise, Player I wins.
A strategy for Player I is a function τ ′ I mapping the empty play prefix to a function r 0 satisfying (C1) and mapping a non-empty prefix r 0 q 0 • • • r i−1 q i−1 to a function r i satisfying (C2).A strategy τ ′ O for Player O maps a play prefix r 0 q 0 • • • r i to a state q i ∈ dom(r i ).A play A strategy τ ′ for Player P ∈ {I, O} is winning, if every play that is consistent with τ ′ is winning for Player P .As usual, we say that a player wins G(A), if she has a winning strategy.
First, we show that the original delay game and the abstract game G(A) have the same winner.To this end, we fix a winning strategy for Player O in the delay game and simulate it in G(A), and vice versa, by translating real moves of Player I into abstract moves from R, and vice versa.Proof.For the sake of readability, we denote G(A) by G and Γ f (L p (A)) by Γ, whenever f is clear from the context."⇒": Let τ O be a winning strategy for Player O in Γ f (L p (A)) for some f , which we can assume2 to be a constant [9].We construct a winning strategy τ ′ O for Player O in G by simulating a play of G by a play of Γ.
Let r 0 be the first move of Player I in G, which has to be answered by Player O by picking τ ′ O (r 0 ) = q C I , and let r 1 be Player I's response.As W r 0 and W r 1 are infinite by definition, we can choose witnesses w 0 ∈ W r 0 and w We simulate this play prefix in Γ: • in G, we have constructed a play prefix • Finally, w j is a witness for r j for every j ≤ i.Now, let i ≥ 1 be arbitrary and let q i−1 = (q ′ i−1 , c i−1 ).We define q i to be the state of C that is reached from (q ′ i−1 , Ω(q ′ i−1 )) after processing w i−1 and the corresponding moves of Player O, i.e., α(|w By definition of r i−1 , we have q i ∈ r i−1 (q i−1 ).Correspondingly, we can define Now, let r i+1 be the next move of Player I in G and let w i+1 ∈ W r i+1 be a witness with O is winning.Consider a play r 0 q 0 r 1 q 1 r 2 q 2 • • • that is consistent with τ ′ O and let w = α(0) β(2) • • • be the outcome in Γ constructed during the simulation as defined above.Note that α(0)α( 1)α(2) • • • is equal to w 0 w 1 w 2 • • • , where each w i is a witness of r i .Furthermore, let q i = (q ′ i , c i ).A straightforward inductive application of Remark 4.5 shows that q ′ i+1 is the state that A reaches after processing w i and the corresponding moves of Player O starting in q ′ i and that c i+1 is the maximal color seen on the run.Thus, the maximal color visited infinitely often by A after processing w is the same as the maximal color of the sequence c 0 c 1 c 2 • • • , which is even, as w is consistent with a winning strategy and therefore accepted by A. Hence, r 0 q 0 r 1 q 1 r 2 q 2 • • • is winning for Player O and τ ′ O is a winning strategy."⇐": Let τ ′ O be a wining strategy for Player O in G.We construct a winning strategy τ O for her in Γ f (L p (A)) for the constant delay function f with f (0) = 2d, where d = 2 n 2 .The strategy τ O is again constructed by simulating a play of Γ by a play of G.
In the following, both players pick their moves in Γ in blocks of length d.We denote Player I's blocks by a i and Player O's blocks by b i , i.e., every a i is in Σ d I and every b i is in Let a 0 a 1 be the first move of Player I in Γ, define q 0 = q C I , and let r 0 = r {q 0 } a 0 and r 1 = r r 0 (q 0 ) a 1 . Then, r 0 q 0 r 1 is a play prefix in G that is consistent with τ ′ O .Thus, we are in the following situation for i = 1: • in Γ, Player I has picked blocks • in G we have constructed a play prefix r 0 q 0 • • • r i−1 q i−1 r i that is consistent with τ ′ O , and • a j is a witness for r j for every j ≤ i.Now, let i ≥ 1 be arbitrary and The rules of G imply q i ∈ dom(r i ) = r i−1 (q i−1 ).Furthermore, as a i−1 is a witness for r i−1 , there is some b i−1 such that the automaton C reaches q i after processing . Player O's strategy for Γ is to pick the letters of b i−1 in the next d rounds.These are answered by Player I by d letters forming a i+1 .This way, we obtain b 2 • • • be the outcome of a play of Γ consistent with τ O .Also, let r 0 q 0 r 1 q 1 r 2 q 2 • • • be the corresponding play of G constructed as described in the simulation above, where each a i is a witness for r i .Finally, let q i = (q ′ i , c i ).A straightforward inductive application of Remark 4.5 shows that q ′ i+1 is the state reached in A after processing a i b i starting in q ′ i and that c i+1 is the largest color seen on this run.As r 0 q 0 r 1 q satisfies the parity condition, i.e., the maximal color occurring infinitely often is even.Thus, the maximal color occurring infinitely often during the run of A on w is even as well, i.e., w is winning for Player O. Thus, τ O is a winning strategy for Player O. Now, we can prove the main theorem of this section: determining whether Player O wins a delay game induced by a given parity automaton A for some f is in ExpTime.To this end, it suffices to model G(A) as a classical parity game and to show that it can be constructed and solved in exponential time.This is sufficient due to Lemma 4.7.
Proof of Theorem 4.4.First, we argue that R can be constructed in exponential time: to this end, one constructs for every partial function r from Q C to 2 Q C the automaton of Lemma 4.6.3recognizing W r and tests it for recognizing an infinite language.There are exponentially many functions and each automaton is of exponential size, which yields the desired result.Now, we can encode G(A) as a graph-based parity game3 ((V, • E is the union of the following sets of edges: -{(v I , r) | dom(r) = {q C I }}: the initial moves of Player I. -{((r, q), r ′ ) | dom(r ′ ) = r(q)}: (regular) moves of Player I.
-{(r, (r, q)) | q ∈ dom(r)}: moves of Player O, and Then, Player O wins G(A) if and only if she has a winning strategy from v I in the explicit parity game.
A parity game with n vertices, m edges, and k colors can be solved in time O(mn By applying both directions of the equivalence between Γ f (L p (A)) and G(A), we obtain an exponential upper bound of the form 2 (|A|k) 2 +1 on the lookahead necessary for Player O to win a delay game with a parity condition over k colors.
Finally, we prove that the quadratic exponent in the upper bound 2 (|A|k) 2 +1 can be replaced by a linear one, using a direct pumping argument.Theorem 4.8.Let L = L p (A) where A is a deterministic parity automaton with k colors.The following are equivalent: (1) Player O wins Γ f (L) for some delay function f .
Proof.We only consider the non-trivial implication (1) ⇒ (2).We define for every i, which boils down to f (0) ≤ f ′ (0) for constant delay functions.If f ≤ f ′ and Player I wins Γ f ′ (L), then he wins Γ f (L) as well.Monotonicity, determinacy, and the fact that constant delay functions are sufficient for Player O to win ω-regular delay games [9] imply that the contrapositive ¬(2) ⇒ ¬(1) is equivalent to the following statement, which we prove below: if Player I wins the game Γ f (L) for the constant delay function f with f (0) = 2 2|A|k+2 + 2, then he also wins for every constant delay function f ′ ≥ f .
In the proof, we show how to turn a winning strategy for Player I in Γ f (L) into a winning strategy for games with arbitrarily larger lookahead.We use a pumping argument to show that every sufficiently large lookahead contains some repetitive behavior, which we pump to cover the larger lookahead.To this end, we construct a simulation of the original game to inductively define the new strategy for Player I.The simulation proceeds in big steps, i.e., the players pick sufficiently large blocks of input and output letters, respectively, which allows us to identify the repetitive behaviour in each such block.The structure of the simulation is similar to the abstract game from the proof of Theorem 4.4, where Player I is always two functions ahead, after he moved, while Player O responds only to the first of these two functions.In this proof, we do not need an abstract representation of the lookahead, which is why we represent it just by concrete sequences of input letters.
As in the previous proof, simulating the game in big steps requires us to extend the automaton recognizing L to accumulate the maximal color along a run.However, here we additionally give Player I the possibility to raise a flag, which triggers a color output and a reset of the accumulator.This changes the underlying language L to a new language L ′ , but as long as we require Player I to trigger color outputs infinitely often, Γ f (L) and Γ f (L ′ ) share the same winner.Thus, it suffices to consider Γ f (L ′ ) instead of Γ f (L).With control over the exact position of color outputs at hand, Player I then can trigger these exactly at the end of each block.Finally, this ensures the same color sequence as in the simulated play.
We first construct the new color tracking automaton.
) be the color-tracking extension of A as defined before.We extend C again to reset and output the accumulated color at positions determined by a marking of the letters from Σ I .All other states have a trivial color that is irrelevant, as long as infinitely many letters of the input are marked.Formally, we define where (q ′ , c) = δ C (q, a b ), and pr • • • / ∈ L and α(0)α(1)α(2) • • • contains infinitely many triggers.Using this, one can easily show that Player I wins Γ f (L) if and only if he wins Γ f (L p (D)).For the left-to-right direction, Player I just has to introduce infinitely many triggers at arbitrary positions and for the right-to-left direction, Player I projects his moves to Σ I .Thus, it suffices to show the following property: if Player I wins Γ f (L p (D)) for the constant delay function f with f (0) = 2 2|A|k+2 + 2, then he also wins for every constant delay function f ′ ≥ f .
To this end, let τ I be a winning strategy for Player I for Γ f (L p (D)), let f ′ ≥ f be arbitrary, but constant, and define d = 2 |D| + 1, i.e., we have f (0) = 2d.We can assume w.l.o.g. that τ I only allows outcomes that have a trigger exactly at the positions d − 1, 2d − 1, 3d − 1, . ... We construct a winning strategy τ ′ I for Player I in Γ f ′ (L p (D)) by simulating a play of Γ f ′ (L p (D)) via a play of Γ f (L p (D)).In the following, we will group the moves of the players in Γ f (L p (D)) into blocks of length d.We denote Player I's blocks by a i and Player O's blocks by b i .For the sake of readability, we denote Γ f (L p (D)) by Γ and Γ f ′ (L p (D)) by Γ ′ .
To begin, we have to give the first moves of Player I in Γ ′ .To this end, consider the first move τ I (ε) = a 0 a 1 of Player I in Γ.By the choice of d, we can decompose a 0 into x 0 y 0 z 0 and a 1 into x 1 y 1 z 1 with non-empty y 0 , z 0 , y 1 , and z 1 such that the powerset automaton of pr I (D) reaches the same state after processing x 0 and x 0 y 0 and reaches the same state after processing a 0 x 1 and a 0 x 1 y 1 , i.e., we have a state repetition in each block 4 .Note that z i being non-empty implies that x i and y i contain no triggers.Now, we pump y 0 sufficiently often, i.e., let α(0) with his first moves in Γ ′ , which is answered by Player O by picking β(0) Now, we are in the following situation for i = 1: Now, let i ≥ 1 be arbitrary and let q i−1 be the state reached by D after processing . Further, let q * i−1 be the state reached by D after processing x i−1 (y i−1 ) h i−1 −1 and the corresponding letters picked by Player O at these positions starting in q i−1 .Due to the state repetition induced by the decomposition, we can find a word such that A reaches the same state q * i−1 after processing x i−1 , when starting in q i−1 .We define , where y ′ i−1 and z ′ i−1 are the letters picked by Player O at the positions of the last repetition of y i−1 and at the positions of z i−1 , respectively.
We continue the simulation in Γ by letting Player O pick the block b i−1 during the next d rounds, which is answered by Player I by picking the next block a i+1 .Again, we can decompose a i+1 into x i+1 y i+1 z i+1 with non-empty y i+1 and z i+1 such that the decomposition induces a state repetition of the powerset automaton of pr I (D) after processing the concatenation of the previous blocks and these prefixes.As before, we define α(ℓ i ) . By the choice of h i+1 , we obtain (ℓ i+1 − f ′ (0)) + 1 ≥ ℓ i .Thus, we are in the situation described above for i + 1, which completes the definition of τ A simple induction shows that D reaches the same state after processing α(0) β(0) The only triggers in w ′ and in w occur as last letters of prefixes as in (4.1), and there are infinitely many such prefixes.Hence, acceptance of w ′ and w only depends on states reached after processing such a prefix, which are equal as argued above, i.e., w ′ is accepted by D if and only if w is accepted by D. Since w is consistent with the winning strategy τ I both are not accepted, i.e., τ ′ I is indeed a winning strategy.

Winning Conditions that are Reachability and Safety
Recall the exponential lower bounds on the necessary lookahead for reachability and safety conditions presented in Section 3.Both rely on the same construction and one can even turn the deterministic safety automata A ′ n exhibiting the lower bound into reachability automata exhibiting the same lower bound.To this end, one changes the set of accepting states, but leaves the transition structure of A ′ n unchanged.Nevertheless, these automata do not accept the same language.In the following, we prove that this is unavoidable: linear lookahead is necessary and sufficient for winning conditions that are both reachability and safety.Furthermore, solving such games is co-NP-complete and thus simpler than solving delay games with general reachability or safety conditions (under standard complexity-theoretic assumptions).
Winning conditions that are both reachability and safety conditions are also known as ω-regular clopen conditions, as they are those ω-regular languages that are both closed and open in the Cantor topology.Note that the way we represent such conditions is a non-trivial issue that has influences on our results: we could specify an ω-regular clopen language either by a reachability or by a safety automaton or even give a pair of equivalent automata, one for each acceptance condition.However, we take another approach.A clopen language is fully characterized by a finite language of finite words.Thus, we use acyclic finite automata on finite words to represent ω-regular clopen winning conditions.For every deterministic reachability and every deterministic safety automaton recognizing a clopen language there is an acyclic finite automaton of the same size that represents the same language, i.e., the change in representation does not incur a blowup, when starting with deterministic automata.The results mentioned above pertain to the representation of winning conditions via acyclic finite automata.
First, we formalize the characterization of ω-regular clopen languages by acyclic finite automata.In the following, we only consider (w.l.o.g.) automata whose states are all reachable from the initial state.Also, recall that we require all our automata to be complete.A state of an automaton is productive, if an accepting state is reachable from it, otherwise it is non-productive.In particular, every non-productive state is non-accepting.Finite languages of finite words are recognized by acyclic finite automata, i.e., automata that satisfy the following property: if q is on a cycle, then q is non-productive.The depth of an acyclic automaton A is the length of the longest path from an initial to an accepting state, which is bounded by |A| − 1.
Remark 5.1.Let A be a non-deterministic automaton.Then, L * (A) is finite if and only if A is acyclic.
By merging all non-productive states of a non-deterministic acyclic automaton into a single non-accepting sink, we obtain an equivalent acyclic automaton of the same depth where processing a word that is longer than the depth leads to the non-accepting sink.
Remark 5.2.Let A be a non-deterministic acyclic automaton of depth k.Then, there is a non-deterministic acyclic automaton A ′ of depth k with |A ′ | ≤ |A|, L * (A) = L * (A ′ ), and such that processing a word of length greater than k leads A ′ to a (non-accepting) sink.Now, we are able to state the characterization theorem for ω-regular clopen languages.Lemma 5.3 ([16]).Let L ⊆ Σ ω be an ω-regular clopen language that is recognized by a deterministic automaton A with reachability or safety acceptance.Then, With this characterization at hand, we determine the complexity of solving delay games with ω-regular clopen winning conditions and then present tight upper and lower bounds on the necessary lookahead.
Theorem 5.4.The following problem is co-NP-complete: Given an acyclic automaton A over The proof of the preceding theorem is split into the following two lemmata.We begin by showing co-NP-hardness, which already holds for deterministic automata.Then, we show co-NP-membership, which also holds for non-deterministic automata.
The following hardness proof is reminiscent of the proof of Theorem 4.3, but simpler since we only have to deal with universal polynomial time machines instead of alternating polynomial space machines.Proof.We show hardness by a reduction from the acceptance problem for universal polynomial time Turing machines.Let M = (Q, Σ, q I , ∆, q A , q R ) be such a machine, where 0, 1} is the transition relation.We assume w.l.o.g. that the accepting state q A and the rejecting state q R have self-loops.Let p be a polynomial that bounds the time-consumption of M. Furthermore, let x ∈ Σ * be an input for M.
We construct an acyclic deterministic automaton A over for some f if and only if M accepts x, i.e., if and only if every run of M on x is accepting.To this end, we construct a game where Player I produces sequences of configurations to simulate runs of M on x and Player O can claim errors in this simulation.Player O wins, if she correctly claims an error or if the simulated run is accepting.Thus, we define Σ I = Q ∪ Σ and Σ O = {✓, ✗}.Player O uses ✗ to claim an error.
Let t = p(|x|) and let Conf be the set of encodings of configurations of M of length t, i.e., words over the alphabet Σ ∪ Q of length t + 1 containing exactly one letter from Q. Furthermore, let c 0 ∈ Conf denote the encoding of the initial configuration of M on x.In the following, we do not distinguish between a configuration and its encoding.Now, consider the language L of words u then u either ends with an accepting configuration or the smallest position marked with ✗ in v indicates a cell which witnesses that the following configuration in u is not a successor configuration of the current one.It is straightforward to show that L is recognized by an automaton A of polynomial size in |M| + t, which is polynomial in the size of M and the length of x.To this end, one relies on the fact that L only contains words of a fixed length, which is polynomial in t, and on the error checking routine described in the proof of Theorem 4.3.Finally, as L is finite, Remark 5.1 implies that A is acyclic.
It remains to show that Player O wins Γ f (L • (Σ I × Σ O ) ω ) for some delay function f if and only if M accepts x, i.e., every run of M on x is accepting.
Thus, let x be accepted by M, i.e., every run of M on x reaches an accepting configuration after executing at most t − 1 transitions.Hence, in order to win a delay game with winning condition L • (Σ I × Σ O ) ω , Player I has to introduce an error in the simulation of M on x.With sufficiently large constant lookahead, Player O can catch him and correctly claim the error.Hence, she wins Conversely, assume x is not accepted by M, i.e., there is a run of M that does not reach an accepting configuration.Player I can simulate this run in Γ f (L • (Σ I × Σ O ) ω ) for every f .As he does not introduce an error, he wins the resulting play, i.e., Player O does not win Γ f (L • (Σ I × Σ O ) ω ) for any f .Next, we show that the problem is in co-NP, which completes the proof of Theorem 5.4 After resolving the complexity of delay games with ω-regular clopen winning conditions, we turn our attention to proving lower and upper bounds on the necessary lookahead in such games.We begin by showing that the depth of the automaton recognizing the winning condition is an upper bound on the necessary lookahead, which follows from the reasoning presented in the proof of Lemma 5.6.O such that α(x) β(0) • • • α(k−1) β(k−1) has a prefix that is accepted by A. Thus, every continuation of this prefix is in L. We conclude that Player O has a winning strategy for Γ f (L) whenever f (0) is greater or equal than the depth of A.
To conclude this section, we present a matching lower bound.Proof.Consider the language It is straightforward to show that L n is recognizable by a deterministic acyclic automaton of size O(n) and depth n + 1, and that Player O wins Γ f (L n • (Σ I × Σ O ) ω ) if and only if f (0) > n.
Note that all upper bounds in this section hold for non-deterministic automata while the lower bounds hold for deterministic ones.
To conclude this section, let us come back to the lower bounds for reachability and safety conditions presented in Section 3. The deterministic safety automata A ′ n witnessing the exponential lower bound can be equipped with a reachability acceptance that witnesses an exponential lower bound for reachability conditions.However, these automata do not accept the same language.If they would, then Lemma 5.3 yields an acyclic automaton of depth O(n) that represents this language.Thus, Theorem 5.7 shows that lookahead O(n) is sufficient for Player O.However, this contradicts the lower bound proven in Theorem 3.2.

Conclusion
We gave the first algorithm that solves ω-regular delay games in exponential time, which is an exponential improvement over the previously known algorithms.We complemented this by showing the problem to be ExpTime-complete, even for safety conditions.Also, we determined the exact amount of lookahead that is necessary to win ω-regular delay games by proving tight exponential bounds, which already hold for safety and reachability conditions.The ExpTime-completeness of solving delay games with safety conditions is contrasted by PSpace-completeness of solving delay games with reachability conditions.Due to this gap in complexity and due to the exponential lower bounds on the lookahead, we also considered delay games with ω-regular clopen winning conditions.Here, linear lookahead suffices and is in general necessary.Furthermore, determining the winner in such games is co-NP-complete.All our lower and upper bounds hold for deterministic automata while for reachability conditions (including clopen conditions) our results even hold for nondeterministic automata.To the best of our knowledge, these are the first non-trivial lower bounds on lookahead and complexity for delay games.
Thus, we completed the picture for deterministic automata and provided partial results for non-deterministic automata, e.g., for automata with reachability acceptance condition.One can trivially obtain upper bounds for the other types of non-deterministic (and universal) automata using determinization, but this incurs an exponential blowup.In current research, we show this to be unavoidable.Furthermore, for alternating automata, we have recently proven tight triply-exponential bounds on the necessary lookahead and shown 3ExpTime-completeness of determining the winner of such a game [14].Here, the lower bounds already hold for LTL specifications.
An open question concerns the influence on the necessary lookahead and the solution complexity when using different deterministic automata models that recognize the class of ω-regular conditions, e.g., Rabin, Streett, and Muller automata.Indeed, our construction used to prove Theorem 4.4 can be adapted to deal with these acceptance conditions, e.g., for conditions given by Muller automata, C keeps track of the states visited on a run and G(A) is a Muller game.This yields upper bounds, but it is open whether these are optimal.
Another promising research direction is the study of restricted classes of strategies for delay games, e.g., finite-state strategies for games with ω-regular winning conditions.Our reduction presented in Section 4.3 implies the existence of such strategies, which in general need exponentially many memory states as well as access to the complete lookahead.This result has been proved and a more elegant construction based on the players picking blocks of letters (cf. the proof of Lemma 4.7), was presented by Salzmann [21].
e., with her first move, Player O has to pick a j such that Player I has produced a bad j-pair.For technical reasons, the first letter picked by Player I is ignored.The construction of an automaton A n recognizing L n is sketched in Figure2(b), where * denotes an arbitrary letter and B j [a\ a * ] denotes B j where for each a ∈ Σ I every transition labeled by a is replaced by transitions labeled by a b for every b ∈ Σ O .Clearly, we have A n ∈ O(n).

Theorem 4 . 4 .
The following problem is in ExpTime: Given a deterministic parity automaton A, does Player O win Γ f (L p (A)) for some delay function f ?

Lemma 4 . 7 .
Player O wins Γ f (L p (A)) for some delay function f if and only if Player O wins G(A).
moves, which is enough to play at least |w 0 | rounds: w 0 is long enough to play the first round and w 1 is even long enough for at least the next |w 0 | rounds.Now, let β(0) • • • β(ℓ 1 − f (0)) be the response of Player O according to τ O .As we have played at least |w 0 | rounds, we obtain |β(0) • • • β(ℓ 1 − f (0))| ≥ |w 0 |.Thus, we are in the following situation for i = 1: as his next moves and let Player O respond by β(ℓ i − f (0) + 1) • • • β(ℓ i+1 − f (0)) according to τ O .Thus, we are again in the aforementioned situation for i + 1, which concludes the definition of τ ′ O .It remains to show that τ ′

a
i+1 bringing us back to the aforementioned situation for i + 1, which concludes the definition of τ O .It remains to show that τ O is winning for Player O. Let w =

k 3 )
[22].The parity game constructed above has at most O(2 |A| 4 •|A| 2 ) vertices and at most |A| colors.Hence, it can be solved in exponential time in the size of A.

2 )b 0 a 1 b 1 a 2 b 2 •
′ I .It remains to show that τ ′ I is winning.Let w ′ = α(• • • be an outcome of a play that is consistent with τ ′ I in Γ ′ and let w = a 0 • • be the simulating play of Γ as described above.

Lemma 5 . 5 .
The following problem is co-NP-hard: Given an acyclic deterministic automaton A over Σ I × Σ O , does Player O win Γ f (L * (A) • (Σ I × Σ O ) ω ) for some f ?

Lemma 5 . 6 .
The following problem is in co-NP: Given an acyclic non-deterministic automaton A overΣ I × Σ O , does Player O win Γ f (L * (A) • (Σ I × Σ O ) ω ) for some f ?Proof.Let L = L * (A) • (Σ I × Σ O ) ω ,which is in particular a reachability condition.Thus, Theorem 4.1 shows that Player O wins Γ f (L) if and only if pr I (L) is universal.Let k be the depth of A. As every word of length greater than k leads to a non-accepting sink state of A, membership in L * (A) • (Σ I × Σ O ) ω only depends on the prefix of length k.Hence, pr I (L) is universal if and only if pr I (A) accepts at least one prefix of every word of length k ≤ |A|.The latter problem can be solved in polynomial time by a universal Turing machine.

Theorem 5 . 8 .
For every n ≥ 0, there is a language L n overΣ I = Σ O = {a, b} such that • L n = L * (A n ) for some deterministic acyclic automaton A n with |A n | ∈ O(n) and depth n + 1, • Player O wins Γ f (L n • (Σ I × Σ O ) ω ) for some constant delay function f , but • Player I wins Γ f (L n • (Σ I × Σ O ) ω )for every delay function f with f (0) ≤ n.
• • • .Player O wins the play if and only if the out-