Parity game explained

A parity game is played on a colored directed graph, where each node has been colored by a priority  - one of (usually) finitely many natural numbers. Two players, 0 and 1, move a (single, shared) token along the edges of the graph. The owner of the node that the token falls on selects the successor node (does the next move). The players keep moving the token, resulting in a (possibly infinite) path, called a 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.[1]

Games related to parity games were implicitly used in Rabin'sproof of decidability of the monadic second-order theory of n successors (S2S for n = 2), where determinacy of such games wasproven.[2] The Knaster - Tarski theorem leads to a relatively simple proof of determinacy of parity games.[3]

Moreover, parity games are history-free determined.[3] [4] [5] 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 game

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 (quasipolynomial time). 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

V=V0\cupV1

, and V colored with colors from 1 to m, is there 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 the largest occurring color is even.

Recursive algorithm for solving parity games

Zielonka outlined a recursive algorithm that solves parity games. Let

G=(V,V0,V1,E,\Omega)

be a parity game, where

V0

resp.

V1

are the sets of nodes belonging to player 0 resp. 1,

V=V0\cupV1

is the set of all nodes,

E\subseteqV x V

is the total set of edges, and

\Omega:VN

is the priority assignment function.

Zielonka's algorithm is based on the notation of attractors. Let

U\subseteqV

be a set of nodes and

i=0,1

be a player. The -attractor of is the least set of nodes

Attri(U)

containing such that can force a visit to from every node in

Attri(U)

. It can be defined by a fix-point computation:
0
\begin{align} Attr
i(U)

&:=

j+1
U \\ Attr
i(U)

&:=

j
Attr
i(U)

\cup\{v\inVi\mid\exists(v,w)\inE:w\in

j
Attr
i(U)

\}\cup\{v\inV1-i\mid\forall(v,w)\inE:w\in

j
Attr
i(U)

\} \\ Attri(U)&:=

infty
cup
j=0
j \end{align}
Attr
i(U)

In other words, one starts with the initial set . Then, for each step (

j+1
Attr
i(U)
) one adds all nodes belonging to player 0 that can reach the previous set (
j
Attr
i(U)
) with a single edge and all nodes belonging to player 1 that must reach the previous set (
j
Attr
i(U)
) 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 (with an arbitrary strategy). Otherwise, let be the largest one and let

i=p\bmod2

be the player associated with the priority. Let

U=\{v\mid\Omega(v)=p\}

be the set of nodes with priority and let

A=Attri(U)

be the corresponding attractor of player .Player can now ensure that every play that visits infinitely often is won by player .

Consider the game

G'=G\setminusA

in which all nodes and affected edges of are removed. We can now solve the smaller game

G'

by recursion and obtain a pair of winning sets

W'i,W'1-i

. If

W'1-i

is empty, then so is

W1-i

for the game, because player

1-i

can only decide to escape from

Wi'

to which also results in a win for player .

Otherwise, if

W'1-i

is not empty, we only know for sure that player

1-i

can win on

W'1-i

as player cannot escape from

W'1-i

to (since is an -attractor). We therefore compute the attractor

B=Attr1-i(W'1-i)

and remove it from to obtain the smaller game

G''=G\setminusB

. We again solve it by recursion and obtain a pair of winning sets

W''i,W''1-i

. It follows that

Wi=W''i

and

W1-i=W''1-i\cupB

.

In simple pseudocode, the algorithm might be expressed as this:

function

solve(G)

:= maximal priority in if

p=0

return

W0,W1:=V,\{\}

else := nodes in with priority

i:=p\bmod2

A:=Attri(U)

W0',W1':=solve(G\setminusA)

if

W1-i'=\{\}

return

Wi,W1-i:=V,\{\}

B:=Attr1-i(W1-i')

W0'',W1'':=solve(G\setminusB)

return

Wi,W1-i:=Wi'',W1-i''\cupB

Related games and their decision problems

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, and thus every vertex is colored by a set of colors instead of a single color. Accordingly, we say a vertex v has color j if the color j belongs to the color set of v. An infinite play is winning for player 0 if there exists i such that infinitely many vertices in the play have color 2i, yet finitely many have color 2i+1.

Parity is the special case where every vertex has a single color.Specifically, in the above bipartite graph scenario, the problem now is to determine if thereis 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 (and hence each strongly connected component) 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.

Relation with logic and automata theory

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.

References

  1. [Donald A. Martin|D. A. Martin]
  2. Rabin. M. O.. Decidability of second-order theories and automata on infinite trees. Transactions of the American Mathematical Society. 1969. 1–35. 141. 10.2307/1995086. American Mathematical Society. 1995086.
  3. [E. A. Emerson]
  4. A. Mostowski: Games with forbidden positions, University of Gdansk, Tech. Report 78 (1991)
  5. Zielonka. W. Infinite Games on Finitely Coloured Graphs with Applications to Automata on Infinite Trees. 1998. Theor. Comput. Sci.. 200. 1 - 2. 135 - 183. 10.1016/S0304-3975(98)00009-7. free.

Further reading

External links

Two state-of-the-art parity game solving toolsets are the following: