Conflict-free coloring games

Paola T. Pantoja1, Rodrigo Chimelli1, Simone Dantas1, Rodrigo Marinho2, Daniel F.D. Posner3
1 IME, Universidade Federal Fluminense, Niterói, RJ, 24210-201, Brazil
2CS-CAC, Federal University of Santa Maria, Cachoeira do Sul, RS, 96503-205, Brazil
3CC-IM, Federal Rural University of Rio de Janeiro, Nova Iguaçu, RJ, 26020-740, Brazil

Abstract

In 2003, the frequency assignment problem in a cellular network motivated Even et al. to introduce a new coloring problem: Conflict-Free coloring. Inspired by this problem and by the Gardner-Bodlaender’s coloring game, in 2020, Chimelli and Dantas introduced the Conflict-Free Closed Neighborhood k-coloring game (CFCN k-coloring game). The game starts with an uncolored graph G, k2 different colors, and two players, Alice and Bob, who alternately color the vertices of G. Both players can start the game and respect the following legal coloring rule: for every vertex v, if the closed neighborhood N[v] of v is fully colored then there exists a color that was used only once in N[v]. Alice wins if she ends up with a Conflict-Free Closed Neighborhood k-coloring of G, otherwise, Bob wins if he prevents it from happening. In this paper, we introduce the game for open neighborhoods, the Conflict-Free Open Neighborhood k-coloring game (CFON k-coloring game), and study both games on graph classes determining the least number of colors needed for Alice to win the game.

Keywords: conflict-free coloring, coloring game, combinatorial games

1. Introduction

We consider undirected, finite and simple graphs G=(V(G), E(G)), where V(G) is the vertex set and E(G) is the edge set of G. We say that vertices u,vV(G) are adjacent if uv is an edge of G. The open neighborhood N(v) of a vertex v is the set of vertices that are adjacent to v, and the closed neighborhood N[v] of vertex v is the union N(v){v}. A vertex k-coloring of a graph G is a function c:V(G){c1,c2,,ck}, where {c1,c2,,ck} represents a set of k different colors.

In 2003, Even et al. [10] introduced the Conflict-Free coloring inspired by the Cellular Network problem: n base stations establish a link via radio frequencies, interference occurs if one particular mobile device establishes a link with two or more base stations that have the same radio frequency. So, every base station must contact a mobile device with a unique radio frequency. A solution for this problem can be obtained by assigning n different frequencies to the n base stations but, since having a lot of different frequencies is expensive, it is important trying to minimize their quantity, in a way that there is no interference.

The Conflict-Free coloring in graphs is obtained by modeling base stations as vertices, interference constraints as edges, and radio frequencies as colors, ensuring that every mobile device (neighborhood) has at least one uniquely colored base station. Therefore, the Conflict-Free coloring of a graph G consists of assigning different colors to the vertices of G such that, for every vertex v, there exists a vertex v in the neighborhood of v, such that the color of v differs from the color of every other vertex in the neighborhood of v.

Formally, given a graph G, a vertex k-coloring is called a Conflict-Free Closed Neighborhood k-coloring (CFCN k-coloring) if for every vertex vV(G), there exists a vertex v in the closed neighborhood N[v] such that c(v)c(w) for all wN[v]{v}. The complexity of these colorings in graphs were studied in [1], and in [13], where the authors prove that the CFCN coloring problem is NP-complete. Moreover, in 2009, Cheilaris considered these colorings not only on graphs, but also on hypergraphs [5], a scenario also studied by Smorodinsky [18] and Cui & Hu [7].

Let G be a graph and SV(G), we say that S is fully colored if each vertex of S has a color assigned to it. A graph G together with a CFCN k-coloring is said to be CFCN k-colored. In Figure 1, we show an example of a graph G with a CFCN 2-coloring.

Figure 1 Graph with a CFCN 2-coloring (where b is blue and r is red)

Another approach to examining this problem is to consider it from the perspective of combinatorial games [2]. Combinatorial games have been studied from different perspectives (see for example impartial games [8], coloring [11,14,16,17,19], domination [4], and labeling [15]).

In 1981, Martin Gardner [12] introduced a combinatorial game, called coloring game, which was studied later by Bodlaender [3]. The game consists of two players, Alice and Bob, who alternately color uncolored vertices of a graph using k colors, such that adjacent vertices have different colors (proper coloring). Alice wins if she obtains a proper k-coloring of the graph; otherwise, Bob wins. Inspired by the coloring game, in 2020, Chimelli and Dantas [6] proposed the combinatorial game called CFCN k-coloring game for complete graphs of small order.

The CFCN k-coloring game is a combinatorial game in which two players, Alice and Bob, alternately color the vertices of a graph as follows. In each turn, a player assigns one of the k colors to one arbitrary vertex v, in such a way that, after it, in every fully colored closed neighborhood to which v belongs, there exists a color that appears exactly once (legal coloring). Thus, for every uV, if N[u] is fully colored, then there exists uN[u] such that c(u)c(w) for all wN[u]{u}. Either Alice or Bob starts the game, they cannot skip turns, they play optimally, and they are constrained to use only legal colorings (moves) in each turn. Alice wins if it is guaranteed that she can obtain a CFCN k-coloring of G, otherwise Bob wins if he prevents it from happening.

We remark that, by play optimally, we mean that the players try to win with the fewest possible turns or, in case of knowing that it is not possible to win the game, delay the opponent’s victory. For example, suppose Alice and Bob play the CFCN 2-coloring game on a star Sn1 graph (complete bipartite K1,n1, with n3). If Alice starts the game, then the best option for her is to color the central vertex (vertex of degree n1) with a color c1. She immediately wins the game because, by the legal coloring rule, in each turn, the vertices of degree one must be colored with a different color c2. Else, if Bob starts the game (see Figure 2) then, to delay Alice’s victory, he colors any vertex other than the central one. So, in the second turn, Alice colors the central vertex and wins.

Figure 2 Example of the CFCN 2-coloring game played on a star S6, where Bob starts (B1), Alice colors the central vertex (A2) and wins (Alice colors with red and Bob with blue).

In the present work, we introduce the Conflict-Free Open Neighborhood k-coloring game (CFON k-coloring game), and contribute to this subject by studying the behavior of both games on some classic graph classes such as stars, complete graphs, paths, cycles.

In order to extend the results on complete graphs, we also analyze the behavior of this coloring on cliques in graphs studying windmill graphs and their generalization. Windmill graphs have been much studied since Erdös, Rényi and Sós [9] (1966) established that the only graphs with the property that every two vertices have exactly one neighbor in common are the friendship graphs, which are members of this larger family called windmill graphs.

The windmill graph W(n,p), n2, p2, is a graph constructed by joining p copies of the complete graph Kn to a unique universal vertex u. We refer to Figure 3 for an example of the CFCN 2-coloring game played on a windmill graph G=W(3,3), where Alice’s turns are A1 and A3, and Bob’s turns are B2 and B4. Alice starts the game, and Bob wins on the fourth turn since all colors are duplicated in the closed neighborhood of vertex u.

Figure 3 Example of the CFCN 2-coloring game played on G=W(3,3), where Alice starts (A1) and Bob wins (Alice colors with red and Bob with blue).

This paper is organized as follows. In Section 2, we introduce the game and show definitions and notation. From Sections 3 to 7, we study the CFCN k-coloring game and the CFON k-coloring game on stars, complete graphs, paths, cycles, and windmill graphs and their generalizations. In each of the studied graph classes, we show strategies that determine the least number of colors necessary so that Alice wins the game. Finally, in Section 8, we present our final remarks.

2. Preliminaries

Let V be a nonempty subset of V. The subgraph H=(V,E) of G whose vertex set is V, and whose edge set E is the set of edges of G that have both incident vertices in V is called the subgraph of G induced by V, and it is denoted by G[V]; we say that G[V] is an induced subgraph of G.

We recall that a vertex k-coloring of a graph G is called a Conflict-Free Closed Neighborhood k-coloring (CFCN k-coloring) if for every vertex vV(G), there exists a vertex u in the closed neighborhood N[v] such that c(u)c(w) for all wN[v]{u}. Similarly a vertex k-coloring is called a Conflict-Free Open Neighborhood k-coloring (CFON k-coloring) if for every vertex vV(G), there exists a vertex u in the open neighborhood N(v) such that c(u)c(w) for all wN(v){u}.

We say that N[v] (resp. N(v)) is fully colored if each vertex of N[v] (resp. N(v)) has a color assigned to it. A graph G together with a CFCN k-coloring (resp. CFON k-coloring) is said to be CFCN k-colored (resp. CFON k-colored). A coloring of a vertex v is said to be a legal coloring of v if, after it, in every fully colored neighborhood in which v belongs, there exists a color that appears exactly once.

Formally, the Closed (resp. Open) Neighborhood Conflict-Free Chromatic Number of G, denoted by χCN(G) (resp. χON(G)), is the minimum number k of colors necessary for G to be CFCN k-colored (resp. CFON k-colored). Now, we are ready to present the rules of the game.

The CFCN k-coloring game (resp. CFON k-coloring game) is a combinatorial game in which two players, Alice and Bob, take turns (alternately) coloring the vertices of a graph as follows. In each turn, a player assigns one of the k colors to one arbitrary vertex v, in such a way that, after it, in every fully colored closed neighborhood in which v belongs, there exists a color that appears exactly once (legal coloring). Thus, for every uV, if N[u] is fully colored, then there exists uN[u] such that c(u)c(w) for all wN[u]{u}. Either Alice or Bob starts the game, they cannot skip turns, they play optimally (as explained in the Introduction section), and they are constrained to use only legal colorings (moves) in each turn. Alice wins if it is guaranteed that she can obtain a CFCN k-coloring (resp. CFON k-coloring) of G, otherwise Bob wins if he prevents it from happening.

We denote by χCNg(G) (resp. χONg(G)), the Closed (resp. Open) Neighborhood Conflict-Free game Chromatic Number of G, that is, the minimum number k of colors necessary for Alice to have a winning strategy for the CFCN (resp. CFON) k-coloring game on G, independent of who starts the game.

Next, we analyze the game on stars, complete graphs, paths, cycles, and windmill graphs and their generalization.

3. Stars

A star graph Sn1 is a tree on n vertices such that one vertex v0 has degree n1 (central vertex) and the other n1 vertices have degree 1.

We consider CFCN k-coloring game and prove that χCNg(Sn1)=2; and we also study the CFON k-coloring game and prove that χONg(Sn1)=n14+1.

Theorem 3.1. Alice wins the CFCN k-coloring game on a Star Sn1 with n>2 vertices and k2 colors, independently of who starts playing.

Proof. If Alice starts the game, then she colors the central vertex v0 with a color c(v0) and wins. Indeed, since N[v]={v0,v} for each vV(Sn1)v0, by the legal coloring rule, no other vertex can be colored with c(v0).

Similarly, if Bob starts the game then, since he plays optimally, he does not color the central vertex in order to delay Alice’s victory. However, in the second turn, Alice colors the central vertex and wins. ◻

Theorem 3.2. Alice wins the CFON k-coloring game played on a star Sn1 with n>2 vertices, when she starts the game, if and only if, k>n24.

Proof. Since N(v0)=V(Sn1){v0} and N(v)=v0 for every vv0, to obtain a CFON k-coloring for Sn1, at least one color must appear exactly once in N(v0). We also remark that the colors chosen for N(v0) (resp. v0) do not affect the decision for the color of the vertex v0 (resp. vertices in N(v0)).

In that case, to prevent a color from appearing only once in N(v0), Bob’s strategy is to duplicate all k colors in N(v0). To delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated.

In addition, Alice starts the game by coloring the central vertex to ensure that duplication of the first two colors in N(v0) takes five turns instead of four (see Figure 4).

Figure 4 CFON k-coloring game on Sn1: if Alice starts (A1) assigning any color to v0, then the first two colors are duplicated in six turns (Alice’s turns Ai, Bob’s turns Bi; B4, B6 are red and B2, A3, A5 are blue).

With the aforementioned strategies, it is immediate to demonstrate that, from the second turn, every 4t+1 turns Alice and Bob have used exactly t+1 colors and each of them has been used at least twice.

Figure 5 CFON k-coloring game on S5: if Alice starts (A1) assigning any color to v0, then, by the legal coloring rule, the last vertex must be colored blue (Alice’s turns Ai, Bob’s turns Bi; B4 is red and B2, A3, A5 are blue).

If |N(v0)|5, then it is clear that two colors are necessary for Alice to win (See Figure 5). If |N(v0)|>5, then there exists tN such that 4t+1<|N(v0)|4(t+1)+1, and since |N(v0)|=n1, we have that 4t+1<n14(t+1)+1.

Suppose that kn24. Thus, we have that kn244(t+1)4=t+1.

Hence, by the time Alice and Bob have colored 4t+1 vertices, they have already used all the k colors at least twice. Furthermore, since 4t+1<|N(v0)|, the graph is not fully colored and Bob wins the game because there exists no available color to use only once.

Reciprocally, if k>n24, since 4t<n24(t+1), then t<n24t+1. Thus, t+1=n24<k. So, kt+2 and, by the legal coloring rule, to duplicate t+2 colors, Bob needs at least 4(t+1)+2 vertices in N(v0). Since |N(v0)|4(t+1)+1, Alice wins the game. ◻

Theorem 3.3. Alice wins the CFON k-coloring game played on a star Sn1 on n>2 vertices, when Bob starts the game, if and only if, k>n14.

Proof. The proof is similar to that of Theorem 3.2 since to prevent a color from appearing only once, Bob’s strategy is to duplicate all k colors in N(v0) and, to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated. If Bob starts the game and colors the central vertex, then he duplicates the first two colors in the next four turns and reduces the number of turns by one to win the game (see Figure 6). If Bob starts the game and colors a vertex in N(v0), then it is the same as what we have in Theorem 3.2. ◻

Figure 6 CFON k-coloring game on a star graph Sn1: Bob starts coloring the central vertex, the first two colors are duplicated in the next four turns ((left) A2, A4 are red and B3, B5 are blue, (right) A2, B5 are red and B3, A4 are blue ).

4. Complete graphs

A complete graph Kn with n vertices is a graph in which every pair of distinct vertices is joined by an edge. In the next results we prove that χCNg(Kn)=n4+1, for n2, and χONg(Kn)=n+74, for n7.

In the context of CFCN coloring of complete graphs, a question arises regarding why Bob cannot simply replicate the color used by Alice in her preceding move. For example, if Alice begins and the graph contains an even number of vertices, this strategy results in an invalid coloring by the legal coloring rule. Moreover, with the strategy presented in the next result, Bob duplicates more colors in fewer turns.

Theorem 4.1. Alice wins the CFCN k-coloring game on a complete graph Kn, n2, when she starts, if and only if k>n4.

Proof. Since N[v]=V(Kn), for every vertex vV(Kn), to obtain a CFCN k-coloring for Kn, we observe that: (i) at least one color must appear only once in V(Kn); and (ii) until coloring the last vertex in Kn no neighborhood is fully colored.

To prevent one color from appearing exactly once, Bob’s strategy is to duplicate all k colors in V(Kn), and to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated. Thus, since Alice starts the game with a color c1 (and chooses this color in her next turn), in the second turn, Bob colors a vertex with a color c2c1, to maximize the number of duplicated colors in the first four turns. Hence, he obtains two duplicated colors in the first four turns, as shown in Figure 7.

Figure 7 Alice and Bob’s first four turns on the CFCN k-coloring game on Kn, assuming that Alice started ((left) A1, A3 are red and B2, B4 are blue, (right) A1, B4 are red and B2, A3 are blue ).

So, for every 4t turns Alice and Bob have used exactly t+1 colors and each of them has been used at least twice.

Suppose that k n4 and n>4. Thus, there exists tN such that 4t<n4(t+1). Therefore, kn44(t+1)4=t+1, and since |V(Kn)|>4t, we have that, by the time Alice and Bob have colored 4t vertices, they have already used all the k colors at least twice, and the graph is not fully colored. Hence, Bob wins the game because there exists no color available to use only once.

Reciprocally, if k>n4, since 4t<n4(t+1), we have that t<n4t+1, and so n4=t+1. Thus, k>n4t+2 and Bob needs at least 4(t+1)+1 vertices to duplicate t+2 colors. Hence, Alice wins since |N(v)|4(t+1)◻

Theorem 4.2. Alice wins the CFCN k-coloring game on a complete graph Kn, n2, when Bob starts, if and only if k > n14.

Proof. The proof is similar to Theorem 4.1 since to prevent one color from appearing only once, Bob’s strategy is to duplicate all k colors in V(Kn) and to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated. In that case, if Bob starts the game, Alice achieves that the first two colors are duplicated in the first five turns, delaying color duplication by one turn (see Figure 8). ◻

Now, we analyze the Conflict-Free Open Neighborhood k-coloring game. We refer to Figure 9 and observe that the two unique ways of CFON k-coloring a complete graph Kn are the following:
(CFON1) all the k colors are chosen exactly twice when coloring all the vertices, or
(CFON2) at least two colors are chosen exactly once.

Figure 8 Alice and Bob’s first five turns on the CFCN k-coloring game on Kn, assuming that Bob started (B3, B5 are red and B1, A2, A4 are blue).
Figure 9 Two ways to obtain a CFON k-coloring of K8: (CFON1) on the left, and (CFON2) right (where b is blue, r is red, g is green and c cyan).

Theorem 4.3. Alice wins the CFON k-coloring game on a complete graph Kn, when she starts, if and only if one of the following statements holds:

  • n=2 and k1;

  • n=4 and k2;

  • n=3,5,6 and k3;

  • n7 and kn+74.

Proof. Since for all vV(Kn) we have that |N(v)|=n1 so, in the first n2 turns, N(v) is not fully colored, for all vV(Kn).

If n is odd, only (CFON2) can be used to obtain a CFON k-coloring of Kn. If n is even, both can be used: (CFON1) requires n2 colors to obtain a CFON k-coloring of Kn, and (CFON2) only 3 colors. In Figure 9, we show a CFON k-coloring game of K8 with k=4 using (CFON1), and k=3 applying (CFON2).

So, if n8, Alice reduces the number of colors needed to win with coloring (CFON2). Since n26, in the first 5 turns, Alice chooses the same color with which she starts the game three times (no neighborhood is fully colored), discarding the possibility of each color appearing only two times to obtain a CFON k-coloring of Kn.

So, in both cases, to prevent a color from appearing only once, Bob’s strategy is to duplicate all k colors in Kn and, to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated.

We recall that, since Alice starts the game with a color c1 (and chooses this color in her next turn), in the second turn, Bob colors a vertex with a color c2c1, to maximize the number of duplicated colors in the first four turns. Hence, he obtains two duplicated colors in the first four turns, With these strategies, for every 4t turns they have used exactly t+1 colors at least twice. Without loss of generality, we assume that Alice starts the game with color c1 and chooses this color in her first n2 turns.

If n7 and k<n+74, then there exists tN such that 4t<n24(t+1), so 4t+2<n4(t+1)+2. Therefore, k<n+744(t+1)+2+74=t+3.

Thus, kt+2 and, since |V(Kn)2|>4t, we have that: (i) by the time Alice and Bob have colored 4t vertices, they have already used all the k1 colors at least twice; (ii) Alice chose color c1 at least three times, and the graph is not fully colored. Hence, Bob wins the game, since there are no two colors that can appear only once in Kn.

Reciprocally, if n7 and kn+74, we study four possible cases:

Case 1. Suppose that n=4t+3 for some tN. In the (4t)-th turn they have used exactly t+1 colors at least twice. Since in the (4t+1)-th turn Alice chooses the color c1, in order to obtain a CFON k-coloring of Kn, in the (4t+2)-th and (4t+3)-th turns, by the legal coloring rule, they use two new colors that have not been chosen. Therefore, Alice wins if kt+3=4t+104=4t+3+74=n+74.

Case 2. Suppose that n=4t+4 for some tN. In the (4t)-th turn they have used exactly t+1 colors at least twice. In the (4t+1)-th turn Alice chooses the color c1. In the (4t+2)-th turn, Bob chooses a new color ct+2 (if there not exist such color, then Bob wins). In the turn (4t+3)-th, Alice chooses the color c1 again. In the (4t+4)-th turn, by the legal coloring rule, Bob is forced to use a new color ct+3 (if such color does not exist, then Bob wins). Thus, Alice wins if kt+3=4t+114=4t+4+74=n+74.

Case 3. If n=4t+5 for some tN then, in the (4t+3)-th turn, Bob and Alice have used t+2 colors such that t+1 colors are used more than twice, and a single color is used only once. If in the (4t+4)-th turn Bob does not use a new color, then Alice does it in the final turn. If Bob uses a new color, then Alice just needs to use color c1 again. In any case, Alice wins if kt+3=4t+124=4t+5+74=n+74.

Case 4. If n=4t+6 for some tN then, in the (4t+4)-th turn, Alice and Bob have used exactly t+2 colors at least twice. By the legal coloring rule, in the (4t+5)-th turn Alice used a new color ct+3 (if there is such color), and Bob is forced to use a color ct+4 never used before (if it exists). Hence, Alice wins if kt+4=4t+144=4t+7+74=n+74. ◻

Theorem 4.4. Alice wins the CFON k-coloring game on a complete graph Kn, when Bob starts, if and only if one of the following statements holds:

(a) n=2 and k1;

(b) n=4 and k2;

(c) n=3,5,6 and k3;

(d) n7 and kn+64.

Proof. The proof is similar to Theorem 4.3 but, in this case, the first two colors are duplicated in the first five turns. ◻

5. Paths

A path Pn=(v0,v1,,vn1) is a graph whose n vertices can be arranged in a linear sequence in such a way that two vertices are adjacent if and only if they are consecutive in the sequence. We call the vertices v1,v2,v3,,vn2 as internal vertices of Pn. In the next results, we prove that χCNg(Pn)=2 and χONg(Pn)={2, if n7,3, if n>7.

Theorem 5.1. Alice wins the CFCN k-coloring game on a path Pn=(v0, v1, ,vn1) on n2 vertices with k2 colors, independently of who starts playing.

Proof. Let Pn be a path with n2 and let c1, c2 and c3 be three different colors. If k=2 then, by the legal coloring rule, the only two strategies for Bob to win is by obtaining, on Alice’s turn, the following colorings for subgraphs of Pn. We refer to Figure 10 for an illustration of Bob’s strategies 1 and 2.
(BS1) coloring a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4), uniquely formed by internal vertices of Pn , such that vertices vi, vi+1 are colored with a color c1; vertices vi+3,vi+4 are colored with a color c2; and the vertex vi+2 is uncolored; or
(BS2) coloring the subgraph P4=(v0,v1,v2,v3) (resp. P4=(vn4,vn3,vn2, vn1)), such that the vertex v0 (resp. vertex vn1) is colored with a color c1, and the vertices v2 and v3 (resp. vertices vn4 and vn3) are colored with a color c2, and vertex v1 (resp. vn2) is uncolored.

Figure 10 Winning strategies for Bob in the CFCN k-coloring game on Pn (where b is blue and r is red).

We prove that, Alice’s strategy is to color any vertex adjacent to the vertex colored by Bob in the previous turn, with a color different from the one that Bob used. In case all the vertices adjacent to the vertex colored by Bob have already been colored, it is enough for Alice to choose any uncolored vertex w adjacent to a colored vertex v, and to color w with a color that is different to the one used in v.

If n=2,3, Alice wins, since the strategies (BS1) and (BS2) need at least four vertices.

For n=4, without loss of generality, we analyze the game when Bob starts coloring v0 or v1. If Bob decides to start the game by coloring v0 with a color c1 then, on the second turn, Alice colors v1 with a color c2. Hence, no P4 subgraph can be colored as in (BS2). On the other hand, if Bob starts the game by coloring the vertex v1 with a color c1 then, on the next turn, Alice either colors the vertex v0 or colors the vertex v2 with a color c2. Again, no P4 subgraph can be colored as in (BS2). In both cases, Alice wins.

For n=5,6, Bob’s unique strategy is to consider subgraphs P4 (BS2). Indeed, strategy (BS1) can not be used because P5 or P6 do not have five internal vertices. Without loss of generality, suppose that Bob tries to win by obtaining a subgraph P4=(v0,v1,v2,v3) (it is analogous for P4=(vn4,vn3,vn2,vn1)). If Bob starts coloring any vertex vi, with 0i2 (resp. v3) then, in the next turn, Alice colors an adjacent vertex (resp. vertex v2) with a different color. Thus, no P4=(v0,v1,v2,v3) subgraph can be colored as in (BS2), and Alice wins.

Let n7. First, suppose that Bob tries to win obtaining a subgraph P5=(vi, vi+1, vi+2, vi+3, vi+4), that has the coloring (BS1). Assume that it is Bob’s turn and he looks for a subgraph P5, that has only vi colored with a color c1 and vi+4 colored with c2. We observe that if any internal vertex vj, with j{i+1,i+2,i+3}, on the subgraph P5 is already colored then, by Alice’s strategy, no P5=(vi, vi+1, vi+2, vi+3, vi+4) subgraph can be colored as in (BS1) (there exist two adjacent vertices of different colors in P5), and Alice wins. Thus, in his turn, Bob tries to color vi+1 or vi+3, with the same color of its adjacent vertex. In the next turn, Alice colors the vertex vi+2 and wins. If Bob tries to win by obtaining a subgraph P4 with the coloring (BS1), the proof that Alice wins is similar to the one used on the paths of order 5 or 6.

It may seem that since Alice wins when Bob starts the game, if she starts and follows the same strategy, then she wins. However, this is not the case. Assume that Bob follows strategy (BS2) and tries to win on the subgraph P4=(v0,v1,v2,v3). If Alice starts coloring vertex v2 with a color c1, then Bob colors v3 with the same color c1. Following her strategy, Alice colors v4 with a different color. Now, Bob colors v0 with color c2, and he wins.

In the same way, if Bob finds a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4) such that vi and vi+1 (resp. vi+3 and vi+4) are colored with the same color c1 and the remaining vertices in P5 are uncolored (possible if Alice starts the game), then he colors vi+4 (resp. vi) with a different color c2. If in the next turn, Alice colors the adjacent vertex to vi+4 (resp. vi) that is not in this subgraph P5, then Bob colors the vertex vi+3 (resp. vi+1) with the color c2, and he wins.

In order to avoid that, Alice starts the game coloring v1 or vn2 of Pn=(v0, v1, , vn1) (preventing Bob from winning in subgraphs P4 or P5). From the third turn onward, she colors the adjacent vertices of those Bob colored (as in the case Bob started the game). Therefore, Alice wins the game with k=2 colors.

If k>2, then Alice colors either vertex vi+2 on subgraph P5; or vertex v1 (or vn2) on subgraph P4 with a color c3, winning the game. ◻

Now, we analyze the CFON k-coloring game on Pn. We show in Figure 11 the unique strategy for Bob to win the CFON k-coloring game in Pn.
(BS3) coloring a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4), such that vertex vi is colored with a color c1 and vertex vi+4 is colored with a color c2, c1c2.

Figure 11 The unique way for Bob to win the CFON k-coloring game in Pn (where b is blue and r is red).

Theorem 5.2. Bob wins the CFON k-coloring game on a path Pn, when Alice starts, if and only if n>7 and k=2.

Proof. Let Pn=(v0,v1,,vn1) be a path with n3, let c1, c2 and c3 be three different colors. If k=2, the only way for Bob to win is considering, on Alice’s turn, a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4), such that the vertex vi is colored with a color c1, and the vertex vi+4 with a color c2. In that case, by the legal coloring rule, vertex vi+2 cannot be colored either with c1, because of N(vi+1); nor with c2, because of N(vi+3).

If n{2,3,4} it is immediate that Alice wins the game. If n=5 then Alice starts coloring the vertex v2, and wins. If n=6 then Alice starts coloring v2 (resp. v3) and, in the third turn, she colors v3 (resp. v2), and wins.

If n=7, then Alice starts coloring the vertex v3. By the legal coloring rule, Bob cannot color vertices v1 and v5 with different colors. Thus, in the next turn, Bob colors vi, i{0,2} (resp. i{4,6}). Alice colors vi+4 (resp. vi4) with the same color that Bob used. Alice wins because it is not possible to apply (BS3) in one of the three subgraphs P5.

If n>7, independently of which vertex vi (resp. vi+4) Alice chooses to color in her first turn, Bob can always find a subgraph P5=(vi,vi+1,vi+2.vi+3,vi+4), and color vi+4 (resp. vi) with a different color.

Now assume k>2. If n{1,2,3} then it is immediate that Alice wins the game. If n4, then Alice colors vertex vi+2 of the subgraphs P5=(vi,vi+1,vi+2.vi+3,vi+4), with a color c3, winning the game. ◻

Theorem 5.3. Bob wins the CFON k-coloring game on a path Pn, when he starts the game, if and only if n>8 and k=2.

Proof. If n{2,3,4} then it is immediate that Alice wins the game. If n=5, then Alice colors vertex v2, and wins. For n{6,7,8}, if Bob starts coloring a vertex vj, then Alice colors either vertex vj4, if j>3; or vertex vj+4, if j<3. In both cases, she prevents Bob to win the game.

If n>8 and k=2 then Bob starts coloring vertex v4 with a color c1. We note that there are two subgraphs P5 such that v4 is either the last or the first vertex. Now, independently of which vertex Alice colors, Bob wins the game.

Now, assume that k>2. If n{1,2,3}, then it is immediate that Alice wins the game. If n>3, then Alice colors the vertex vi+2 of all subgraphs P5 with a color c3, ensuring her victory in the game. ◻

6. Cycles

A cycle Cn=(v0,v1,,vn), with n3 and v0=vn is a graph whose n vertices can be arranged in a cyclic sequence in a way that two vertices are adjacent if and only if they are consecutive in the sequence. Next, we prove that χCNg(Cn)=2 and χONg(Cn)=3.

The approach for cycles follows a similar pattern as with paths. However, Bob’s victory is restricted on applying the strategy (BS1). As previously, Alice adopts a strategy where she colors any vertex adjacent to Bob’s previously colored vertex with a distinct color. In the event that all adjacent vertices to Bob’s colored vertex have already been colored, Alice can ensure her advantage by selecting any uncolored vertex, denoted as w, that is adjacent to a previously colored vertex v, and coloring w with a different color than v.

Theorem 6.1. Alice wins the CFCN k-coloring game on a cycle Cn with k2 colors, independently of who starts playing.

Proof. Let k=2. It is easy to see that Alice wins the game for n{3,4}. Let n=5 and consider that Alice starts the game coloring v0 with color c1. Independently of the vertex colored by Bob in the second turn, Alice colors an uncolored vertex v2 or v3 with color c1.

Let n6. Assuming Bob is the first player, at some point in the game, he attempts to find a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4) in which vi is colored with color c1, vi+4 is colored with c2 (c1c2), and the remaining vertices of P5 are uncolored. Similarly to paths, Alice’s strategy is to color (on the subgraph P5) either vertex vi+2 or the vertices vi+1 (resp. vi+3) with a different color from that used for vi (resp. vi+4).

If Alice starts the game, her strategy has a slight variation. Consider the vertex vi colored by Bob in his last turn as the reference vertex. If there exist two adjacent colored vertices with the same color in the clockwise direction of vi, then Alice colors the vertex vi+1. However, if these two vertices are in the counterclockwise direction, Alice colors the vertex vi1. Otherwise, if there exist no adjacent colored vertices with the same color in either the clockwise or counterclockwise direction, Alice simply colors any of the adjacent vertices.

This variant is used because, if Alice doesn’t have a preference for coloring the adjacent vertex based on the direction of the adjacent colored vertices, it could potentially allow Bob to win the game. Indeed, suppose that Alice starts the game coloring a vertex vi with a color c1. Bob colors a vertex vi+1 with color c1. Now, Alice colors vi+2 with a different color c2. If there exist at least three uncolored vertices {vi1,vi2,vi3} adjacent to vi, then Bob tries (BS1) on the subgraph P5=(vi3,vi2,vi1,vi,vi+1), and colors vi3 with a color c2. With the variant strategy, Alice colors the adjacent vertex vi2 with color c1, and wins the game.

For k>2, the idea is the same as in the Theorem 5.1. Therefore, Alice always wins the game. ◻

Since the results for the game on C3 are addressed by Theorems 4.3 and 4.4, we now consider the CFON k-coloring game on Cn for n4 and k2.

Theorem 6.2. Bob wins the CFON k-coloring game on a cycle Cn, n>4, when Alice starts the game, if and only if k=2.

Proof. Again, the strategy applied to cycles Cn, with n>4, is similar to that of paths. If k=2, then Bob can only win by considering a subgraph P5=(vi, vi+1, vi+2, vi+3, vi+4), where the vertex vi is colored with a color c1 and the vertex vi+4 is colored with a different color c2. The proof follows a similar approach to Theorem 5.2. Regardless of the vertex Alice chooses to color in the first turn, Bob can always find a subgraph P5=(vi,vi+1,vi+2,vi+3,vi+4) where vi is the vertex colored by Alice, and Bob can color vi+4 with another color, winning the game.

Conversely, if k>2, Alice can always color the vertex vi+2 in all subgraphs P5 with a color c3, such that c(vi)c(vi+4)c3. Therefore, she wins the game. ◻

Theorem 6.3. Bob wins the CFON k-coloring game on a cycle Cn, n>4, when he starts the game, if and only if n8 and k=2.

Proof. If n=8 then, whenever Bob colors a vertex vj, Alice colors the vertex vj+4 (mod n) with the same color used by Bob. Let P5=(vi,vi+1,vi+2,vi+3,vi+4) be a subgraph of Cn. If k>2, then Alice can always color the uncolored vertices vi+2 of all subgraphs P5 with a color c3, such that c(vi)c(vi+4)c3. In both cases, Alice wins the game.

Conversely, assume that n8 and k=2. If n=6 and Bob starts coloring the vertex vj, Alice can not color the vertex vj+4 (mod n) (resp. vj+2 (mod n)) with the same color, otherwise, the open neighborhood of vj+5 (mod n) (resp. vj+1 (mod n)) would be monochromatic. Hence, Bob wins the game. In the cases n{6,8}, regardless of which vertex Alice chooses to color in the second turn, Bob can always find, in the third turn, a subgraph P5 that includes either vi or vi+4 as the vertex colored by Alice. ◻

7. Generalized windmill graph

The windmill graph W(n,p) with n2, p2, is composed by the disjoint union of p complete graphs Kn of order n joined with a single vertex u called the universal vertex. We refer to Figure 12 for an example of the windmill graph W(2,p), which is also known as friendship or Dutch windmill graph.

Figure 12 Windmill W(2,p) (friendship graph)

Similarly, a generalized windmill graph W(N,p), with N={n1,n2,,np}, p2, is composed by the disjoint union of p complete graphs Kni of order ni, with ni2, for 1ip, joined with a single universal vertex u. See an example of W({3,2,4,2},4) in Figure 13.

In this section, we study the CFCN k-coloring game on generalized windmill graphs. Let c:V(W(N,p)){c1,c2,ck} be a k-vertex coloring of W(N,p), where {c1,c2,,ck} represents a set of k different colors. Let c1(ci) be the subset of vertices assigned to color ci, i{1,,k} (color class). We observe that in a CFCN k-coloring of W(N,p), one of the following statements holds:

  1. the color of the universal vertex appears only once;

  2. the color of the universal vertex is duplicated but, for every 1ip, at least one color ci appears exactly once in Kni and there exists 1jp such that |c1(cj)|=1.

Figure 13 Generalized windmill W({3,2,4,2},4).

Again, Bob’s strategy is to duplicate each of the k colors that are used and, to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated.

Lemma 7.1. If Alice tries to use as few colors as possible in the CFCN k-coloring game on W(N,p), then Bob can always duplicate the color of the universal vertex u in the first 4 turns.

Proof. We prove this result considering W(2,2), since W(2,2) is a induced subgraph of W(N,p) for any arbitrary windmill graph W(N,p), N2 and p2. We refer to Figures 14 and 15.

If Alice starts the game and colors vertex u with c1, then Bob colors any vertex on W(2,2) with c2. No matter which vertex Alice colors with c1 (resp. c2), in the fourth turn, Bob colors any vertex with c2 (resp. c1). If Alice starts the game and colors a vertex vu with c1 then, in the next turn, Bob colors u with c2. The case is similar if Bob starts the game. In any case, Bob duplicates the first two colors in the first four turns. ◻

Figure 14 Alice starts on the universal vertex, and Bob duplicates the color of the universal vertex of W(2, 2) in the first four turns (Alice colors with red and Bob with blue).
Figure 15 Alice starts at a vertex different from the universal vertex, and Bob duplicates the color of the universal vertex of W(2, 2) in the first four turns (Alice colors with red and Bob with blue).

By Lemma 7.1, we have the following result:

Lemma 7.2. Assume that Alice tries to use as few colors as possible and Bob duplicates the color of the universal vertex in the CFCN k-coloring game on W(N,p). If there exist at least two uncolored vertices in W(N,p), then Bob always duplicates a color that appeared only once.

Proof. Without loss of generality, assume that there are only two uncolored vertices w and w, and that c(vi) appears only once. By Lemma 7.1, since the color of the universal vertex u is duplicated in the first four turns, then viKni and wwu.

If w,wV(Knj) (Knj is not fully colored), then one of them can be colored with c(vi). However, if they are in different Knj, then it is sufficient to color with c(vi) the uncolored vertex in Knj with ij◻

To ensure that both players play optimally, we also need to verify the following result:

Lemma 7.3. Assume that Bob duplicates the color of the universal vertex in the CFCN k-coloring game on W(N,p). If there exist at least two uncolored vertices in W(N,p), then Alice always chooses either the same color or any of the colors that have already been chosen at least twice.

Proof. Without loss of generality, we assume that there are only two uncolored vertices. Furthermore, suppose that it is Alice’s turn, she has chosen the same color c1 in all previous turns, and, due to the legal coloring rule, she is now forced to select a new color. We claim that Alice chooses a duplicated color. If the two uncolored vertices are on the same Kni, then one of them can be colored with c1 (Kni is not fully colored), a contradiction. Thus, one uncolored vertex is in Kni and the other one is in Knj, 1i,jp, ij. If color c1 cannot be chosen, by the legal coloring rule, either c1 appears only once and the remaining colors appear at least twice in Kni, or every color appears at least twice in Kni. In any case, since Bob chooses a new color every time he achieves a color duplication, we have that the colors duplicated in some Kni are not duplicated in another Knj, for 1i,jp, ij. So, there always exists a duplicated color in Kni (resp. Knj) that can be chosen by Alice in Knj (resp. Kni). ◻

The next two results show that χCNg(W(N,p))=|V(W(N,p))|+44.

Theorem 7.4. Alice wins the CFCN k-coloring game on a generalized windmill graph W(N,p), when she starts, if and only if k>|V(W(N,p))|4.

In particular, since |V(W(n,p))|=np+1, she wins the CFCN k-coloring game on a windmill graph W(n,p), when she starts, if and only if k>np+14.

Proof. By Lemmas 7.2 and 7.3, before coloring the last vertex, for every 4t turns Alice and Bob have used exactly t+1 colors, and each of them has been used at least twice (the proof is by induction on t).

Since |W(N,p)|>4, there exists tN such that 4t<|W(N,p)|4(t+1). If k |W(N,p)|4, then

k|W(N,p)|44(t+1)4=t+1, and we have that by the time Alice and Bob have colored 4t vertices, they have already used all the k colors at least twice. Furthermore, since 4t<|W(N,p)|, the graph is not fully colored. Hence, Bob wins the game because there exists no color available to use only once.

Reciprocally, if k>|W(N,p)|4, since 4t<|W(N,p)|4(t+1), then t<|W(N,p)|4t+1. Thus, t+1=|W(N,p)|4<k. So, kt+2 and, to duplicate t+2 colors, Bob needs at least 4(t+1)+1 vertices. Since |W(N,p)|4(t+1), Alice wins the game. ◻

Now we show that, when Bob starts the CFCN k-coloring game on a generalized windmill graph W(N,p), Alice requires one fewer color to win.

Theorem 7.5.

Alice wins the CFCN k-coloring game on a generalized windmill graph W(N,p), when Bob starts, if and only if k>|W(N,p)|14.

In particular, since |V(W(n,p))|=np+1, she wins the CFCN k-coloring game on a windmill graph W(n,p), when Bob starts, if and only if k>np4.

Proof. The proof is similar to Theorem 7.4. Again, to prevent one color from appearing only once, Bob’s strategy is to duplicate all k colors in W(N,p), and to delay this duplication, Alice chooses as few colors as possible using colors that have already been duplicated. If Bob starts the game, then the first two colors are duplicated in the first five turns, delaying color duplication by one turn. ◻

8. Conclusion

In this work, we study the Conflict-Free k-coloring games on classic graph classes such as stars, complete graphs, paths, cycles, and windmill graphs and their generalization. In each of them, we show strategies that determine the least number of colors necessary for Alice to win the game.

We recall that the Closed (resp. Open) Neighborhood Conflict-Free game Chromatic Number of G, denoted by χCNg(G) (resp. χONg(G)), is the minimum number k of colors necessary for Alice to have a winning strategy for the CFCN (resp. CFON) k-coloring game on G, independently of who starts the game.

Table 1 Conflict-free k-coloring game
Graph χCN(G) χCNg(G) χON(G) χONg(G) Theorems
[0.5em]
[-0.7em] Sn1 2 2 2 n14+1 3.1,3.2,3.3
[0.4em]K2 1 1 1 1 4.1,4.2,4.3,4.4
K4 2 2 2 2 4.1,4.2,4.3,4.4
K3, K5, K6 3 3 3 3 4.1,4.2,4.3,4.4
Kn (n7) 2 n4+1 3 n+74 4.1,4.2,4.3,4.4
Pn (n7) 2 2 2 2 5.1,5.2,5.3
Pn (n>7) 2 2 2 3 5.1,5.2,5.3
Cn 2 2 2 3 6.1,6.2,6.3
W(N,p) 2 |V(W(N,p))|+49 7.4,7.5

In Table 1, we show our results on the Conflict-free k-coloring game comparing χCN(G), χCNg(G), χON(G) and χONg(G). We remark that it may seem that if Alice wins when Bob starts the game, then she also wins when she starts the game. However, this is not always true. In fact, since Alice’s general strategies are based on preventing Bob from achieving his general strategies, when Alice starts, her turn can eventually contribute to improve Bob’s strategy to win the game. For example, in the CFCN 2-coloring game on the complete graph K5, Alice wins when Bob starts the game, and loses when she starts the game (see Theorem 4.1 and Theorem 4.2). Sometimes it is possible to prevent that by improving Alice’s strategies, as it occurs in the CFCN 2-coloring game on paths Pn and cycles Cn with n5, (see Theorem 5.1 and Theorem 6.1).

Finally, the general strategies lead us to pose the following question:

Question 8.1(Monotonicity).Assume that Alice wins the CFCN k-coloring game (resp. CFON k-coloring game) on G. Does she win the CFCN (resp. CFON) (k+1)-coloring game on G when the same player starts the game?

Author Contributions

All authors contributed equally to the research, analysis, and writing of this paper.

Acknowledgments

This work was partially supported by the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brasil (CAPES) – Finance Code 001; the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) 311260/2021-7, 313797/2020-0; and the Fundação Carlos Chagas Filho de Amparo à Pesquisa do Estado do Rio de Janeiro (FAPERJ) Processo SEI-260003/014835/2023, E-26/210.649/2023.

Conflicts of Interest

All authors declare that they have no conflicts of interest.

Declaration of competing interest

There is no conflict of interest related to this work.

References:

  1. Z. Abel, V. Alvarez, E. D. Demaine, S. P. Fekete, A. Gour, A. Esterberg, P. Keldenich, and C. Scheffer. Conflict-free coloring of graphs. SIAM Journal on Discrete Mathematics, 32(4):2675–2702, 2018.
  2. E. R. Berlekamp, J. H. Conway, and R. K. Guy. Winning Ways for Your Mathematical Plays, volume 1. Academic Press, 2001.
  3. H. Bodlaender. On the complexity of some coloring games. In Graph-Theoretic Concepts in Computer Science. Volume 484, Lecture Notes in Computer Science, pages 30–40, 1991.
  4. C. Bujtás. On the game total domination number. Graphs and Combinatorics, 34:415–425, 2018. https://doi.org/10.1007/s00373-018-1883-y.
  5. P. Cheilaris. Conflict-Free Coloring. PhD thesis, City University of New York, 2009.
  6. R. Chimelli and S. Dantas. Conflict free closed neighborhood coloring game. In 9th Latin American Workshop on Cliques in Graphs, pages 10–10, Niterói, Brazil, 2020.
  7. Z. Cui and Z. C. Hu. On variants of conflict-free-coloring for hypergraphs. Discrete Applied Mathematics, 220:46–54, 2017. https://doi.org/10.1016/j.dam.2016.12.018.
  1. E. Duchêne, S. Gravier, and M. Mhalla. Combinatorial graph games. Ars Combinatoria, 90:33–44, 2009.
  2. P. Erdős, A. Rényi, and V. Sós. On a problem of graph theory. Studia Scientiarum Mathematicarum Hungarica, 1:215–235, 1966.
  3. G. Even, Z. Lotker, D. Ron, and S. Smorodinsky. Conflict-free colorings of simple geometric regions with applications to frequency assignment in cellular networks. SIAM Journal on Computing, 33:94–136, 2003.
  4. U. Faigle, U. Kern, H. Kierstead, and W. T. Trotter. On the game chromatic number of some classes of graphs. Ars Combinatoria, 35:143–150, 1993.
  5. M. Gardner. Mathematical games. Scientific American, 23:18–23, 1981.
  6. L. Gargano and A. A. Rescigno. Complexity of conflict-free colorings of graphs. Theoretical Computer Science, 566:39–49, 2015. https://doi.org/10.1016/j.tcs.2014.11.029.
  7. H. A. Kierstead. Asymmetric graph coloring games. Journal of Graph Theory, 48(3):169–185, 2005. https://doi.org/10.1002/jgt.20049.
  8. E. Krop, A. Mittal, and M. C. Wigal. The cordiality game and the game cordiality number. Graphs and Combinatorics, 40:75, 2024. https://doi.org/10.1007/s00373-024-02798-1.
  9. P. C. B. Lam, W. C. Shiu, and B. G. Xu. Edge game-coloring of graphs. Graph Theory Notes N. Y., 37:17–19, 1999.
  10. K. M. Nakprasit and K. Nakprasit. The game coloring number of planar graphs with a specific girth. Graphs and Combinatorics, 34:349–354, 2018. https://doi.org/10.1007/s00373-018-1877-9.
  1. S. Smorodinsky. Conflict-free coloring and its applications. In I. Bárány, K. J. Böröczky, G. Tóth, and J. Pach, editors, Geometry–Intuitive, Discrete, and Convex, pages 331–389. Springer, Berlin, Heidelberg, 2013.
  2. R. Wang. A biased edge coloring game. Discrete Applied Mathematics, 366:193–200, 2025. https://doi.org/10.1016/j.dam.2025.01.028.