An Ordered Approach to Solving Parity Games in Quasi Polynomial Time and Quasi Linear Space

John Fearnley, Sanjay Jain, Sven Schewe, Frank Stephan, Dominik Wojtczak

Introduction

Parity games are two-player zero-sum games played on a finite graph. The two players, named even and odd, move a token around the graph until a cycle is formed. Each vertex is labelled with an integer colour, and the winner is determined by the parity of the largest colour that appears on the cycle: player even wins if it is an even colour, and player odd wins otherwise.

Parity games have been the focus of intense study , in part due to their practical applications. Solving parity games is the central and most expensive step in many model checking , satisfiability checking , and synthesis algorithms.

Parity games have also attracted attention due to their unusual complexity status. The problem of determining the winner of a parity game is known to lie in UP \cap co-UP , so the problem is very unlikely to be NP-complete. However, despite much effort, no polynomial time algorithm has been devised for the problem. Determining the exact complexity of solving a parity game is a major open problem.

Three main classes of algorithms have been developed for solving parity games in practice. The recursive algorithm , which despite being one of the oldest algorithms has been found to be quite competitive in practice . Strategy improvement algorithms use a local search technique , similar to the simplex method for linear programming and policy iteration algorithms for solving Markov decision processes. Progress measure algorithms define a measure that captures the winner of the game, and then use value iteration techniques to find it . Each of these algorithms has inspired lines of further research, all of which have contributed to our understanding of parity games. Unfortunately, all of them are known to have exponential worst case complexity.

Recently, Calude et al. have provided a quasi-polynomial time algorithm for solving parity games that runs in time O(nlog(c)+6)O(n^{\lceil\log(c)+6\rceil}), where cc denotes the number of priorities used in the game. Previously, the best known algorithm for parity games was a deterministic sub-exponential algorithm , which could solve parity games in nO(n)n^{O(\sqrt{n})} time, so this new result represents a significant advance in our understanding of parity games.

Their approach is to provide a compact witness that can be used to decide whether player even wins a play. Traditionally, one must store the entire history of a play, so that when the players construct a cycle, we can easily find the largest priority on that cycle. The key observation of Calude et al. is that a witness of poly-logarithmic size can be used instead. This allows them to simulate a parity game on an alternating Turing machine that uses poly-logarithmic space, which leads to a deterministic algorithm that uses quasi-polynomial time and space.

This new result has already inspired follow-up work. Jurdziński and Lazić have developed an adaptation of the classical small-progress measures algorithm that runs in quasi-polynomial time. Their approach is to provide a succinct encoding of a small-progress measure, which is very different from the succinct encoding developed by Calude et al. . The key advantage of using progress measures as a base for the algorithm is that it avoids the quasi-polynomial space requirement of the algorithm of Calude et al., instead providing an algorithm that runs in quasi-polynomial time and near linear space.

In this paper, we develop a progress-measure based algorithm for solving parity games that uses the succinct witnesses of Calude et al. . These witnesses were designed to be used in a forward manner, which means that they are updated as we move along a play of the game. Our key contribution is to show that these witnesses can also be used in a backwards manner, by processing the play backwards from a certain point. This allows us to formulate a value iteration algorithm that uses (backwards versions of) the witnesses of Calude et al. directly.

The outcome of this is to provide a second algorithm for parity games that runs in quasi-polynomial time and near linear space. We provide a comprehensive complexity analysis of this algorithm, which is more detailed than the one given Calude et al. for the original algorithm. In particular, we show that our algorithm provides

a quasi bi-linear running time for a fixed number of colours, O(mnlog(n)c1)O(mn\log(n)^{c-1});

a quasi bi-linear FPT bound, e.g. O(mna(n)loglogn)O(mn\mathfrak{a}(n)^{\log\log n}), where any other quasi-constant function can be used to replace the inverse Ackermann function a\mathfrak{a}; and

an improved upper bound for a high number of colours, O(mhnc1.45+log2(h))O(m\cdot h\cdot n^{c_{1.45}+\log_{2}(h)})

for parity games with mm edges, nn vertices, and cc colours, where h=1+c/log(n)h=\lceil 1+c/\log(n)\rceil and the constant c1.45=log2e<1.45c_{1.45}=\log_{2}\mathsf{e}<1.45. We also provide an argument that parity games with O(logn)O(\log n) colours can be solved in polynomial time.

The complexity bounds (1) of our algorithm only match the bounds for the algorithm of Jurdziński and Lazić , while (2) and (3) are new. Moreover, we believe that it is interesting that the witnesses of Calude et al. can be used in this way. The history of research into parity games has shown that ideas from the varying algorithms for parity games can often spur on further research. Our result and the work of Jurdziński and Lazić show that there are two very different ways of succinctly encoding the information that is needed to decide the winner in a parity game, and that both of them can be applied in value iteration algorithms. Moreover, implementing our progress measure is easier, as standard representations of the colours can be used. We have implemented our algorithm, and we provide some experimental results in the last section.

Finally, we present a lower bound for our algorithm, and for the algorithm of Calude et al. . We derive a family of examples upon which both of the algorithms achieve their worst case—quasi-polynomial—running time. These are simple single player games.

Preliminaries

A play v0,v1,\langle v_{0},v_{1},\ldots\rangle is won by player even if lim supiϕ(vi)\limsup_{i\rightarrow\infty}\phi(v_{i}) is even, by player odd if lim supiϕ(vi)\limsup_{i\rightarrow\infty}\phi(v_{i}) is odd.

A strategy for player even is a function σ:VVeV\sigma:V^{*}V_{e}\rightarrow V such that \big{(}v,\sigma(\rho,v)\big{)}\in E for all ρV\rho\in V^{*} and vVev\in V_{e}. A strategy σ\sigma is called memoryless if σ\sigma only depends on the last state (σ(ρ,v)=σ(ρ,v)\sigma(\rho,v)=\sigma(\rho^{\prime},v) for all ρ,ρV\rho,\rho^{\prime}\in V^{*} and vVev\in V_{e}). A play v0,v1,\langle v_{0},v_{1},\ldots\rangle is consistent with σ\sigma if, for every initial sequence ρn=v0,v1,,vn\rho_{n}=v_{0},v_{1},\ldots,v_{n} of the play that ends in a state of player even (vnVev_{n}\in V_{e}), σ(ρn)=vn+1\sigma(\rho_{n})=v_{n+1} holds.

It is well known that the following conditions are equivalent: Player even wins the game starting at v0v_{0} if she has a strategy σ\sigma that satisfies that

all plays v0,v1,\langle v_{0},v_{1},\ldots\rangle consistent with σ\sigma satisfy lim supiϕ(vi)\limsup_{i\rightarrow\infty}\phi(v_{i}) (i.e. the highest colour that occurs infinitely often in the play) is even;

all plays v0,v1,\langle v_{0},v_{1},\ldots\rangle consistent with σ\sigma contain a winning loop vi,vi+1,,vi+kv_{i},v_{i+1},\ldots,v_{i+k}, that satisfies vi=vi+kv_{i}=v_{i+k} and ϕ(vi)ϕ(vi+j)\phi(v_{i})\geq\phi(v_{i+j}) for all natural numbers jkj\leq k;

as (1), and σ\sigma must be memoryless; or

We use different criteria in the technical part, choosing the one that is most convenient.

QP Algorithms

We discuss a variation of the algorithm of Calude et al. .

In a nutshell, the algorithm keeps a data structure, the witnesses, that encodes the existence of sequences of “good” events. This intuitively qualifies witnesses as a measure of progress in the construction of a winning cycle. This intuition does not fully hold, as winning cycles are not normally identified immediately, but it gives a good intuition of the guarantees the data structure provides.

In , witnesses are used to track information in an alternating machine. As they are quite succinct (they have only logarithmically many entries in the number of vertices of the game, and each entry only requires logarithmic space in the number of colours), this entails the quasi-polynomial complexity.

We have made this data structure accessible for value iteration, using it in a similar way as classical progress measures. This requires a—simple—argument that witnesses can be used in a backward analysis of a run just as well as in a forward analysis. This, in turn, requires a twist in the updating rule that allows for rational decisions. For this, we equip the data structure with an order, and show that the same game is still won by the same player if the antagonist can increase the value in every step.

Let ρ=v1,v2,,vm\rho=v_{1},v_{2},\dots,v_{m} be a prefix of a play of the parity game. An ii-witness is a sequence of (not necessarily consecutive) positions of ρ\rho

of length exactly 2i2^{i}, that satisfies the following properties:

Position: Each pjp_{j} specifies a position in the play ρ\rho, so each pjp_{j} is an integer that satisfies 1pjm1\leq p_{j}\leq m.

Order: The positions are ordered. So we have pj<pj+1p_{j}<p_{j+1} for all j<2ij<2^{i}.

Evenness: All positions other than the final one are even. Formally, for all j<2ij<2^{i} the colour ϕ(vpj)\phi(v_{p_{j}}) of the vertex in position pjp_{j} is even.

Inner domination: The colour of every vertex between pjp_{j} and pj+1p_{j+1} is dominated by the colour of pjp_{j}, or the colour of pj+1p_{j+1}. Formally, for all j<2ij<2^{i}, the largest colour of any vertex in the subsequence vpj,v(pj)+1,,vp(j+1)v_{p_{j}},v_{(p_{j})+1},\ldots,v_{p_{(j+1)}} is less than or equal to \max\big{\{}\phi(v_{p_{j}}),\phi(v_{p_{j+1}})\big{\}}.

Outer domination: The colour of p2ip_{2^{i}} is greater than or equal to the colour of every vertex that appears after p2ip_{2^{i}} in ρ\rho. Formally, for all kk in the range p2i<kmp_{2^{i}}<k\leq m, we have that ϕ(vk)ϕ(vp2i)\phi(v_{k})\leq\phi(v_{p_{2^{i}}}).

Witnesses

We define C_=C{_}C_{\_}=C\cup\{\_\} to be the set of colours augmented with the _\_ symbol. A witness is a sequence

of length k+1k+1—we will later see that k=log2(e)k=\lfloor\log_{2}(e)\rfloor is big enough, where ee is the number of vertices with an even colour—where each element biC_b_{i}\in C_{\_}, and that satisfies the following properties.

Witnessing. There exists a family of ii-witnesses, one for each element bib_{i} with bi_b_{i}\neq\_. We refer to such an ii-witness in the run ρ\rho. We will refer to this witness as

Dominating colour. For each bj_b_{j}\neq\_, we have that bj=ϕ(vpi,2i)b_{j}=\phi(v_{p_{i,2^{i}}}). In other words, bjb_{j} is the outer domination colour of the ii-witness.

Ordered sequences. The ii-witness associated with bib_{i} starts after jj-witness associated with bjb_{j} whenever i<ji<j. Formally, for all ii and jj with i<ji<j, if bi_b_{i}\neq\_ and bj_b_{j}\neq\_, then pj,2j<pi,1p_{j,2^{j}}<p_{i,1}.

It should be noted that the ii-witnesses associated with each position bib_{i} are not stored in the witness, but in order for a sequence to be a witness, the corresponding ii-witnesses must exist.

Observe that the dominating colour property combined with the ordered sequences property imply that the colours in a witness are monotonically increasing, since each colour bjb_{j} (weakly) dominates all colours that appear afterwards in ρ\rho.

Forwards and backwards witnesses.

So far, we have described forwards witnesses, which were introduced in . In this paper, we introduce the concept of a backwards witnesses, and an ordering over these witnesses, which will be used in our main result. For each play ρ=v1,v2,,vm\rho=v_{1},v_{2},\dots,v_{m}, we define the reverse play ρ=vm,vm1,,v1\overleftarrow{\rho}=v_{m},v_{m-1},\dots,v_{1}. A backwards witness is a witness for ρ\overleftarrow{\rho}, or for an initial sequence of it.

Order on witnesses.

We first introduce an order \succeq over the set C_C_{\_} that captures the following requirements: even numbers are better than odd numbers, and all numbers are better than _\_. Among the even numbers, higher numbers are better than smaller ones, while among the odd numbers, smaller numbers are better than higher numbers. Formally, bcb\succeq c if either c=_c=\_\,; or if cc is odd and bb is either odd and bcb\leq c holds, or bb is even; or cc is even and bb is even and bcb\geq c holds.

Then, we define an order \sqsupseteq over witnesses. This order compares two witnesses lexicographically, starting from bkb_{k} and working downwards, and for each individual position the entries are compared using \succeq. We also define a special witness won\mathsf{won} which is \sqsupseteq than any other witness.

The value of a witness.

An even chain of length mm is a sequence of positions p1<p2<p3<<pmp_{1}<p_{2}<p_{3}<\ldots<p_{m} (with 0p00\leq p_{0} and pmnp_{m}\leq n) in ρ\rho that has the following properties:

for all jmj\leq m, we have that ϕ(vpj)\phi(v_{p_{j}}) is even, and

for all j<mj<m the colours in the subsequence defined by pjp_{j} and pj+1p_{j+1} are less than or equal to ϕ(pj)\phi(p_{j}) or ϕ(pj+1)\phi(p_{j+1}). More formally, we have that all colours ϕ(vpj),ϕ(v(pj)+1),,ϕ(vp(j+1))\phi(v_{p_{j}}),\phi(v_{(p_{j})+1}),\ldots,\phi(v_{p_{(j+1)}}) are less than or equal to \max\big{\{}\phi(v_{p_{j}}),\phi(v_{p_{j+1}})\big{\}}.

For each witness b=bk,bk1,,b0\mathbf{b}=b_{k},b_{k-1},\ldots,b_{0}, we define the function even(b,i)=1\mathsf{even}(\mathbf{b},i)=1 if bi_b_{i}\neq\_ and bib_{i} is even. Then we define the value of the witness b\mathbf{b} to be value(b)=i=0k2ieven(b,i)\mathsf{value}(\mathbf{b})=\sum_{i=0}^{k}2^{i}\cdot\mathsf{even}(\mathbf{b},i). We can show that the value b\mathbf{b} corresponds to the length of an even chain in ρ\rho that is witnessed by b\mathbf{b}.

If b\mathbf{b} is a (forward or backward) witness of ρ\rho, then there is an even chain of length value(b)\mathsf{value}(\mathbf{b}) in ρ\rho.

Let ii be an index such that even(b,i)=1\mathsf{even}(\mathbf{b},i)=1. By definition, the ii-witness pi,1,pi,2,,pi,2ip_{i,1},p_{i,2},\dots,p_{i,2^{i}} is an even chain of length 2i2^{i} in ρ\rho. This holds irrespective of whether b\mathbf{b} is a forward or backward witness.

Then, given an index j>ij>i such that even(b,j)=1\mathsf{even}(\mathbf{b},j)=1, observe that the outer domination property ensures that ϕ(pi,2i)ϕ(vl)\phi(p_{i,2^{i}})\geq\phi(v_{l}) for all ll in the range pi,2ilpj,1p_{i,2^{i}}\leq l\leq p_{j,1}. So, when we concatenate the ii-witness with the jj-witness we still obtain an even chain. Thus, ρ\rho must contain an even chain of length value(b)\mathsf{value}(\mathbf{b}).

Let e={vV  :  ϕ(v) is even }e=|\{v\in V\;:\;\phi(v)\text{ is even }\}| be the number of vertices with even colours in the game. Observe that, if we have an even chain whose length is strictly greater than ee, then ρ\rho must contain a cycle, since there must be a vertex with even colour that has been visited twice. Moreover, the largest priority on this cycle must be even, so this is a winning cycle for player even. Thus, for player even to win the parity game, it is sufficient for him to force a play that has a witness whose value is strictly greater than ee.

If, from an initial state v0v_{0}, player even can force the game to run through a sequence ρ\rho, such that ρ\rho has a (forwards or backwards) witness b\mathbf{b} such that value(b)\mathsf{value}(\mathbf{b}) is greater than the number of vertices with even colour, then player even wins the parity game starting at v0v_{0}.

1 Updating forward witnesses

We now show how forward witnesses can be constructed incrementally by processing the play one vertex at a time. Throughout this subsection, we will suppose that we have a play ρ=v0,v1,,vm\rho=v_{0},v_{1},\dots,v_{m}, and a new vertex vm+1v_{m+1} that we would like to append to ρ\rho to create ρ\rho^{\prime}. We will use d=ϕ(vm+1)d=\phi(v_{m+1}) to denote the colour of this new vertex. We will suppose that b=bk,bk1,,b1,b0\mathbf{b}=b_{k},b_{k-1},\ldots,b_{1},b_{0} is a witness for ρ\rho, and we will construct a witness c=ck,ck1,,c1,c0\mathbf{c}=c_{k},c_{k-1},\ldots,c_{1},c_{0} for ρ\rho^{\prime}.

We present three lemmas that allow us to perform this task.

Suppose that there exists an index jj such that bib_{i} is even for all i<ji<j, and that bidb_{i}\geq d or bi=_b_{i}=\_ for all i>ji>j. If we set ci=bic_{i}=b_{i} for all i>ji>j, cj=dc_{j}=d, and ci=_c_{i}=\_ for all i<ji<j, then c\mathbf{c} is a witness for ρ\rho^{\prime}.

For the indices i>ji>j, observe that since bidb_{i}\geq d, the outer domination of the corresponding ii-witnesses continues to hold. For the indices i<ji<j, since we set ci=_c_{i}=\_ there are no conditions that need to be satisfied.

To complete the proof, we must argue that there is a jj-witness that corresponds to cjc_{j}. This witness is obtained by concatenating the ii-witnesses corresponding to the numbers bib_{i} for i<ji<j, and then adding the vertex vm+1v_{m+1} as the final position. This produces a sequence of length 1+i=0j12i=2j1+\sum_{i=0}^{j-1}2^{i}=2^{j} as required. Since all bib_{i} with i<ji<j were even, the evenness condition is satisfied. For inner domination, observe that the outer domination of each ii-witness ensures that the gaps between the concatenated sequences are inner dominated, and the fact that b0b_{0} dominates sequence vp0,1,,vmv_{p_{0,1}},\ldots,v_{m} ensures that the final subsequence is also dominated by b0b_{0} or dd. Outer domination is trivial, since vm+1v_{m+1} is the last vertex in ρ\rho^{\prime}. So, we have constructed a jj-witness for ρ\rho^{\prime}, and we have shown that c\mathbf{c} is a witness for ρ\rho^{\prime}.

Note that, differently from Calude et al. , we also allow this operation to be performed in the case where dd is odd.

Suppose that there exists an index jj such that bj_b_{j}\neq\_, d>bjd>b_{j}, and, for all i>ji>j, either bi=_b_{i}=\_ or bidb_{i}\geq d hold. Then setting ci=bic_{i}=b_{i} for all i>ji>j, setting cj=dc_{j}=d, and setting ci=_c_{i}=\_ for all i<ji<j yields a witness for ρ\rho^{\prime}.

For all i>ji>j, we set ci=bic_{i}=b_{i}. Observe that this is valid, since bidb_{i}\geq d, and so the outer domination property continues to hold for the ii-witness associated with bib_{i}. For all i<ji<j, we set ci=_c_{i}=\_, and this is trivially valid, since this imposes no requirements upon ρ\rho^{\prime}.

To complete the proof, we must argue that setting cj=dc_{j}=d is valid. Observe that in ρ\rho, the jj-witness associated with bjb_{j} ends at a certain position p=pj,2jp=p_{j,2^{j}}. We can create a new jj-witness for ρ\rho^{\prime} by instead setting pj,2j=m+1p_{j,2^{j}}=m+1, that is, we change the last position of the jj-witness to point to the newly added vertex. Note that inner domination continues to hold, since d>bj=ϕ(vp)d>b_{j}=\phi(v_{p}) and since vpv_{p} outer dominated ρ\rho. All other properties trivially hold, and so c\mathbf{c} is a witness for ρ\rho^{\prime}.

Suppose that for all jkj\leq k either bj=_b_{j}=\_ or bjdb_{j}\geq d. If we set ci=bic_{i}=b_{i} for all iki\leq k, then c\mathbf{c} is a witness for ρ\rho^{\prime}.

Since dbjd\leq b_{j} for all jj, the outer domination of every ii-witness implied by b\mathbf{b} is not changed. Moreover, no other property of a witness is changed by the inclusion of vm+1v_{m+1}, so by setting c=b\mathbf{c}=\mathbf{b} we obtain a witness for ρ\rho^{\prime}.

When we want to update a witness upon scanning another state vm+1v_{m+1}, we find the largest witness that (according to \sqsubseteq) can be obtained by applying Lemmas 3 through 5. The largest such witness is quite easy to find: first, there are at most 3k3k to check, but the rule is simply to update the leftmost position in a witness that can be updated.

For a given witness b\mathbf{b} and a vertex vm+1v_{m+1}, we denote with

ru(b,vm+1)\mathsf{ru}(\mathbf{b},v_{m+1}) the raw update of the witness to c\mathbf{c}, as obtained by the update rules described above.

up(b,vm+1)\mathsf{up}(\mathbf{b},v_{m+1}) is either ru(b,vm+1)\mathsf{ru}(\mathbf{b},v_{m+1}) if \mathsf{value}\big{(}\mathsf{ru}(\mathbf{b},v_{m+1})\big{)}\leq e (where ee is the number of vertices with even colour), or up(b,vm+1)=won\mathsf{up}(\mathbf{b},v_{m+1})=\mathsf{won} otherwise.

Basic Update Game

With these update rules, we define a forward and a backward basic update game. The game is played between player even and player odd. In this game, player even and player odd produce a play of the game as usual: if the pebble is on a position of player even, then player even selects a successor, and if the pebble is on a position of player odd, then player odd selects a successor.

Player even can stop any time she likes and evaluate the game using b0=_,,_\mathbf{b}_{0}=\_,\ldots,\_ as a starting point and the update rule bi+1=up(bi,vi)\mathbf{b}_{i+1}=\mathsf{up}(\mathbf{b}_{i},v_{i}). For a forward game, she would process the partial play ρ+=v0,v1,v2,,vn\rho^{+}=v_{0},v_{1},v_{2},\ldots,v_{n} from left to right, and for the backwards game she would process the partial play ρ=vn,vn1,,v0\rho^{-}=v_{n},v_{n-1},\ldots,v_{0}. In both cases, she has won if bn+1=won\mathbf{b}_{n+1}=\mathsf{won}.

If player even has a strategy to win the (forward or backward) basic update game, then she has a strategy to win the parity game.

By definition, we can only have bn+1=won\mathbf{b}_{n+1}=\mathsf{won} if at some point we created a witness whose value was more than the total number of even colours in the game. As we have argued, such a witness implies that a cycle has been created, and that the largest priority on the cycle is even. Since player even can achieve this no matter what player odd does, this implies that player even has a winning strategy for the parity game.

The Data-structure for the Progress Measure

Recall that there are two obstacles in implementing the algorithm of Calude et al. as a value iteration algorithm. The first (and minor) obstacle is that it uses forward witnesses, while value iteration naturally uses backward witnesses. We have already addressed this point by introducing the same measure for a backward analysis.

The second obstacle is the lack of an order over witnesses that is compatible with value iteration. While we have introduced an order in the previous sections, this order is not a natural order. In particular, it is not preserved under update, nor does it agree with the order over values. As a simple example consider the following two sequences:

While value(b)=3>value(c)=2\mathsf{value}(\mathbf{b})=3>\mathsf{value}(\mathbf{c})=2, cb\mathbf{c}\sqsupset\mathbf{b}. In particular, c2b2c_{2}\succ b_{2} and c1b1c_{1}\succ b_{1} hold. Yet, when using the update rules when traversing a state with colour 66, b\mathbf{b} is updated to b=6,_,_,\mathbf{b}^{\prime}=6,\_,\_,, while c\mathbf{c} is updated to c=9,8,6\mathbf{c}^{\prime}=9,8,6. While cb\mathbf{c}\sqsupset\mathbf{b} held prior to the update, bc\mathbf{b}^{\prime}\sqsupset\mathbf{c}^{\prime} holds after the update. Value iteration, however, needs a natural order that will allow us to choose the successor with the higher value.

We overcome this problem by allowing the antagonist in our game, player odd, an extra move: prior to executing the update rule for a value b\mathbf{b}, player odd may increase the witness b\mathbf{b} in the \sqsubseteq ordering. The corresponding antagonistic update is defined as follows.

Obtaining au(b,v)\mathsf{au}(\mathbf{b},v) is quite simple: au(b,v)\mathsf{au}(\mathbf{b},v) is either up(b,v)\mathsf{up}(\mathbf{b},v) or it is up(d,v)\mathsf{up}(\mathbf{d},v) where d\mathbf{d} is

Observe that if bb\mathbf{b}\sqsubseteq\mathbf{b}^{\prime} then au(b,v)au(b,v)\mathsf{au}(\mathbf{b},v)\sqsubseteq\mathsf{au}(\mathbf{b}^{\prime},v), because the minimum used in au(b,v)\mathsf{au}(\mathbf{b}^{\prime},v) ranges over a smaller set.

Antagonistic Update Game

The antagonistic update game is played like the basic update game, but uses the antagonistic update rule. I.e. player even and odd play out a play of the game as usual: if the pebble is on a position of player even, then player even selects a successor, and if the pebble is on a position of player odd, then player odd selects a successor.

Player even can stop any time she likes and evaluate the game using b0=_,,_\mathbf{b}_{0}=\_,\ldots,\_ as a starting point and the update rule bi+1=au(bi,vi)\mathbf{b}_{i+1}=\mathsf{au}(\mathbf{b}_{i},v_{i}). For a forward game, she would process the partial play ρ+=v0,v1,v2,,vn\rho^{+}=v_{0},v_{1},v_{2},\ldots,v_{n} from left to right, and for the backwards game she would process the partial play ρ=vn,vn1,,v0\rho^{-}=v_{n},v_{n-1},\ldots,v_{0}. In both cases, she has won if bn+1=won\mathbf{b}_{n+1}=\mathsf{won}.

If player even has a strategy to win the (forward or backward) antagonistic update game, then she has a strategy to win the parity game.

We first look at the evaluation of a play ρ+=v0,v1,v2,,vn\rho^{+}=v_{0},v_{1},v_{2},\ldots,v_{n} or ρ=vn,vn1,,v0\rho^{-}=v_{n},v_{n-1},\ldots,v_{0} in a forward or backwards game, respectively. In an antagonistic game, this will lead to a sequence a0,a1,,an+1\mathbf{a}_{0},\mathbf{a}_{1},\ldots,\mathbf{a}_{n+1}, while it leads to a sequence b0,b1,,bn+1\mathbf{b}_{0},\mathbf{b}_{1},\ldots,\mathbf{b}_{n+1} when using the basic update rule. We show by induction that biai\mathbf{b}_{i}\sqsupseteq\mathbf{a}_{i} holds.

For an induction basis, b0=a0=_,,_\mathbf{b}_{0}=\mathbf{a}_{0}=\_,\ldots,\_.

For the induction step, if biai\mathbf{b}_{i}\sqsupseteq\mathbf{a}_{i}, then

Thus, when player even wins the (forward or backward) antagonistic update game, then she wins the (forward or backward) basic update game using the same strategy.

It remains to show that, if player even has a strategy to win the parity games, then she has a strategy to win the antagonistic update game. For this, we will use the fact that she can, in this case, make sure that the highest number that occurs infinitely often on a run is even. We exploit this in two steps. We first introduce a x\downarrow_{x} operator, for every even number xx, that removes all but possibly one entry with numbers smaller than xx, and adjust the one that possibly remains to x1x-1. We then argue that, when there are no higher numbers than xx, this value of the witnesses obtained after this operator are non-decreasing w.r.t. \sqsupseteq, and increase strictly with every occurrence of xx.

Formally we define, for a witness b=bk,bk1,,b0\mathbf{b}=b_{k},b_{k-1},\ldots,b_{0} and an even number xx, the following.

bx\mathbf{b}\downarrow_{x} to be b\mathbf{b} if, for all iki\leq k, bi=_b_{i}=\_ or bixb_{i}\geq x holds.

Otherwise, let i=max{skbs_i=\max\{s\leq k\mid b_{s}\neq\_ and bs<x}b_{s}<x\}. We define bx=bk,bk1,,b0\mathbf{b}\downarrow_{x}=b_{k}^{\prime},b_{k-1}^{\prime},\ldots,b_{0}^{\prime} with bj=bjb_{j}^{\prime}=b_{j} for all j>ij>i, bi=x1b_{i}^{\prime}=x-1, and bj=_b_{j}^{\prime}=\_ for all j<ij<i.

The x\downarrow_{x} operator provides the following guarantees:

ba    bxax\mathbf{b}\sqsupset\mathbf{a}\;\Rightarrow\;\mathbf{b}\downarrow_{x}\sqsupseteq\mathbf{a}\downarrow_{x}

ϕ(v)<x    up(b,v)xbx\phi(v)<x\;\Rightarrow\;\mathsf{up}(\mathbf{b},v)\downarrow_{x}\sqsupseteq\mathbf{b}\downarrow_{x}

ϕ(v)<x    au(b,v)xbx\phi(v)<x\;\Rightarrow\;\mathsf{au}(\mathbf{b},v)\downarrow_{x}\sqsupseteq\mathbf{b}\downarrow_{x}

ϕ(v)=x    up(b,v)xbx\phi(v)=x\;\Rightarrow\;\mathsf{up}(\mathbf{b},v)\downarrow_{x}\sqsupset\mathbf{b}\downarrow_{x}

ϕ(v)=x    au(b,v)xbx\phi(v)=x\;\Rightarrow\;\mathsf{au}(\mathbf{b},v)\downarrow_{x}\sqsupset\mathbf{b}\downarrow_{x}

For (1), let iki\leq k be the highest position with biaib_{i}\neq a_{i}, and thus with biaib_{i}\succ a_{i} (as ba\mathbf{b}\sqsupset\mathbf{a}). If bixb_{i}\succeq x or x+1aix+1\succeq a_{i}, the claim follows immediately (and we have bxax\mathbf{b}\downarrow_{x}\sqsupset\mathbf{a}\downarrow_{x}). For the case xbiaix+1x\succ b_{i}\succ a_{i}\succ x+1, this position would be replaced by x1x-1 and all smaller positions by _\_ by the x\downarrow_{x} operator (and we have bx=ax\mathbf{b}\downarrow_{x}=\mathbf{a}\downarrow_{x}).

For (2), the highest position iki\leq k for which a=up(b,v)\mathbf{a}=\mathsf{up}(\mathbf{b},v) and b\mathbf{b} differ (if any) satisfies ai<xa_{i}<x and bixb_{i}\prec x (the latter holds because otherwise vv does not overwrite position ii by this update rule). If bix+1b_{i}\prec x+1, then we get up(b,v)xbx\mathsf{up}(\mathbf{b},v)\downarrow_{x}\sqsupset\mathbf{b}\downarrow_{x}; otherwise we get up(b,v)x=bx\mathsf{up}(\mathbf{b},v)\downarrow_{x}=\mathbf{b}\downarrow_{x}.

For (4), a=up(b,v)\mathbf{a}=\mathsf{up}(\mathbf{b},v) and b\mathbf{b} differ in some highest position iki\leq k, and for that position, x=aibix=a_{i}\succ b_{i} holds. Thus, up(b,v)xbx\mathsf{up}(\mathbf{b},v)\downarrow_{x}\sqsupset\mathbf{b}\downarrow_{x}.

This almost immediately implies the correctness.

If player even can win the parity game from a position vv, then she can win the (forward and backward) antagonistic update game from vv.

Player even can play such that the highest colour that occurs in a run infinitely many times is even. She can thus in particular play to make sure that, at some point in the run, an even colour xx has occurred more often that the size of the image of x\downarrow_{x} after the last occurrence of a priority higher than xx. By Lemma 6, evaluating the forward or backward antagonistic update game at this point will lead to a win of player even.

These results directly provide the correctness of all four games described.

Player even can win the forward and backward antagonistic and basic update game from a position vv if, and only if, she can win the parity game from vv.

Value Iteration

Let bv=max{au(ι(s),v)(v,s)E}\mathbf{b}_{v}=\max_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\} for vVev\in V_{e} and bv=min{au(ι(s),v)(v,s)E}\mathbf{b}_{v}=\min_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\} for vVov\in V_{o}. We say that ι\iota can be lifted at vv if ι(v)bv\iota(v)\sqsubset\mathbf{b}_{v}. When ι\iota is liftable at vv, we define by lift(ι,v)\mathsf{lift}(\iota,v) the function ι\iota^{\prime} with ι(v)=bv\iota^{\prime}(v)=\mathbf{b}_{v} and ι(v)=ι(v)\iota^{\prime}(v^{\prime})=\iota(v^{\prime}) for all vvv^{\prime}\neq v. We extend the lift operation to every non-empty set VVV^{\prime}\subseteq V of liftable positions, where ι=lift(ι,V)\iota^{\prime}=\mathsf{lift}(\iota,V^{\prime}) updates all values vVv\in V^{\prime} concurrently.

A progress measure is called consistent if it cannot be lifted at any vertex vVv\in V. The minimal consistent progress measure ιmin\iota_{\min} is the smallest (w.r.t. the partial order in the natural lattice defined by pointwise comparison) progress measure that satisfies

for all vVev\in V_{e} that ι(v)max{au(ι(s),v)(v,s)E}\iota(v)\sqsupseteq\max_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}, and

for all vVov\in V_{o} that ι(v)min{au(ι(s),v)(v,s)E}\iota(v)\sqsupseteq\min_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}.

As au(b,v)\mathsf{au}(\mathbf{b},v) is monotone in b\mathbf{b} by definition and the state space is finite, we get the following.

The minimal consistent progress measure ιmin\iota_{\min} is well defined.

First, a consistent progress measure always exists: the function that maps all states to won\mathsf{won} is a consistent progress measure.

Second if we have two consistent progress measures ι\iota and ι\iota^{\prime}, then the pointwise minimum ι:vmin{ι(v),ι(v)}\iota^{\prime\prime}:v\mapsto\min_{\sqsubseteq}\{\iota(v),\iota^{\prime}(v)\} is a consistent progress measure. To see this, we assume w.l.o.g. that ι(v)ι(v)\iota(v)\sqsubseteq\iota^{\prime}(v).

For vVev\in V_{e} we get ι(v)=ι(v)max{au(ι(s),v)(v,s)E}max{au(ι(s),v)(v,s)E}\iota^{\prime\prime}(v)=\iota(v)\sqsupseteq\max_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}\sqsupseteq\max_{\sqsubseteq}\{\mathsf{au}(\iota^{\prime\prime}(s),v)\mid(v,s)\in E\}, using that ι(s)ι(s)\iota^{\prime\prime}(s)\sqsubseteq\iota(s) holds for all sVs\in V.

Likewise, we get for vVov\in V_{o} that ι(v)=ι(v)min{au(ι(s),v)(v,s)E}min{au(ι(s),v)(v,s)E}\iota^{\prime\prime}(v)=\iota(v)\sqsupseteq\min_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}\sqsupseteq\min_{\sqsubseteq}\{\mathsf{au}(\iota^{\prime\prime}(s),v)\mid(v,s)\in E\}, using again that ι(s)ι(s)\iota^{\prime\prime}(s)\sqsubseteq\iota(s) holds for all sVs\in V.

As the state space is finite, we get the minimal consistent progress measure as a pointwise minimum of all consistent progress measures.

Moreover, we can compute the minimal consistent progress measure by starting with the initial progress measure ι0\iota_{0}, which maps all vertices to the minimal witness _,,_\_,\ldots,\_, and iteratively lifting.

The minimal consistent progress measure ιmin\iota_{\min} can be obtained by any sequence of lift operations on liftable positions, starting from ι0\iota_{0}.

We show that, for any sequence ι0,ι1,,ιn\iota_{0},\iota_{1},\ldots,\iota_{n} of progress measures constructed by a sequence of lift operations, for all vVv\in V, and for all ini\leq n, ιi(v)ιmin(v)\iota_{i}(v)\sqsubseteq\iota_{\min}(v) holds.

For the induction basis, ι0(v)\iota_{0}(v) is the minimal element for all vVv\in V, such that ι0(v)ιmin(v)\iota_{0}(v)\sqsubseteq\iota_{\min}(v) holds trivially. For the induction step, let ViVV_{i}\subseteq V be a set of liftable position for ιi\iota_{i} and ιi+1=lift(ιi,Vi)\iota_{i+1}=\mathsf{lift}(\iota_{i},V_{i}). We now make the following case distinction.

For vViVev\in V_{i}\cap V_{e}, we have ιi+1(v)=max{au(ι(s),v)(v,s)E}IHmax{au(ιmin(s),v)(v,s)E}ιmin(v)\iota_{i+1}(v)=\max_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}\sqsubseteq_{IH}\max_{\sqsubseteq}\{\mathsf{au}(\iota_{\min}(s),v)\mid(v,s)\in E\}\sqsubseteq\iota_{\min}(v).

For vViVov\in V_{i}\cap V_{o}, we have ιi+1(v)=min{au(ι(s),v)(v,s)E}IHmin{au(ιmin(s),v)(v,s)E}ιmin(v)\iota_{i+1}(v)=\min_{\sqsubseteq}\{\mathsf{au}(\iota(s),v)\mid(v,s)\in E\}\sqsubseteq_{IH}\min_{\sqsubseteq}\{\mathsf{au}(\iota_{\min}(s),v)\mid(v,s)\in E\}\sqsubseteq\iota_{\min}(v).

For vViv\notin V_{i}, we have ιi+1(v)=ιi(v)IHιmin(v)\iota_{i+1}(v)=\iota_{i}(v)\sqsubseteq_{IH}\iota_{\min}(v).

While we have proven that the value of the progress measures cannot surpass the value of ιmin\iota_{\min} at any vertex, each liftable progress measure ιi\iota_{i} is succeeded by a progress measure ιi+1\iota_{i+1}, which is nowhere smaller, and strictly increasing for some vertices. Thus, this sequence terminates eventually by reaching a non-liftable progress measure. But non-liftable progress measures are consistent.

Thus, we eventually reach a consistent progress measure ιn\iota_{n} which is pointwise no larger than ιmin\iota_{\min}; i.e. we eventually reach ιmin\iota_{\min}.

It is simple to get from establishing that ιmin(v)=won\iota_{\min}(v)=\mathsf{won} holds to a winning strategy of player even in the antagonistic update game.

If ιmin(v)=won\iota_{\min}(v)=\mathsf{won}, then player even has a strategy to win the antagonistic update game when starting from vv.

We can construct the strategy in the following way: starting in state vn=vv_{n}=v, where nn is the length of the play we will create, player even selects for a state viVev_{i}\in V_{e} with i>0i>0 a successor vi1v_{i-1} such that ιi(vi)au(ιi1(vi1),vi)\iota_{i}(v_{i})\sqsubseteq\mathsf{au}(\iota_{i-1}(v_{i-1}),v_{i}). Note that such a successor must always exist. Note also that, if viVov_{i}\in V_{o} with i>0i>0, then ιi(vi)au(ιi1(vi1),vi)\iota_{i}(v_{i})\sqsubseteq\mathsf{au}(\iota_{i-1}(v_{i-1}),v_{i}) holds for all successors vi1v_{i-1} of viv_{i} by definition.

For the induction basis, we have b0=ι0(v0)\mathbf{b}_{0}=\iota_{0}(v_{0}) by definition. For the induction step, we have ιi+1(vi+1)au(ιi(vi),vi+1)IHau(bi,vi+1)=bi+1\iota_{i+1}(v_{i+1})\sqsubseteq\mathsf{au}(\iota_{i}(v_{i}),v_{i+1})\sqsubseteq^{IH}\mathsf{au}(\mathbf{b}_{i},v_{i+1})=\mathbf{b}_{i+1}.

Thus, we get bnιn(vn)=won\mathbf{b}_{n}\sqsupseteq\iota_{n}(v_{n})=\mathsf{won}, and player even wins the antagonistic update game.

At the same time, player even cannot win from any vertex vv with ιmin(v)won\iota_{\min}(v)\neq\mathsf{won}, and ιmin\iota_{\min} provides a witness strategy for player odd for this.

Player even cannot win from any vertex vv with ιmin(v)won\iota_{\min}(v)\neq\mathsf{won}, and ιmin\iota_{\min} provides a witness strategy for player odd.

We recall that the construction of ιmin\iota_{\min} by Lemma 8 provides

ιmin(v)max{au(ιmin(s),v)(v,s)E}\iota_{\min}(v)\sqsubseteq\max_{\sqsubseteq}\{\mathsf{au}(\iota_{\min}(s),v)\mid(v,s)\in E\} for vVev\in V_{e}, and

ιmin(v)min{au(ιmin(s),v)(v,s)E}\iota_{\min}(v)\sqsubseteq\min_{\sqsubseteq}\{\mathsf{au}(\iota_{\min}(s),v)\mid(v,s)\in E\} for vVov\in V_{o}.

The latter provides the existence of some particular successor ss of vv with ιmin(v)au(ιmin(s),v)\iota_{\min}(v)\sqsubseteq\mathsf{au}(\iota_{\min}(s),v). The witness strategy of player odd is to always choose such a vertex.

Let ρ=vn,vn1,vn2,,v1\rho=v_{n},v_{n-1},v_{n-2},\ldots,v_{1} be a sequence obtained by any strategy of player even from a starting vertex vnv_{n} with ιmin(vn)won\iota_{\min}(v_{n})\neq\mathsf{won}, such that player even chooses to evaluate the backward antagonistic update game after ρ\rho, and ρ,v0\rho,v_{0} an extension in line with the strategy of player odd.

We first observe that ιmin(vi+1)au(ιmin(vi),vi+1)\iota_{\min}(v_{i+1})\sqsubseteq\mathsf{au}(\iota_{\min}(v_{i}),v_{i+1}) holds for all i<ni<n, either by the choice of the successor of vi+1v_{i+1} of player odd if vi+1Vov_{i+1}\in V_{o}, or by ιmin(vi+1)max{au(ιmin(s),vi+1)(vi+1,s)E}au(ιmin(vi),vi+1)\iota_{\min}(v_{i+1})\sqsubseteq\max_{\sqsubseteq}\{\mathsf{au}(\iota_{\min}(s),v_{i+1})\mid(v_{i+1},s)\in E\}\sqsubseteq\mathsf{au}(\iota_{\min}(v_{i}),v_{i+1}) if vi+1Vev_{i+1}\in V_{e}. With ιmin(vn)won\iota_{\min}(v_{n})\neq\mathsf{won}, this provides ιmin(vi)won\iota_{\min}(v_{i})\neq\mathsf{won} for all ini\leq n.

Complexity

A simple implementation can track, for each vertex, the information which position in the witness is the next one that would need to be updated to trigger a lift along an edge, and, using a binary representation in line with \succcurlyeq, which bit in the representation of this position has to change to consider triggering an update. (Intuitively the most significant bit that separates the current value from the next value that would trigger an update.)

For each incoming edge, the position and bit that need to be increased to trigger the next lift operation for this vertex are also stored.

We look at a vertex vv with one outgoing edge to its successor vertex ss. We have 77 different colours, 22 through 88. Vertex vv has colour 22.

We use a representation that follows the \succcurlyeq order and thus maps to , 77 to 11, 55 to 22, 33 to 33, 22 to 44, 44 to 55, 66 to 66, 88 to 77.

Assume that ss has currently a witness b=b2,b1,b0=6,0,2\mathbf{b}=b_{2},b_{1},b_{0}=6,0,2 attached to it, represented as b~=b~2,b~1,b~0=6,0,4\widetilde{\mathbf{b}}=\widetilde{b}_{2},\widetilde{b}_{1},\widetilde{b}_{0}=6,0,4.

To obtain a witness for vv, we calculate c=au(b,v)=6,5,2\mathbf{c}=\mathsf{au}(\mathbf{b},v)=6,5,2, which is represented as c~=c~2,c~1,c~0=6,2,4\widetilde{\mathbf{c}}=\widetilde{c}_{2},\widetilde{c}_{1},\widetilde{c}_{0}=6,2,4. The next higher value ab\mathbf{a}\sqsupset\mathbf{b} such that au(a,v)au(b,v)\mathsf{au}(\mathbf{a},v)\sqsupset\mathsf{au}(\mathbf{b},v) is a~=a~2,a~1,a~0=6,2,4\widetilde{\mathbf{a}}=\widetilde{a}_{2},\widetilde{a}_{1},\widetilde{a}_{0}=6,2,4.

The lowest position ii with a~i>b~i\widetilde{a}_{i}>\widetilde{b}_{i} is for position i=1i=1, and the difference occurs in the middle bit (a~1=2=0102\widetilde{a}_{1}=2=010_{2} and b~1=0=0002\widetilde{b}_{1}=0=000_{2}).

For the edge from vv to ss, we can store after the update that we only need to consider an update from ss if it increases at least the position b1b_{1} of the witness for ss. If b1b_{1} is changed, we only have to consider the change if the update is at least to the value represented as 2 (b~12\widetilde{b}_{1}^{\prime}\geq 2), and thus b15b_{1}^{\prime}\succcurlyeq 5. For all smaller updates of the witness of ss, no update of the witness of vv needs to be considered.

The first observation is that, if the highest colour is the odd colour omaxo_{\max}, then we do not need to represent this colour: if ϕ(v)=omax\phi(v)=o_{\max} and bwon\mathbf{b}\neq\mathsf{won}, then up(b,v)\mathsf{up}(\mathbf{b},v) contains only _\_ and omaxo_{\max} entries. Moreover, _\_ and omaxo_{\max} entries behave in exactly the same way. This is not surprising: omaxo_{\max} is the most powerful colour, and a state with colour omaxo_{\max} cannot occur on a winning cycle.

The second observation is that, if the lowest colour is the odd colour omino_{\min}, then we can ignore it during all update steps without violating the correctness arguments. (In fact, this colour cannot occur at all when using the update rules suggested in Calude et al. .)

We call the number of different colours, not counting the maximal and minimal colour if they are odd, the number rr of relevant colours.

The 11 refers to the dedicated value won\mathsf{won}. For the other witnesses, the values can be obtained by considering the number ii of integer entries. For ii integer entries, there are \Big{(}\begin{array}[]{c}l\\ i\end{array}\Big{)} different positions in the witnesses that could hold these ii integer values. Fixing these positions, there are \Big{(}\begin{array}[]{c}i+r-1\\ r-1\end{array}\Big{)} ways to assign non-increasing values from the range of relevant colours. (E.g. these can be represented by a sequence of ii white balls and r1r-1 black balls. The number of white balls prior to the first black ball is the number of positions assigned the highest relevant colour, the number of white balls between the first and second black ball is the number of positions assigned the next lower colour, etc.)

In particular, we get the following complexity for a constant number of colours.

A parity game with rr relevant colours, nn vertices, mm edges, and ee vertices with even colour can be solved in time O\big{(}e\cdot m\cdot(\log(e)+r)^{r-1}/(r-1)!\big{)} and space O\big{(}n\cdot\log(e)\cdot\log(r)+m\cdot\log(\log(e)\cdot\log(r))\big{)}.

We use that the length l=log2(e+1)l=\lceil\log_{2}(e+1)\rceil of the witnesses is logarithmic in ee.

This also provides us with a strong fixed parameter tractability result: when we fix the number of colours to some constant cc, we maintain a quasi bi-linear complexity in the number of edges and the number of vertices. If we fix, e.g., a monotonously growing quasi constant function qc\mathsf{qc} (like the inverse Ackermann function), then Theorem 8.2 shows that, as soon qc(n)c\mathsf{qc}(n)\geq c, and thus almost everywhere and in particular in the limit, have (l+r)r1/(r1)!(log2n)qc(n)(l+r)^{r-1}/(r-1)!\leq(\log_{2}n)^{\mathsf{qc}(n)}, or (l+r)r1/(r1)!qc(n)log2(log2(n))(l+r)^{r-1}/(r-1)!\leq\mathsf{qc}(n)^{\log_{2}(\log_{2}(n))} if log2(qc(n)c)\log_{2}(\mathsf{qc}(n)\geq c).

Parity games are fixed parameter tractable, using the number of colours as their parameter, with complexity O\big{(}m\cdot n\cdot\mathsf{qc}(n)^{\log\log n}\big{)} for an arbitrary quasi constant qc\mathsf{qc}, where mm is the number of edges and nn is the number of states.

For a parity game with rr relevant colours, mm edges, and ee vertices with even colour, and thus length l=log2(e+1)l=\lceil\log_{2}(e+1)\rceil of the witnesses, and h=\big{\lceil}1+\frac{r-1}{l}\big{\rceil}, one can solve the parity game in time O(mhe1+c1.45+log2(h))O(m\cdot h\cdot e^{1+c_{1.45}+\log_{2}(h)}), and in time O(mhec1.45+log2(h))O(m\cdot h\cdot e^{c_{1.45}+\log_{2}(h)}) if r>l2r>l^{2}.

We note that l+r1hll+r-1\leq h\cdot l, such that we can estimate this value by drawing ll out of hlh\cdot l.

The number of all ways to choose l=log(e+1)l=\lceil\log(e+1)\rceil out of hlh\cdot l numbers can, by the Wikipedia page on binomial coefficients and the inequality using the entropy in there (also can be found in ), be bounded by

This allows for identifying a class of parity games that can be solved in polynomial time.

Parity games where the number cc of colours is logarithmically bounded by the number ee of vertices with even colour (cO(loge)c\in O(\log e)) can be solved in polynomial time.

Lower Bounds

In this section, we introduce a family of examples, on which the the basic update game from is slow. (Recall that these original rules restrict the use of Lemma 3 to even colours. Adjusting the example is not hard, but effectively disallows to make effective use of b0b_{0}.)

The example is a single player game, which is drawn best as a ring. In this example, the losing player, player odd, can draw out his loss. The vertices of the game have name and colour 1,,2n1,\ldots,2n. They are all owned by player odd. There is always an edge to the next vertex (in the modulo ring). Additionally, there is an edge back to 11 from all vertices with even name (and colour).

Obviously, all runs are winning for player even. We show how player odd can, when starting in vertex 11, produce a play, such that forward updates produce all witnesses that use only _\_ and even numbers.

We first observe that every value 2i12i-1 is overwritten after the next move in a play by 2i2i in a witness b\mathbf{b}.

The strategy of player odd to create a long path is simple. We consider three cases.

If, in the current witness b=bk,,b0\mathbf{b}=b_{k},\ldots,b_{0}, we have b0=_b_{0}=\_ and the token is at a position 2i2i, then moving to 11, and thus next to 22, results in the next larger witness without odd entries than b\mathbf{b}.

If b0_b_{0}\neq\_, then we have that b0=2ib_{0}=2i, and b\mathbf{b} has no smaller entries than 2i2i. If all of these entries are consecutively on the right of b\mathbf{b}, then we obtain the next larger witness without odd entries than b\mathbf{b} by going through 2i+12i+1 to 2i+22i+2. Player odd therefore chooses to continue by moving the token to vertex 2i+12i+1 in this case.

Otherwise, there is a rightmost bj=_b_{j}=\_, such that right of it are only entries 2i2i (for all h<jh<j, bh=2ib_{h}=2i), and there is also a 2i2i value to the left (for some h>jh>j, bh=2ib_{h}=2i). Then the next larger witness without odd entries than b\mathbf{b} is obtained by replacing bjb_{j} by 22 and all entries to its right by _\_. This can be obtained by going to vertex 1 and, subsequently, to vertex 2. Player odd therefore chooses to continue by moving the token to vertex 11 in this case.

Implementation

We implemented our algorithm in C++ and tested its performance on Mac OS X with 1.7 GHz Intel Core i5 CPU and 4 GB of RAM. We then compared it with the small progress measure algorithm , Zielonka’s recursive algorithm , the classic strategy improvement algorithm as implemented in the PGSolver version 4.0 , and the implementation of an alternative recently developed succinct progress measure algorithm from . We tested their performance, with timeout set to two minutes, on around 250 different parity games of various sizes generated using PGSolver. These examples include the following classes.

Friedmann’s trap examples , which show exponential lower bound for the classic strategy improvement algorithm;

random parity games of sizes, ss, ranging from 100 to 10000 that were generated using PGSolver’s command steadygame ss 1 6 1 6 (for each ss we generated ten instances);

recursive ladder construction generated using PGSolver’s command recursiveladder.

PGSolver implements several optimisation steps before the algorithm of choice is invoked. These include SCC decomposition, detection of special cases, priority compression, and priority propagation as described in . To illustrate this, the small progress measures algorithm in PGSolver was able to solve all Friedmann’s trap examples in 0.01 seconds when using these optimisations. However, without these optimisations, it failed to terminate within the set timeout of two minutes. As our aim was to compare different algorithms and not the heuristics or preprocessing steps involved, we invoked PGSolver with options “-dgo -dsd -dlo -dsg” to switch off some of these optimisation steps. We believe this gives a better and fairer picture of the relative performance of these algorithms. Some of these optimisations are embedded in the algorithms themselves and cannot be switched off. For example, the small progress measure algorithm implemented in PGSolver starts off with the computation of maximal values that may ever need to be considered . In future, we plan to include these optimisation preprocessing techniques into our tool as well.

The more interesting results of our tests are presented in Table 1. As expected, our algorithm is outperformed by strategy improvement and recursive algorithm on randomly generated examples. Our algorithm is very fast on Friedmann’s trap examples, because player odd wins from all nodes and a fixed point is reached very quickly using a small number of entries in the witnesses. Finally, we tested the algorithms on the recursive ladder construction, which is a class of examples for which the recursive algorithm runs in exponential time. As expected, the small progress measure and the recursive algorithm fail to terminate for examples as small as 250 nodes. Our algorithm as well as the classic strategy improvement solved these instances very quickly. Interestingly, the worst performing algorithm is , which currently has the best theoretical upper bound on its running time. The most likely reason for this is that their single step of the value iteration is a lot more complicated than ours. As a result, even if less such steps are required to reach a fixed point, the algorithm performs badly as each step is a lot slower. In conclusion, our algorithm complements quite well the existing well-established algorithms for parity games and can be faster than any of them depending on the class of examples being considered.

The implementation of our algorithm along with all the examples that we used in this comparison are available at https://cgi.csc.liv.ac.uk/~dominik/parity/.

Acknowledgements

We thank Ding Xiang Fei for pointing out an error in a previous version of this manuscript. Sanjay Jain was supported in part by NUS grant C252-000-087-001. Further, Sanjay Jain and Frank Stephan were supported in part by the Singapore Ministry of Education Academic Research Fund Tier 2 grant MOE2016-T2-1-019 / R146-000-234-112. Sven Schewe and Dominik Wojtczak were supported in part by EPSRC grant EP/M027287/1. Further, John Fearnley, Sven Schewe and Dominik Wojtczak were supported in part by EPSRC grant EP/P020909/1.

References