Time and Parallelizability Results for Parity Games with Bounded Tree and DAG Width

Parity games are a much researched class of games in NP intersect CoNP that are not known to be in P. Consequently, researchers have considered specialised algorithms for the case where certain graph parameters are small. In this paper, we study parity games on graphs with bounded treewidth, and graphs with bounded DAG width. We show that parity games with bounded DAG width can be solved in O(n^(k+3) k^(k + 2) (d + 1)^(3k + 2)) time, where n, k, and d are the size, treewidth, and number of priorities in the parity game. This is an improvement over the previous best algorithm, given by Berwanger et al., which runs in n^O(k^2) time. We also show that, if a tree decomposition is provided, then parity games with bounded treewidth can be solved in O(n k^(k + 5) (d + 1)^(3k + 5)) time. This improves over previous best algorithm, given by Obdrzalek, which runs in O(n d^(2(k+1)^2)) time. Our techniques can also be adapted to show that the problem of solving parity games with bounded treewidth lies in the complexity class NC^2, which is the class of problems that can be efficiently parallelized. This is in stark contrast to the general parity game problem, which is known to be P-hard, and thus unlikely to be contained in NC.


Introduction
A parity game is a two player game that is played on a finite directed graph.The problem of solving a parity game is known to lie in NP ∩ CoNP [McN93], and a sub-exponential time algorithm is known for the problem [JPZ08].However, despite much effort, this problem is not known to be in P. Due to the apparent difficulty of solving parity games, recent work has considered special cases, where the input is restricted in some way.In particular, people have studied parity games where the input graph is restricted by a graph parameter.For example, parity games have been shown to admit polynomial time algorithms whenever the input graph has bounded treewidth [Obd03], DAG width [BDHK06], clique width [Obd07], Kelly width [HK08], or entanglement [BG04].In this paper we study the parity game problem for graphs of bounded treewidth and graphs of bounded DAG width.
Parity games are motivated by applications in model checking.The problem of solving a parity game is polynomial-time equivalent to the modal µ-calculus model checking problem [EJS93,Sti95].In model checking, we typically want to check whether a large We then turn our attention to parity games with bounded treewidth.Using similar techniques, we are able to obtain an algorithm that solves parity games with bounded treewidth in O(n • (k + 1) k+5 • (d + 1) 3k+5 ) time on a deterministic Turing machine.Again, since the exponent of d does not depend on k 2 , this is an improvement over the original algorithm of Obdržálek, which runs in O(n • k 2 • d 2(k+1) 2 ) time.
For the treewidth result, we must pay attention to the complexity of computing a tree decomposition.In the DAG width result, this did not concern use, because a DAG decomposition can be computed in O(n k+2 ) time, and this is therefore absorbed by the running time of the algorithm.In the treewidth case, however, things are more complicated.From a theoretical point of view, we could apply the algorithm of Bodlaender [Bod96], which runs in O(n • f (k)) time.However, the function f lies in 2 O(k 3 ) , and this has the potential to dwarf any improvement that our algorithm provides.As we have mentioned, in some practical cases, a tree decomposition can be computed cheaply.Otherwise, we suggest that the approximation algorithm of Amir [Ami01] should be used to find a 4.5-approximate tree decomposition.Our algorithm runs in O(n • k 4.5k+5 • (d + 1) 13.5k+5 ) time when a 4.5approximate tree decomposition is used.Note that Obdržálek's algorithm also requires a tree decomposition as input.Thus, in this case, the gap between the two algorithms is even wider, as using a 4.5-approximate tree decomposition causes Obdržálek's algorithm to run in O(n • d 40.5k 2 +18k+2 ) time.
Finally, we are able to adapt these techniques to show a parallelizability result for parity games with bounded treewidth.We are able to provide an alternating Turing machine that solves the problem in O(k 2 • (log n) 2 ) time while using O(k • log n) space.This version of the algorithm does not require a precomputed tree decomposition.Hence, using standard results in complexity theory [ALR10], we have that the problem lies in the complexity class NC 2 ⊆ NC, which is the class of problems that can be efficiently parallelized.
This result can be seen in stark contrast to the complexity of parity games on general graphs: parity games are known to be P-hard by a reduction from reachability games, and P-hardness is considered to be strong evidence that an efficient parallel algorithm does not exist.Our result here shows that, while we may be unable to efficiently parallelize the µ-calculus model checking problem itself, we can expect to find efficient parallel algorithms for the model checking problems that appear in practice.

Preliminaries
2.1.Parity games.A parity game is a tuple (V, V 0 , V 1 , E, pri), where V is a set of vertices and E is a set of edges, which together form a finite directed graph.The sets V 0 and V 1 partition V into vertices belonging to player Even and player Odd, respectively.The function pri : V → D assigns a priority to each vertex from the set of priorities D ⊆ N. It is required that the game does not contain any dead ends: for each vertex v ∈ V there must exist an edge (v, u) ∈ E.
We define the significance ordering ≺ over D. This ordering represents how attractive each priority is to player Even.For two priorities a, b ∈ N, we have a ≺ b if one of the following conditions holds: (1) a is odd and b is even, (2) a and b are both even and a < b, or (3) a and b are both odd and a > b.We say that a b if either a ≺ b or a = b.
At the beginning of the game, a token is placed on a starting vertex v 0 .In each step, the owner of the vertex that holds the token must choose one outgoing edge from that vertex and move the token along it.In this fashion, the two players form an infinite path π = v 0 , v 1 , v 2 , . . ., where (v i , v i+1 ) ∈ E for every i ∈ N. To determine the winner of the game, we consider the set of priorities that occur infinitely often along the path.This is defined to be: Inf(π) = {d ∈ N : For all j ∈ N there is an i > j such that pri(v i ) = d}.Player Even wins the game if the highest priority occurring infinitely often is even, and player Odd wins the game if it is odd.In other words, player Even wins the game if and only if max(Inf(π)) is even.
A positional strategy for Even is a function that chooses one outgoing edge for every vertex in V 0 .A strategy is denoted by σ : V 0 → V , with the condition that (v, σ(v)) ∈ E for every Even vertex v. Positional strategies for player Odd are defined analogously.The sets of positional strategies for Even and Odd are denoted by Σ 0 and Σ 1 , respectively.Given two positional strategies σ and τ , for Even and Odd, respectively, and a starting vertex v 0 , there is a unique path v 0 , v 1 , v 2 . . ., where v i+1 = σ(v i ) if v i is owned by Even, and v i+1 = τ (v i ) if v i is owned by Odd.This path is known as the play induced by the two strategies σ and τ , and will be denoted by Play(v 0 , σ, τ ).
For each σ ∈ Σ 0 , we define G ↾ σ to be the modification of G where Even is forced to play σ.That is, an edge (v, u) ∈ E is included in G ↾ σ if either v ∈ V 1 , or v ∈ V 0 and σ(v) = u.We define G ↾ τ for all τ ∈ Σ 1 analogously.
An infinite path v 0 , v 1 , . . . is said to be consistent with an Even strategy σ ∈ Σ 0 if v i+1 = σ(v i ) for every i such that v i ∈ V 0 .If σ ∈ Σ 0 is a strategy for Even, and v 0 is a starting vertex, then we define Paths(v 0 , σ) to give every path starting at v 0 that is consistent with σ.An Even strategy σ ∈ Σ 0 is called a winning strategy for a vertex v 0 ∈ V if max(Inf(π)) is even for all π ∈ Paths 0 (v 0 , σ).The strategy σ is said to be winning for a set of vertices W ⊆ V if it is winning for all v ∈ W . Winning strategies for player Odd are defined analogously.
A game is said to be positionally determined if one of the two players always has a positional winning strategy.We now give a fundamental theorem, which states that parity games are positionally determined.
Theorem 2.1 ( [EJ91,Mos91]).In every parity game, the set of vertices V can be partitioned into winning sets (W 0 , W 1 ), where Even has a positional winning strategy for W 0 , and Odd has a positional winning strategy for W 1 .
In this paper we study the following computational problem for parity games: given a starting vertex s, determine whether s ∈ W 0 or s ∈ W 1 .

Treewidth. Treewidth originated from the work of Robertson and Seymour [RS84].
Treewidth is a complexity measure for undirected graphs.Thus, to define the treewidth of a parity game, we will use the treewidth of the undirected graph that is obtained when the orientation of the edges is ignored.We begin by defining tree decompositions.Definition 2.2 (Tree Decomposition).For each game G = (V, V 0 , V 1 , E, pri), the pair (T, X), where T = (I, J) is an undirected tree and X = {X i : i ∈ I} is a family of subsets of V , is a tree decomposition of G if all of the following hold: (1) i∈I X i = V .
(2) For every (v, u) ∈ E there is an i ∈ I such that v ∈ X i and u ∈ X i .
(3) For every i, j ∈ I, if k ∈ I is on the unique path from i to j in T , then The width of a tree decomposition (T, X) is max{|X i | : i ∈ I}.The treewidth of a game G is the smallest width of a tree decomposition of G.Note that this is a slightly unusual definition, because the width of a tree decomposition is usually defined to be max{|X i |− 1 : i ∈ I}.However, we use our definition in order to keep the definitions the same between treewidth and DAG width.
Let (T = (I, J), X) be a tree decomposition for a parity game G = (V, V 0 , V 1 , E, pri).Let i ∈ I be a node in the tree decomposition, and let v ∈ V be a vertex in the parity game with v / ∈ X i .Let k ∈ I be the closest node to i in T such that x ∈ X k .Since T is a tree decomposition, the node k is well defined.Let (i, j) ∈ J be the first edge on the path from i to k.We define Direction(X i , v) to be the function that outputs the node j.
There are multiple approaches for computing tree decompositions.From a theoretical point of view, the best known algorithm is the algorithm of Bodlaender [Bod96].If the treewidth is bounded, then this is a linear time algorithm: it runs in O(n • f (k)) time.However, the constant factor hidden by the function f (k) is in the order of 2 O(k 3 ) , which makes the algorithm impractical.For a more practical approach, we can apply the algorithm of Amir [Ami01] to approximate the treewidth of the graph.This algorithm takes a graph G and an integer k, and in O(2 3k • n 2 • k 3/2 ) time either finds a tree decomposition of width at most 4.5k for G, or reports that the tree-width of G is larger than k.
In this paper, we will assume that the size of the tree decomposition is linear in the size of the parity game.More precisely, we assume that, if (T = (I, J), X) is a tree decomposition of a parity game (V, V 0 , V 1 , E, pri), then we have |I| ≤ |V |.It has been shown that every tree decomposition can be modified, in polynomial time, to satisfy this property [Bod96, Lemma 2.2] 1 .Therefore we can make this assumption without loss of generality.
2.3.DAG width.As opposed to treewidth, which is a measure for undirected graphs, DAG width [BDH + 12] is a measure for directed graphs.A directed graph G = (V, E) is a DAG if it contains no directed cycles.If G is a DAG, then we define ⊑ D to be the reflexive transitive closure of the edge relation of G.A source in the DAG is a vertex v ∈ V that is minimal in the ⊑ D ordering, and a sink in the DAG is a vertex that is maximal in the ⊑ D ordering.Furthermore, given two sets U, W ⊆ V , we say that W guards U if, for every edge (v, u) ∈ E, where v ∈ U , we have u ∈ W ∪ U .In other words, W guards U if the only way to leave U is to pass through a vertex in W .We can now define a DAG decomposition.
, where D is a DAG, and X = {X i : i ∈ I} is a family of subsets of V , which satisfies the following conditions: (1) i∈I X i = V .
(2) For every edge (i, j) ∈ J, the set The width of a DAG decomposition (D, X) is max{|X i | : i ∈ I}.The DAG width of a game G is the smallest width of a DAG decomposition of G.In accordance with the second condition in Definition 2.3, for each X i ∈ X we define: 1 Specifically, we refer to Lemma 2.2 in the SIAM Journal on Computing version of this paper.
We can also define Direction for DAG decompositions.Suppose that (D = (I, J), X) is a DAG decomposition of a parity game G = (V, V 0 , V 1 , E, pri).Let i ∈ I be a node in the DAG decomposition, and let v ∈ V be a vertex in the parity game with v ∈ Guarded(X i ).From the properties of a DAG decomposition, there must be at least one j ∈ I such that (i, j) ∈ J and either v ∈ X j or v ∈ Guarded(X j ).We define Direction(X i , v) to arbitrarily select a node j ∈ I that satisfies this property.
The only algorithm for computing DAG decompositions was given by Berwanger et.al. [BDH + 12].They showed that, if a graph has DAG width k, then a DAG decomposition can be computed in O(n k+2 ) time.In the case of DAG width, we cannot assume that the size of the DAG decomposition is linear in the size of the graph.In fact, the best known upper bound on the number of nodes in a DAG decomposition is n k+1 , and the number of edges is n k+2 , where n is the number of vertices in the graph, and k is the width of the DAG decomposition [BDH + 12, Proof of Theorem 16].

Strategy Profiles
In this section we define strategy profiles, which are data structures that allow a player to give a compact representation of the relevant properties of their strategy.Our algorithms in Sections 6, 7, and 8 will use strategy profiles to allow the players to declare their strategies in a small amount of space.Throughout this section we will assume that there is a starting vertex s ∈ V and a set of final vertices F ⊆ V .Let σ ∈ Σ 0 be a strategy for Even.The strategy profile of σ describes the outcome of a modified parity game that starts at s, terminates whenever a vertex u ∈ F is encountered, and in which Even is restricted to only play σ.
For each u ∈ F , we define Paths(σ, s, F, u) to be the set of paths from s to u that are consistent with σ and that do not visit a vertex in F .More formally, Paths(σ, s, F, u) contains every path of the form v 0 , v 1 , v 2 , . . .v k in G ↾ σ, for which both of the following conditions hold: • the vertex v 0 = s and the vertex v k = u, and • for all i in the range 0 ≤ i ≤ k − 1 we have v i / ∈ F .For each strategy τ ∈ Σ 1 , we define the functions Paths(τ, s, F, u) analogously.
Recall that is the significance ordering over priorities.For each u ∈ F , the function Exit(σ, s, F, u), gives the best possible priority, according to , that Odd can visit when Even plays σ and Odd chooses to move to u.This function either gives a priority p ∈ D, or, if Odd can never move to u when Even plays σ, the function gives a special symbol −, which stands for "unreachable".We will also define this function for Odd strategies τ ∈ Σ 1 .Formally, for every finite path π = v 1 , v 2 , . . ., v k , we define MaxPri(π) = max{pri(v i ) : 1 ≤ i ≤ k}.Furthermore, we define, for σ ∈ Σ 0 and τ ∈ Σ 1 : For every strategy χ ∈ Σ 0 ∪ Σ 1 and every u ∈ F we define:   We can now define the strategy profile for each strategy χ ∈ Σ 0 ∪ Σ 1 .We define Profile(χ, s, F ) to be a function F → D ∪ {−} such that Profile(χ, s, F )(u) = Exit(χ, s, F, u) for each u ∈ F .

Outline
In this section we give an outline of the rest of the paper.We start by describing simulated parity games, which are the foundation upon which all our results are based.Then we describe how this simulation game can be used to prove our three results.4.1.Simulated Parity Games.Suppose that we have a DAG or tree decomposition of width k for our parity game.Suppose further that we want to determine the winner of some vertex s ∈ V in the parity game.Our approach is to find some set of vertices S ⊆ V , where S = X i for some node i in our decomposition, such that s ∈ S. We then play a simulation game on S, which simulates the whole parity game using only the vertices in S.
The general idea behind the simulation game is shown in Figure 1a.The large circle depicts the decomposition node S, the boxes represent Even vertices, and the triangles represent Odd vertices.Since no two vertices share the same priority in this example, we will use the priorities to identify the vertices.As long as both players choose to remain in S, the parity game is played as normal.However, whenever one of the two players chooses to move to a vertex v with v / ∈ S we simulate the parity game using a strategy profile: Even is required to declare a strategy in the form of a strategy profile P for v and S. Odd then picks some vertex u ∈ S, and moves there with priority P (u)2 .In the diagram, the dashed edges represent these simulated decisions.For example, when the play moved to the vertex 6, Even gave a strategy profile P with P (3) = 14, and Odd decided to move to the vertex 3. Together, the simulated and real edges will eventually form a cycle, and the winner of the game is the winner of this cycle.In our example, Even wins the game because the largest priority on the cycle is 10.
If Even always gives strategy profiles that correspond to some strategy σ ∈ Σ 0 , then the outcome of our simulated game will match the outcome that would occur in the real parity game.On the other hand, it is possible that Even could lie by giving a strategy profile P for which he has no strategy.To deal with this, Odd is allowed to reject P , which causes the two players to move to a second simulation game, where Even is required to prove that he does have a strategy for P .Suppose that Odd rejected Even's first strategy profile in the game shown in Figure 1a.Hence, Even must show that his strategy profile P , that contains P (3) = 14, is correct.To do this, we select a second node S ′ ⊆ V from the decomposition, and play a simulation game on S ′ .An example run of this game is shown in Figure 1b.The left circle represents S, and the right circle represents S ′ .The game proceeds as before, by simulating a parity game on S ′ .However, we add the additional constraint that, if a vertex u ∈ S is visited, then the game ends: Even wins the game if the largest priority p seen on the path to u has p P (u), and Odd wins otherwise.In this example, Even loses the game because the largest priority seen during the path is 8, and Even's strategy profile in Figure 1a claimed that the largest priority p should satisfy p 14.We also use rejections to deal with the case where Even's strategy profile never returns to S. If Even gives a strategy profile P with P (u) = − for every u ∈ S, then Odd will reject P , and the game will continue on S ′ as before.
The simulation game will be formally defined in Section 5. We will then go on to prove three different results using three distinct versions of the simulation game.These versions differ in the way that the set S ′ is selected whenever Odd rejects Even's strategy profile.4.2.The Time Complexity Results.In our first result, to be shown in Section 6, we will show that parity games with DAG width k can be solved in 2 gives an example run of the simulation game that will be used in this result.The figure shows the DAG decomposition of the parity game, and each circle depicts one of the nodes in the decomposition.At the start of the game, we find a source node i of the DAG decomposition, and we play a simulation game on the set of vertices X i .This node is shown as S 1 in the figure .Recall, from Figure 1, that if the game on S 1 ends with Odd rejecting Even's strategy profile, then we must pick a new set of vertices, and play a second simulation game.The rule for picking this new set of vertices will make use of the DAG decomposition.Suppose that the game on S 1 ends when Odd rejects Even's strategy profile for v and S 1 .The next set of vertices is chosen to be X i , where i = Direction(S 1 , v).This set is shown as S 2 in the diagram.
Thus, as we can see in the diagram, as Odd keeps rejecting Even's strategy profiles, we walk along a path in the DAG decomposition.This means that the game must eventually end.To see this, note that when we play a simulation game on S 5 , the properties of a DAG decomposition ensure that we either form a cycle in S 5 , or that we visit some vertex in S 4 , because S 4 is a guard of S 5 .Recall that the simulation game ends whenever we move back to a set that we have already seen.Thus, when we play a simulation game on a sink in the DAG decomposition, there cannot be any simulated moves, and the game will either end in a cycle on the vertices in S 5 , or when one of the two players moves to a vertex in S 4 .
Our plan is to implement the simulation game on an alternating Turing machine.We will use the non-deterministic and universal states in the machine to implement the moves of the two players.Our goal is to show that this implementation uses at most O(k • log |V |) space, which would then immediately imply our desired result.
There is one observation about DAG decompositions that is important for obtaining the O(k • log |V |) alternating space bound.Recall from Figure 1b that if Odd rejects a strategy profile of Even, then we must remember the strategy profile so that we can decide the winner in subsequent simulation games.Our observation is that, if we are playing a simulation game using a DAG decomposition, then we only ever have to remember one previous strategy profile.For example, suppose that we are playing the simulation game on S 3 in Figure 2. Since S 3 ⊆ Guarded(S 2 ), we know that we cannot reach a vertex in S 1 without passing through a vertex in S 2 .However, the simulation game on S 3 ends immediately when a in S 2 is visited.Hence, we can forget the strategy profile on S 1 .This observation is crucial for showing the O(k • log |V |) alternating space bound.
Our second result, which will be shown in Section 7, uses the same techniques, but applies them to parity games with bounded treewidth.We will show how the amount of space used by the alternating Turing machine can be significantly reduced for the treewidth case, and from this we derive a O(|V | • (k + 1) k+5 • (|D| + 1) 3k+5 ) time algorithm for parity games with bounded treewidth.4.3.The Parallelizability Result.In our third result, which will be proved in Section 8, we show that the problem of solving parity games with bounded tree-width lies in the complexity class NC 2 .To do this, we will construct a rather different version of the simulation game, which can be solved by an alternating Turing machine in O(k 2 • (log |V |) 2 ) time and O(k • log |V |) space.This then immediately implies that our problem lies in the class NC 2 [ALR10, Theorem 22.15].
In the first and second results, we were able to compute a DAG decomposition or tree decomposition, and then chose the sets S to be nodes in this decomposition.However, we do not take this approach here, because we do not know of a way to compute a tree decomposition in O(k • log |V |) space on an alternating Turing machine.Instead, we will allow player Odd to chose these sets.
However, giving Odd this freedom comes at a price.In the first result, we only ever had to remember the last strategy profile that was rejected by Odd, and this was critical for showing the required space bounds for the alternating Turing machine.In this result, since Odd could potentially select any set, we may have to remember all of the previous strategy profiles to ensure that the simulation game eventually terminates.But, if we remember too many strategy profiles, then we will be unable to show the required space bound for the alternating Turing machine.
We resolve this by showing the following property: if the parity game has treewidth k, then Odd has a strategy for selecting the sets S such that: The strategy Slice.
The strategy Reduce.• The simulation game always terminates after k • log |V | many rounds.
• We never have to remember more than 3 previous strategy profiles at the same time.These two properties are sufficient to show that our alternating Turing machine meets the required time and space bounds.We now outline the strategy for Odd that achieves these two properties.In fact, this strategy consists of two different strategies.The first strategy is called Slice, and is shown in Figure 3a.The figure shows the nodes in the tree decomposition, which means that each circle represents a set of vertices in the parity game.The nodes F 1 and F 2 represent two previous strategy profiles that we have remembered.The strategy Slice is required to select one of the nodes between F 1 and F 2 .We do so using the following well known lemma about trees.
Lemma 4.1.For every tree T = (I, J) with |I| ≥ 3, there is an i ∈ I such that removing i from T splits T into parts, where each part has at most 2 3 |I| vertices.We define the strategy Slice to select a separator that satisfies Lemma 4.1.For example, in Figure 3a the separator S ′ splits the tree into 3 parts, having 6, 1, and 1 vertices, respectively.Since there were originally 9 nodes between F 1 and F 2 , we have that S ′ satisfies Lemma 4.1.
The second strategy is called Reduce, and it is shown in Figure 3b.It is used whenever we have remembered three strategy profiles.It selects the unique vertex that lies on the paths between them.It can be seen in Figure 3b that the set S ′ lies on the unique vertex that connects F 1 , F 2 , and F 3 .The purpose of this strategy is to reduce the number of strategy profiles that we must remember.It can be seen that, no matter how the game on S ′ ends, we will be able to forget at least two of the three strategy profiles, while adding only one new strategy profile for S ′ .
Odd's overall strategy combines these two sub-strategies: we use Slice until three strategy profiles have been remembered, and then we switch between Reduce and Slice.Applying this strategy ensures that we use Slice at least half of the time, and so the game must end after at most O(log |V |) simulation games have been played.The use of Reduce ensures that we never have to remember more than three strategy profiles.
Once these properties have been established, it is then fairly straightforward to show that the game can be implemented by an alternating Turing machine in O(k 2 • (log |V |) 2 ) time and O(k • log |V |) space, which then immediately gives containment in NC 2 .

Simulated Parity Games
In this section we describe the simulation game, which will be used in all of our subsequent results.We begin by formally defining the simulation game.Since each of our results requires a slightly different version of the simulation game, our definitions will be parameterized by two functions: Next and Hist, and each of our results will provide their own versions of these functions.In the second part of this section, we will show that, no matter which functions are chosen, if the simulation game terminates, then it determines the correct winner.Then, for each of our results, we provide a proof of termination for the relevant Next and Hist functions.
We begin by defining records, which allow us to remember the outcome of previous games.A record is a triple (F, p, P ), where F ⊆ V is a set of vertices, P is a strategy profile for F , and p ∈ D is the largest priority that has been seen since P was rejected.When a record is created, we will use (F, −, P ) to indicate that no priority has been seen since P was rejected.Given a record (F, p, P ), and a priority p ′ , we define Update((F, p, P ), p ′ ) = (F, max(p, p ′ ), P ), where we have max(−, p ′ ) = p ′ .A history is an ordered sequence of records.Given a history F and a priority p ′ , we define: Update(F, p ′ ) = {Update((F, p, P ), p ′ ) : (F, p, P ) ∈ F}.
We can now define the format for the two functions Next and Hist.The function Next(S, v, F) takes a set of vertices S ⊆ V , a vertex v ∈ V , and a history F. It is required to return a set of vertices S ′ ⊆ V .The history function Hist(F) allows us to delete certain records from the history F.More formally, the function is required to return a history F ′ with F ′ ⊆ F.
We can now formally define the simulation game.Let G be a parity game.Given S ⊆ V , s ∈ V , a history F, and two functions Next and Hist, we define the game Simulate G (S, F, s, Next, Hist) as follows.The game maintains a variable c to store the current vertex.It also maintains a sequence of triples Π, where each entry is of the form (v, p, u) with v, u ∈ V and p ∈ D. The sequence Π represents the simulated path that the two players form during the game.
We are now able to define Simulate G (S, F, s, Next, Hist).The game is played in rounds.The first round of the game is slightly different, because it requires a special initialization procedure that will be introduced later.Every other round proceeds as follows. (1 the vertex c is set to v, and the game moves to Step 5. (3) Even gives a strategy profile P ′ for the vertex v and the set S. (4) Odd can either play accept for some vertex u ∈ S with P ′ (u) = −, or play reject.
• If Odd plays accept, then (c, max(pri(v), P ′ (u)), u) is appended to Π, and c is set to u. • If Odd plays reject, then: − The history F ′ is obtained by computing Update(F, MaxPri(Π)).− The history F ′′ is obtained by adding (S, −, P ′ ) to the end of F ′ .
− The history F ′′′ is obtained by computing Hist(F ′′ ).− The set S ′ is obtained by computing Next(S, v, F ′′′ ).− The winner of the game is the winner of Simulate G (S ′ , F ′′′ , v, Next, Hist).(5) If c ∈ F for some (F, p, P ) ∈ F, then the game stops.Let (F, p, P ) be the final record in F such that c ∈ F .If P (c) = − then Odd wins the game.Otherwise, let p ′ = max(MaxPri(Π), p).Even wins the game if p ′ P (c) and Odd wins if p ′ ≺ P (c).(6) If Π ends in a cycle, then the winner of the game is Winner(Π).Note that, whenever we move to a new simulation game in Step 4, the variables c and Π are reset to their initial values.We will omit the subscripted parity game G from Simulate G (S, F, s, Next, Hist) when it is clear from the context.
As we have mentioned, the first round is slightly different.This is because we allow the starting vertex s to be any vertex in V .Thus, we need a procedure to initialize the variable c.If we happen to have s ∈ S, then we can set c = s, and start the game in Step 1 as normal.If s / ∈ S, then we start the game in Step 3 with v = s.In other words, the game begins by allowing Even to give a strategy profile for v and S. It can be seen that, if this profile is accepted by Odd, then c is set to some vertex u ∈ S. Thus, after this initialization procedure, the game can continue on as normal.
5.1.Strategies for the simulation game.Let σ ∈ Σ 0 be an Even strategy for the original parity game.We define a strategy for Even in Simulate called follow 0 (σ), which follows the moves made by σ.More formally, follow 0 (σ) does the following: • If Even is required to select an edge in Step 1, then the edge (c, σ(c)) is selected.
• In Step 3, the strategy selects P ′ = Profile(σ, v, S).On the other hand, let τ ∈ Σ 1 be a strategy for Odd in the original parity game.We define a strategy for Odd in Simulate called follow 1 (τ ), which is analogous to the strategy follow 0 (σ) that we have just defined.Odd's strategy is more complex, because it must decide whether the strategy profile proposed by Even in Step 3 should be accepted.To aid in this, we use the following definition.Let P τ = Profile(τ, s, S) for some s ∈ V and S ⊆ V .If P is a strategy profile for S given by Even in Step 3, then τ refutes P if one of the following conditions holds.
• For all u ∈ S, we have P (u) = −.• For all u ∈ S, we have either P τ (u) = − and P (u) = −, or P τ (u) ≺ P (u).The first condition is necessary to deal with cases where Even gives a strategy profile P with P (u) = − for all u ∈ S. In this case, Odd can not play accept and therefore has no choice but to reject P in Step 4. The second condition detects whether Even gives a false strategy profile: the condition ensures that if Odd rejects P , and if in a subsequent simulation game we arrive back at a vertex u ∈ S, then Odd will win in Step 5.
The strategy follow 1 (τ ) follows τ for the vertices in S, and whenever Even gives a strategy profile P , Odd plays reject only when τ refutes P .If τ does not refute P , then there must be at least one u ∈ S such that P τ (u) P (u).Odd selects one such u and plays accept for it.Formally, we define follow 1 (τ ) as follows: • If Odd selects an edge in Step 1, then Odd selects (c, τ (c)).
We will call this a play of the simulation game.We define some notation for working with simulation game plays.Each of the games S i maintained a variable Π.At the start of the game S i , the variable Π was empty, and at the end of the game, Π contained a sequence of tuples, which represented a sequence of real and simulated moves in S i .For each i, we define Π i to be the state of the variable Π at the end of the game S i .Furthermore, for each i, we will represent Π i as: We are interested in plays of the simulation game that arise when either Even plays follow 0 (σ) for some strategy σ ∈ Σ 0 , or Odd plays follow 1 (τ ) for some strategy τ ∈ Σ 1 .For the sake of exposition, we focus on player Even, but we will prove our results for both players.We want to show that, if Even uses follow 0 (σ), then we can translate the paths Π i in the simulation game to paths in the original parity game.More precisely, for each tuple (v i,j , p i,j , u i,j ) in Π i , we want to construct a path π i,j in G ↾ σ.For the portions of Π i that correspond to real edges in the parity game, this is easy.Formally, if (v i,j , p i,j , u i,j ) was not added to Π i by a simulated move, then we can define π i,j = v i,j , u i,j .This path is obviously a path in G ↾ σ.The following lemma shows that paths π i,j can be defined for the simulated moves in Π i .
Lemma 5.1.We have two properties: • If there is a strategy σ ∈ Σ 0 such that: for some i and j, then there exists a path π i,j ∈ Paths(σ, v i,j , S i , u i,j ) such that MaxPri(π i,j ) = p i,j .
• If there is a strategy τ ∈ Σ 1 such that: for some i and j, then there exists a path π i,j ∈ Paths(τ, v i,j , S i , u i,j ) such that MaxPri(π i,j ) p i,j .
Proof.The first part of this lemma follows directly from the definition of a strategy profile.Since we know that Profile(σ, v i,j , S i )(u i,j ) = −, we have that Paths(σ, v i,j , S i , u i,j ) = ∅.Furthermore, since Profile(σ, v i,j , S i )(u i,j ) considers the minimum path according to theordering, there must exist a path π i,j in Paths(σ, v i,j , S i , u i,j ) such that MaxPri(π i,j ) = p i,j .
The second part is very similar to the first.Since we know that Profile(τ, v i,j , S i )(u i,j ) = −, we have that Paths(τ, v i,j , S i , u i,j ) = ∅.Furthermore, since Profile(τ, v i,j , S i )(u i,j ) considers the maximum path according to the -ordering, there must exist a path π i,j in Paths(τ, v i,j , S i , u i,j ) such that MaxPri(π i,j ) = Profile(τ, v i,j , S i )(u i,j ) p i,j .
For the rest of this section, we will assume that either Even always plays follow 0 (σ) for some strategy σ ∈ Σ 0 , or that Odd always plays follow 1 (τ ) for some strategy τ ∈ Σ 1 .We will prove properties about the paths p i,j that are obtained from Lemma 5.1.
Firstly, we note that if π i,j is concatenated with π i,j+1 , then the result is still a path in either G ↾ σ or G ↾ τ .This is because Steps 2 and 4 of the simulation game ensure that the final vertex in π i,j is the first vertex in π i,j+1 .Similarly, the concatenation of π i,|π i | and π i+1,1 always produces a path in either G ↾ σ, or G ↾ τ , because Step 4 of the simulation game ensures that the final vertex in π i,|Π i | must have an edge to the first vertex in π i+1,1 .
With these properties in mind, we define π (i,j)→(i ′ ,j ′ ) , for two pairs of integers where, either i ′ > i, or both i = i ′ and j ′ > j, to be the concatenation of π i,j through π i ′ ,j ′ .More formally, let • be the operator that concatenates two paths.We define: to be the path from the first vertex in π i,1 to the final vertex in π i,|π i | .We then define to be the concatenation of the paths between π i,j and π i ′ ,j ′ .

5.3.
Winning strategies and the simulation game.In this section, we show that if one of the two players follows a winning strategy for the original parity game, then that player cannot lose the simulation game.More formally, we show that, if σ ∈ Σ 0 is a winning strategy for Even for some vertex s ∈ V , and if Even plays follow 0 (σ), then Even cannot lose Simulate(S, F, s, Next, Hist), for all S, F, Next, and Hist.We also show the analogous result for Odd.We begin by showing that, if Even never lies about his strategy profile in Step 3, then Even can never lose the game in Step 5.
Lemma 5.3.If Even plays follow 0 (σ) for some σ ∈ Σ 0 , then Even can never lose the simulation game in Step 5.
Proof.Assume, for the sake of contradiction, that Even loses the simulation game in Step 5 while playing follow 0 (σ).Let be the play of the simulation game, where Even loses S k in Step 5.
Let (F, p, P ) be the record used to decide the winner in Step 5.The fact that Odd wins in Step 5 implies that Π k ends at some vertex u ∈ F , and that either P (u) = − or max(MaxPri(Π), p) ≺ P (u).Let i be the index of the game S i in which (F, −, P ) is contained in F i+1 \ F i .
We now consider the case where Odd wins in Step 5 because Π k ends at some vertex u ∈ F and max(MaxPri(Π), p) ≺ P (u).In this case we can again invoke Lemma 5.1 to argue that there is a path π (i+1,1)→(k,|Π k |) in G ↾ σ, and we can use the same arguments as in the previous case to argue that this path is contained in Paths(σ, s i+1 , F i , u).Moreover, Lemma 5.2 implies that Since p ′ ≺ P (u), and P (u) = Profile(σ, s i+1 , F ), we have the following inequality: is contained in Paths(σ, s i+1 , F, u) this inequality is impossible, which yields the required contradiction.
We now show a corresponding property for Odd.
Lemma 5.4.If Odd plays follow 1 (τ ) for some strategy τ ∈ Σ 1 , then Odd can never lose the simulation game in Step 5.
Proof.Assume, for the sake of contradiction, that Odd loses the simulation game in Step 5 while playing follow 1 (τ ).Let be the play of the simulation game, where Odd loses S k in Step 5.
We now turn our attention to Step 6 of the simulation game.The following pair of lemmas will be used to show that, if one of the two players follows a winning strategy, then that player cannot lose the simulation game in Step 6.
Lemma 5.5.Let σ ∈ Σ 0 be an Even winning strategy for s ∈ V .If Even plays follow 0 (σ), then Even cannot lose Simulate(S, F, s, Next, Hist) is Step 6, for all choices of S, F, Next, and Hist.
Proof.Assume, for the sake of contradiction, that Even loses the simulation game in Step 6 while playing follow 0 (σ).Let be the play of the simulation game, where Even loses S k in Step 6.
Since Even loses in Step 6, there must be some index i such that Π k,i , . . ., Π k,|Π k | forms a cycle in S k , and that the highest priority on this cycle is odd.Since Even plays follow 0 (σ), we can use Lemma 5.1 to conclude that π (k,i)→(k,|Π k |) is a cycle in G ↾ σ, and we can apply Lemma 5.2 to conclude that MaxPri(π This implies that σ is not a winning strategy for s, which provides the required contradiction. Lemma 5.6.Let τ ∈ Σ 1 be an Odd winning strategy for s ∈ V .If Odd plays follow 1 (τ ), then Odd cannot lose Simulate(S, F, s, Next, Hist) is Step 6, for all choices of S, F, Next, and Hist.
Proof.Assume, for the sake of contradiction, that Odd loses the simulation game in Step 6 while playing follow 1 (τ ).Let S 1 = Simulate(S 1 , F 1 , s 1 , Next, Hist), . . ., S k = Simulate(S k , F k , s k , Next, Hist) be the play of the simulation game, where Odd loses S k in Step 6.
Since Odd loses in Step 6, there must be some index i such that Π k,i , . . ., Π k,|Π k | forms a cycle in S k , and that that the highest priority on this cycle is even.Since Odd plays follow 1 (τ ), we can use Lemma 5.1 to conclude that π (k,i)→(k,|Π k |) is a cycle in G ↾ τ , and we can apply Lemma 5.2 to conclude that MaxPri(π (k,i)→(k,|Π k |) ) MaxPri(Π k ).Since MaxPri(Π k ) is even, every priority p with p MaxPri(Π k ) must also be even.Hence, we can conclude that MaxPri(π This implies that τ is not a winning strategy for s, which provides the required contradiction.
When combined, Lemmas 5.3 through 5.6 imply the following property, which is the main result of this section.
Lemma 5.7.If Simulate G (S, F, s, Next, Hist) terminates, then it correctly determines the winner of s.

Time Complexity Results for Parity Games
Let G be a parity game with a DAG decomposition (D = (I, J), X) of width k.In this section we give a version of the simulation game that can be solved in (k + 3) • log |V | + (k + 2) • log(k) + (3k + 2) • log(|D| + 1) space on an alternating Turing machine, and hence O(|V | k+3 • k k+2 • (|D| + 1) 3k+2 ) time on a deterministic Turing machine.
6.1.The functions Next and Hist.Recall that the simulation game can be customized by specifying the Next and Hist functions.We begin by defining the versions of these functions that will be used for this result.We start by defining the Next function.Recall, from Section 4.2, that we begin by playing a simulation game on a source in the DAG decomposition.To define this formally, we must be more specific: if we want to determine the winner of some vertex v ∈ V , then we must pick a source i from the DAG decomposition such that v ∈ Guarded(X i ) ∪ X i , and play a simulation game on X i .
The definition of Next follows the intuition that was outlined in Section 4.2.Suppose that we are required to compute Next(S, v, F), for some set S = X i with i ∈ I, some v ∈ V , and some history F. We find the DAG decomposition node j ∈ I such that (i, j) ∈ J, and v ∈ Guarded(X j ) ∪ X j , and set Next(S, v, F) = X j .After defining Hist, we will prove Lemma 6.1, which shows that such a j always exists.
To define the Hist function, we use the observation that we made in Section 4.2: we only need to remember at most one record.More precisely, we only need to remember the record corresponding to the last simulation game that was played.Formally, we can define the Hist function as follows.
• The first time that Hist(F) is called, F will contain only one record.We do not delete this record, so we set Hist(F) = F. • Every other time that Hist(F) is called, F will contain exactly two records.Due to the definition of Next, we know that the two records in F have the form (X i , v 1 , P 1 ) and (X j , v 2 , P 2 ) for some i, j ∈ I, some v 1 , v 2 ∈ V , and some strategy profiles P 1 and P 2 .Furthermore, we know that (i, j) ∈ J is a directed edge in the DAG decomposition.We set Hist(F) = {(X j , v 2 , P 2 )}.We now show the correctness of the Next function.Lemma 6.1.Let S = X i for some i ∈ I, and s ∈ Guarded(X i ) ∪ X i .Suppose that Simulate(S, ∅, s, Next, Hist) ends when Odd rejects a strategy profile for some vertex v ∈ V .There exists a j ∈ I with (i, j) ∈ J and v ∈ Guarded(X j ) ∪ X j .
Proof.The definitions of Next and Hist imply that there are two cases to consider: • The case where X i is a sink, and F is empty.
• The case where X i is not a sink, and F = {(X k , v ′ , P ′ )}, with (k, i) ∈ J.In the first case, the property follows from the definition of a guarded set: no matter which edges (c, v) are chosen in Step 1, we can never move to a vertex v / ∈ Guarded(X i ).In the second case, we can either choose an edge (c, v) with v ∈ Guarded(X i ), or an edge (c, v) with v ∈ X k .However, Step 2 ensures that, if v ∈ X k , then the game skips directly to Step 5. Thus, in both cases, if Odd rejects a strategy profile for some vertex v, with (c, v) ∈ E, then we have v ∈ Guarded(X i ).
To prove our claim, we can apply the properties given in Definition 2.3.They imply that, if there is an edge (c, v) ∈ E with c ∈ X i and v ∈ Guarded(X i ) \ X i , then there must exist an edge (i, j) ∈ J with v ∈ Guarded(X j ) ∪ X j .6.2.Termination and correctness.We now show that this version of the simulation game terminates, and that it can be used to correctly determine the winner of the parity game.Recall that, in Section 5.3, we showed that if the simulation game terminates, then it correctly determines the winner of the parity game.Thus, we must show that the simulation game terminates when it is equipped with Next and Hist.Lemma 6.2.If S = X i for some source i ∈ I, and s ∈ Guarded(X i ) ∪ X i is a starting vertex, then Simulate(S, ∅, s, Next, Hist) terminates.
Proof.We begin by showing that Odd cannot play reject in Step 4 infinitely many times.This follows from the definition of Next.This functions ensures two properties: • Each simulation game is played on a set of vertices S = X j for some j ∈ I.
• If odd plays reject in a game on S = X j , then the next game will be played on S ′ = X k , with (j, k) ∈ J.These two properties ensure that, every time that Odd plays reject, we take one step along a directed path in the DAG decomposition.Since the DAG decomposition contains no cycles, we know that Odd can play reject at most |I| times before we reach a sink in the DAG decomposition.
The Hist function ensures that, once we reach a sink in the DAG decomposition, the game must end.Suppose that we have reached a simulation game on S = X j where j ∈ I is a sink.The history function ensures that F contains a record (F, p, P ) with F = X k , where (k, j) ∈ J. Therefore, since X j guards X i , every edge (v, w) with v ∈ S and w / ∈ S has w ∈ X j .Thus, Step 2 of the simulation game ensures that Odd cannot play reject.
We now show that if Odd only plays accept in a simulation game on S, then the game must terminate after |S| + 1 steps.This is because each time Odd plays accept for some vertex u ∈ S, the vertex u is appended to Π. Therefore, if the game continues for |S| + 1 steps, then Odd will be forced to play accept for some vertex u that has been visited by Π, and the game will terminate in Step 6.
Then, we can apply Lemma 6.2 along with Lemma 5.7 to imply the correctness of this version of the simulation game.Lemma 6.3.Let v ∈ V be a vertex, and let X i ∈ X be a set of vertices, where i is a source, and v ∈ Guarded(X i ) ∪ X i .Even wins Simulate(X i , ∅, v, Next, Hist) if and only if v ∈ W 0 .
6.3.Implementation on an alternating Turing machine.In this section, we show how this version of the simulation game can be implemented on an alternating Turing machine.We use the existential states of the machine to simulate the moves of Even and the universal states of the machine to simulate the moves of Odd.In this way, we ensure that the machine will have an accepting run if and only if Even has a strategy for Simulate G (S, ∅, s, Next, Hist) that forces a win no matter how Odd plays.Theorem 6.4.There is an algorithm that, when given a parity game G, a DAG decomposition (D = (I, J), X) of width k for G, and a vertex s, terminates in O(|V | k+3 • k k+2 • (|D| + 1) 3k+2 ) time and outputs the winner of s.
Proof.We show that Simulate G (S, ∅, s, Next, Hist), where S is a source in the DAG decomposition, and s ∈ Guarded(S) ∪ S, can be implemented on an alternating Turing machine in logarithmic space.We split our analysis into two cases: the data that must be stored throughout the game, and the data that must be stored to implement each iteration of the game.
We begin by considering the data that must be stored throughout.The simulation game maintains the variables S, F, Π and c.Note that, from the definitions of Hist and Next, we have that S = X i for some i ∈ I.Moreover, we know that F contains exactly one record (F, p, P ), where F = X j for some j with (j, i) ∈ J.These variables can be stored using the following amount of space.
• We claim that S and F can be remembered using (k + 2) log |V | bits.This is because we always have S = X i and F = X j for some edge (j, i) ∈ J, and since since |J| ≤ |V | k+2 , we need at most (k + 2) log |V | bits to store (i, j).Remembering (i, j) is sufficient to identify both S and F .• Note that c is always a vertex in S. Since we know that S = X i , we can represent c as a number between 1 and k.Thus, c can be stored in at most log k bits.• The priority p can be stored in log D bits.
• The strategy profile P contains |F | mappings from the vertices of F to either a priority d, or −.Thus, we can represent a strategy profile as a list of length k, where each element of the list is a number between 1 and |D| + 1: the numbers 1 through |D| encode their respective priorities, and the number |D| + 1 encodes −.Thus, P can be stored using k • log(|D| + 1) bits.• Recall that the sequence Π is reset to ∅ at the start of each simulation game.This implies that Π contains at most |S| + 1 tuples of the form (v, p, u).Due to the initialization procedure of the simulation game we can have v / ∈ S and u ∈ S in the first element of Π.However, for every subsequent element, we always have v ∈ S and u ∈ S. Suppose that the first element of Π does have v / ∈ S. We claim that we do not need to remember the vertex v.Note that the simulation game only cares about the largest priority along Π, and whether Π forms a cycle.Since v / ∈ S, Step 2 prevents Π from forming a cycle that includes v. Thus, we do not need to store v.
Note also that, if (v, p, u) appears in Π, then, the next element in the sequence must be of the form (u, p ′ , u ′ ).Thus, for every tuple in Π other than the first element in the sequence, we only need to store the priority p ′ and the vertex u ′ .In total, therefore, we can represent Π by storing at most |S| + 1 priorities, and at most |S| + 1 vertices in S.These can be stored in (k + 1) • log |D| + (k + 1) • log k bits.Next, we account for the space used during the execution of the game.
• The vertex v that is selected in Step 1 requires log |V | bits to store.
• As with the strategy profile P , the strategy profile P ′ given by Even in Step 3 can be stored in k • log(|D| + 1) bits.• We claim that no additional space is needed if Odd rejects the strategy profile P ′ in step 4. To see why, note that Update will always delete the current record in F. Thus, we can implement Step 4 by first deleting the existing record in F, and then reusing the space for the new record.• No extra space is needed by Steps 2, 5, and 6.Thus, in total, we require bits of storage for to implement the game on an alternating Turing machine.Using the standard determinization techniques for alternating Turing machines, we can obtain a deterministic algorithm that runs in O(|V | k+3 • k k+2 • (|D| + 1) 3k+2 ) time.

A Faster Algorithm For Parity Games With Bounded Treewidth
In Section 6 we gave an O(|V | k+3 • k k+2 • (|D| + 1) 3k+2 ) time algorithm for parity games with bounded DAG width.In this section, we show that, if the parity game has bounded treewidth, then we can produce a version of the simulation game that can be solved in 7.1.Outline.The version of the simulation game used in this section is very similar to the version used in Section 6, but this time we will be using a tree decomposition.In fact, we will convert the tree decomposition to a rooted tree decomposition.Suppose that we want to determine the winner of some vertex s in the parity game.We find a tree decomposition node i such that s ∈ X i , and we declare i to be the root of T .Then, we turn T into a directed tree, by orienting all edges away from the root i.This step is necessary to obtain our desired complexity.
Recall that the factor of |V | k+3 in Theorem 6.4 arose from the fact that we needed to use (k + 3) • log |V | bits of storage in the alternating Turing machine: • We needed (k + 2) • log |V | bits to store an edge from the DAG decomposition.
• We needed log |V | bits to store the vertex v.The first observation that we make is that, when we consider parity games with bounded treewidth, we can easily reduce the amount of space that is required.Whereas a DAG decomposition can have up to |V | k+2 edges, a tree decomposition can have at most |V | − 1 edges.Thus, we can reduce the amount of space needed by the alternating Turing machine to 2 ) time algorithm for solving parity games with bounded treewidth.
We can, however, do better than this.For the rest of this section, our goal is to show that the 2 • log |V | term in our space bounds can be reduced to log |V |.This will lower the |V | 2 term in the complexity of the algorithm to |V |.To do this, we concentrate on the amount of space used by the variable v.The reason why we require log |V | bits to store v is that the edge chosen in Step 1 can potentially set v to be any vertex in the parity game. Figure 4 illustrates this.It shows a subtree of a tree decomposition: specifically, it shows the tree decomposition nodes i with u ∈ X i .Each node in the tree decomposition is represented as a circle.For each set X i , the diagram displays the outgoing edges from u that are contained in that node.That is, for each set X i , it displays the edges of the form (u, w) with both u ∈ X i and w ∈ X i .
Suppose that we are playing a simulation game on the set X j , and that the current vertex c = u.In Step 1, Even could select the edge (u, h).Since X m is far from X j in the tree decomposition, the best we can do is to use log |V | bits to store the vertex h.
We will fix this problem by modifying the parity game.The modification procedure is illustrated in Figure 5.Each vertex in the graph will have its outgoing edges modified.Figure 5a shows an example vertex u, and Figure 4 gives an example tree decomposition, where only the nodes that contain u are shown.Figures 5a shows the outgoing edges from u  in the original parity game, and Figure 5b shows the changes that we make to the outgoing edges from u. Suppose that we are playing a simulation game on X j , and that we have arrived at u. Now suppose that Even wants to move to some vertex not in X j , for example, the vertex g.The modification forces Even to a path in the tree decomposition to a node that contains h, before moving to h.
Without this modification, we would be forced to use log v bits to hold the variable c, because in Step 1 of the simulation game, Even could potentially pick any vertex in the graph.On the other hand, suppose that we have made the modification, and that are playing a simulation game on X j and that c = u.Let (u, v) be the edge picked by Even in Step 1.
• If v ∈ X j , then we can represent v using log k bits.
• If v / ∈ X j , then we must have that v = u i for some tree decomposition edge (j, i).In this case, we can store v by remembering u and (j, i).In the second case, the vertex u can be stored using log k bits.We claim that the edge (j, i) can be stored without using any additional memory.Recall that we are already required to remember a tree decomposition edge of the form (l, j), in order to represent the current set It is not difficult to see that this construction cannot change the winner of the parity game.This is because, if there is an edge (v, u) ∈ E, then there is a path v 1 , v 2 , . . ., v k in G ′ with v 1 = v, v k = u, and where v 2 through v k−1 belong to the owner of v 1 .Thus, if Even has a winning strategy in G that uses the edge (v, u), then we can construct a strategy for Even in G ′ that follows the corresponding path from v to u.The same property also holds for Odd's winning strategies.Thus, we have the following lemma.
Lemma 7.3.Let s ∈ V be a vertex.Even wins from s in G if, and only if, Even wins from s in G ′ .
For the rest of this section, we will develop a version of the simulation game that can be used to solve G ′ .Although we have modified the parity game, we will not compute a new tree decomposition.We will develop an algorithm that uses the original tree decomposition and the modified parity game.7.3.The functions Next TW and Hist TW .We now define two functions, Next TW and Hist TW .The idea is to use the same approach as we did in Section 6.That is, if we want to determine the winner for some vertex s in the parity game, then we find an i ∈ I with s ∈ X i , and we play Simulate G ′ (S, ∅, s, Next TW , Hist TW ).
We start by defining the function Next TW .This function will always choose sets of the form X i ∪ {v i }, where i ∈ I is a tree decomposition node, and v i ∈ V ′ is a vertex.Suppose that we are required to compute Next TW (S, v, F), for some set S, some vertex v ∈ V ′ , and some history F. Since S was either chosen by Next TW , or was the set chosen at the start of the game, we know that S ⊆ X i ∪ {v i } for some i ∈ I and some v i ∈ V ′ .Let (u, w) be an edge with u ∈ S and w / ∈ S. The definition of G ′ implies that w is one of the extra vertices added that were added while constructing G ′ .That is, we have w = u j for some tree decomposition edge (i, j) ∈ J. Thus, we know that, if we are required to compute Next TW (S, v, F), then we must have v = u j for some u ∈ S, and some tree decomposition edge (i, j).We define Next TW (S, u j , F) = X j ∪ {u j }.
Next, we define the Hist TW function.It is very similar to the Hist function defined in Section 6, and it is defined as follows: • The first time that Hist TW (F) is called, F will contain only one record.We do not delete this record, so we set Hist(F) = F. • Every other time that Hist(F) is called, F will contain exactly two records.Due to the definition of Next TW , we know that the two records in F have the form (S 1 , v 1 , P 1 ) and (S 2 , v 2 , P 2 ), where X i ⊆ S 1 and X j ⊆ S 2 , for some i, j ∈ I. Furthermore, we know that (i, j) ∈ J is a directed edge in the tree decomposition.We set Hist(F) = {(S 2 , v 2 , P 2 )}.The next lemma shows that, if we equip the simulation game with the functions Next TW and Hist TW , then the simulation game always terminates.Since we are following the approach used in Section 6, this proof is similar in structure to the proof of Lemma 6.2.Lemma 7.4.If i is the root of the tree decomposition, and s ∈ X i is a vertex, then Simulate G ′ (X i , ∅, s, Next TW , Hist TW ) terminates.
Proof.We begin by arguing that Odd cannot play reject an infinite number of times.This follows from the definition of Next TW : we know that if Odd plays reject in a simulation game where X i ⊆ S for some i ∈ I, then the next game will be played on a set S ′ with X j ⊆ S ′ for some directed edge (i, j) ∈ J. Thus, after Odd has played reject at most |I| times, we will have arrived at a leaf in the tree decomposition.
The Hist TW function ensures that, once we reach a leaf in the tree decomposition, the game must end.Suppose that we have reached a simulation game on S, where S = X j ∪{w j } where j ∈ I is a leaf, and w ∈ X j is a vertex.The history function ensures that F contains a record (F, p, P ) with X k ⊆ F , where (k, j) ∈ J.We now have two properties: • For every edge (v, u) with v ∈ X j \ X k and u / ∈ X j , we have u ∈ X k .This follows from the definition of a tree decomposition given in Definition 2.2.
• For every edge (v, u) with v = w j , we have u ∈ X j .This follows from the definition of E ′ given in Definition 7.2.Thus, we have shown that, for every edge (v, u) with v ∈ X j \ X k and u / ∈ X j , we have u ∈ X k .Therefore, since X k ⊆ F , Step 2 of the simulation game ensures that Odd cannot play reject.
Since S contains at most k +1 vertices, we know that, if Odd can no longer play reject, then Odd can play accept at most k + 2 times before the game is forced to end in either Step 5 or Step 6.Now that we have established termination, we can apply Lemma 5.7 to imply the correctness of this version of the simulation game.
7.4.Implementation on an alternating Turing machine.Finally, we show how this version of the simulation game can be implemented on an alternating Turing machine.As usual, the existential and universal states of the alternating Turing machine will be used to simulate the moves of Even and Odd.We have the following theorem.Proof.For the most part, the proof of this theorem is the same as the proof of Theorem 6.4.Recall, from the proof of Theorem 6.4, that we must remember the following variables: S, F = {F, p, P }, Π, P ′ , c, and v.
Our central claim is that S, F , and v can be stored in log |V | + 2 • log(k + 1) bits.Note that, Next TW and Hist TW ensure that S ⊆ X i ∪ {s i } and F ⊆ X j ∪ {f j }, for some (j, i) ∈ J, and some vertices s, f ∈ V .By Definition 7.2, there cannot be an edge (v, u) with v ∈ S \F , and u = f j .Thus, our alternating Turing machine can represent F as the set X j , while forgetting the vertex f j , and this cannot affect the correctness of the algorithm.Now we argue that S, F , and v can be stored in log |V | + 2 log(k + 1) bits.There are two cases to consider: • If v ∈ S, then X i and X j can be represented by pointing to an edge in J. Since T is a tree, we know that |J| ≤ |I| ≤ |V |.Then, to store s i we can simply store the vertex s in log k bits, because we already know X i .Since v ∈ S, and since |S| ≤ k + 1, we can store v using log(k + 1) bits.
∈ S, then we know that v = u l for some u ∈ S, and some l ∈ I.Note that j, i, and l form a directed two-edge path in T .Thus, by Lemma 7.1, we can represent j, i, and l, in log |I| ≤ log |V | bits.As with the previous case, we can represent the extra vertex s i using log k bits.Moreover, since u ∈ S, we can represent v using at most log(k + 1) bits.Therefore, in both cases we can store S, F , and v using log |V | + log(k + 1) + log k bits.
The amount of space for the variables p, P , Π, P ′ , and c follow from the arguments made in the proof of Theorem 6.4.However, there is one small difference: in this proof, we have |S| = k + 1 rather than |S| = k.Thus, while P could be stored in k • log(D + 1) bits in Theorem 6.4, we must use (k + 1) • log(D + 1) bits in this proof.Similar modifications are required for the other variables.

Parity Games With Bounded Treewidth Are In NC 2
We begin by defining the Next and Hist functions that will be used in by simulation game in this result.Recall, from Section 4.3, that this version of the simulation game gives extra strategic choices to player Odd.We use this idea to define Next NC and Hist NC as follows: • When Step 4 requires a value for Next NC (S, v, F ′′′ ), we allow player Odd to select the set of vertices that will be used.More precisely, we allow Odd to select Step 4 requires a value for Hist NC (F ′′ ), we allow Odd to to select the set F ′′′ by deleting records from F ′′ .We insist that, if |F ′′ | > 3, then Odd must delete enough records so that |F| ≤ 3. Thus, we will use Simulate(S, F, s, Next NC , Hist NC ) as the simulation game in this section.
Note that this simulation game could go on forever, since Odd could, for example, always play reject, and remove all records from F. For this reason, we define a limitedround version of the game, which will be denoted by Simulate r (S, F, s, Next NC , Hist NC ), where r ∈ N.This game is identical to Simulate r (S, F, s, Next NC , Hist NC ) for the first r rounds.However, if the game has not ended before the start of round r + 1, then Even is declared to be the winner.
Let r ∈ N be an arbitrarily chosen bound.The following lemma states that, no matter what sets Odd chooses, if the simulation game stops before round r + 1, then the winner of the parity game is correctly determined.The correctness of this lemma follows from Lemma 5.7.Note that this lemma does not guarantee anything if the simulation game terminates in round r + 1.Our goal in this section is to show that there is an r such that Odd can always force the game to end before round r + 1, which will then allow us to apply Lemma 8.1 to prove correctness of our algorithm.
We will assume that our parity game has a tree decomposition (T = (I, J), X) of width k.Our main goal is to show that Odd has a strategy for choosing Next NC and Hist NC that forces the game to terminate within the first r rounds, for some r ∈ N. In particular, to show that parity games with bounded treewidth lie in NC 2 , our strategy must have the following properties: • The history may never contain more than three records.
In the following subsections, we will provide such a strategy.8.1.Odd's strategy for Next NC and Hist NC .Recall, from Section 4.3, that the strategy for Odd consists of two sub-strategies: Slice and Reduce.The strategy Slice will be applied whenever F contains fewer than 3 records, and Reduce will be applied whenever F contains exactly 3 records.Both of these strategies maintain a set of eligible tree decomposition nodes L ⊆ I.The set of eligible tree decomposition nodes represents the portion of the parity game that can still be reached by the simulation game.An intuitive idea of this is given in Figures 3a and 3b.In both cases, the set of eligible nodes is the subtree between the nodes F 1 , F 2 , and F 3 .
We give a formal definition for how L will be updated.Suppose that Odd rejects the profile P for the vertex v and set X i .We define Subtree(X i , v) to be the set of nodes in the subtree of i rooted at Direction(X i , v).We update L as follows.
• The first time that reject is played, Odd sets L = I.
• In each subsequent iteration, the set L is updated so that L := L ∩ Subtree(X i , v).Odd uses L to decide which records should be deleted.Formally, Odd will select Hist NC (F) according to the following rules: − The first time that reject is played, Odd removes all records from F. − In each subsequent iteration, Odd uses the following rule.Let (F, p, P ) ∈ F, and suppose that X i ⊆ F for some i ∈ I.If there is no edge (i, j) ∈ J with j ∈ L, then Odd removes (F, p, P ) from F ′ .We now define the strategy Slice.Recall that Lemma 4.1 shows that every tree with more than three nodes can be split into pieces, where each piece has at least two-thirds of the nodes in the tree.We define Split(I, J) to be a function that returns a vertex i ∈ I that satisfies the properties given in Lemma 4.1.The strategy Slice will use the function Split to remove at least one third of the eligible nodes.Formally, we define Slice(S, v, L, F).The strategy is defined as follows: The second clause is necessary, because Lemma 4.1 requires that the tree should have at least three vertices.
We now introduce our second strategy for choosing S ′ , which is called Reduce.This strategy will be applied whenever |F| = 3. Recall that the purpose of Reduce is to reduce the number of records in F to at most 2, so that we can continue to apply Slice.Suppose that F = {(F 1 , p 1 , P 1 ), (F 2 , p 2 , P 2 ), (F 3 , p 3 , P 3 )}.By assumption we have that F 1 = X i , F 2 = X j , and F 3 = X k , for some i, j, k ∈ I.Note that i, j and k cannot all lie on the same path, because otherwise one of the records in F would have been deleted by Hist NC .It is a basic property of trees that, if i, j, and k are not on the same path, then there exists a unique vertex l ∈ I such that, if l is removed, then i, j, and k, will be pairwise disconnected.For each history F with |F| = 3, we define Point(F) to be the function that gives the vertex l.We define the strategy Reduce(S, v, L, F) = X i , where i = Point(F).
Finally, we can give the full strategy for Odd.Odd selects Next NC (S, v, F) according to the following rules:

Correctness of SR.
In this subsection, we show that SR has both of the properties that we desire.Suppose that Odd uses SR, and that the outcome is a play of the simulation game: Furthermore, let L i be the contents of L at the start of the game S i , and let v i = s i+1 be the final vertex visited in S i .The first property that we will prove is that, as long as Odd plays SR, the set L is guarded by the records in F. Informally, this means that, in order to move from a tree decomposition node i ∈ L, to a tree decomposition node j / ∈ L, we must pass through some record in F. Formally, this can be expressed as the following lemma.
Lemma 8.2.Suppose that Odd plays SR.If z ≥ 2, then for every edge (i, j) ∈ J with i ∈ L z , and j / ∈ L z , there exists a record (F, p, P ) ∈ F z with X z = F .
Proof.We will prove this claim by induction on z.The base case is vacuously true, since SR sets L 2 = I, which implies that there cannot exist an edge (i, j) with j / ∈ L 2 .For the inductive step, assume that this lemma holds for some z > 2. Since L z+1 = L z ∩ Subtree(S z , v z ), the only possible edge that could be not covered by a set in F z is the edge (i, j), where X i = S z+1 , and j ∈ Subtree(S z+1 , v z+1 ).However, this edge is covered by two properties: • In Step 4, the simulation game always adds the record (F, −, P ′ ) to F ′ to create F ′′ .
• When choosing F ′′′ , the strategy SR never removes a record (F, p, P ) from F ′′ with F ⊆ X j , where (i, j) ∈ J and i ∈ L z+1 and j / ∈ L z+1 .Thus, a record (F, p, P ) with F = X i must be contained in F z+1 , which completes the proof of the inductive step.
Next we will show the correctness of Reduce.In particular, we show how if it is used when |F x | = 3, it enforces that |F x+1 | ≤ 2. Lemma 8.3.Suppose that Odd plays SR, and for some x ≥ 2 we have |F x | = 3, and S x = Reduce(S x−1 , v x−1 , L x−1 , F x ).We have |F x+1 | ≤ 2.
Proof.Since x ≥ 2, and since Odd is following SR, we know that there must exist three tree decomposition nodes i, j, k ∈ I, such that, if (F 1 , p 1 , P 1 ), (F 2 , p 2 , P 2 ), and (F 3 , p 3 , P 3 ) are the three records in F x , then we have F 1 = X 1 , F 2 = X j , and F 3 = X k .By definition, Reduce(S x−1 , v x−1 , L x−1 ) selects a vertex l such that, if l is removed from T = (I, J), then i, j, and k become disconnected.Thus, at most one of i, j, and k can lie in Subtree(S x−1 , v x−1 ), and hence at least two records will be removed by SR.Therefore, since at most one new record is added to  Proof.In order to simulate the game, we must remember the set S, the vertex c and the vertex v, the strategy profile P ′ , the path Π, and the history F. It is important to note that we do not need to remember the set L used by SR.In Lemma 8.4 we showed that there exists an Odd strategy that forces the game to terminate in O(k • log |V |).The existence of such a strategy is sufficient to ensure that the alternating Turing machine computes the correct answer, and we do not need to actually implement the strategy on the alternating Turing machine.
Therefore, the amount of space used by the alternating Turing machine is as follows.It is worth noting that the running time of our algorithm for parity games with bounded DAG width includes a factor of |V | k+2 , because that is the best known upper bound for the number of edges that can appear in a DAG decomposition.If, in the future, better upper bounds are derived, then the running time of our algorithm will see a corresponding improvement.
An interesting open problem is: are there fixed parameter tractable algorithms for solving parity games with bounded treewidth?An algorithm is fixed parameter tractable if its running time can be expressed as O(poly (V ) • f (k)), where the degree of the polynomial is independent of the treewidth.Neither of the algorithms that we have presented satisfy this property, because they include the terms |V | k+3 and (|D| + 1) 3k+5 , respectively.In the case of DAG width, if the upper bounds on the size of the DAG decomposition are tight, then it seems unlikely that there exist fixed parameter tractable algorithms.However, for the case of treewidth, it is entirely possible that such algorithms could exist.
The simulation game.
The second simulation game.

Figure 1 .
Figure 1.Example runs of the simulation game.

Figure 2 .
Figure 2.An example run of the simulation game for the time complexity result.

Figure 3 .
Figure 3. Odd's strategies for choosing S in the simulation game.

Figure 4 .
Figure 4.The outgoing edges from the vertex u shown in a tree decomposition.

Finally, we are
able to prove that SR has the property that we require.Lemma 8.4.Suppose that the parity game has a tree decomposition of width k.If Odd plays SR, then the game ends in O(k • log |V |) rounds.Proof.Lemma 4.1 implies that, if Slice is invoked at the end of S i , then we will have|L i+1 | ≤ 2 3 |L i |.Each time Slice is used, we add at most one new record to F. Therefore, for each use of Slice, we must use Reduce at most 1 time, in order to keep |F| ≤ 3. Thus, after Odd has played reject at most 2 • log 3 2 (|I|) times, we will arrive at a game S c with |L c | < 3. − Since computing MaxPri(Π) can take at most k • log |D| time, and since |F| ≤ 3, we have that F ′ can computed in k • log |D| time.− Appending (F, −, P ′ ) to F ′ when creating F ′′ will take k • log |V | + log(|D| + 1) + k • log(|D| + 1) time.− Implementing Odd's strategy for Hist NC can be done in 4 • k • log |V | + log(|D| + 1) + k • log(|D| + 1) time.This is because Odd is only allowed to remove records from F ′′ , and because |F ′′ | ≤ 4. − Implementing Odd's strategy for Next NC involves picking a subset of vertices with size at most k.This can be done in k • log |V | time.• In Step 5, since |F i | ≤ 3, we can check whether c ∈ F , for some (F, p, P ) ∈ F i , in 3 • k • log |V | time.If the game stops here, then computing p ′ , which requires us to find MaxPri(Π), must take at most k • log |D| time.• In Step 6, determining if Π forms a cycle can be done by checking for each tuple (v, p, u) ∈ Π if c = v.Since there can be at most k tuples in Π, this can be done in k • log |V | time.Finding the highest priority on the cycle then takes at most k • log |D| time.Since |D| ≤ |V |, we have that each round takes at most O(k • log |V |) time.Since there are at most O(k • log |V |) rounds, the machine must terminate in O(k 2 • (log |V |) 2 ) time.Next, we prove the space bounds for the alternating Turing machine.Lemma 8.6.A simulation of Simulate c G ({s}, ∅, s, Next NC , Hist NC ) by an alternating Turing machine uses at most O(k • log |V |) space.

•
Since we always have |S| ≤ k, we know that S requires at most k • log |V | bits to store.• The vertices c and v each require log |V | bits to store.• The strategy profile P ′ contains |S| mappings u → p, where u ∈ S and p ∈ D ∪ {−}.Therefore, P ′ can be stored using k(log |V | + log(|D| + 1)) bits.• Since |S| ≤ k, the path Π contains at most k tuples of the form (v, p, u), where v, u ∈ V and p ∈ D∪{−}.Therefore, storing the path Π requires at most 3•k•(log |V |+log(|D|+1)) bits.• For each record (F, p, P ) ∈ F, the set F requires k • log |V | bits to store, the priority p requires log(|D| + 1) bits to store, and we have already argued that the strategy profile P requires at most k • (log |V | + log(|D| + 1)) bits to store.Since |F| ≤ 3, we have that F requires at most 3 • (2 • k • log |V | + (k + 1) • log(|D| + 1)) bits to store.Since |D| ≤ |V |, we have shown that the alternating Turing machine requires at most O(k • log |V |) space.Having shown these two properties, we now have the main result of this section.Theorem 8.7.Let G be a parity game and k be a parameter.There is an alternating Turing machine that takes O(k 2 • (log |V |) 2 ) time, and uses O(k • log |V |) space, to either determine the winner of a vertex s ∈ V , or correctly report that G has treewidth larger than k.A simple corollary of the time and space results for our alternating Turing machine is that our problem lies in the class NC 2 [ALR10, Theorem 22.15].Corollary 8.8.The problem of solving a parity game with bounded treewidth lies in N C 2 .9. Conclusion We have seen three results: a O(|V | k+3 •k k+2 •(|D|+1) 3k+2 ) time algorithm for parity games with bounded DAG width, a O(|V | • (k + 1) k+5 • (|D| + 1) 3k+5 ) time algorithm for parity games with bounded treewidth, and a proof that parity games with bounded treewidth lies in NC 2 .
Plays in the simulation game.We now describe the outcome when the simulation game Simulate(S, F, s, Next, Hist) is played.The players begin by playing G 1 = Simulate(S, F, s, Next, Hist).This game either ends in Step 5, Step 6, or when Odd plays reject in Step 4 and causes the players to move to a new game G 2 .The outcome can be described as a (potentially infinite) sequence of games: • In Step 4, Odd's decision is based on the strategy profile P ′ .If τ refutes P ′ , then odd plays reject.Otherwise, Odd selects a vertex u ∈ F such that Profile(τ, v, S)(u) P ′ (u) and plays accept for u.5.2.
Lemma 8.1.No matter which sets are chosen by Odd for Next NC and Hist NC in Step 4: • if s ∈ W 0 , then Even has a strategy to win Simulate r ({s}, ∅, s, Next NC , Hist NC ).• If s ∈ W 1 , and if the game ends before round r + 1, then Odd has a strategy to win Simulate r ({s}, ∅, s, Next NC , Hist NC ).