# The Parameterized Complexity of Positional Games

###### Abstract

We study the parameterized complexity of several positional games. Our main result is that Short Generalized Hex is W[1]-complete parameterized by the number of moves. This solves an open problem from Downey and Fellows’ influential list of open problems from 1999. Previously, the problem was thought of as a natural candidate for AW[*]-completeness.

Our main tool is a new fragment of first-order logic where universally quantified variables only occur in inequalities. We show that model-checking on arbitrary relational structures for a formula in this fragment is W[1]-complete when parameterized by formula size.

We also consider a general framework where a positional game is represented as a hypergraph and two players alternately pick vertices. In a Maker-Maker game, the first player to have picked all the vertices of some hyperedge wins the game. In a Maker-Breaker game, the first player wins if she picks all the vertices of some hyperedge, and the second player wins otherwise. In an Enforcer-Avoider game, the first player wins if the second player picks all the vertices of some hyperedge, and the second player wins otherwise.

Short Maker-Maker is AW[*]-complete, whereas Short Maker-Breaker is W[1]-complete and Short Enforcer-Avoider co-W[1]-complete parameterized by the number of moves. This suggests a rough parameterized complexity categorization into positional games that are complete for the first level of the W-hierarchy when the winning configurations only depend on which vertices one player has been able to pick, but AW[*]-completeness when the winning condition depends on which vertices both players have picked. However, some positional games where the board and the winning configurations are highly structured are fixed-parameter tractable. We give another example of such a game, Short -Connect, which is fixed-parameter tractable when parameterized by the number of moves.

labelinglabel \CopyrightÉdouard Bonnet, Serge Gaspers, Antonin Lambilliotte, Stefan Rümmele, and Abdallah Saffidine \subjclassF.2.2 Nonnumerical Algorithms and Problems

## 1 Introduction

In a positional game [(12)], two players alternately claim unoccupied elements of the board of the game. The goal of a player is to claim a set of elements that form a winning set, and/or to prevent the other player from doing so.

Tic-Tac-Toe, its competitive variant played on a board, Gomoku, as well as Hex are the most well-known positional games. When the size of the board is not fixed, the decision problem, whether the first player has a winning strategy from a given position in the game is PSPACE-complete for many such games. The first result was established for Generalized Hex, a variant played on an arbitrary graph [(7)]. Reisch1980 soon followed up with results for gomoku Reisch1980 () and Hex played on a board Reisch81 (). More recently, PSPACE-completeness was obtained for Havannah BonnetJS2016TCS () and several variants of Connect(, , , , ) HsiehT2007 (), a framework that encompasses Tic-Tac-Toe and Gomoku.

In a Maker-Maker game, also known as strong positional game, the winner is the first player to claim all the elements of some winning set. In a Maker-Breaker game, also known as weak positional game, the first player, Maker, wins by claiming all the elements of a winning set, and the second player, Breaker, wins by preventing Maker from doing so. In an Enforcer-Avoider game, the first player, Enforcer, wins if the second player claims all the vertices of a winning set, and the second player, Avoider, wins otherwise.

In this paper, we consider the corresponding short games, of deciding whether the first player has a winning strategy in moves from a given position in the game, and parameterize them by . The parameterized complexity of short games is known for games such as generalized chess ScottS08 (), generalized geography AbrahamsonDF93 (); AbrahamsonDF95 (), and pursuit-evasion games ScottS10 (). For Hex, played on a hexagonal grid, the short game is FPT and for Generalized Hex, played on an arbitrary graph, the short game is W[1]-hard and in AW[*].

When winning sets are given as arbitrary hyperedges in a hypergraph, we refer to the three game variants as Maker-Maker, Maker-Breaker, and Enforcer-Avoider, respectively. Maker-Breaker was first shown PSPACE-complete by Schaefer1978 () under the name . A simpler proof was later given by Byskov2004 () who also showed PSPACE-completeness of Maker-Maker. To the best of our knowledge, the classical complexity of Enforcer-Avoider has not been established yet.

In this paper we will show that the short game for Generalized Hex is W[1]-complete, solving an open problem stated numerous times BonnetJS2016TCS (); DowneyF2013 (); DowneyF99 (); FominM12 (); Scott2009 (), we establish that the short game for a generalization of Tic-Tac-Toe is FPT, and we determine the parameterized complexity of the short games for Maker-Maker, Maker-Breaker, and Enforcer-Avoider. One of our main tools is a new fragment of first-order logic where universally-quantified variables only occur in inequalities and no other relations. After giving some necessary definitions in the next section, we will state our results precisely, and discuss them. The rest of the paper is devoted to the proofs of our results, with some parts deferred to the appendix, due to space constraints.

## 2 Preliminaries

##### Finite structures.

A vocabulary is a finite set of relation symbols, each having an associated arity. A finite structure over consists of a finite set , called the universe, and for each in a relation over of corresponding arity. An (undirected) graph is a finite structure , where is a symmetric binary relation. A hypergraph is a finite structure , where is the incidence relation between vertices and edges. Sometimes it is more convenient to denote a hypergraph instead by a tuple where is a set of subsets of .

##### First-order logic.

We assume a countably infinite set of variables. Atomic formulas over vocabulary are of the form or where and are variables. The class FO of all first-order formulas over consists of formulas that are constructed from atomic formulas over using standard Boolean connectives as well as quantifiers followed by a variable. Let be a first-order formula. The size of (a reasonable encoding of) is denoted by . The variables of that are not in the scope of a quantifier are called free variables. We denote by the set of all assignments of elements of to the free variables of such that is satisfied. We call a model of if is not empty. The class contains all first-order formulas of the form where is a quantifier free first-order formula.

##### Parameterized complexity.

The class FPT contains all parameterized problems that can be decided by an FPT-algorithm. An FPT-algorithm is an algorithm with running time , where is an arbitrary computable function that only depends on the parameter and is the size of the problem instance. An FPT-reduction of a parameterized problem to a parameterized problem is an FPT-algorithm that transforms an instance of to an instance of such that: (i) is a yes-instance of if and only if is a yes-instance of , and (ii) , where is an arbitrary computable function that only depends on . Hardness and completeness with respect to parameterized complexity classes is defined analogously to the concepts from classical complexity theory, using FPT-reductions. The following parameterized classes will be needed in this paper: . Many parameterized complexity classes can be defined via a version of the following model checking problem.

MC() | |
---|---|

Instance: | Finite structure and formula . |

Parameter: | . |

Problem: | Decide whether . |

In particular, the problem MC() is W[1]-complete and the problem MC(FO) is AW[*]-complete (see for example FlumG1998 ()).

##### Positional games.

Positional games are played by two players on a hypergraph . The vertex set indicates the set of available positions, while the each hyperedge denotes a winning configuration. For some games, the hyperedges are implicitly defined, instead of being explicitly part of the input. The two players alternatively claim unclaimed vertices of until either all elements are claimed or one player wins. A position in a positional game is an allocation of vertices to the players, who have already claimed these vertices. The empty position is the position where no vertex is allocated to a player. The notion of winning depends on the game type. In a Maker-Maker game, the first player to claim all vertices of some hyperedge wins. In a Maker-Breaker game, the first player (Maker) wins if she claims all vertices of some hyperedge . If the game ends and player 1 has not won, then the second player (Breaker) wins. In an Enforcer-Avoider game, the first player (Enforcer) wins if the second player (Avoider) claims all vertices of some hyperedge . If the game ends and player 1 has not won, then the second player wins. A positional game is called an -move game, if the game ends either after a player wins or both players played moves. A winning strategy for player 1 is a move for player 1 such that for all moves of player 2 there exists a move of player 1…such that player 1 wins.

## 3 Results

The first game we consider is a Maker-Maker game that generalizes well-known games Tic-Tac-Toe, Connect6, and Gomoku (also known as Five in a Row). In Connect(, , , , ), the vertices are cells of an grid, each set of aligned cells (horizontally, vertically, or diagonally) is a winning set, the first move by player 1 is to claim vertices, and then the players alternate claim unclaimed vertices at each turn. Tic-Tac-Toe corresponds to Connect(), Connect6 to Connect(), and Gomoku to Connect(). Variations with different board sizes are also common. In the Short -Connect problem, the input is the set of vertices, an assignment of some of these vertices to the two players, the integer , and the parameter . The winning sets corresponding to the aligned cells are implicitly defined. The question is whether player 1 has a winning strategy from this position in at most moves. We omit from the problem definition of Short -Connect since we are modeling games that advanced already past the initial moves. Our first result (proved in Section 4) is that Short -Connect is fixed-parameter tractable for parameter . (In all our results, the parameter is the number of moves, .)

theoremthmconnect Short -Connect is FPT.

The main reason for this tractability is the rather special structure of the winning sets. It helps reducing the problem to model checking for first-order logic on locally bounded treewidth structures, which is FPT FrickG2001 ().

A similar strategy was recently used to show that Short Hex is FPT (BonnetJS2016TCS, ). The Hex game is played on a parallelogram board paved by hexagons, each player owns two opposite sides of the parallelogram. Players alternately claim an unclaimed cell, and the first player to connect their sides with a path of connected hexagons wins the game. Note that we may view Hex as a Maker-Breaker game: if the second player manages to disconnect the first players sides, he has created a path connecting his sides. BonnetJS2016TCS () also considered a well-known generalization to arbitrary graphs. The Generalized Hex game is played on a graph with two specified vertices and . The two players alternately claim an unclaimed vertex of the graph, and player 1 wins if she can connect and by vertices claimed by her, and player 2 wins if he can prevent player 1 from doing so. The Short Generalized Hex problem has as input a graph , two vertices and in , an allocation of some of the vertices to the players, and an integer . The parameter is , and the question is whether player 1 has a winning strategy to connect and in moves.

The Short Generalized Hex problem is known to be in AW[*] and was conjectured to be AW[*]-complete BonnetJS2016TCS (); DowneyF2013 (); DowneyF99 (); FominM12 (); Scott2009 (). In fact, AW[*] is thought of as the natural home for most short games DowneyF2013 (), playing a similar role in parameterized complexity as PSPACE in classical complexity for games with polynomial length. However, BonnetJS2016TCS () only managed to show that Short Generalized Hex is W[1]-hard, leaving a complexity gap between W[1] and AW[*]. Our next result is to show that Short Generalized Hex is in W[1]. Thus, Short Generalized Hex is in fact W[1]-complete. {restatable}theoremthmhex Short Generalized Hex is W[1]-complete. Our main tool is a new fragment of first-order logic for which model-checking on arbitrary relational structures is W[1]-complete parameterized by the length of the formula. This fragment, which we call -FO, is the fragment of first-order logic where universally-quantified variables appear only in inequalities. {restatable}theoremthmcustomized MC(-FO) is W[1]-complete. This result is proved by reducing a formula in -FO to a formula in . The -FO logic makes it convenient to express short games where we can express that player 1 can reach a certain configuration without being blocked by player 2, no matter what configurations player 2 reaches. This is indeed the case for Generalized Hex, where we are merely interested in knowing if player 1 can connect and without being blocked by player 2.

More generally, this is the case for Short Maker-Breaker, where the input is a hypergraph , a position, and an integer , and the question is whether player 1 has a winning strategy to claim all the vertices of some hyperedge in moves. {restatable}theoremthmmb Short Maker-Breaker is W[1]-complete. The fact that Short Maker-Breaker is PSPACE-complete and W[1]-complete (and not AW[*]-complete) may challenge the intuition one has on alternation. Looking at the classical complexity (PSPACE-completeness), it seems that both players have comparable expressivity and impact over the game. As the game length is polynomially bounded, if the outcome could be determined by only guessing a sequence of moves from one player, then the problem would lie in NP. Now from the parameterized complexity standpoint, Short Maker-Breaker is equivalent under FPT reductions to guessing the vertices of a clique (as in the seminal W[1]-complete -Clique problem); no alternation there. Those considerations may explain why it was difficult to believe that Generalized Hex is not AW[*]-complete as conjectured repeatedly Scott2009 (); DowneyF99 (); DowneyF2013 ().

This is also in contrast to Short Maker-Maker, where the input is a hypergraph , a position, and an integer , and the question is whether player 1 has a strategy to be the first player claiming all the vertices of some hyperedge in moves. {restatable}theoremthmmm Short Maker-Maker is AW[*]-complete.

For the remaining type of positional games, the Short Enforcer-Avoider problem has as input a hypergraph , a position, and an integer , and the question is whether player 1 has a strategy to claim vertices that forces player 2 to complete a hyperedge. Again, player 1 can only block some moves of player 2, and the winning condition for player 1 can be expressed in -FO. {restatable}theoremthmea Short Enforcer-Avoider is co-W[1]-complete. Our results suggest that a structured board may suggest that a positional game is FPT, but otherwise, the complexity depends on how the winning condition for player 1 can be expressed. If it only depends on what positions player 1 has reached, our results suggest that the problem is W[1]-complete, but when the winning condition for player 1 also depends on the position player 2 has reached, the game is probably AW[*]-complete.

## 4 Short -Connect is Fpt

Graph represents an board in the following sense. Every board cell is represented by a vertex. Horizontal, vertical and diagonal neighbouring cells are connected via an edge. Vertex sets and represent the vertices already occupied by Player 1 and Player 2. While integer , the number of stones to be placed during a move, is part of the input, we restrict it to values below constant as games with are trivial.

Short -Connect | |
---|---|

Instance: | A graph representing an board, occupied vertices , and integer and . |

Parameter: | . |

Problem: | Decide whether Player 1 has a winning strategy with at most moves. |

*

###### Proof.

We reduce Short -Connect to first-order model checking MC(FO) on a bounded local treewidth structure. Using a result by Frick and Grohe FrickG2001 (), it follows that Short -Connect is FPT. Let be an instance of Short -Connect, where . We construct instance of MC(FO) as follows. Let be a binary relation symbol and let and be unary relation symbols. Then is the -structure with , , and . FO-formula is defined as ,

Variables represent the th stone in Player 1’s th move and variables represent the th stone in Player 2’s th move. The sequences and represent possible winning configurations for Player 1 and Player 2. The overall structure of is the following. The first disjunction ranging from to represents the number of moves Player 1 needs to win the game. We then ensure that the variables represent legal moves by Player 1. Further, either variables do not represent legal moves by Player 2, or Player 1 achieved a winning configuration. For the latter, we assure that variables represent aligned vertices occupied by Player 1. Finally, we check that Player 2 did not achieve a winning configuration before, that is vertices do not represent aligned vertices occupied by Player 2.

Formula expresses that there is a path of length 2 between vertices and via ( and ensure that the arguments are disjoint vertices). Formula expresses that vertices , , and are aligned horizontally or vertically in this order. A case analysis shows that and are horizontally or vertically aligned if and only if there are exactly three nodes at distance 1 of and , and that is in the middle of the other two. In case and are located on one of the border lines of the board, there are exactly two nodes at distance 1. Formula expresses that vertices , , and are diagonally aligned in this order. This is the case if there exists no other length 2 path between and . Formula expresses that vertices , , and are aligned (in that order). Formula (see Appendix A) ensures that variables represent legal moves of Player 1, that is vertices not contained in or or previously played vertices. Analogously, ensures that variables represent legal moves of Player 2. Formula, (see Appendix A) expresses that variables form a valid configuration of exactly vertices out of the set of or vertices played by Player 1. Analogously, states that variables form a valid configuration of exactly vertices out of the set of or vertices played by Player 2. The size of is polynomial in , , and . Since is a constant and is bounded by , we have an FO formula polynomial in our parameter . Graph represents a grid with diagonals. Hence, has maximum degree 8. It follows from Seese Seese1996 () that Short Connect is FPT. ∎

## 5 Mc(-Fo) is W[1]-complete

The class -FO contains all first-order formulas of the form , with and being a quantifier free first-order formula such that every -quantified variable only occurs in inequalities, that is in relations of the form for some variable . Furthermore, does not contain any other variables besides .

*

###### Proof.

Hardness: Every formula is contained in the class -FO. Hence, W[1]-hardness follows from W[1]-completeness of MC().

Membership: By reduction to MC(). Let be an instance of MC(-FO). If contains only existential quantifiers then is already an instance of MC(). Hence, let with for , is in negation normal form and . That is, is the rightmost of the universal quantified variables. In order to reduce to an instance of MC(), we need a way to remove all universal quantifications. We will show how to eliminate the universal quantification of . This technique can then be used to iteratively eliminate all the universal quantifiers. Let be the subformula . We will show that we can replace by

(1) | ||||

(2) | ||||

(3) |

This reduction is an FPT-reduction, since the size of formula is a function of the size of formula . Let be arbitrary but fixed elements of the universe of . We will show that by proving (a) and (b) . For (a) assume that is true. This means, is true for all , that is for all there exists an assignment to such that is true. Part (1) of asks for some such that there exists an assignment to such that is true. Part (2) asks for the existence of an assignment to such that is true for each of the cases where is one of the elements . Part (3) asks for the existence of an assignment to such that is true for each of the cases where is one of the elements that are assigned to in the model of Part (1). All these are special cases of the universal quantification over , hence is true.

For direction (b) assume towards a contradiction that is false and that is true. Since is false, there exists such that is false. We perform a case distinction on the value . First let for some . Then let be the assignments to variables in the model of . The th conjunct of Part (2) of states that holds for using the assignment . Hence, assigning to variables in is a model for , which contradicts our assumption. As the next case, let be the assignment to variables in the model of and let for some . Let be the assignments to variables in the model of . The conjunct with index of Part (3) of states that holds for using the assignment . Hence, assigning to variables in is a model for , which contradicts our assumption. For the last case, let be one of the remaining values. Let be all the literals in that contain . All of them are inequalities of the form for . Let be the assignment to in the model of . Let be the literals in in Part (1) of that correspond to . We have no knowledge about the truth value of these literals with , but all of the literals in evaluate to true when assigning to the variables . Since is in negation normal form and the literals never occur in unnegated form, that is as equalities, changing the truth value of these literal from false to true will never result in changing the truth value of the whole formula from true to false. But since together with is a model of Part (1) of , it holds that for all values of that we consider in this case, that is true, which contradicts our assumption. This completes the case distinction and we have . ∎

## 6 Short Generalized Hex is W[1]-complete

Short Generalized Hex | |
---|---|

Instance: | Graph , vertices , vertex sets with , and integer . |

Parameter: | . |

Problem: | Decide whether Player 1 has a winning strategy with at most moves in the generalized Hex game . |

A generalized Hex game is a positional game , where the positions and the winning configurations are defined as follows. Set contains all vertices of , that is . Set contains a set of vertices if and only if form an path in . Additionally, vertices in and are already claimed by player 1 and player 2, respectively. Since the set of winning configurations of Short Generalized Hex is only defined implicitly, the input size of Short Generalized Hex can be exponential smaller than the number of winning configurations.

*

###### Proof.

Hardness is already known BonnetJS2016TCS (). For membership, we reduce Short Generalized Hex to MC(-FO). Let be an instance of Short Generalized Hex, where . Claimed vertices and can be preprocessed: (i) every and its incident edges are removed from and the neighbourhood of is turned into a clique; (ii) every and its incident edges are removed from . Hence, w.l.o.g. we assume that . We construct an instance of MC(-FO) as follows. Let be a binary relation symbol and let and be unary relation symbols. Then is the -structure with , , and . The -FO-formula is defined as , with

The intuition of is the following. The variables , , and represent the moves of Player 1, the moves of Player 2, and the ordered -path induced by Player 1’s moves, respectively. The variables and represent the vertices of the same name. Formula expresses that there is either a direct edge between and or a - path of length was played. The main disjunctions () ensure that we consider wins that take up to moves, and build - path of length up to . Subformula will be true if and only if the variables form a path using only values of the selected values for the variables. Subformula ensures that all variables are pairwise distinct and they are distinct from all variables with smaller index.

We have , so this is indeed an FPT-reduction and W[1]-membership follows. ∎

## 7 Short Maker-Breaker is W[1]-complete

Short Maker-Breaker | |
---|---|

Instance: | Hypergraph , vertex sets with , and integer . |

Parameter: | . |

Problem: | Decide whether Player 1 has a winning strategy with at most if vertices and are already claimed by Player 1 and Player 2, respectively. |

*

###### Proof.

For membership, we reduce Short Maker-Breaker to MC(-FO). Let be an instance of Short Maker-Breaker, where is a hypergraph. Claimed vertices and can be preprocessed: (i) every is removed from and every hyperedge ; (ii) every is removed from and every hyperedge with is removed from . Hence, w.l.o.g. we assume that . We construct an instance of MC(-FO) as follows. Let and be binary relation symbols. Then is the -structure with and . Hence, the universe of consists of the vertices of , an element for each hyperedge, and an element for some bounded number of integers. The -FO-formula is defined as , with

The subformula refers to the subformula with same name used in the proof of Theorem 3. That is, it ensures that all variables are pairwise distinct and that they are distinct from all variables with smaller index. The intuition of is the following. The variables and represent the moves of Maker and the moves of Breaker, respectively. The variables represent the vertices forming the winning configuration of Maker and represents the hyperedge of this winning configuration. The first disjunction ensures that we consider wins that take up to moves. The second disjunction ensures that we consider winning configurations that consist of up to vertices. After checking that has the correct size (), we encode that the values of the variables are contained in the hyperedge represented by and that these variables are pairwise disjoint and selected among the moves of Maker (the variables).

We have , so this is indeed an FPT-reduction and W[1]-membership follows.

For hardness, we reduce -Multicolored Clique to Short Maker-Breaker. The reduction is essentially the same as the reduction used for showing W[1]-hardness of Generalized Hex BonnetJS2016TCS (). The crucial observation is that the construction of BonnetJS2016TCS () contains only a polynomial number of possible paths. Hence, we can encode every such -path as a unique hyperedge denoting a winning configuration in Short Maker-Breaker. ∎

## 8 Short Maker-Maker is Aw[*]-complete

Short Maker-Maker | |
---|---|

Instance: | Hypergraph , vertex sets with , and integer . |

Parameter: | . |

Problem: | Decide whether Player 1 has a winning strategy with at most if vertices and are already claimed by Player 1 and Player 2. |

*

###### Proof.

For membership, we reduce Short Maker-Maker to MC(FO). Let be an instance of Short Maker-Maker, where is a hypergraph. We construct an instance of MC(FO) as follows. Let , , and be unary relation symbols. Let be a binary relation symbol. Then is the -structure with , , , and . Hence, the universe of consists of the vertices and the hyperedges of . The FO-formula is defined as , with

Variable represent Player 1’s th move and variable represent Player 2’s th move. The first disjunction represents the number of moves that Player 1 needs to win the game. Formula (see Appendix B) ensures that variables represent legal moves of Player 1, that is vertices not contained in or or previously played vertices. Analogously, ensures that variables represent legal moves of Player 2. Formula ensures that Player 1 has won within the first moves, that is, it has completed a hyperedge with and variables up to . Analogously, ensures that Player 2 has won within the first moves. We have and , so this is indeed an FPT-reduction and AW[*]-membership follows.

For hardness, we reduce from the AW[*]-complete problem Short Generalized Geography on bipartite graphs. The reduction is deferred to the appendix. ∎

## 9 Short Enforcer-Avoider is co-W[1]-complete

Short Enforcer-Avoider | |
---|---|

Instance: | Hypergraph , vertex sets with , and integer . |

Parameter: | . |

Problem: | Decide whether Player 1 has a winning strategy with at most moves if vertices and are already claimed by Player 1 and Player 2, respectively. |

*

###### Proof.

We show that the co-problem of Short Enforcer-Avoider is W[1]-complete. The co-problem of Short Enforcer-Avoider is to decide whether for all strategies of Enforcer, there exists a strategy of Avoider such that during the first moves, Avoider does not claim a hyperedge. Again, vertices and are already claimed by Enforcer and Avoider, respectively. We prove W[1]-hardness by a parameterized reduction from Independent Set and W[1]-membership by reduction to MC(-FO).

In the W[1]-complete Independent Set problem DowneyF99 (), the input is a graph and an integer parameter , and the question is whether has an independent set of size , i.e., a set of pairwise non-adjacent vertices. We construct a positional game by replacing each vertex of by a clique of size . The vertex set has vertices for each vertex , and hyperedges are . We claim that has an independent set of size if and only if Avoider does not claim a hyperedge in the first moves in the positional game starting from the empty position, that is . For the forward direction, suppose is an independent set of of size . Then, a winning strategy for Avoider is to claim an unclaimed vertex from at round . We note that Enforcer cannot claim all the vertices from , since there are not enough moves to do so, and Avoider does not complete a hyperedge with this strategy. On the other hand, suppose Avoider has a winning strategy in moves. For an arbitrary play by Enforcer, let denote the vertices claimed by Player 1. Then, and for any , since Player 1 would otherwise claim all the vertices of a hyperedge. Therefore, is an independent set of of size .

For membership, we reduce to MC(-FO). Let be an instance of the co-problem of Short Enforcer-Avoider where is a hypergraph. First we do some preprocessing. We remove all vertices from that are contained in , that is the vertices already claimed by Avoider. If this results in an empty hyperedge, the instance is a no-instance. Otherwise, we remove all hyperedges that contain a vertex in , that is the vertices already claimed by Enforcer, since Avoider will never lose via these edges anymore. Finally, we remove all vertices from that are contained in . Let now refer to the outcome of this preprocessing. By construction all vertices of are unoccupied and some vertices might not be contained in any hyperedge. If contains less than vertices we can solve the problem via brute force in FPT time. Hence, in what follows we assume that there are at least unoccupied vertices in . We construct an instance of MC(-FO) as follows. Let be a -ary relation symbol for . Then is the -structure with , that is contains every permutation of all hyperedges of cardinality . The -FO-formula is defined as

where

Subformula ensures that all variables are pairwise distinct and they are distinct from all variables with index less or equal theirs. The intuition of is the following. The variables and represent the moves of Avoider and the moves of Enforcer, respectively. Avoider wins if the variables do not cover a whole hyperedge after moves. We only have to check hyperedges of size up to . Hence, for each cardinality , we check for all subsets of the variables that they do not form a hyperedge. Formula does not pose any restrictions on the variables, that is we do not force Enforcer to pick unoccupied vertices. We call a move by Enforcer that picks an already occupied vertex cheating. To prove correctness, we need to show that whenever Enforcer has a winning strategy that involves cheating, Enforcer also has a winning strategy without cheating. We construct as follows. We follow strategy while does not perform a cheating move. If the next move would be a cheating move, we play a random unoccupied vertex instead and keep track of this vertex in a new set . The next time we need to select a move, we construct a board state by removing all vertices in from the picks of Enforcer and query strategy on this state . If the answer is an unoccupied vertex, we perform this move normally. If instead the answer is a previously played vertex (which might be in ), we play a random unoccupied vertex instead and add it to . Since was a winning strategy, so is . Hence, formula does not need to check if the variables correspond to unoccupied vertices. The construction can be done by an FPT algorithm since for each hyperedge of cardinality , we create entries in the relation. We have , so this is indeed an FPT reduction and W[1]-membership follows. ∎

## 10 Conclusion

We have seen that the parameterized complexity of short positional games depends crucially on whether both players compete for achieving winning sets, or whether the game can be seen as one player aiming to achieve a winning set and the other player merely blocking the moves of the first player. Naturally, blocking moves correspond to inequalities in first-order logic, and our -FO fragment of first-order logic therefore captures that the universal player can only block moves of the existential player. Our W[1]-completeness of MC(-FO) has been used several times in this paper, but our transformation of -FO formulas into formulas may have other uses. As a concrete example related to positional games, BonnetJS2016TCS () established that Short Hex is FPT by expressing the problem as a FO formula, and making use of Frick and Grohe’s meta-theorem FrickG2001 (), similarly as we did in Section 4. This establishes that the problem is FPT but the running time is non-elementary in . However, we remark that their FO formula is actually a -FO formula of size polynomial in . Our transformation gives an equivalent formula whose length is single-exponential in , and the meta-theorem of GroheW2004 () then gives a running time for solving Short Hex that is triply-exponential in .

#### Acknowledgments

We thank anonymous reviewers for helpful comments and we thank Yijia Chen and Paul Hunter for bringing GroheW2004’s work to our attention. Serge Gaspers is the recipient of an Australian Research Council (ARC) Future Fellowship (FT140100048). Abdallah Saffidine is the recipient of an ARC DECRA Fellowship (DE150101351). This work received support under the ARC’s Discovery Projects funding scheme (DP150101134).

## References

- (1) Karl R. Abrahamson, Rodney G. Downey, and Michael R. Fellows. Fixed-parameter intractability II (extended abstract). In Proceedings of the 10th Annual Symposium on Theoretical Aspects of Computer Science (STACS 93), volume 665 of Lecture Notes in Computer Science, pages 374–385. Springer, 1993. doi:10.1007/3-540-56503-5_38.
- (2) Karl R. Abrahamson, Rodney G. Downey, and Michael R. Fellows. Fixed-parameter tractability and completeness IV: on completeness for W[P] and PSPACE analogues. Annals of Pure and Applied Logic, 73(3):235–276, 1995. doi:10.1016/0168-0072(94)00034-Z.
- (3) Édouard Bonnet, Florian Jamain, and Abdallah Saffidine. On the complexity of connection games. Theoretical Computer Science, 644:2–28, 2016. doi:10.1016/j.tcs.2016.06.033.
- (4) Jesper Makholm Byskov. Maker-Maker and Maker-Breaker games are PSPACE-complete. Technical Report RS-04-14, BRICS, Department of Computer Science, Aarhus University, 2004.
- (5) Rodney G. Downey and Michael R. Fellows. Parameterized complexity. Springer-Verlag, New York, 1999.
- (6) Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013.
- (7) Shimon Even and Robert Endre Tarjan. A combinatorial problem which is complete in polynomial space. Journal of the ACM, 23(4):710–719, 1976. doi:10.1145/321978.321989.
- (8) Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Springer, 1998.
- (9) Fedor V. Fomin and Dániel Marx. FPT suspects and tough customers: Open problems of downey and fellows. In Hans L. Bodlaender, Rod Downey, Fedor V. Fomin, and Dániel Marx, editors, The Multivariate Algorithmic Revolution and Beyond - Essays Dedicated to Michael R. Fellows on the Occasion of His 60th Birthday, volume 7370 of Lecture Notes in Computer Science, pages 457–468. Springer, 2012. doi:10.1007/978-3-642-30891-8_19.
- (10) Markus Frick and Martin Grohe. Deciding first-order properties of locally tree-decomposable structures. Journal of the ACM, 48(6):1184–1206, 2001.
- (11) Martin Grohe and Stefan Wöhrle. An existential locality theorem. Annals of Pure and Applied Logic, 129(1):131–148, 2004. doi:10.1016/j.apal.2004.01.005.
- (12) Alfred W. Hales and Robert I. Jewett. Regularity and positional games. Transactions of the American Mathematical Society, 106:222–229, 1963.
- (13) Ming Yu Hsieh and Shi-Chun Tsai. On the fairness and complexity of generalized -in-a-row games. Theoretical Computer Science, 385(1):88–100, 2007. doi:10.1016/j.tcs.2007.05.031.
- (14) Stefan Reisch. Gobang ist PSPACE-vollständig. Acta Informatica, 13(1):59–66, 1980.
- (15) Stefan Reisch. Hex ist PSPACE-vollständig. Acta Informatica, 15:167–191, 1981. doi:10.1007/BF00288964.
- (16) Thomas J. Schaefer. On the complexity of some two-person perfect-information games. Journal of Computer and System Sciences, 16(2):185–225, 1978. doi:10.1016/0022-0000(78)90045-4.
- (17) Allan Scott. On the Parameterized Complexity of Finding Short Winning Strategies in Combinatorial Games. PhD thesis, University of Victoria, 2009.
- (18) Allan Scott and Ulrike Stege. Parameterized chess. In Proceedings of the 3rd International Workshop on Parameterized and Exact Computation (IWPEC 2008), volume 5018 of Lecture Notes in Computer Science, pages 172–189. Springer, 2008. doi:10.1007/978-3-540-79723-4_17.
- (19) Allan Scott and Ulrike Stege. Parameterized pursuit-evasion games. Theoretical Computer Science, 411(43):3845–3858, 2010. doi:10.1016/j.tcs.2010.07.004.
- (20) Detlef Seese. Linear time computable problems and first-order descriptions. Mathematical Structures in Computer Science, 6(6):505–526, 1996.