A parity game is played on a colored directed graph, where each node has been colored by a priority - one of finitely manynatural numbers. Two players, 0 and 1, move a token along the edges of the graph. The owner of the node that the token falls on selects the successor node, resulting in a path, called the play. The winner of a finite play is the player whose opponent is unable to move. The winner of an infinite play is determined by the priorities appearing in the play. Typically, player 0 wins an infinite play if the largest priority that occurs infinitely often in the play is even. Player 1 wins otherwise. This explains the word "parity" in the title. Parity games lie in the third level of the Borel hierarchy, and are consequently determined. Games related to parity games were implicitly used in Rabin's proof of decidability of second-order theory ofn successors, where determinacy of such games was proven. The Knaster-Tarski theorem leads to a relatively simple proof of determinacy of parity games. Moreover, parity games are history-free determined. This means that if a player has a winning strategy then that player has a winning strategy that depends only on the current board position, and not on the history of the play.
Solving a parity game played on a finite graph means deciding, for a given starting position, which of the two players has a winning strategy. It has been shown that this problem is in NP and Co-NP, more precisely UP and co-UP, as well as in QP. It remains an open question whether this decision problem is solvable in PTime. Given that parity games are history-free determined, solving a given parity game is equivalent to solving the following simple looking graph-theoretic problem. Given a finite colored directed bipartite graph with n vertices, and V colored with colors from 1 to m, is there a choice function selecting a single out-going edge from each vertex of, such that the resulting subgraph has the property that in each cycle the largest occurring color is even.
Zielonka outlined a recursive algorithm that solves parity games. Let be a parity game, where resp. are the sets of nodes belonging to player 0 resp. 1, is the set of all nodes, is the total set of edges, and is the priority assignment function. Zielonka's algorithm is based on the notation of attractors. Let be a set of nodes and be a player. The -attractor of is the least set of nodes containing such that can force a visit to from every node in. It can be defined by a fix-point computation: In other words, one starts with the initial set and adds, in every step, all nodes belonging to player 0 that can reach with a single edge and all nodes belonging to player 1 that must reach no matter which edge player 1 takes. Zielonka's algorithm is based on a recursive descent on the number of priorities. If the maximal priority is 0, it is immediate to see that player 0 wins the whole game. Otherwise, let be the largest one and let be the player associated with the priority. Let be the set of nodes with priority and let be the corresponding attractor of player. Player can now ensure that every play that visits infinitely often is won by player. Consider the game in which all nodes and affected edges of are removed. We can now solve the smaller game by recursion and obtain a pair of winning sets. If is empty, then so is for the game, because player can only decide to escape from to which also results in a win for player. Otherwise, if is not empty, we only know for sure that player can win on as player cannot escape from to . We therefore compute the attractor and remove it from to obtain the smaller game. We again solve it by recursion and obtain a pair of winning sets. It follows that and. In simple pseudocode, the algorithm might be expressed as this: function := maximal priority in if return else := nodes in with priority
A slight modification of the above game, and the related graph-theoretic problem, makes solving the game NP-hard. The modified game has the Rabin acceptance condition. Specifically, in the above bipartite graph scenario, the problem now is to determine if there is a choice function selecting a single out-going edge from each vertex of V0, such that the resulting subgraph has the property that in each cycle it is the case that there exists an i and a node with color 2i, and no node with color 2i + 1... Note that as opposed to parity games, this game is no longer symmetric with respect to players 0 and 1.
Despite its interesting complexity theoretic status, parity game solving can be seen as the algorithmic backend to problems in automated verification and controller synthesis. The model-checking problem for the modal μ-calculus for instance is known to be equivalent to parity game solving. Also, decision problems like validity or satisfiability for modal logics can be reduced to parity game solving.