On the Complexity of the Maker-Breaker Happy Vertex Game
Abstract
Given a -colored graph , a vertex of is said to be happy if it has the same color as all its neighbors. The notion of happy vertices was introduced by Zhang and Li [27] to compute the homophily of a graph. Eto, Fujimoto, Kiya, Matsushita, Miyano, Murao and Saitoh [11] introduced the Maker-Maker version of the Happy vertex game, where two players compete to claim more happy vertices than their opponent. We introduce here the Maker-Breaker happy vertex game: two players, Maker and Breaker, alternately color the vertices of a graph with their respective colors. Maker aims to maximize the number of happy vertices at the end, while Breaker aims to prevent her. This game is also a scoring version of the Maker-Breaker domination game introduced by Duchene, Gledel, Parreau and Renault [8], as a happy vertex corresponds exactly to a vertex that is not dominated in the domination game. Therefore, this game is a very natural game on graphs and can be studied within the scope of scoring positional games [3]. We initiate here the complexity study of this game, by proving that computing its score is -complete on trees, -hard on caterpillars, and polynomial on subdivided stars. Finally, we provide the exact value of the score on graphs of maximum degree 2, and we provide an -algorithm to compute the score on graphs of bounded neighborhood diversity. An important contribution of the paper is that, to achieve our hardness results, we introduce a new type of incidence graph called the literal-clause incidence graph for -SAT formulas. We prove that QMAX 2-SAT remains -complete even if this graph is acyclic, and that MAX 2-SAT remains -complete, even if this graph is acyclic and has maximum degree , i.e. is a union of paths. We demonstrate the importance of this contribution by proving that Incidence, the scoring positional game played on a graph is also -complete when restricted to forests.
Keywords and phrases:
Maker-Breaker game, Domination game, happy vertex game, scoring game, complexityFunding:
Nacim Oijid: Kempe Foundation Grant No. JCSMK24-515 (Sweden).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Algorithmic game theoryFunding:
This research was supported by the ANR project P-GASE (ANR-21-CE48-0001-01).Editor:
John IaconoSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
1.1 Framework of the study
Happy vertices have been introduced in graphs to measure their homophily: a vertex is happy if it has the same color as all its neighbors. This concept has been introduced by Zhang and Li [27], and has been the subject of several studies afterwards; see for instance [1, 2, 20, 28]. In this context, Eto, Fujimoto, Kiya, Matsushita, Miyano, Murao and Saitoh have introduced the happy vertex game [11] as a two-player game, in which two players, Black and White, alternately color the vertices of a graph with their own color and aim to have more happy vertices of their color than their opponent. We focus here on the Maker-Breaker version of the game, in which Maker and Breaker again alternately color the vertices of a graph, Maker in red, and Breaker in blue. Maker aims to maximize the number of happy red vertices, and Breaker aims to minimize it. Hence, when all the vertices are colored, the number of red happy vertices is precisely the number of vertices not dominated by Breaker, which makes this game a scoring version of the well-known Maker-Breaker domination game.
The Maker-Breaker domination game, introduced by Duchêne, Gledel, Parreau and Renault [8] in 2020, is one of the most studied positional games played on the vertices of graphs. In this game, two players, Dominator and Staller, alternately claim the unclaimed vertices of a given graph until no vertices remain. Dominator wins if the set of vertices she has claimed is a dominating set; otherwise, i.e. if Staller has isolated one vertex by claiming it and all its neighbors, Staller wins. The algorithmic study of this game led to its -completeness on bipartite graphs of bounded degree or split graphs [8, 23], and to polynomial algorithms on several classes of graphs, including paths, grids, unit interval graphs, and regular graphs [4, 7]. This game is part of the larger field of Maker-Breaker positional games, which are games played on a hypergraph with two players, Maker and Breaker, alternately claiming the vertices of the hypergraph. Maker wins if she manages to claim all the vertices of some hyperedge; otherwise, Breaker wins. Positional games were introduced by Hales and Jewett in 1963 [15], and proved to be -complete by Schaefer in 1978 [25] for hypergraphs of rank 11, i.e. whose largest hyperedge has size . The study of their complexity has recently gained strong interest with the three consecutive improvements on the minimal rank for which the game remains -complete to rank by Rahman and Watson [24], to rank by Koepke [17], and to rank by Galliot [12]. On the positive side, Galliot, Gravier, and Sivignon proved that the game is solvable in polynomial time on hypergraphs of rank [13].
Here, in the Maker-Breaker happy vertex game, the ruleset is the same as in the Maker-Breaker domination game, except that, once all the vertices have been claimed, we count the number of vertices isolated by Staller, instead of asking if one exists. This consideration makes this game in the universe of scoring positional games, introduced by Bagan, Deschamps, Duchêne, Durain, Effantin, Gledel, Oijid and Parreau [3]. They proved that scoring positional games belongs to Milnor’s universe, a large framework of scoring combinatorial games, which grants some structure on the game [21]. They also proved that computing the score of a scoring Maker-Breaker positional game is -complete, even restricted to hypergraphs of rank 2, i.e. graphs, and they provided several tools to handle this class of games.
1.2 Outline of the paper
In this paper, we first remind some useful results about Milnor’s universe and the domination game in Section 2. In particular, we use Milnor’s group structure to handle disconnected graphs, which can be handled through his results on sum of games, and we use the results on the domination game to focus our study on specific graph classes.
In Section 3, we introduce several variants MAX 2-SAT, together with a new representation: the literal-clause incidence graph. We prove that a quantified version of MAX 2-SAT is -complete even when we restrict it to instances for which this graph is acyclic, and that MAX 2-SAT is -complete, even when we restrict it to instances for which this graph is acyclic and has maximum degree 2. As a corollary, we prove that Incidence, the scoring positional game played on a graph is -complete, even restricted to forests, answering an open question of [3]. We then turn back to the Happy vertex game, and we prove that even though the Maker-Breaker Domination game can be solved in polynomial time on forests, its scoring version that we study here is already -complete on trees. This phenomenon leads us to the study of specific subclasses of trees, hence, we prove that the game is already -hard on caterpillars (Section 3), but can be solved in polynomial time on subdivided stars and union of paths (Section 4). Concerning the latter result, we can extend it to graphs of maximum degree since isolated cycles will not change the score of the game.
Finally, in search for extending results known from scoring positional games, we adapt the so-called super-lemma to this game and manage to provide an -algorithm in Section 4.3 parameterized by the neighborhood diversity, a graph parameter introduced by Lampis [18] that measures the variety of the neighborhoods of vertices in the graph.
2 Preliminaries
2.1 Definitions and Notations
Let be a graph, and let be a vertex of . We denote by the open neighborhood of , i.e. we have . We denote by the closed neighborhood of , i.e. .
We denote by the score obtained on when Maker plays next, and when Breaker plays next. Note that we will always consider that both players play optimally, i.e. this score is uniquely defined as the maximum score that Maker can ensure against all the possible strategies for Breaker. In particular, denotes Maker’s maximal score when Maker starts the game on , and when Breaker starts. If there is no possible confusion, they will be denoted by and respectively.
When the identity of the starting player is irrelevant, we denote the score by , omitting the prefix or . This allows us to state results that are valid for both and . However, it is important to note that this notation does not imply that ; it merely indicates that the statement applies to both cases independently.
We denote by SHVG the Scoring Happy Vertex Game, and we identify it with the decision problem that takes as input a graph and an integer and returns true if and only if Maker has a strategy to guarantee a score of at least on . Formally, the problem is defined as follows:
Problem 1 (Scoring Happy Vertex Game).
- Input:
-
A graph , an integer , a first player X with .
- Question:
-
Do we have ?
As usual in positional game, if the first player is not specified, we suppose that it is Maker.
A current game state is represented by the triple , where are the sets of vertices colored by Maker (Maker) and Breaker (Breaker), respectively. We also denote by the set of free vertices in .
2.2 Scoring game
In this section, we begin by introducing some basic results about the score function associated with the game. We start by recalling the inductive definition of the score in scoring games, using the standard notations of Larsson [19].
Definition 2.
Let be a game state. Let be the set of uncolored vertices in this position. Then, the scores and are defined inductively as follows:
If all vertices have been colored, i.e., , the score is evaluated by:
We also recall that Milnor’s universe is the set of games that are dicotic and nonzugzwang, i.e., the set of games in which, if a player can move, his opponent also can, and in which the players have no interest in passing their turn. Being a scoring positional game, the happy vertex game belongs to Milnor’s universe [3], which implies the following inequality:
Lemma 3.
For any game state , we have:
Within Milnor’s universe, we define the union between two games and , and we note , the game in which, at each turn, a player may choose to move either in or in . Considering positional games played on graphs, this consists in considering that playing on a disconnected graph consists in playing on the sum of its connected components.
We also define the notion of equivalence as follows:
Definition 4.
Two scoring games and are equivalent, and we note , if for every game , the scores satisfy
Moreover, the group structure in Milnor’s universe makes it possible to bound the score on a union of games knowing the score of its terms. Namely, we have:
Theorem 5 (Milnor [21]).
Let and be two positions in the Happy vertex game. We have:
In particular, if , since , the left and the right parts of the inequalities are equal, we have the following result:
Theorem 6 (Milnor 1953 [21]).
Let be a game position such that . Then, we have for any position :
This result takes place in the more general framework of temperature theory, by stating that if a game satisfies , then its temperature is . However, the framework of temperature theory will not be required throughout this article. We refer the reader to Hanner’s results [16] and to an article by Duchêne, Oijid, and Parreau [10] that summarizes these results for a general overview of this framework.
2.3 Results inherited from the Maker-Breaker domination game
The Maker-Breaker domination game can result in three different outcomes: , , and . The outcome indicates that Dominator wins going second. The outcome means that Staller wins going second. Finally, the outcome means that the next (or first if no move has been played yet) player to move has a winning strategy. Note that, since in a Maker-Breaker positional game, it is always better to go first rather than second, these are the only three possible outcomes. There is a direct connection between the outcomes of the scores:
Remark 7.
Let be a graph.
-
The Domination Game on results in if and only if .
-
The Domination Game on results in if and only if and .
-
The Domination Game on results in if and only if and .
Note that this only makes it possible to differentiate scores from positive scores. For instance, if is a star with at least two leaves, the outcome of the Maker-Breaker domination game on is , but the score when Maker starts in the SHVG depends on the number of leaves.
In particular, if the outcome of a game is in the Maker-Breaker domination game, it means that Breaker can ensure a score of in the Happy vertex game, going either first or second. Thus, using Theorem 6, we have the following corollary:
Corollary 8.
Let be a graph. Then, the outcome of the Domination game on is if and only if .
A classical tool to prove that the outcome of the domination game is , is the pairing strategy. This general notion exists in all Maker-Breaker positional games, and can be expressed as follows in the Maker-Breaker domination game: if is a graph, a set of disjoint pairs of vertices is called a pairing dominating set if . Duchêne et al. [8] proved that if has a pairing dominating set, then its outcome is . In our score-based framework, this leads to the following:
Remark 9.
Let be a graph. If has a pairing dominating set, then .
In particular, this means that when considering disconnected graphs, removing a connected component that contains a pairing dominating set does not change the score on the game.
2.4 Simplifying instances
In this section, we aim to identify structures in a graph that can be reduced to other structures that are simpler to handle. In particular, when some vertices are already colored, we are looking for graph operations that will transform our graph into a simpler one without altering the score on the current position.
Definition 10.
Let define a position in the game on the graph . We define the decomposed graph at this position, denoted by , as the subgraph of induced by the vertices , augmented as follows: for every vertex in the subgraph induced by that is adjacent to at least one vertex in , we add a new vertex and an edge . We denote by the set of all the vertices added this way and . This decomposition is depicted in Figure 1.
This transformation consists in identifying the vertices dominated by Breaker, i.e. that cannot be made happy any longer, making them dominated only by a leaf, by removing all the remaining vertices claimed by Breaker.
Lemma 11.
Let define a position in the game on the graph .
Then, .
Proof.
Suppose Maker has a strategy that ensures a score in . She can apply her strategy in , which is possible since the vertices of are also free in . At the end of the game, a vertex is dominated in if and only if it has a neighbor colored by Breaker. If this neighbor is in , then also has a neighbor colored by Breaker in . Otherwise, belongs to and, as the strategy in mimics the one in , is still colored by Breaker in . Consequently, any happy vertex in is also happy in , ensuring that . Similarly, by applying his strategy in to , Breaker can ensure that , which concludes the proof.
We now focus on properties that can help us computing the score, by limiting the number of moves to consider: When considering scoring game, it happens that some moves will always have a higher impact on the score than others. It then seems natural to think that these moves will be played first. Note that a similar Lemma is used in [3], but the structure of the winning sets being more complex in the Maker-Breaker happy vertex game, it’s stated differently. We first introduce a function that takes a position and a free vertex and outputs the number of points scored instantly by playing . Formally, we have:
If there is no ambiguity on , we will simply denote it by . The next lemma says that if playing is worth more points than claiming , even if all the neighbors of are made happy, then, there exists an optimal strategy in which is played before .
Lemma 12.
Let be a position of the game. Let be two vertices such that:
Then, there is an optimal strategy in which is played before .
Proof.
We give the proof for Maker playing before , a similar proof provides the result if it is Breaker.
Up to consider a position of the game that is reached later in the strategy, let be a position and suppose Maker has a strategy that scores in which the next move of Maker is to color . Let . We propose the following strategy for Maker:
-
Maker plays .
-
If Breaker colors a vertex , Maker considers that he has played this vertex in . If the answer of Maker in is a vertex , Maker answers by playing in . If Maker’s answer in is to color , then Maker colors instead.
-
If Breaker colors , Maker considers that he has played in and continue her strategy by playing the move that she would have played according to (inverting the plays on and ).
Following this strategy, when all the vertices are colored, either Maker has colored both and . In this case, the set of colored vertices by Maker and Breaker at the end of the game is exactly the same, so Maker scores by coloring first. Otherwise, the set of colored vertices is the same, except that Maker has colored instead of , and Breaker has colored instead of . Denote by the resulting position if Maker has played according to and the resulting position of the described strategy above. The score in is then:
where the second inequality is obtained as we have and .
This proves that Maker can ensure a score at least by playing before .
The so-called Super Lemma is a result that was introduced simultaneously in the PhD thesis of Nacim Oijid [22] and in the study of the game Incidence [3]. In this section, we adapt it to the Scoring Happy Vertex Game, thereby extending its applicability and providing a crucial tool for analyzing the strategic structure of the game. In the context of our game, this lemma says that if two vertices have the same neighborhood, among the uncolored vertices, and scores the same number of points among the colored vertices, there exists an optimal strategy in which the two players Maker and Breaker will both color one of these two vertices.
Theorem 13.
Let be a position of the game on a graph , and let be two distinct vertices such that for any , we have
then
Proof.
The proof is made by induction on
If (), we have . For , the hypothesis implies:
Therefore, after Maker and Breaker’s turns, the score is the same regardless of the choice of the vertex colored by the next player. Hence,
Suppose now . Assume first that Maker has a strategy to ensure a score in , and consider the following strategy in :
-
If it’s Maker’s turn, she colors the vertex she would have color in , following .
-
If Breaker colors a vertex in , Maker colors the second vertex of , which leads to the same score as in by hypothesis on .
-
Otherwise, If Breaker colors Maker colors the vertex that she is supposed to color according to , considering that the last move of Breaker in was . Note that this move is always available and cannot be a vertex {u,v}, unless , in which case, Breaker would also color in .
Following this strategy, if the result is not obtained directly, the resulting position is which has two less free vertices. Hence, by induction, it has the same score as , and since the moves was supposed to be optimal answer to in , it has a score equal or higher than , which proves that Maker can ensure in .
A similar argument applied to Breaker shows that if Breaker can ensure a score of at most in , he can ensure at most in , which concludes the proof.
Similarly to the provided result in [3], this lemma enables us to directly compute the score on complete binary trees, i.e. trees defined by a single vertex, which is a root, and is obtained by taking two copies of , and adding a new root that will be connected to the previous roots of the copies of . The integer is then called the depth of .
Theorem 14.
Let be the complete binary tree of depth . We have and if , and otherwise.
Proof.
If , is an isolated vertex, and Maker scores one by coloring it, otherwise the score is . If , the graph is , the path on vertices. We can apply Theorem 13 to its two leaves, and Maker scores if she starts by coloring the middle vertex; otherwise, Breaker colors it and ensures that no vertex is happy. If , each pair of leaves attached to the same vertex are twins, thus, we can apply Theorem 13 to them. Hence, Maker has colored half of them, i.e. of them. Now their parents satisfy the hypothesis of Theorem 13, as they are in the winning set of the connected leaf colored by Maker and the winning set of their common parent (which exists as ). Thus, Maker will color half of them, ensuring that half of the leaves she has colored are happy, and thus scoring . We can then repeat this process until reaching the vertices of depth , but now, all the colored vertices by Maker already have one neighbor colored by Breaker, and thus will not be happy. Finally, regardless of whether Maker or Breaker colors the root, it has one neighbor colored by Breaker and thus will not be happy. Finally, the score is . This process is depicted in Figure 2.
3 Hardness results
In this section, we concern ourselves with the hardness of the SHVG problem. Note that, since the Maker-Breaker domination game is already -complete on bounded degree bipartite graphs, or split graphs [8, 23], we can inherit this result for . Namely, we have the following theorem:
Theorem 15.
SHVG is -complete even restricted to , and to bounded degree bipartite graphs or split graphs.
However, adding scores to the Maker-Breaker domination game makes it hard on smaller graph classes, and we prove that SHVG is already -complete when restricted to trees, and that the problem is -hard when restricted to caterpillars.
Both hardness results will rely on reductions from two specific Quantified MAX-SAT problems, which we introduce and prove to be -complete and at least -hard respectively in the next subsection. We postpone the hardness results on SHVG to Section 3.2 and Section 3.3.
3.1 Quantified MAX SAT restrictions
In this subsection, we will introduce two restrictions of the (Quantified) MAX--SAT problem which we will use in order to obtain our hardness results. These problems are very general, and are an important contribution of this paper since they can be used to provide other reduction, in particular, providing a natural -complete problem on forests. Recall first the definition of Quantified MAX 2-SAT, which is a quantified version of Max -SAT.
Problem 16 (Quantified Max 2-SAT).
- Input:
-
where is a QBF formula of the form with, for , , a quantifier free -CNF formula, and is an integer.
- Question:
-
Is it possible to satisfy simultaneously clauses of ?
As usual dealing with positional games, we will consider the equivalent gaming variant of the problem [26, 3]: Two players Satisfier and Falsifier choose the value of the s, Satisfier chooses the existentially quantified variables, and Falsifier chooses the universally quantified variables. Satisfier wins if she manages to satisfy clauses, otherwise Falsifier wins.
Quantified MAX 2-SAT is -complete [3]. We will prove that this remains the case even when we impose structural properties on the formula .
We now define the main tool that will be used in our reductions. Let be a quantifier-free -CNF formula, with variables . Let be the graph in which each variable is represented by two vertices, denoted and , corresponding to its positive and negative literals respectively, and where for each clause in , there is an edge between the vertices corresponding to the literals and . We will call the literal–clause incidence graph of . An example of construction of this graph is provided in Figure 3. For readers used to expressing boolean formulas in graphs, note that this graph is not the usual incidence graph of a formula.
Let us now introduce our first specific Quantified MAX--SAT problem.
Problem 17 (Acyclic Q-MAX 2-SAT).
- Input:
-
A QBF formula of the form with a quantifier-free -CNF formula whose literal–clause incidence graph is acyclic, an integer .
- Question:
-
Is it possible to satisfy simultaneously clauses of ?
Lemma 18.
Acyclic Q-MAX 2-SAT is -complete.
Proof.
Membership in follows from the -completeness of Quantified MAX 2-SAT [3]. To prove the hardness, we reduce from Quantified MAX 2-SAT without the acyclicity restriction. Let be an instance of Quantified MAX 2-SAT, with where is a quantifier-free formula. Let be a cycle in . Without loss of generality, assume that , the case being similar. We then introduce three new existential quantifiers and the following gadget clauses:
We consider the formula where is obtained from by substituting to , and by adding the clauses . Let .
The intuition behind this construction is that if there is an assignment of the variables that satisfy clauses in , the same assignment putting , and choosing the value of and such that will satisfy clauses in .
Suppose first that Satisfier has a winning strategy in , by applying the same strategy in , and by setting , she ensures that at least clauses are satisfied when is played, as exactly one of and exactly one of . Then, by putting , she ensures to satisfy the two remaining clauses, and that at least clauses are satisfied.
Reciprocally, suppose that Falsifier has a winning strategy in . By applying the same strategy in , he ensures that at most clauses are satisfied when is played. Then, if Satisfier puts , the only clauses that can be satisfied in that are not in are the added clauses, hence, Falsifier ensures that at most are satisfied in total. If Satisfier sets , the only clause that can be satisfied that was in through this move is the clause , since the other clauses do not contain . Hence, at most clauses are satisfied outside . But, either and are True, then, at most one of can be satisfied, or and are False, and then at most one of can be satisfied. In both cases, at most three of these clauses can be satisfied, and thus, at most in total, ensuring that Falsifier wins in . Hence, Satisfier wins in if and only if she wins in
Finally, in the constructed formula , the literal–clause incidence graph has at least one less cycle than the one of since the variables and are separated by the variables , and , .
By iterating this construction we can eliminate all cycles. Note that each time this reduction is applied, the number of clauses that can be in a cycle decreases by one, since none of the added clauses can be in a cycle. Thus, the number of time this argument has to be applied is bounded by the number of clause of , ensuring that this reduction is polynomial. Therefore, Acyclic Q-MAX 2-SAT is -complete.
Then, we can define our second more specific problem, where we restrict the number of times a variable can occur in a clause.
Problem 19 (Acyclic MAX 2-SAT-2-2).
- Input:
-
A -CNF formula such that
-
the literal–clause incidence graph is acyclic,
-
each variable occurs at most twice positively and at most twice negatively,
an integer .
-
- Question:
-
Is it possible to satisfy simultaneously clauses of ?
This problem consists in a quantified version of bounded occurrence MAX 2-SAT - but where we furthermore impose acyclicity on the literal-clause incidence graph. First, we recall that MAX 2-SAT-3, the version of MAX 2-SAT where the number of occurrences of each variable is bounded by is -complete [5]. More formally, this means that the following problem is -complete:
Problem 20 (MAX 2-SAT-3).
- Input:
-
A -CNF formula such that each variable occurs at most thrice, an integer .
- Question:
-
Is it possible to satisfy simultaneously clauses of ?
We now prove the -completeness of Acyclic MAX 2-SAT-2-2 by a reduction from MAX 2-SAT-3.
Lemma 21.
Acyclic MAX 2-SAT-2-2 is -complete.
Proof.
First, note that Acyclic MAX 2-SAT-2-2 is in as it is an instance of Max 2-SAT.
We reduce from the -complete problem MAX 2-SAT-3 [5]. Let be a -CNF formula such that each variable occurs at most thrice and an integer. If a variable in appears more than twice positively (resp. negatively) then it must appears exactly thrice positively (resp. negatively). Then we can satisfy all three clauses by assigning the variable to True (resp. False) and no clause is satisfied by changing the truth value of the variable from True to False (resp. False to True), i.e. we can always satisfy these three clauses without incidence on the other clauses. Thus we can simply remove these three clauses from and lower by . By iterating this process we construct a new formula where variables not only occur at most thrice, but also occur at most twice positively and at most twice negatively.
Furthermore, if a variable appears in a cycle in the literal-clause graph, we can apply the gadget from the previous reduction to effectively remove cycles. However, this gadget introduces a new variable for each , and requires using one more occurrence of if appears negatively in the cycle or one more of if it appears positively in the cycle. However, this transformation cannot make a variable appear a third time positively or negatively, since if ( resp.) appears in the cycle, it means that it appears exactly twice positively (negatively resp.) and thus at most once negatively (positively resp.). Note also that this transformation ensures that all the occurences of and are either of degree , or neighbors of a vertex of degree , ensuring that they cannot appear in cycle, and thus this reduction has to be applied at most once per variable. Hence, this transformation does not make any variable appear more than twice positively or negatively. This entire transformation can be performed in polynomial time, therefore we conclude that the problem is -complete.
A direct consequence of this result is that, by quantifying all the vertices with , it’s quantified version is -hard and in .
Problem 22 (Acyclic QMAX 2-SAT-2-2).
- Input:
-
A quantified -CNF formula such that
-
the variable–clause incidence graph is acyclic,
-
each variable occurs at most twice positively and at most twice negatively,
an integer .
-
- Question:
-
Can Satisfier satisfy simultaneously clauses of ?
Corollary 23.
Acyclic QMAX 2-SAT-2-2 is -hard and in .
Proof.
The -hardness is directly inherited from Acyclic MAX 2-SAT-2-2 by quantifying all the variables with . The problem is in as a subproblem of QMAX 2-SAT.
These new variants of Q-MAX 2-SAT are quite general and can be used in several reductions. In particular, the reduction from Q-MAX 2-SAT provided in [3], proving that Incidence, the scoring positional game on graphs is -complete starts from the literal-clause incidence graph of a formula and only adds isolated vertices and leaves to it. Hence, we almost answer an open problem of the paper, that asks the complexity of the game on trees with the following corollary:
Corollary 24.
Maker-Breaker Incidence is -complete, even restricted to forests, and -hard, even restricted to unions of caterpillars.
Proof.
We perform the same reduction as in [3], except that the input problem is Acyclic QMAX 2-SAT (or Acyclic QMAX 2-SAT-2-2). Since this constructions consists in adding leaves to the literal-clause incidence graph of the formula, it produces either a forest or a caterpillar, depending on the problem from which we do the reduction.
3.2 Trees
We now have all the necessary tools to establish the -completeness of SHVG when restricted to trees. The proof relies on a reduction from Acyclic Q-MAX 2-SAT which we proved to be -hard. Since SHVG belongs to as it is a scoring positional game [3], the result follows.
Theorem 25.
SHVG on trees is -complete.
Proof.
We provide a reduction from Acyclic Q-MAX 2-SAT. Let be an instance of Acyclic Q-MAX 2-SAT with with an acyclic and quantifier-free -CNF formula. Up to add a variable that appear in no clauses, for each pair of consecutive quantifiers of same type, we can suppose that if is odd, and if is even. Note that this addition of dummy variables do not break the acyclicity of the literal-clause incidence graph, as it only adds isolated vertices. The first step of our reduction is to duplicate our formula: we transform it into , where is obtained from by changing each to . Note that any strategy satisfying clauses can be applied twice to satisfy clauses in . Let be the number of clauses of We will progressively construct a tree by making modifications to the literal-clause incidence graph of , in which we denote by ( resp.) the vertex corresponding to literal ( resp.).
Since the graph is acyclic by hypothesis, it must be a disjoint union of trees . We now construct a tree based on this graph. We start from . For every tree let us fix two of its leaves and and let us connect all trees into a single one by adding edges between and for . We denote by either or . For each edge , we introduce a new vertex and replace the edge with two edges: and .
Next, to each vertex , we attach leaves. Finally, we introduce new vertices , attach leaves to each of them, add we connect them through a path whose extremity is attached to .
An example of reduction is provided in Figure 4.
Let be defined as follows:
Let . Both and can be constructed in polynomial time. We prove that Falsifier wins in if and only if Maker wins in .
Firstly, each leaf can be colored using Theorem 13. Denote by and the vertices colored during this step. Then, if , we have and . Hence, using Lemma 12, there exists an optimal strategy in which Maker and Breaker color the vertices in the following order, for , in increasing order:
-
Maker colors one of .
-
Breaker colors the other vertex in .
-
Maker colors .
-
Breaker colors one of .
-
Maker colors the other vertex in .
-
Breaker colors .
Considering this order, which is optimal, note that all the moves are forced or have to be chosen among two vertices that are connected to the same number of leaves. Moreover, no vertex nor can be happy, because of the leaves colored by Breaker connected to them. Hence, we know that after this step, Maker has colored exactly happy vertices.
Finally, once all the previously described vertices have been colored, only the vertices remain. These vertices will be colored last, and each of them can be happy if and only if both of their adjacent vertices have been colored by Maker.
Suppose first that Falsifier has a winning strategy in . We define the following strategy for Maker:
-
For , if Falsifier has to put to True, Maker colors , ensuring that Breaker will color ; otherwise, she colors , ensuring that Breaker colors .
-
For , if Breaker colors , Maker considers that Satisfier has put to True in . Otherwise, she considers that Satisfier has put to False.
-
When is played, Maker applies again from scratch.
When all the vertices and have been played, if is a clause that has not been satisfied in , then its two literals has been put to False. Thus, since was a winning strategy for Satisfier in , we know that at most clauses of and at most clauses of are satisfied. Thus, at least vertices has their two neighbors colored by Maker. Hence, Maker can by playing only on them ensure to color at least half of them, i.e. , and having colored happy vertices in total.
Reciprocally, suppose that Satisfier has a winning strategy in . We define the following strategy for Breaker:
-
For , if Satisfier has to put to True, Breaker colors ; otherwise, he colors .
-
For , if Maker colors , Breaker colors and considers that Satisfier has put to False in . Otherwise, he considers that Satisfier has put to True.
-
When is played, Breaker applies again from scratch.
Now, when all the vertices, and have been played, the same argument as above ensures that any clause that was satisfied by has one of its literal played by Breaker. Hence, since was a winning strategy in , at least vertices are already dominated by Breaker, and thus, at most of them are not. By pairing them, Breaker can ensure to claim at least of them ensuring that Maker scores at most . Thus, Breaker wins.
3.3 Caterpillars
We now consider SHVG restricted to caterpillars. A graph is called a caterpillar if removing all its leaves results in a path. In other words, a caterpillar consists of a central path with pendant vertices attached to some or all of its nodes.
Theorem 26.
SHVG on caterpillars is -hard.
Proof.
The proof is identical to the one on trees, except that instead of using Acyclic Q-MAX 2-SAT, we now rely on Acyclic Q-MAX 2-SAT-2-2, which is proved to be -hard. In this case, the constructed graph is not only a disjoint union of trees, but in particular a disjoint union of paths, since each vertex in the graph would have degree at most . The same reduction carries through and produces a caterpillar by always connecting the different paths through one of their extremities. This shows that SHVG remains -hard on caterpillars.
4 Efficient algorithms
Since the game is already -complete on forests, and -hard on caterpillars, we aim to find efficient algorithms on other subclasses of trees. Namely, we focus here on union of paths and subdivided stars.
4.1 Union of paths
We first consider union of paths.
4.1.1 Single path
We begin by studying paths. A path is defined by its set of vertices and its set of edges .
Theorem 27.
Let be a path on vertices. Then:
-
If is even, .
-
If is odd, then and .
Proof.
-
Suppose first that is even.
Then, Dominator wins the Maker-Breaker domination game on . Thus, by Corollary 8, we have , and consequently, .
-
Suppose now that is odd, the outcome of the domination game on is . So, , and by Remark 7. To prove that , set , and denote by the vertices of , and consider the following pairing strategy for Breaker: if Maker colors a vertex in , for , Breaker colors the other one. This strategy ensures that no vertex in will be happy and thus, the only vertex that Maker can make happy is , which ensures .
4.1.2 Union of paths
Once the score on a single path can be computed, union of paths can be handled using the group structure provided by Milnor’s universe. In particular, if is even, since, , , and thus for any graph , we have and .
Lemma 28.
Let be two odd integers, we have . Thus .
Proof.
Since , it is sufficient to prove and .
Suppose Breaker starts. Up to exchange and , suppose that his first move is a vertex in . It’s now Maker’s turn, and thus Maker can ensure a score of since by Theorem 5.
Suppose now that Maker starts. Let and . Denote by the vertices of and by the vertices of . Consider the following pairing for Breaker . This strategy ensures that all the vertices and for will not be happy, and that Maker will color at most one of , which ensures that at most one of them will be happy. Thus, .
Corollary 29.
Let be integers, with of them being odd. We have and
Remark 30.
Since cycles have outcome in the Maker-Breaker domination game, they can be added to any game without changing the score. Thus, Corollary 29 can be extended to graphs of maximum degree .
4.2 Subdivided Stars
Now, we focus on subdivided stars. These graphs are formed by connecting a finite number of paths to a central vertex. Subdivided stars represent an intermediate level of complexity between paths and more general tree structures, since they are trees with a single vertex of degree higher than .
Lemma 31.
Let be a position of the game. We have for any , .
Proof.
Let be a strategy for Maker in . By applying in which has the same set of uncolored vertices, any vertex made happy in is also happy in , which proves the result.
Theorem 32.
Let be a subdivided star obtained by connecting paths to a central vertex . If , is a path, and the score on is given by Theorem 27. Otherwise, denote by the number of odd paths attached to . We have and , unless in which case .
Proof.
Let be a subdivided star. First, since the Maker-Breaker domination game on has outcome [8], we have .
Let be its central vertex and be the paths attached to it. Note that if , is a path and its score is given by Theorem 27, i.e. its score is if it has an odd number of vertices and Maker starts, and otherwise.
Suppose now that Maker starts and . Let be the number of odd paths in and let be these odd-length paths. Suppose . If Maker colors the central vertex at the beginning, by coloring , she can guarantee a score of at least . By Lemma 31, and, since is an union of paths, by Corollary 29, . Hence .
Let be the length of and denote by the vertices of for such that is connected to . Breaker has a pairing strategy to prevent Maker from scoring inside the even-length paths by pairing adjacent vertices starting from their leaves. Moreover the pairing enables Breaker to prevent Maker from scoring inside . It results that the only vertices that can be made happy are in . Hence, by applying the strategy provided in Corollary 29 in when Maker plays in it, and by applying his pairing strategy in , since , we conclude that . All together, we have
If however, Maker can still guarantee a score of . We prove this result by induction. Since , there are at least two even paths and . Let be the subdivided star that is formed by connecting paths of length exactly to a central vertex . By coloring successively all the leaves’ neighbors, Maker forces Breaker to answer by coloring each leaves, since otherwise by coloring one of the leaves and its neighbor Maker can score , which will conclude the proof. Once Maker colored all the leaves’ neighbors and Breaker colored all the leaves, it is again Maker’s turn. All vertices adjacent to the central vertex have been colored by Maker, thus by coloring it Maker scores . As a result, is at least one. This sequence is illustrated in Figure 5 for .
If is formed by connecting paths each of length for to a central vertex , and assuming that has length . Then Maker colors the neighbor of the leaf of , forcing Breaker to answer by playing on the leaf, or letting Maker score in her next move. Then by Lemma 31 and Lemma 11, Maker can ensure on this position a score at least equal to that of formed by connecting paths to where is the path of length , and, inductively, at least that of .
For the other direction Breaker has a pairing strategy preventing any vertex besides the central vertex to be happy, by pairing the vertices of each path together, which is possible by again pairing adjacent vertices starting from the leaves. The only vertex that is not paired, and thus that can be happy and the end of the game is , which proves . All together, .
4.3 An FPT algorithm for the neighborhood diversity
The parameterized complexity of positional games has recently grown a strong interest and is a promising way to obtain efficient algorithms for games that are usually hard to solve. Bonnet, Gaspers, Lambilliotte, Rümmele and Saffidine, have proved that Maker-Breaker positional games are [1]-hard parameterized by the number of moves, but can be solved in time for the same parameter in several graph classes [6]. However, these general results cannot be used when considering scores, and therefore do not apply directly in our framework. In the scoring positional games universe, the first parameter considered in [3] is the neighborhood diversity, which was introduced by Lampis [18], and measures the variety of the neighborhoods of the vertices in the graph. We propose an -algorithm for this parameter, where is the neighborhood diversity of the input graph. Note that, since the game is already -hard on caterpillars, one cannot hope, under classical complexity assumptions, for an -algorithm for most of the general parameters, such as the pathwidth, the treewidth, the twinwidth, or the feedback edge number.
We first recall that two vertices, and have the same type if . If is a graph, the neighborhood diversity of , denoted is defined as the smallest integer such that the vertices of can be partitioned into sets where all the vertices of each set have the same type. Such a partition is called a neighborhood partition of . Note that it implies that each set is either a clique or an independent set.
The main idea of the reduction is to use Theorem 13 to color all the vertices of same type but at most . However, contrary to the kernelization provided for the game Incidence [3], we cannot here easily remove the claimed vertices, as some of them may require several moves from Maker to contribute to the score. Hence, our algorithm cannot provide us a polynomial kernel, and the question of its existence remains open.
Theorem 33.
Let be a graph of neighborhood diversity . The score in the scoring happy vertex game can be computed in time when parameterized by the neighborhood diversity. In particular, can be computed in time .
Proof.
We first compute a neighborhood partition of , which can be done in time time [18].
Let be two vertices having the same type. By definition, we have . Thus, for any position of the game and any subset , we have:
Therefore, Theorem 13 can be applied to each pair of vertices of the same type.
By applying this lemma to all the pairs of uncolored vertices of same type, the resulting position has at most one vertex of each type that remains uncolored and has the same score as the original instance. We can then explore all possible games on these vertices using dynamic programming. Since the number of uncolored vertices is at most , and each vertex can be in one of three states (uncolored, colored by Maker, or colored by Breaker), this exploration can be performed in time .
Finally, given a position in which all the vertices are colored, computing the score can be done in time. Putting everything together, the overall complexity is .
5 Conclusion
In this paper, we initiated the study of the Maker-Breaker Scoring Happy Vertex Game, which corresponds to a scoring version of the domination game, and we focused on some simple graph classes. Among our considerations, the -hardness proof for caterpillars is related to a question of [4], which proved that the domination game is in when restricted to interval graphs, and asks whether the problem is -complete or not. In the case of the Happy vertex game, the -hardness result for caterpillar makes us wonder whether the game is in or -complete for this class of graphs.
Among the other natural classes of graphs to consider, a natural extension of our results for the neighborhood diversity would be to consider graphs of bounded modularwidth, starting naturally with cographs which have modularwidth and are known to be polynomial-time solvable in the Maker-Breaker Domination game. However, this study is not as simple here, since isolating a single vertex will not end the game: On playing on a union of cographs having each a single universal vertex, a move from Maker will consist in replacing one of these cographs by the union of its component, while a move of Breaker will consist in removing one of the connected component of the graph. This particular behavior makes it difficult to propose strategies.
Counting the number of winning sets claimed by Maker appears as a natural generalization of a Maker-Breaker game which was first introduced in [3]. A natural question, considering instances in which Maker wins, would be to consider other classical positional games on graphs, and to count the number of winning sets she can fill up. The study of the complexity of the other classical positional games on graphs has been studied recently [9], and observing these games with a scoring view seems to be a natural new step in their study. In particular, the study of the -game led to the study of the number of triangles Maker can create [14], and an algorithmic study of this game would be a natural extension of our results.
References
- [1] Akanksha Agrawal. On the parameterized complexity of happy vertex coloring. In International Workshop on Combinatorial Algorithms, pages 103–115. Springer, 2017. doi:10.1007/978-3-319-78825-8_9.
- [2] NR Aravind, Subrahmanyam Kalyanasundaram, and Anjeneya Swami Kare. Linear time algorithms for happy vertex coloring problems for trees. In International Workshop on Combinatorial Algorithms, pages 281–292. Springer, 2016.
- [3] Guillaume Bagan, Quentin Deschamps, Eric Duchêne, Bastien Durain, Brice Effantin, Valentin Gledel, Nacim Oijid, and Aline Parreau. Incidence, a scoring positional game on graphs. Discrete Mathematics, 347(8):113570, 2024.
- [4] Guillaume Bagan, Éric Duchêne, Valentin Gledel, Tuomo Lehtilä, and Aline Parreau. Partition strategies for the maker–breaker domination game. Algorithmica, 87(2):191–222, 2025. doi:10.1007/s00453-024-01280-x.
- [5] Piotr Berman and Marek Karpinski. On some tighter inapproximability results. In Automata, Languages and Programming: 26th International Colloquium, ICALP’99 Prague, Czech Republic, July 11–15, 1999 Proceedings, pages 200–209. Springer, 2002.
- [6] Édouard Bonnet, Serge Gaspers, Antonin Lambilliotte, Stefan Rümmele, and Abdallah Saffidine. The Parameterized Complexity of Positional Games. In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017), volume 80 of Leibniz International Proceedings in Informatics (LIPIcs), pages 90:1–90:14, Dagstuhl, Germany, 2017. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2017.90.
- [7] Pakanun Dokyeesun. Maker-breaker domination game on cartesian products of graphs. Communications in Combinatorics and Optimization, pages –, 2025. doi:10.22049/cco.2025.29866.2198.
- [8] Eric Duchene, Valentin Gledel, Aline Parreau, and Gabriel Renault. Maker–breaker domination game. Discrete Mathematics, 343(9):111955, 2020. doi:10.1016/J.DISC.2020.111955.
- [9] Eric Duchêne, Valentin Gledel, Fionn Mc Inerney, Nicolas Nisse, Nacim Oijid, Aline Parreau, and Miloš Stojaković. Complexity of maker–breaker games on edge sets of graphs. Discrete Applied Mathematics, 361:502–522, 2025. doi:10.1016/j.dam.2024.11.012.
- [10] Eric Duchêne, Nacim Oijid, and Aline Parreau. Bipartite instances of influence. Theoretical Computer Science, 982:114274, 2024. doi:10.1016/j.tcs.2023.114274.
- [11] Hiroshi Eto, Akiko Fujimoto, Hironori Kiya, Ruka Matsushita, Eiji Miyano, Yuto Murao, and Toshiki Saitoh. Happy vertex game. In Proceedings of the International Symposium on Computing and Networking (CANDAR 2025), 2025.
- [12] Florian Galliot. 4-uniform maker-breaker and maker-maker games are pspace-complete, 2025. doi:10.48550/arXiv.2509.13819.
- [13] Florian Galliot, Sylvain Gravier, and Isabelle Sivignon. Maker-breaker is solved in polynomial time on hypergraphs of rank 3, 2025. arXiv:2209.12819.
- [14] Christian Glazik and Anand Srivastav. A new bound for the maker–breaker triangle game. European Journal of Combinatorics, 104:103536, 2022. doi:10.1016/j.ejc.2022.103536.
- [15] Alfred W Hales and Robert I Jewett. Regularity and positional games. In Classic Papers in Combinatorics, pages 320–327. Springer, 2009.
- [16] Olof Hanner. Mean play of sums of positional games. Pacific Journal of Mathematics, 9:81–99, 1959. URL: https://api.semanticscholar.org/CorpusID:120425420.
- [17] Finn Orson Koepke. Solving maker-breaker games on 5-uniform hypergraphs is pspace-complete. arXiv preprint arXiv:2502.20271, 2025. doi:10.48550/arXiv.2502.20271.
- [18] Michael Lampis. Algorithmic meta-theorems for restrictions of treewidth. Algorithmica, 64(1):19–37, 2012. doi:10.1007/s00453-011-9554-x.
- [19] Urban Larsson. Games of No Chance 5, volume 5. Cambridge University Press, 2019.
- [20] Rhyd Lewis, Dhananjay Thiruvady, and Kerri Morgan. Finding happiness: an analysis of the maximum happy vertices problem. Computers & Operations Research, 103:265–276, 2019. doi:10.1016/J.COR.2018.11.015.
- [21] John Milnor. Sums of positional games. Ann. of Math. Stud.(Contributions to the Theory of Games, HW Kuhn and AW Tucker, eds.), Princeton, 2(28):291–301, 1953.
- [22] Nacim Oijid. Complexité des jeux positionnels sur les graphes. PhD thesis, Université Claude Bernard-Lyon I, 2024.
- [23] Nacim Oijid. Bounded degree qbf and positional games. In Irene Finocchi and Loukas Georgiadis, editors, Algorithms and Complexity, pages 121–135, Cham, 2025. Springer Nature Switzerland. doi:10.1007/978-3-031-92935-9_8.
- [24] Md Lutfar Rahman and Thomas Watson. 6-uniform maker-breaker game is pspace-complete. Combinatorica, 43(3):595–612, 2023. doi:10.1007/S00493-023-00026-7.
- [25] 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.
- [26] Larry J. Stockmeyer and Albert R. Meyer. Word problems requiring exponential time (preliminary report). In Proceedings of the fifth annual ACM symposium on Theory of computing, pages 1–9, 1973. doi:10.1145/800125.804029.
- [27] Peng Zhang and Angsheng Li. Algorithmic aspects of homophyly of networks. Theoretical Computer Science, 593:117–131, 2015. doi:10.1016/j.tcs.2015.06.003.
- [28] Peng Zhang, Yao Xu, Tao Jiang, Angsheng Li, Guohui Lin, and Eiji Miyano. Improved approximation algorithms for the maximum happy vertices and edges problems. Algorithmica, 80(5):1412–1438, 2018. doi:10.1007/S00453-017-0302-8.
