1 Introduction

Deciding language inclusion between two automata is a fundamental problem in verification, wherein we ask whether all executions of an implementation satisfy a given specification. Unfortunately, the problem of checking language inclusion is often computationally hard. For parity automata—which are the focus of this paper—it is \({\textbf {PSPACE}}\)-complete, with \({\textbf {PSPACE}}\)-hardness already occurring for finite state automata [39].

On the other hand, simulation is a fundamental behavioural relation between two automata [23, 33], which is a finer relation than language inclusion and is easier to check. For parity automata, simulation can be decided in polynomial time if the parity indices are fixed; otherwise it is in \({\textbf {NP}}\) [13]. Note that while simulation between two automata is sufficient to guarantee language inclusion, it is not necessary.

For history-deterministic automata, however, the relation of language inclusion is equivalent to simulation [8, 9], thus making them suitable for verification. These are nondeterministic automata where the nondeterminism can be resolved ‘on-the-fly’, just based on the prefix of the word read so far. The definition we use here was introduced by Henzinger and Piterman in 2006, where they dubbed it ‘good-for-games’ automata, while the term ‘history-determinism’ was coined by Colcombet [15] in the context of regular cost automata.

History-deterministic parity automata are more succinct than their deterministic counterparts [28] whilst still maintaining tractability for the problems of verification and synthesis on them [8, 24, 28]. Consequently, history-deterministic parity automata have been the subject of extensive research [2, 3, 5, 28, 29, 37], and has garnered significant attention over the recent years beyond parity automata as well, extending to quantitative automata [6, 7], infinite state systems [10, 20, 21, 31, 35], and timed automata [9].

Despite these recent research efforts, a significant gap remains in understanding the complexity of checking whether a given parity automaton is history-deterministic. While Henzinger and Piterman have shown an \({\textbf {EXPTIME}}\) upper bound [24], the best lower bound known so far is by Kuperberg and Skrzypczak since 2015 [28], who showed that checking for history-determinism is at least as hard as finding the winner of a parity game [28]—a problem that can be solved in quasi-polynomial time and is in \({\textbf {NP}}\cap {\textbf {coNP}}\) (and even in \({\textbf {UP}}\cap {\textbf {coUP}}\) [26]).

Kuperberg and Skrzypczak also gave a polynomial-time algorithm to check for history-determinism of co-Büchi automata in their work [28]. This was followed by a polynomial time algorithm to check for history-determinism of Büchi automata in 2018 by Bagnol and Kuperberg [3], who showed that in order to check if a Büchi automaton is history-deterministic, it suffices to find the winner of the so-called ‘two-token game’ of the automaton. This connection between history-determinism and two-token games was extended in 2020 to co-Büchi automata by Boker, Kuperberg, Lehtinen, and Skrzypczak [4]. It is conjectured that the winner of the two-token game of a parity automaton characterises its history-determinism. While the two-token conjecture is open to date, showing this conjecture would imply that one can check history-determinism of a given parity automata with a fixed parity index in polynomial time.

Our contributions. We show that checking for simulation between two parity automata is \({\textbf {NP}}\)-hard when the parity index is not fixed. Since simulation is known to be in \({\textbf {NP}}\), this establishes the problem to be \({\textbf {NP}}\)-complete (Theorem 11).

An adaptation of our proof of Theorem 11 gives us that checking history-determinism for a parity automata is also \({\textbf {NP}}\)-hard (Theorem 15), when the parity index is not fixed. This is an improvement on Kuperberg and Skrzypczak’s result from 2015, which shows that checking history-determinism for parity automata is at least as hard as solving parity games [28]. We also show, using the same reduction, that checking whether Eve wins the 2-token game (of a given parity automaton) is \({\textbf {NP}}\)-hard, while checking whether Eve wins the 1-token game is \({\textbf {NP}}\)-complete (Theorem 15).

As remarked earlier, for history-deterministic parity automata, the relation of language inclusion is equivalent to simulation. This gives us an immediate \({\textbf {NP}}\) upper bound for checking language inclusion of a nondeterministic parity automaton in an HD-parity automata, as was observed by Schewe [37]. We show that we can do better, by showing the problem to be decidable in quasi-polynomial time (Theorem 20).

Overview of the paper: one reduction for all. The central problem used in our reduction is of checking whether Eve wins a 2-D parity game, which is known to be \({\textbf {NP}}\)-complete due to Chatterjee, Henzinger and Piterman [13]. In Section 3, we give a reduction from this problem to checking for simulation between two parity automata, thus establishing its \({\textbf {NP}}\)-hardness (Theorem 11). We then show, in Section 4.1, that the problem of checking whether Eve wins a good 2-D parity games—a technical subclass of 2-D parity games—is also \({\textbf {NP}}\)-hard. In Section 4.2, we show that modifying the reduction in proof of Theorem 11 to take as inputs good 2-D parity games yields \({\textbf {NP}}\)-hardness for the problems of checking history-determinism (Lemma 14) and of checking if Eve wins the 1-token game or the 2-token game (Theorem 15). Finally, in Section 5, we give a quasi-polynomial algorithm to check whether the language of a nondeterministic parity automaton is contained in the language of a history-deterministic parity automaton (Theorem 20), by reducing to finding the winner in a parity game.

2 Preliminaries

We let \(\mathbb {N}=\{0,1,2,\cdots \}\) to be the set of natural numbers, and \(\omega \) to be the cardinality of \(\mathbb {N}\). We will use [ij] to denote the set of integers in the interval \(\{i,i+1,\ldots ,j\}\) for two natural numbers ij with \(i<j\), and [j] for the interval [0, j]. An alphabet \(\varSigma \) is a finite set of letters. We use \(\varSigma ^{*}\) and \(\varSigma ^{\omega }\) to denote the set of words with finite and \(\omega \) length over \(\varSigma \) respectively. We also let \(\varepsilon \) denote the unique word of length 0.

2.1 Parity conditions

Let \(G = (V,E)\) be a (finite or infinite) directed graph equipped with a priority function \(\chi :E \xrightarrow {} \mathbb {N}\) that assigns each edge with a natural number, called its priority. We say that an infinite path \(\rho \) in G satisfies the \(\chi \)-parity condition if the highest priority occurring infinitely often in the path is even. When clear from the context, we will drop ‘parity condition’ and instead say that \(\rho \) satisfies \(\chi \).

A parity condition is easily dualised. Given a priority function \(\chi \) as above, consider the priority function \(\chi ' := \chi +1\) that is obtained by increasing all the labels by 1. Then, an infinite path satisfies \(\chi '\) if and only if it does not satisfy \(\chi \).

2.2 Parity automata

A nondeterministic parity automaton \(\mathcal {A}= (Q,\varSigma ,q_0,\varDelta ,\varOmega )\) contains a finite directed graph with edges labelled by letters in \(\varSigma \). These edges are called transitions, which are elements of the set \(\varDelta \subseteq Q \times \varSigma \times Q\), and the vertices of this graph are called states, which are elements of the set Q.

Each automaton has a designated initial state \(q_0 \in Q\), and a priority function \(\varOmega : \varDelta \xrightarrow {} [i,j]\) which assigns each transition a priority in [ij], for \(i<j\) two natural numbers. For states pq and an alphabet \(a \in \varSigma \), we use \(p\xrightarrow {a:c}q\) to denote a transition from p to q on the letter a that has the priority c.

A run on an infinite word w in \(\varSigma ^{\omega }\) is an infinite path in the automaton, starting at the initial state and following transitions that correspond to the letters of w in sequence. We say that such a run is accepting if it satisfies the \(\varOmega \)-parity condition, and a word w in \(\varSigma ^{\omega }\) is accepting if the automaton has an accepting run on w. The language of an automaton \(\mathcal {A}\), denoted by \(L(\mathcal {A})\), is the set of words that it accepts. We say that the automaton \(\mathcal {A}\) recognises a language \(\mathcal {L}\) if \(L(\mathcal {A})=\mathcal {L}\). A parity automaton \(\mathcal {A}\) is said to be deterministic if for any given state in \(\mathcal {A}\) and any given letter in \(\varSigma \), there is at most one transition from the given state on the given letter.

If \(\mathcal {A}\)’s priorities are in [ij], we say that \((j-i+1)\) is the number of priorities of \(\mathcal {A}\). Since decreasing (or increasing) all of these priorities in the automaton by 2 does not change the acceptance of a run— and hence a word—in the automaton, we will often assume i to be 0 or 1. With this assumption, the interval [ij] is then said to be the parity index of \(\mathcal {A}\). A Büchi (resp. co-Büchi) automaton is a parity automaton whose parity index is [1, 2] (resp. [0, 1]).

Remark 1

We note that we allow an automatonto be incomplete, i.e. there might be letter and state pairs in an automaton such that there are no transitions on that letter from that state.

2.3 Game arenas

An arena is a directed graph \(G=(V,E)\) with vertices partitioned as \(V_{\pmb {\forall }}\) and \(V_{\pmb {\exists }}\) between two players Adam and Eve respectively. Additionally, a vertex \(v_0 \in V_{\pmb {\forall }}\) is designated as the initial vertex. We say that the set of vertices \(V_{\pmb {\exists }}\) is owned by Eve while the set of vertices \(V_{\pmb {\forall }}\) is owned by Adam. Additionally, we assume that the edges E don’t have both its start and end vertex in \(V_{\pmb {\exists }}\) or \(V_{\pmb {\forall }}\).

Given an arena as above, a play of this arena is an infinite path starting at \(v_0\), and is formed as follows. A play starts with a token at the start vertex \(v_0\), and proceeds for countably infinite rounds. At each round, the player who owns the vertex on which the token is currently placed chooses an outgoing edge, and the token is moved along this edge to the next vertex for another round of play. This creates an infinite path in the arena, which we call a play of G.

A game \(\mathcal {G}\) consists of an arena \(G=(V,E)\) and a winning condition given by a language \(L \subseteq E^{\omega }\). We say that Eve wins a play \(\rho \) in G if \(\rho \) is in L, and Adam wins otherwise. A strategy for Eve in such a game \(\mathcal {G}\) is a function from the set of plays that end at an Eve’s vertex to an outgoing edge from that vertex. Such an Eve strategy is said to be a winning strategy for Eve if any play that can be produced when she plays according to her strategy is winning for Eve. We say that Eve wins the game if she has a winning strategy. Winning strategies are defined for Adam analogously, and we say that Adam wins the game if he has a winning strategy.

In this paper we will deal with \(\omega \)-regular games. These are games where the languages specifying the winning condition are recognised by a parity automata. Such games are known to be determined [22, 32], i.e. each game has a winner. Two games are equivalent if they have the same winner.

2.4 Parity games

A parity game \(\mathcal {G}\) is played over a finite game arena \(G = (V,E)\), with the edges of G labelled by a priority function \(\chi :E \xrightarrow {} \{0,1,2,\cdots ,d\}\). A play \(\rho \) in the arena of \(\mathcal {G}\) is winning for Eve if and only if \(\rho \) satisfies the \(\chi \)-parity condition.

2.5 Muller conditions and Zielonka trees

A \((C,\mathcal {F})\)-Muller conditions consists of a finite set of colours C, and a set \(\mathcal {F}\) consisting of subsets of C. An infinite sequence in \(C^{\omega }\) satisfies the \((C,\mathcal {F})\)-Muller condition if the set of colours seen infinitely often along the sequence is in \(\mathcal {F}\).

A Muller game \(\mathcal {G}\) consists of an arena \(G = (V,E)\), a colouring function \(\pi : E \xrightarrow {} C\) and a Muller condition \((C,\mathcal {F})\). An infinite play \(\rho \) in \(\mathcal {G}\) is winning for Eve if the set of colours seen infinitely often along the play is in \(\mathcal {F}\), and Eve wins the Muller game \(\mathcal {G}\) if she has a winning strategy.

Every Muller game can be converted to an equivalent parity game, as shown by Gurevich and Harrington [22]. We will use the conversion of Dziembowski, Jurdziński, and Walukiewikz that involve Zielonka trees [12, 16], which we define below.

Definition 2

(Zielonka tree). Given a Muller condition \((C,\mathcal {F})\), the Zielonka tree of a Muller condition, denoted \(Z_{C,\mathcal {F}}\), is a tree whose nodes are labelled by subsets of C, and is defined inductively. The root of the tree is labelled by C. For a node that is already constructed and labelled with the set X, its children are nodes labelled by distinct maximal non-empty subsets \(X' \subsetneq X\) such that \(X \in \mathcal {F}\Leftrightarrow X' \notin \mathcal {F}\). If there are no such \(X'\), then the node labelled X is a leaf of \(Z_{C,\mathcal {F}}\) and has no attached children.

Given a \((C,\mathcal {F})\)-Muller condition, consider the language \(L \subseteq C^{\omega }\) consisting of words w that satisfy the \((C,\mathcal {F})\)-Muller condition. The language L is then said to be the language of the \((C,\mathcal {F})\)-Muller condition, and can be recognised by a deterministic parity automaton, whose size depends on the size of the Zielonka tree [12].

Lemma 3

([12]). Let \((C,\mathcal {F})\) be a Muller condition with the Zielonka tree \(Z_{C,\mathcal {F}}\) that has n leaves and height h. Then there is a deterministic parity automaton \(\mathcal {D}_{C,\mathcal {F}}\) that can be constructed in polynomial time such that \(\mathcal {D}_{C,\mathcal {F}}\) has n states and \((h+1)\) priorities, and accepts the language of the the \((C,\mathcal {F})\)-Muller condition.

Consider a Muller game \(\mathcal {G}\) on the arena \(G = (V,E)\) with the colouring function \(\pi :E \xrightarrow {} C\) and the Muller condition \((C,\mathcal {F})\). We can then construct an equivalent parity game \(\mathcal {G}'\) by taking the product of \(\mathcal {G}\) with the automaton \(\mathcal {D}_{C,\mathcal {F}}\) from Lemma 3. In more details, the set of vertices \(V'\) of \(\mathcal {G}'\) consists of vertices of the form \(v'=(v,q)\), where v is a vertex in \(\mathcal {G}\) and q is a state in \(\mathcal {D}_{C,\mathcal {F}}\). The owner of the vertex (vq) is the owner of the vertex v, and the initial vertex is \((\iota ,q_0)\), where \(\iota \) is the initial vertex in \(\mathcal {G}\) and \(q_0\) is the initial state in \(\mathcal {D}_{C,\mathcal {F}}\). We have the edge \(e' = (v,q) \xrightarrow {} (v',q')\) in \(\mathcal {G}'\) if \(e = v \xrightarrow {} v'\) is an edge in \(\mathcal {G}\) with the colour \(\pi (e) = c\), and \(\delta = q \xrightarrow {c} q'\) is a transition in \(\mathcal {D}_{C,\mathcal {F}}\). The edge \(e'\) is assigned the priority \(\varOmega (\delta )\) in \(\mathcal {G}'\), where \(\varOmega \) is the priority function of the automaton \(\mathcal {D}_{C,\mathcal {F}}\). The game \(\mathcal {G}'\) then is such that Eve wins \(\mathcal {G}\) if and only if Eve wins \(\mathcal {G}'\).

Lemma 4

Let \(\mathcal {G}\) be a Muller game on an arena consisting of m vertices with a Muller condition \((C,\mathcal {F})\) whose Zielonka tree \(Z_{C,\mathcal {F}}\) has n leaves and height h. Then, \(\mathcal {G}\) can be converted to an equivalent parity game \(\mathcal {G}'\) which has mn many vertices and \(h+1\) priorities.

2.6 2-dimensional parity game

Multi-dimensional parity games were introduced by Chatterjee, Henzinger and Piterman, where they called it generalised parity games [13]. For our purposes, it suffices to consider 2-dimensional (2-D) parity games, which is what we define now.

A 2-dimensional parity game \(\mathcal {G}\) is similar to a parity game, but we now have two priority functions \(\pi _1:E \xrightarrow {} [0,d_1]\) and \(\pi _2:E \xrightarrow {} [0,d_2]\) on E. Any infinite play in the game is winning for Eve if the following holds: if the play satisfies \(\pi _1\), then it satisfies \(\pi _2\).

We say that Adam wins the game otherwise. We call the problem of deciding whether Eve wins a 2-D parity game as 2-D parity game.

2-D parity game: Given a 2-D parity game \(\mathcal {G}\), does Eve win \(\mathcal {G}\)?

If Eve has a strategy to win a 2-D parity game, then Eve has a positional winning strategy to do so, i.e. she can win by always choosing the same edge from each vertex in \(V_{\pmb {\exists }}\), which is given by a function \(\sigma :V_{\pmb {\exists }} \xrightarrow {} E\). This can be inferred directly from seeing the 2-D parity game as a Rabin game, which are known to have positional strategies for Eve [17]. Furthermore, given a positional strategy \(\sigma \) for Eve in a 2-D parity game (or a Rabin game), one can check in polynomial time if \(\sigma \) is a winning strategy [17]. This gives us a nondeterministic polynomial time procedure to decide if Eve wins a given 2-D parity game. In 1988, Emerson and Jutla established \({\textbf {NP}}\)-hardness for Rabin games [18, 19]. This was later extended by Chatterjee, Henzinger, and Piterman in 2007 to show \({\textbf {NP}}\)-hardness for 2-D parity games as well [13].

Theorem 5

([13]). The problem of deciding whether Eve wins a given 2-D parity game is \({\textbf {NP}}\)-complete.

Remark 6

Chatterjee, Henzinger and Piterman give a slightly different and a more natural definition of 2-D parity games [13], where the winning condition for Eve requires every play to satisfy either of two given parity conditions. It is easy to see, however, that both definitions are log-space inter-reducible to each other, by dualising the first parity condition. Our definition, although less natural, makes the connection to simulation games and our reductions in Sections 4 and 3 more transparent.

2.7 Simulation

We say a parity automaton \(\mathcal {A}\) simulates another parity automaton \(\mathcal {B}\) if for any (finite or infinite) run on \(\mathcal {B}\), there is a corresponding run on \(\mathcal {A}\) on the same word that can be constructed on-the-fly such that if the run in \(\mathcal {B}\) is accepting, so is the corresponding run in \(\mathcal {A}\). This is made more formal by the following simulation game.

Definition 7

(Simulation game). Given nondeterministic parity automata \(\mathcal {A}= (Q,\varSigma ,q_0,\varDelta _A,\varOmega _A)\) and \(\mathcal {B}= (P,\varSigma ,p_0,\varDelta _B, \varOmega _B)\), the simulation game between \(\mathcal {A}\) and \(\mathcal {B}\), denoted \(Sim(\mathcal {A},\mathcal {B})\), is defined as a two player game between Adam and Eve as follows, with positions in \(P \times Q\). A play of the simulation game starts at the position \((p_0,q_0)\), and has \(\omega \) many rounds. For each \(i \in \mathbb {N}\), the \((i+1)^{th}\) round starts at a position \((p_i,q_i) \in P \times Q\), and proceeds as follows:

  • Adam selects a letter \(a \in \varSigma \), and a transition \(p_i \xrightarrow {a} p_{i+1}\) in \(\mathcal {B}\).

  • Eve selects a transition \(q_i \xrightarrow {a} q_{i+1}\) on the same letter in \(\mathcal {A}\).

The new position is \((p_{i+1},q_{i+1})\), for another round of the play.

The player Eve wins the above play if either her constructed run in \(\mathcal {A}\) is accepting, or Adam’s constructed run in \(\mathcal {B}\) is rejecting. If Eve has a winning strategy in \(Sim(\mathcal {A},\mathcal {B})\), then we say that \(\mathcal {A}\) simulates \(\mathcal {B}\), and denote it by \(\mathcal {B}\lesssim \mathcal {A}\).

We call the problem of checking whether a parity automaton simulates another as Simulation:

Simulation: Given two parity automata \(\mathcal {A}\) and \(\mathcal {B}\), does \(\mathcal {A}\) simulate \(\mathcal {B}\)?

The simulation game \(Sim(\mathcal {A},\mathcal {B})\) can naturally be seen as a 2-D parity game, where the arena is the product of two automata with Adam selecting letters and transitions in \(\mathcal {A}\) and Eve transitions in \(\mathcal {B}\), and the priority functions \(\chi _1\) and \(\chi _2\) based on corresponding priorities of transitions in \(\mathcal {A}\) and \(\mathcal {B}\) respectively. Since 2-D parity game can be solved in \({\textbf {NP}}\), Simulation can be solved in \({\textbf {NP}}\) as well.

2.8 History-determinism

A history-deterministic (HD) parity automaton is a nondeterministic parity automaton in which the nondeterminism can be resolved ‘on-the-fly’ just based on the prefix read so far, without knowing the rest of the word. The history-determinism of a parity automaton can be characterised by the letter game, which is a 2-player turn-based game between Adam and Eve, who take alternating turns to select a letter and a transition in the automaton (on that letter), respectively. After the game ends, the sequence of Adam’s choices of letters is an infinite word, and the sequence of Eve’s choices of transitions is a run on that word. Eve wins the game if her run is accepting or Adam’s word is rejecting, and we say that an automaton is history-deterministic if Eve has a winning strategy in the history-determinism game.

Definition 8

(Letter game). Given a parity automaton \(\mathcal {A}= (Q,\varSigma , q_0, \varDelta ,\varOmega )\), the letter game of \(\mathcal {A}\) is defined between the two players Adam and Eve as follows, with positions in \(Q \times \varSigma ^{*}\). The game starts at \((q_0,\varepsilon )\) and proceeds in \(\omega \) many rounds. For each \(i \in \mathbb {N}\), the \((i+1)^{th}\) round starts at a position \((q_i,w_i) \in Q \times \varSigma ^{i}\), and proceeds as follows:

  • Adam selects a letter \(a_i \in \varSigma \)

  • Eve selects a transition \(q_i \xrightarrow {a_i} q_{i+1} \in \varDelta \)

The new position is \((q_{i+1},w_{i+1})\), where \(w_{i+1} = w_i a_i\).

Thus, the play of a letter game can be seen as Adam constructing a word letter-by-letter, and Eve constructing a run transition-by-transition on the same word. Eve wins such a play if the following holds: if Adam’s word is in \(L(\mathcal {A})\), then Eve’s run is accepting.

We note that the letter game is an \(\omega \)-regular game: the set of winning plays \(\mathcal {P}\) for Eve are sequences of alternating letters and transitions, so that the word formed by just the letters is accepting in \(\mathcal {A}\), while the run formed by just the transitions is rejecting. Since parity automata can be determinised, it is clear that \(\mathcal {P}\) is an \(\omega \)-regular language, hence the letter game is an \(\omega \)-regular game, and therefore the letter game is determined [22, 32].

If Eve has a winning strategy on the letter game of \(\mathcal {A}\), then \(\mathcal {A}\) is said to be history-deterministic. We are interested in the problem of checking whether a given parity automaton is history-deterministic, which we shall denote by History-deterministic.

History-deterministic: Given a parity automaton \(\mathcal {A}\), is \(\mathcal {A}\) history-deterministic?

2.9 Token games

Token games, or k-token games are defined on an automaton and are similar to letter games. Similar to as in a letter game, Adam constructs a word letter-by-letter and Eve constructs a run transition-by-transition on the same word over \(\omega \) many rounds. But additionally, Adam also constructs k runs transition-by-transition on that word. The winning objective of Eve requires her to construct an accepting run if one of k Adam’s runs is accepting.

Definition 9

(k-token game). Given a nondeterministic parity automaton \(\mathcal {A}= (Q,\varSigma ,, q_0, \varDelta ,\varOmega )\), the k-token game of \(\mathcal {A}\) is defined between the two players Adam and Eve as follows, with positions in \(Q \times Q^k\). The game starts at \((q_0,(q_0)^k)\) and proceeds in \(\omega \) many rounds. For each \(i \in \mathbb {N}\), the \((i+1)^{th}\) round starts at a position \((q_i,(p^1_i,p^2_i,\cdots ,p^k_i)) \in Q \times Q^k\), and proceeds as follows:

  • Adam selects a letter \(a_i \in \varSigma \)

  • Eve selects a transition \(q_i \xrightarrow {a_i} q_{i+1} \in \varDelta \)

  • Adam selects k transitions \(p^1_i \xrightarrow {a_i} p^1_{i+1}, p^2_i \xrightarrow {a_i} p^2_{i+1}, \cdots p^k_i \xrightarrow {a_i} p^k_{i+1},\)

The new position is \((q_{i+1},(p^1_{i+1},p^2_{i+1},\cdots ,p^k_{i+1}))\), from where the \((i+2)^{th}\) round begins.

Thus, in a play of the k-token game, Eve constructs a run and Adam k runs, all on the same word. Eve wins such a play if the following holds: if one of Adam’s k runs is accepting, then Eve’s run is accepting.

Bagnol and Kuperberg have shown that for any parity automaton \(\mathcal {A}\), the 2-token game of \(\mathcal {A}\), and the k-token game of \(\mathcal {A}\) for any \(k \ge 2\), are equivalent.

Lemma 10

([3]). Given a parity automaton \(\mathcal {A}\), Eve wins 2-token game of \(\mathcal {A}\) if and only if Eve wins the k-token game of \(\mathcal {A}\) for all \(k \ge 2\).

If \(\mathcal {A}\) is a nondeterministic Büchi or co-Büchi automaton, then Eve wins the 2-token game of \(\mathcal {A}\) if and only if \(\mathcal {A}\) is history-deterministic[3, 4], and it is conjectured that this result extends to all parity automata.

Two-token conjecture: Given a nondeterministic parity automaton \(\mathcal {A}\), Eve wins the 2-token game of \(\mathcal {A}\) if and only if \(\mathcal {A}\) is history-deterministic.

3 Simulation is \({\textbf {NP}}\)-hard

In this section, we show that the problem of deciding if a parity automaton simulates another is \({\textbf {NP}}\)-hard, by giving a reduction from the problem of deciding whether Eve wins a 2-D parity game, which was shown to be \({\textbf {NP}}\)-complete by Chatterjee, Henzinger and Piterman [13]. Since a simulation game can be solved in \({\textbf {NP}}\) (see Section 2.7), we obtain \({\textbf {NP}}\)-completeness.

Theorem 11

Given two parity automata \(\mathcal {A}\) and \(\mathcal {B}\), deciding if \(\mathcal {A}\) simulates \(\mathcal {B}\) is \({\textbf {NP}}\)-complete.

Since \(\mathcal {A}\) simulates \(\mathcal {B}\) if and only if Eve wins the simulation game, which is a 2-dimensional parity game (see Section 2.7), and deciding if Eve wins a 2-D parity game is in \({\textbf {NP}}\) [13], we get that the problem of checking for simulation is in \({\textbf {NP}}\). Hence, we show that Simulation is \({\textbf {NP}}\)-hard in the rest of this section, by giving a reduction from 2-D parity game.

Let \(\mathcal {G}\) be a two-dimensional parity game played on the arena \(G=(V,E)\), with two priority functions \(\chi _1\) and \(\chi _2\). We recall that the winning condition for Eve in such a game requires a play to satisfy the \(\chi _2\)-parity condition if the \(\chi _1\)-parity condition is satisfied (see Section 2.6).

Overview of the reduction. We shall construct two parity automata \(\mathcal {H}\) and \(\mathcal {D}\) such that \(\mathcal {H}\) simulates \(\mathcal {D}\) if and only if Eve wins \(\mathcal {G}\). The automata \(\mathcal {H}\) and \(\mathcal {D}\) are over the alphabet \(E \cup \{\$\}\), where \(\$\) is a letter added for padding. The automaton \(\mathcal {D}\) is deterministic, while the automaton \(\mathcal {H}\) has nondeterminism on the letter \(\$\) and contains a copy of \(\mathcal {D}\).

Adam, by his choice of letter in \(Sim(\mathcal {H},\mathcal {D})\), captures his moves from Adam vertices in \(\mathcal {G}\). Similarly, Eve, by means of choosing her transition on \(\$\) in \(\mathcal {H}\), captures her moves from Eve vertices in \(\mathcal {G}\). After each \(\$\)-round in \(Sim(\mathcal {H},\mathcal {D})\), we require Adam to ‘replay’ Eve’s choice as the next letter. Otherwise, Eve can take a transition to the same state as Adam (recall that \(\mathcal {H}\) contains a copy of \(\mathcal {D}\)), from where she wins the play in \(Sim(\mathcal {H},\mathcal {D})\) by copying Adam’s transitions in each round from here on-wards. The priorities of \(\mathcal {D}\) are based on \(\chi _1\), while the priorities of \(\mathcal {H}\) are based on \(\chi _2\). This way \(\mathcal {D}\) and \(\mathcal {H}\) roughly accept words that correspond to plays in \(\mathcal {G}\) satisfying \(\chi _1\) and \(\chi _2\) respectively.

We first present our reduction on an example 2-D parity game whose sub-game consists of vertices \(u,v,v',w,w'\) with edges between them as shown in Fig. 1. For Adam’s vertex u, we have corresponding states \(u_D\) in \(\mathcal {D}\) and \(u_H\) in \(\mathcal {H}\). An Adam move from u in \(\mathcal {G}\) corresponds to one round of \(Sim(\mathcal {H},\mathcal {D})\) from the position \((u_D,u_H)\). In \(\mathcal {G}\), Adam chooses an outgoing edge, say \(e=(u,v)\) from u such that \(\chi _1(u)=c_1\) and \(\chi _2(u)=c_2\). This corresponds to Adam choosing the letter e in \(Sim(\mathcal {H},\mathcal {D})\). We then have the corresponding unique transitions \(u_D \xrightarrow {e:c_1} v_{\$}\) in \(\mathcal {D}\) and \(u_H \xrightarrow {e:c_2} v_H\) in \(\mathcal {H}\), and hence the simulation game goes to \((v_{\$},v_H)\).

Fig. 1.
figure 1

A snippet of a game \(\mathcal {G}\), and the corresponding automata \(\mathcal {D}\) and \(\mathcal {H}\) constructed in the reduction. The Adam vertices are represented by pentagons and Eve vertices by squares. The automaton \(\mathcal {D}\) is deterministic, and \(\mathcal {H}\) contains a copy of \(\mathcal {D}\).

An Eve move from v in \(\mathcal {G}\) corresponds to two rounds of the simulation game from \((v_{\$},v_H)\). In \(Sim(\mathcal {H},\mathcal {D})\), Adam must select a letter \(\$\) and the unique \(\$\) transition \(v_{\$} \xrightarrow {\$:0} v_D\) on \(\mathcal {D}\), since \(\$\) is the only letter on which there is an outgoing transition from \(v_{\$}\). Eve must now select a transition on \(\$\) from \(v_{H}\). Suppose she picks \(v_{H} \xrightarrow {\$:0} (v_{H},f)\) where \(f=(v,w)\) is an outgoing edge from v in \(\mathcal {G}\) with \(\chi _1(f)=c_5\) and \(\chi _2(f)=c_6\). This corresponds to Eve selecting the edge f from her vertex v in \(\mathcal {G}\). The simulation game goes to the position \((v_D,(v_H,f))\). From here, Adam may select any outgoing edge from v as the letter. If he picks \(f' = (v,w')\) and the transition \(v_D \xrightarrow {f':c_7} w'_D\), then Eve can pick the transition \((v_{H},f) \xrightarrow {f':c_8} w'_D\) and move to the same state as Adam: such transitions are indicated by dashed edges in Fig. 1. From here, Eve can win \(Sim(\mathcal {H},\mathcal {D})\) by simply copying Adam’s transitions. Otherwise, Adam picks the edge f as the letter, same as Eve’s ‘choice’ in the previous round, resulting in the transition \(v_D \xrightarrow {f:c_5} w_D\) in \(\mathcal {D}\) and \((v_H,f)\xrightarrow {f:c_6}w_H\) in \(\mathcal {H}\), and the simulation game goes to the position \((w_D,w_H)\), from where the game continues similarly.

The reduction. We now give formal descriptions of the two parity automata \(\mathcal {D}\) and \(\mathcal {H}\) such that \(\mathcal {H}\) simulates \(\mathcal {D}\) if and only if Eve wins \(\mathcal {G}\). We encourage the reader to refer to Fig. 1 while reading the construction of the automata described below.

Both automata \(\mathcal {D}\) and \(\mathcal {H}\) are over the alphabet \(\varSigma = E \cup \{\$\}\). The automaton \(\mathcal {D}\) is given by \(\mathcal {D}= (P, \varSigma , p_0,\varDelta _D, \varOmega _D)\), where the set P consists of the following states:

  • states \(u_D\) for each Adam vertex \(u \in V_{\pmb {\forall }}\),

  • states \(v_{\$}\) and \(v_{D}\) for each Eve vertex \(v \in V_{\pmb {\exists }}\).

The state \(p_0 = \iota _D\) is the initial vertex, where \(\iota \) is the initial vertex of the game \(\mathcal {G}\). The set \(\varDelta _D\) consists of the following transitions with their priorities (given by \(\varOmega _D\)) as indicated:

  • transitions \(u_D \xrightarrow {e:\chi _1(e)} v_{\$}\) for every edge \(e = (u,v)\) in \(\mathcal {G}\) such that \(u \in V_{\pmb {\forall }}\) is an Adam-vertex in \(\mathcal {G}\),

  • transitions \(v_{\$} \xrightarrow {\$:0} v_D\) for every \(v \in V_{\pmb {\exists }}\) that is an Eve-vertex in \(\mathcal {G}\),

  • transitions \(v_D \xrightarrow {f:\chi _1(f)} w_D\) for every edge \(f=(v,w)\) in \(\mathcal {G}\) such that \(v \in V_{\pmb {\exists }}\) is an Eve vertex in \(\mathcal {G}\)

The automaton \(\mathcal {H}\) is given by \(\mathcal {H}= (Q, \varSigma , q_0, \varDelta _H,\varOmega _H)\), where the set Q consists of the following states:

  • states \(u_H\) for each Adam vertex \(u \in V_{\pmb {\forall }}\),

  • states \(v_{H}\) for each Eve vertex \(v \in V_{\pmb {\exists }}\),

  • states \((v_{H},f)\) for each edge \(f=(v,w)\) in \(\mathcal {G}\) such that \(v \in V_{\pmb {\exists }}\) is an Eve vertex,

  • all states in P, the set of states of \(\mathcal {D}\).

The state \(q_0=\iota _H\) is the initial vertex. The set \(\varDelta _H\) consists of the following transitions with their priorities (given by \(\varOmega _H\)) as indicated:

  • transitions \(u_H \xrightarrow {e:\chi _2(e)} v_H\) for every edge \(e = (u,v)\) in \(\mathcal {G}\) such that \(u \in V_{\pmb {\forall }}\) is an Adam-vertex in \(\mathcal {G}\),

  • transitions \(v_H \xrightarrow {\$:0} (v_H,f)\) for every edge \(f = (v,w)\) in \(\mathcal {G}\) that is outgoing from an Eve-vertex \(v \in V_{\pmb {\exists }}\),

  • transitions \((v_H,f) \xrightarrow {f:\chi _2(f)} w_H\) for every edge \(f=(v,w)\) in \(\mathcal {G}\) outgoing from an Eve-vertex \(v \in V_{\pmb {\exists }}\),

  • transitions \((v_H,f) \xrightarrow {f':\chi _2(f')} w'_D\) for every edge \(f'=(v,w') \ne f\) in \(\mathcal {G}\) outgoing from an Eve-vertex \(v \in V_{\pmb {\exists }}\),

  • all transitions of \(\mathcal {D}\).

Note that, by construction, \(\mathcal {H}\) contains a copy of \(\mathcal {D}\) as a sub-automaton.

Correctness of the reduction. We now show that Eve wins the simulation game \(Sim(\mathcal {H},\mathcal {D})\) if and only if Eve wins the game \(\mathcal {G}\). Call any play of the simulation game uncorrupted if the following holds: whenever Eve’s state in \(\mathcal {H}\) is at \((v_H,f)\) at the start of a round of \(Sim(\mathcal {H},\mathcal {D})\), Adam plays the letter f. If Adam plays a letter \(f' \ne f\), then we call such a move corrupted. Any play consisting of a corrupted move is called a corrupted play.

It is clear that Eve wins any play of \(Sim(\mathcal {H},\mathcal {D})\) that is corrupted, since a corrupted move causes Eve’s state in \(\mathcal {H}\) and Adam’s state in \(\mathcal {D}\) to be the same in \(Sim(\mathcal {H},\mathcal {D})\). Then, both Eve’s and Adam’s runs are identical and determined by the choices of Adam’s letters. In particular, Eve’s run is accepting if Adam’s run is.

Thus, it suffices to consider only uncorrupted plays. We first observe an invariant that is preserved throughout any uncorrupted play of \(Sim(\mathcal {H},\mathcal {D})\).

Invariant: At the start of any round of the simulation game \(Sim(\mathcal {H},\mathcal {D})\) following an uncorrupted play:

  • Adam’s state is at \(u_D\) for some \(u \in V_{\pmb {\forall }}\) if and only if Eve’s state is at \(u_H\)

  • Adam’s state is at \(v_{\$}\) for some \(v \in V_{\pmb {\exists }}\) if and only if Eve’s state is at \(v_H\)

  • Adam’s state is at \(v_D\) for some \(v \in V_{\pmb {\exists }}\) if and only if Eve’s state is at \((v_H,f)\) for some edge f that is outgoing from v.

This invariant is easy to observe from the construction, and can be shown by a routine inductive argument.

Note that if Adam constructs the word \(w = e_0 \$ f_0 e_1 \$ f_1\ldots \)—which we denote by \((e_i \$ f_i)_{i\ge 0}\) for succinctness—in an uncorrupted play of \(Sim(\mathcal {H},\mathcal {D})\), then Eve’s run on \(\mathcal {H}\) is uniquely determined, since the letter \(f_i\) indicates how nondeterminism on \(\mathcal {H}\) was resolved by Eve on the \(i^{th}\) occurrence of \(\$\) in \(Sim(\mathcal {H},\mathcal {D})\). Thus, any uncorrupted play in the simulation can be thought of as Adam selecting the \(e_i\)’s and Eve selecting the \(f_i\)’s, resulting in the word \(w = (e_i \$ f_i)_{i \ge 0}\) being constructed in the simulation game. Note that then, by construction, \((e_i f_i)_{i \ge 0}\) is a play in \(\mathcal {G}\). Conversely, if \((e_i f_i)_{i \ge 0}\) is a play in \(\mathcal {G}\), then there is an uncorrupted play of \(Sim(\mathcal {H},\mathcal {D})\) whose word is \(w = (e_i \$ f_i)_{i \ge 0}\).

Furthermore, observe that the transitions on a letter \(e \in E\) in \(\mathcal {D}\) and \(\mathcal {H}\) in any uncorrupted play have the priorities \(\chi _1(e)\) and \(\chi _2(e)\) respectively, while transitions on \(\$\) have priority 0. Thus, in a uncorrupted play of \(Sim(\mathcal {H},\mathcal {D})\) whose word is \((e_i \$ f_i)_{i \ge 0}\), the highest priorities occurring infinitely often in the run on \(\mathcal {D}\) and \(\mathcal {H}\) are the same as the highest \(\chi _1\)-priority and \(\chi _2\)-priority occurring infinitely often in the play \((e_i f_i)_{i \ge 0}\) respectively.

Thus, an uncorrupted play in \(Sim(\mathcal {H},\mathcal {D})\) whose word is \(w = (e_i \$ f_i)_{i \ge 0}\) is winning for Eve if and only if the play \((e_i f_i)_{i\ge 0}\) in \(\mathcal {G}\) is winning for Eve. Since Eve wins any corrupted play, the equivalence of the games \(\mathcal {G}\) and \(Sim(\mathcal {H},\mathcal {D})\) follows easily now. If Eve has a winning strategy in \(\mathcal {G}\), she can use her strategy to select transitions so that the word \(w=(e_i \$ f_i)_{i \ge 0}\) that is constructed in any uncorrupted play \(\rho \) of \(Sim(\mathcal {H},\mathcal {D})\) corresponds to a winning play for her in \(\mathcal {G}\), and hence \(\rho \) is winning in \(Sim(\mathcal {H},\mathcal {D})\). If Adam ever makes a corrupted move, she wins trivially.

Conversely, if she has a winning strategy in \(Sim(\mathcal {H},\mathcal {D})\), then she can use her strategy to choose moves in \(\mathcal {G}\) so that the play \((e_i f_i)_{i\ge 0}\) corresponds to a winning uncorrupted play of \(Sim(\mathcal {H},\mathcal {D})\) in which the word \((e_i \$ f_i)_{i \ge 0}\) is constructed, thus resulting in the play \((e_i f_i)_{i \ge 0}\) to also be winning for Eve.

4 Checking History-Determinism is \({\textbf {NP}}\)-hard

In this section, we show that the problem of deciding whether a given nondeterministic parity automaton is history-deterministic is \({\textbf {NP}}\)-hard, as is the problem of deciding whether Eve wins the 1-token game or the 2-token game of a given parity automaton. To show this, we reduce from deciding whether Eve wins a 2-D parity game with priority functions \(\chi _1\) and \(\chi _2\) that satisfies the following property: any play satisfying the \(\chi _2\)-parity condition also satisfies the \(\chi _1\)-parity condition. We call such games ‘good 2-D parity games’. We first show in Section 4.1 that deciding whether Eve wins a good 2-D parity game is \({\textbf {NP}}\)-hard, and then use this to show \({\textbf {NP}}\)-hardness for the problems mentioned above in Section 4.2.

4.1 Good 2-D parity games

Definition 12

(Good 2-D parity game). A 2-D parity game \(\mathcal {G}\) with the priority functions \(\chi _1\) and \(\chi _2\) is called good if any play in \(\mathcal {G}\) that satisfies \(\chi _2\) also satisfies \(\chi _1\).

We call the problem of deciding whether Eve wins a 2-D parity game as good 2-D parity game. Chatterjee, Henzinger and Piterman’s reduction from SAT to 2-D parity game  [13] can also be seen as a reduction to Good 2-D parity game, as we show below.

Lemma 13

Deciding whether Eve wins a good 2-D parity game is \({\textbf {NP}}\)-hard.

Proof

We reduce from the problem of SAT. Let \(\phi \) be a Boolean formula over the variables \(X=\{x_1,x_2,\cdots ,x_M\}\) that is a conjunction of terms \(t_i\) for each \(i \in [1,N]\), where each term \(t_i\) is a finite disjunction of literals—elements of the set \(L=\{x_1,x_2,\cdots ,x_M,\lnot x_1,\lnot x_2, \cdots , \lnot x_M\}\). We shall construct a good 2-D parity game \(\mathcal {G}_{\phi }\) such that Eve wins \(\mathcal {G}_{\phi }\) if and only if \(\phi \) has a satisfying assignment.

Let \(T = \{t_1,t_2,\cdots ,t_N\}\) be the set of all terms in \(\phi \). The game \(\mathcal {G}_{\phi }\) has the set \(T \cup L\) as its set of vertices. The elements of L are Adam vertices, while the elements of T are Eve vertices. We set the element \(x_1\) in L to be the initial vertex. Each Adam vertex l in L has an outgoing edge \(e=(l,t)\) to every term t in T, and every Eve vertex \(t \in T\) has an outgoing edge \(f=(t,l)\) to a literal l if l is a literal in t. Thus, each play in the game \(\mathcal {G}_{\phi }\) can be seen as Adam and Eve choosing a term and a literal in that term in alternation respectively.

The game \(\mathcal {G}_{\phi }\) has priority functions \(\chi _1\) and \(\chi _2\). To every edge \(e = (l,t)\) that is outgoing from an Adam vertex, both priority functions \(\chi _1\) and \(\chi _2\) assign e the priority 0, i.e., \(\chi _1(e)=\chi _2(e)=0\). Every edge \(e = (t,l)\) that is outgoing from an Eve vertex is assigned priorities as follows:

figure a

This concludes our description of the game \(\mathcal {G}_{\phi }\). We now show that \(\mathcal {G}_{\phi }\) is a good 2-D parity game, which Eve wins if and only if \(\phi \) is satisfiable.

\({\boldsymbol{\mathcal {G}}}_{\boldsymbol{\phi }}\) is a good 2-D parity game. Let \(\rho \) be a play in \(\mathcal {G}_{\phi }\) that satisfies the \(\chi _2\) parity condition. If 2c is the largest \(\chi _2\)-priority occurring infinitely often in \(\rho \), then by construction, \(2c+2\) is the largest \(\chi _1\)-priority occurring infinitely often in the \(\rho \), which is also even. Thus, \(\rho \) satisfies the \(\chi _1\) parity condition.

If \(\boldsymbol{\phi }\) is satisfiable, then Eve wins \(\boldsymbol{\mathcal {G}}_{\boldsymbol{\phi }}\). Let \(f:\{x_1,x_2,\cdots ,x_M\} \xrightarrow {} \{\top ,\bot \}\) be a satisfying assignment of \(\phi \). Let \(\sigma \) be a function which assigns, to each term \(t_i\), a literal \(l \in t_i\) that is assigned \(\top \) in f. Consider the Eve-strategy \(\sigma _{\pmb {\exists }}\) in \(\mathcal {G}_{\phi }\) defined by \(\sigma _{\pmb {\exists }}(t) = (t,\sigma (l))\). We claim that \(\sigma _{\pmb {\exists }}\) is a winning strategy. Indeed, let \(\rho \) be a play in \(\mathcal {G}_{\phi }\) following \(\sigma _{\pmb {\exists }}\), and consider the largest i such that \(x_i\) or \(\lnot x_i\) appear infinitely often in \(\rho \). Since \(\sigma _{\pmb {\exists }}\) is obtained from a satisfying assignment, we know that either only \(x_i\) appears infinitely often, or only \(\lnot x_i\) appears infinitely often. In the former case, the highest \(\chi _2\) priority appearing infinitely often is 2i, which is even, and hence \(\rho \) is winning for Eve. In the latter case, the highest \(\chi _1\) priority appearing infinitely often is \(2i+1\), which is odd, and hence the \(\chi _1\)-parity condition is not satisfied, implying \(\rho \) is winning for Eve.

If Eve wins \(\boldsymbol{\mathcal {G}}_{\boldsymbol{\phi }}\), then \(\boldsymbol{\phi }\) is satisfiable. If Eve wins \(\mathcal {G}_{\phi }\), then we know she can win using a positional strategy since \(\mathcal {G}_{\phi }\) is a 2-dimensional parity game. Let \(\sigma _{\pmb {\exists }}:T \xrightarrow {} L\) be such a strategy, where Eve chooses the edge \((t,\sigma _{\pmb {\exists }} (t))\) at a vertex t. If there are no two terms \(t,t'\) such that \(\sigma _{\pmb {\exists }} (t) =x_i\) and \(\sigma _{\pmb {\exists }} (t') = \lnot x_i\) for some \(x_i\), then consider the assignment \(\sigma \) defined as follows. The assignment \(\sigma \) maps all variables x that are in the image of \(\sigma _{\pmb {\exists }}\) to \(\top \), while any terms \(x_j\) such that neither \(x_j\) or \(\lnot x_j\) appear in the image are assigned \(\top \) and \(\bot \) respectively. It is clear then that \(\sigma \) is a satisfying assignment, since each term t in \(\phi \) evaluates to \(\top \).

Otherwise, if there are terms \(t,t'\) with \(\sigma _{\pmb {\exists }}(t)=x_i\) and \(\sigma _{\pmb {\exists }}(t')=\lnot x_i\), we claim that Adam wins the game \(\mathcal {G}_{\phi }\). Adam can alternate between picking t and \(t'\), and then the highest \(\chi _1\) priority appearing infinitely often is \(2i+2\) while the highest \(\chi _2\) priority appearing infinitely often is \(2i+1\). This implies that the play is winning for Adam, which is a contradiction since \(\sigma _{\pmb {\exists }}\) is a winning strategy for Eve.    \(\square \)

4.2 \({\textbf {NP}}\)-hardness of checking history-determinism

We now show that deciding the history-determinism, whether Eve wins the 1-token game, and whether Eve wins the 2-token game of a given parity automaton is \({\textbf {NP}}\)-hard (Theorem 15). Much of the work towards this has already been done in the reduction from 2-D parity game to Simulation given in Section 3. We show that the automaton \(\mathcal {H}\) that is constructed when using this reduction from a good 2-D parity game \(\mathcal {G}\) is such that Eve wins \(\mathcal {G}\) if and only if \(\mathcal {H}\) is history-deterministic. Since Good 2-D parity game is \({\textbf {NP}}\)-hard (Lemma 13), we get that History-deterministic is \({\textbf {NP}}\)-hard as well.

Lemma 14

Checking whether a given nondeterministic parity automaton is history-deterministic is \({\textbf {NP}}\)-hard.

Proof

Let us consider a good 2-D parity game \(\mathcal {G}\). Recall the construction of the automata \(\mathcal {H}\) and \(\mathcal {D}\) in Section 3, which is such that Eve wins \(\mathcal {G}\) if and only if \(\mathcal {H}\) simulates \(\mathcal {D}\). We will show that if \(\mathcal {G}\) is a good 2-D parity game, then the following statements are equivalent.

  1. 1.

    Eve wins \(\mathcal {G}\).

  2. 2.

    \(\mathcal {H}\) simulates \(\mathcal {D}\).

  3. 3.

    \(\mathcal {H}\) is history-deterministic.

The equivalence of 1 and 3 would then conclude the proof. The equivalence of 1 and 2 has already been shown in the proof of Theorem 11, and we now focus on showing that 2 and 3 are equivalent.

Towards this, let \(\varSigma = E \cup \{\$\}\), and consider the languages \(\mathcal {L}_j\) over \(\varSigma \) consisting of the words \((e_i \$ f_i)_{i \ge 0}\) such that \((e_i f_i)_{i\ge 0}\) is a play in \(\mathcal {G}\) that satisfies \(\chi _j\), for \(j = 1,2\). By construction, we know \(L(\mathcal {D}) = \mathcal {L}_1\), and \(L(\mathcal {H}) = \mathcal {L}_1 \cup \mathcal {L}_2\). Furthermore, since \(\mathcal {G}\) is good, we know that \(\mathcal {L}_1 \supseteq \mathcal {L}_2\) and hence \(L(\mathcal {D}) = L(\mathcal {H})\). Observe that by construction, \(\mathcal {D}\) is deterministic.

If \(\mathcal {H}\) is history-deterministic, then since \(L(\mathcal {D}) = L(\mathcal {H})\), Eve wins the simulation game between \(\mathcal {H}\) and \(\mathcal {D}\): she can use her strategy in the letter game of \(\mathcal {H}\) to play in \(Sim(\mathcal {H},\mathcal {D})\), ignoring Adam’s transitions in \(\mathcal {D}\).

The converse direction follows from [24, Theorem 4.1], where Henzinger and Piterman show that if a nondeterministic parity automaton \(\mathcal {N}\) simulates a language-equivalent deterministic parity automaton, then \(\mathcal {N}\) is history-deterministic. We include a proof nevertheless, for self-containment. Supposing \(\mathcal {H}\) simulates \(\mathcal {D}\), Eve can use her winning strategy in \(Sim(\mathcal {H},\mathcal {D})\) to win the letter game of \(\mathcal {H}\) as follows. Eve, during the letter game of \(\mathcal {H}\), will keep in her memory, a play of the game \(Sim(\mathcal {H},\mathcal {D})\). On each round in the letter game of \(\mathcal {H}\), Adam gives a letter, and Eve, in the game \(Sim (\mathcal {H},\mathcal {D})\), lets Adam pick the same letter and the unique transition on that letter in \(\mathcal {D}\). She then uses her strategy in \(Sim(\mathcal {H},\mathcal {D})\) to pick a transition in \(\mathcal {H}\), and she plays the same transition in the letter game of \(\mathcal {H}\). We claim that any resulting play of the letter game of \(\mathcal {H}\) if Eve plays as above is winning for Eve. Indeed, if Adam constructs an accepting word in \(\mathcal {H}\), then it is accepting in \(\mathcal {D}\) as well. Hence, since \(\mathcal {D}\) is deterministic, Adam’s run on \(\mathcal {D}\) in the simulation game between \(\mathcal {H}\) and \(\mathcal {D}\) that is stored in Eve’s memory is accepting. Since Eve is playing according to a winning strategy in \(Sim(\mathcal {H},\mathcal {D})\), Eve’s run in \(\mathcal {H}\), which is the same in \(Sim(\mathcal {H},\mathcal {D})\) and the letter game of \(\mathcal {H}\), is accepting as well. Hence, Eve wins the letter game of \(\mathcal {H}\), and thus \(\mathcal {H}\) is history-deterministic.    \(\square \)

We also argue in the full version of the paper [34] that the automaton \(\mathcal {H}\) in proof of Lemma 14 above is such that Eve wins the 1-token game of \(\mathcal {H}\) if and only if Eve wins the 2-token game of \(\mathcal {H}\) if and only if \(\mathcal {H}\) is history-deterministic. This gives us that checking whether Eve wins the 1-token game or the 2-token game of a parity automaton is \({\textbf {NP}}\)-hard. Since 1-token games can naturally be seen as a 2-D parity game, we get that deciding whether Eve wins the 1-token game of a given parity automaton is in \({\textbf {NP}}\), and hence the problem is \({\textbf {NP}}\)-complete.

Theorem 15

The following problems are \({\textbf {NP}}\)-hard:

  1. 1.

    Given a parity automaton \(\mathcal {A}\), is \(\mathcal {A}\) history-deterministic?

  2. 2.

    Given a parity automaton \(\mathcal {A}\), does Eve win the 2-token game of \(\mathcal {A}\)?

Additionally, the following problem is \({\textbf {NP}}\)-complete: Given a parity automaton \(\mathcal {A}\), does Eve win the 1-token game of \(\mathcal {A}\)?

5 Language Containment

In this section, we consider the following problem:

HD-automaton containment: Given two parity automata \(\mathcal {A}\) and \(\mathcal {B}\) such that \(\mathcal {B}\) is history-deterministic, is \(L(\mathcal {A}) \subseteq L(\mathcal {B})\)?

While the problem of checking language inclusion between two non-deterministic parity automata is \({\textbf {PSPACE}}\)-complete (regardless of whether the parity index is fixed or not) [1, 30], the same for deterministic parity automata is \({\textbf {NL}}\)-complete [36, Theorem 1]. For history-deterministic parity automata with fixed parity indices, however, the problem of language inclusion reduces to checking for simulation (Lemma 16), which can be solved in polynomial time when the parity indices are fixed [13]. This gives us that checking for language inclusion between two history-deterministic parity automata with fixed parity index can be done in polynomial time (Corollary 17). This observation has been treated as folklore, and we prove it here for completeness.

Lemma 16

([9, 37]). Given a nondeterministic parity automaton \(\mathcal {A}\) and a history-deterministic parity automaton \(\mathcal {B}\), the following are equivalent:

  1. 1.

    \(\mathcal {B}\) simulates \(\mathcal {A}\)

  2. 2.

    \(L(\mathcal {A}) \subseteq L(\mathcal {B})\)

Proof

(1) \(\Rightarrow \) (2): Fix \(\sigma _{\pmb {\exists }}\) to be a winning strategy for Eve in \(Sim(\mathcal {B},\mathcal {A})\). Let w be a word accepted by \(\mathcal {A}\) via an accepting run \(\rho \). Consider a play of \(Sim(\mathcal {B},\mathcal {A})\) where Adam constructs the run \(\rho \) on the word w, and Eve plays according to \(\sigma _{\pmb {\exists }}\). Then, the run in \(\mathcal {B}\) that Eve constructs must be accepting, and hence w is accepted by \(\mathcal {B}\).

(2) \(\Rightarrow \) (1): Let \(\sigma _{B}\) be a winning strategy for Eve in the letter game of \(\mathcal {B}\). Consider the strategy for Eve in \(Sim(\mathcal {B},\mathcal {A})\) where Eve chooses the transitions on \(\mathcal {B}\) according to \(\sigma _{B}\), ignoring Adam’s transitions in \(\mathcal {A}\). If Adam constructs an accepting run in \(\mathcal {A}\) on a word w in \(Sim(\mathcal {B},\mathcal {A})\), then \(w \in L(\mathcal {A}) \subseteq L(\mathcal {B})\). Hence \(\sigma _{B}\) would have constructed an accepting run in \(\mathcal {B}\) in \(Sim(\mathcal {B},\mathcal {A})\). It follows that Eve wins \(Sim(\mathcal {B},\mathcal {A})\), and hence \(\mathcal {B}\) simulates \(\mathcal {A}\).    \(\square \)

Corollary 17

Given a nondeterministic parity automaton \(\mathcal {A}\) and a history-deterministic parity automaton \(\mathcal {B}\) such that both \(\mathcal {A}\) and \(\mathcal {B}\) have priorities in [d] for a fixed d, the problem of whether \(L(\mathcal {A}) \subseteq L(\mathcal {B})\) can be decided in polynomial time.

We now focus on the problem HD-automaton containment when the parity index is not fixed. From Lemma 16, we know that this can be reduced to Simulation. Since Simulation is in \({\textbf {NP}}\) [13], we get an immediate \({\textbf {NP}}\)-upper bound for HD-automaton containment [37, Lemma 3]. We show that we can do better, in quasi-polynomial time, by giving a polynomial time reduction to finding the winner in a parity game[11, 27].

Towards this, let us fix a nondeterministic parity automaton \(\mathcal {A}\) and a history-deterministic parity automaton \(\mathcal {B}\) over the alphabet \(\varSigma \) throughout the rest of this section, for which we want to decide if \(L(\mathcal {A}) \subseteq L(\mathcal {B})\). Suppose that \(\mathcal {A}\) has \(n_1\) states and priorities in \([d_1]\), and \(\mathcal {B}\) has \(n_2\) states and priorities in \([d_2]\).

It is well known that every such parity automaton \(\mathcal {A}\) can be converted efficiently to a language-equivalent nondeterministic Büchi automaton \(\mathcal {A}'\) that has at most \((n_1 \cdot d_1)\) states [14, 38]. Then, from Lemma 16, it suffices to check if Eve wins the game \(Sim(\mathcal {B},\mathcal {A}')\). Note that \(Sim(\mathcal {B},\mathcal {A}')\) is a 2-D parity game \(\mathcal {G}\) with \((n_1 \cdot d_1 \cdot n_2 \cdot |\varSigma |)\)-many vertices that has the priority functions \(\chi _1: V \xrightarrow {} [1,2]\) and \(\chi _2:V \xrightarrow {} [d_2]\), where V is the set of vertices of \(\mathcal {G}\).

The game \(\mathcal {G}\) can be viewed equivalently as a Muller game with the condition \((C,\mathcal {F})\), where \(C = [1,2] \times [d_2]\) and \(\mathcal {F}\) consists of sets \(F \subseteq C\) such that if \(\max (F\arrowvert _1)\) is even, then \(\max (F\arrowvert _2)\) is even. Here, \(F\arrowvert _i\) for \(i\in \{1,2\}\) indicates the projection of F onto the \(i^{th}\) component. Call the Zielonka tree (Definition 2) of this Muller condition as \(Z_{d_2}\). We shall show that the size of \(Z_{d_2}\) is polynomial in \(d_2\).

Lemma 18

The Zielonka tree \(Z_{d_2}\) has \((\lceil \frac{d_2}{2} \rceil )\) many leaves and its height is \(d_2\).

The proof of the lemma, obtained via an inductive argument, can be found in the full version of the paper [34]. Lemma 18 allows us to use Lemma 4 on \(Sim(\mathcal {B},\mathcal {A}')\) to obtain an equivalent Parity game \(\mathcal {G}'\) with \((n_1 \cdot d_1 \cdot n_2 \cdot |\varSigma | \cdot \lceil \frac{d_2}{2} \rceil )\) vertices which has \(d_2+1\) priorities, such that Eve wins \(Sim(\mathcal {B},\mathcal {A}')\) if and only if Eve wins \(\mathcal {G}'\).

Lemma 19

Given a nondeterministic parity automaton \(\mathcal {A}\) with \(n_1\) states and a history-deterministic parity automaton \(\mathcal {B}\) with \(n_2\) states whose priorities are in \([d_2]\) that are both over the alphabet \(\varSigma \), the problem of deciding whether \(L(\mathcal {A})\) is contained in \(L(\mathcal {B})\) can be reduced in polynomial time to finding the winner of a parity game \(\mathcal {G}\) which has \((n_1 \cdot d_1 \cdot n_2 \cdot |\varSigma | \cdot \lceil \frac{d_2}{2} \rceil )\) many vertices and \(d_2+1\) priorities.

Since parity games can be solved in quasi-polynomial time[11, 27], Lemma 19 implies that the problem of language containment in a history-deterministic automaton can be solved in quasi-polynomial time as well.

Theorem 20

Given a nondeterministic parity automaton \(\mathcal {A}\) with \(n_1\) states and priorities in \([d_1]\), and a history-deterministic parity automaton \(\mathcal {B}\) with \(n_2\) states whose priorities are in \([d_2]\), checking whether the language of \(\mathcal {A}\) is contained in the language of \(\mathcal {B}\) can be done in time

$$(n_1 \cdot d_1 \cdot n_2 \cdot d_2 \cdot |\varSigma |)^{\mathcal {O}({\log d_2})}.$$

6 Discussion

We have shown \({\textbf {NP}}\)-hardness for the problem of checking for simulation between two parity automata (when their parity indices are not fixed). We have also established upper and lower bounds of several decision problems relating to history-deterministic parity automata. The most significant amongst these, in our view, is the \({\textbf {NP}}\)-hardness for the problem of deciding if a given parity automaton is history-deterministic, which is an improvement from the previous lower bound of solving a parity game [28].

There still remains a significant gap between the lower bound of \({\textbf {NP}}\)-hardness and the upper bound of \({\textbf {EXPTIME}}\) for checking history-determinism, however. Furthermore, note that even if one shows the two-token conjecture [3, 4], this would only imply a \({\textbf {PSPACE}}\)-upper bound (when the parity index is not fixed), since 2-token games can be seen as Emerson-Lei games [25]. Thus, a natural direction for future research is to try to show that the problem of checking for history-determinism is \({\textbf {PSPACE}}\)-hard.

On the other hand, however, it is also plausible that checking whether Eve wins the 2-token game of a given parity automaton can be done in \({\textbf {NP}}\). A proof for this might show that if Eve wins a 2-token game, then she has a strategy that can be represented and verified polynomially. Such an approach, which would involve understanding the strategies for the players in the 2-token games better, could also yield crucial insights for proving or disproving the two-token conjecture (see Section 2.9).

Boker and Lehtinen showed in their recent survey that for a ‘natural’ class of automata T, checking history-determinism for T-automata is at least as hard as solving T-games [8]. Interestingly, the problem of checking history-determinism over T-automata also has the matching upper bound of solving T-games for all classes of automata T over finite words, and over infinite words with safety and reachability objectives on which the notion of history-determinism has been studied so far [7, 9, 20, 21, 35]. Our result of the problem of checking history-determinism being \({\textbf {NP}}\)-hard for parity automata deviates from this trend (unless parity games are \({\textbf {NP}}\)-hard, which would have the drastic and unlikely consequence of \({\textbf {NP}}= {\textbf {NP}}\cap {\textbf {coNP}}\)), and demonstrates the additional intricacy that parity conditions bring.