Acyclic, Star and Injective Colouring: A Complexity Picture for H-Free Graphs
Jan Bok, Nikola Jedlickova, Barnaby Martin, Pascal Ochem, Daniel Paulusma, Siani Smith
AAcyclic, Star and Injective Colouring:A Complexity Picture for H -Free Graphs Jan Bok
Computer Science Institute, Charles University, Prague, Czech [email protected]ff.cuni.cz
Nikola Jedli˘cková
Department of Applied Mathematics, Charles University, Prague, Czech [email protected]ff.cuni.cz
Barnaby Martin
Department of Computer Science, Durham University, Durham, United [email protected]
Daniël Paulusma
Department of Computer Science, Durham University, Durham United [email protected]
Siani Smith
Department of Computer Science, Durham University, Durham, United [email protected]
Abstract A k -colouring c of a graph G is a mapping V ( G ) → { , , . . . k } such that c ( u ) = c ( v ) whenever u and v are adjacent. The corresponding decision problem is Colouring . A colouring is acyclic, star,or injective if any two colour classes induce a forest, star forest or disjoint union of vertices andedges, respectively. Hence, every injective colouring is a star colouring and every star colouring is anacyclic colouring. The corresponding decision problems are
Acyclic Colouring , Star Colouring and
Injective Colouring (the last problem is also known as L (1 , -Labelling ).A classical complexity result on Colouring is a well-known dichotomy for H -free graphs, whichwas established twenty years ago (in this context, a graph is H -free if and only if it does not contain H as an induced subgraph). Moreover, this result has led to a large collection of results, whichhelped us to better understand the complexity of Colouring . In contrast, there is no systematicstudy into the computational complexity of
Acyclic Colouring , Star Colouring and
InjectiveColouring despite numerous algorithmic and structural results that have appeared over the years.We initiate such a systematic complexity study, and similar to the study of
Colouring we usethe class of H -free graphs as a testbed. We prove the following results:1. We give almost complete classifications for the computational complexity of Acyclic Colouring , Star Colouring and
Injective Colouring for H -free graphs.2. If the number of colours k is fixed, that is, not part of the input, we give full complexityclassifications for each of the three problems for H -free graphs.From our study we conclude that for fixed k the three problems behave in the same way, but this isno longer true if k is part of the input. To obtain several of our results we prove stronger complexityresults that in particular involve the girth of a graph and the class of line graphs. Mathematics of computing → Graph theory
Keywords and phrases acyclic colouring, star colouring, injective colouring, H -free, dichotomy Funding
Jan Bok : Supported by GAUK 1198419 and SVV–2020–260578.
Nikola Jedli˘cková : Supported by GAUK 1198419 and SVV–2020–260578.
Daniël Paulusma : Supported by the Leverhulme Trust (RPG-2016-258). a r X i v : . [ c s . D M ] A ug Acyclic Colouring, Star Colouring and Injective Colouring for H -Free Graphs We study the complexity of three classical colouring problems. We do this by focusing on hereditary graph classes, i.e., classes closed under vertex deletion, or equivalently, classescharacterized by a (possibly infinite) set F of forbidden induced subgraphs. As evidenced bynumerous complexity studies in the literature, even the case where |F| = 1 captures a richfamily of graph classes suitably interesting to develop general methodology. Hence, we usuallyfirst set F = { H } and consider the class of H -free graphs, i.e., graphs that do not contain H as an induced subgraph. We then investigate how the complexity of a problem restricted to H -free graphs depends on the choice of H and try to obtain a complexity dichotomy .To give a well-known and relevant example, the Colouring problem is to decide, givena graph G and integer k ≥
1, if G has a k -colouring , i.e., a mapping c : V ( G ) → { , . . . , k } such that c ( u ) = c ( v ) for every two adjacent vertices u and v . Král’ et al. [39] provedthat Colouring on H -free graphs is polynomial-time solvable if H is an induced subgraphof P or P + P and NP -complete otherwise. Here, P n denotes the n -vertex path and G + G = ( V ( G ) ∪ V ( G ) , E ( G ) ∪ E ( G )) the disjoint union of two vertex-disjoint graphs G and G . If k is fixed (not part of the input), then we obtain the k -Colouring problem.No complexity dichotomy is known for k - Colouring if k ≥
3. In particular, the complexitiesof 3-
Colouring for P t -free graphs for t ≥ k - Colouring for sP -free graphs for s ≥ k ≥ sG for the disjoint union of s copies of G . We referto the survey of Golovach et al. [28] for further details and to [14, 38] for updated summaries.For a colouring c of a graph G , a colour class consists of all vertices of G that are mappedby c to a specific colour i . We consider the following special graph colourings. A colouring ofa graph G is acyclic if the union of any two colour classes induces a forest. The ( r + 1)-vertex star K ,r is the graph with vertices u, v , . . . , v r and edges uv i for every i ∈ { , . . . , r } . Anacyclic colouring is a star colouring if the union of any two colour classes induces a starforest , that is, a forest in which each connected component is a star. A star colouring is injective (or an L (1 , -labelling ) if the union of any two colour classes induces an sP + tP for some integers s ≥ t ≥
0. An alternative definition is to say that all the neighboursof every vertex of G are uniquely coloured. These definitions lead to the following threedecision problems: Acyclic Colouring
Instance:
A graph G and an integer k ≥ Question:
Does G have an acyclic k -colouring? Star Colouring
Instance:
A graph G and an integer k ≥ Question:
Does G have a star k -colouring? Injective Colouring
Instance:
A graph G and an integer k ≥ Question:
Does G have an injective k -colouring? If k is fixed, we write Acyclic k -Colouring , Star k -Colouring and Injective k -Colouring , respectively.All three problems have been extensively studied. We note that in the literature onthe Injective Colouring problem it is often assumed that two adjacent vertices may becoloured alike by an injective colouring (see, for example, [30, 31, 35]). However, in our . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 3 paper, we do not allow this; as reflected in their definitions we only consider colourings thatare proper. This enables us to compare the results for the three different kinds of colouringswith each other.So far, systematic studies mainly focused on structural characterizations, exact values,lower and upper bounds on the minimum number of colours in an acyclic colouring orstar colouring (i.e., the acyclic and star chromatic number ); see, e.g., [2, 10, 20, 21, 22, 36,37, 51, 52, 54], to name just a few papers, whereas injective colourings (and the injectivechromatic number ) were mainly considered in the context of the distance constrained labellingframework (see the survey [12] and Section 6 therein). The problems have also been studiedfrom a complexity perspective, but apart from a study on
Acyclic Colouring for graphsof bounded maximum degree [47], known results are scattered and relatively sparse. Weperform a systematic and comparative complexity study by focusing on the following researchquestion both for k part of the input and for fixed k : What are the computational complexities of
Acyclic Colouring , Star Colouring and
Injective Colouring for H -free graphs? Before discussing our new results and techniques, we first briefly discuss some known results.Coleman and Cai [15] proved that for every k ≥ Acyclic k -Colouring is NP -completefor bipartite graphs. Afterwards, a number of hardness results appeared for other hereditarygraph classes. Alon and Zaks [3] showed that Acyclic -Colouring is NP -complete for linegraphs of maximum degree 4. Angelini and Frati [4] showed that Acyclic -Colouring is NP -complete for planar graphs of maximum degree 4. Mondal et al. [47] proved that Acyclic -Colouring is NP -complete for graphs of maximum degree 5 and for planargraphs of maximum degree 7. Albertson et al. [1] and recently, Lei et al. [40] proved that Star -Colouring is NP -complete for planar bipartite graphs and line graphs, respectively.Bodlaender et al. [7], Sen and Huson [49] and Lloyd and Ramanathan [43] proved that Injective Colouring is NP -complete for split graphs, unit disk graphs and planar graphs,respectively. Mahdian [46] proved that for every k ≥ Injective k -Colouring is NP -complete for line graphs, whereas Injective -Colouring is known to be NP -complete forcubic graphs (see [12]); observe that Injective -Colouring is trivial for general graphs.On the positive side, Lyons [45] showed that every acyclic colouring of a P -free graphis, in fact, a star colouring. Lyons [45] also proved that Acyclic Colouring and
StarColouring are polynomial-time solvable for P -free graphs; we note that InjectiveColouring is trivial for P -free graphs, as every injective colouring must assign each vertexof a connected P -free graph a unique colour. The results of Lyons have been extended to P -tidy graphs and ( q, q − Acyclic Colouring is polynomial-time solvablefor claw-free graphs of maximum degree at most 3. Calamoneri [12] observed that
InjectiveColouring is polynomial-time solvable for comparability and co-comparability graphs.Zhou et al. [53] proved that
Injective Colouring is polynomial-time solvable for graphsof bounded treewidth (which is best possible due to the W[1]-hardness result of Fiala etal. [23]).
Our Complexity Results and Methodology
The girth of a graph G is the length of a shortest cycle of G (if G is a forest, then its girthis ∞ ). To answer our research question we focus on two important graph classes, namelythe classes of graphs of high girth and line graphs, which are interesting classes on theirown. If a problem is NP -complete for both classes, then it is NP -complete for H -free graphs Acyclic Colouring, Star Colouring and Injective Colouring for H -Free Graphs whenever H has a cycle or a claw. It then remains to analyze the case when H is a linearforest , i.e., a disjoint union of paths; see [9, 11, 26, 39] for examples of this approach, whichwe discuss in detail below.The construction of graph families of high girth and large chromatic number is wellstudied in graph theory (see, e.g. [19]). To prove their complexity dichotomy for Colouring on H -free graphs, Král’ et al. [39] first showed that for every integer g ≥
3, 3 -Colouring is NP -complete for the class of graphs of girth at least g . This approach can be readily extendedto any integer k ≥ k -colourable if and only if the original graph is so (see also [29, 33]).By a more intricate use of the above technique we are able to prove that for every g ≥ Acyclic k -Colouring is NP -complete for the class of graphs of girth at least g , for each k ≥
3. This implies that
Acyclic k -Colouring is NP -complete for H -free graphs whenever H has a cycle. For Star -Colouring we are also able to prove that the problem remains NP -complete, for the class of graphs of girth at least g , for each g ≥
3. This implies that
Star -Colouring is NP -complete for H -free graphs whenever H has a cycle. We provethe same result for every k ≥ Injective k -Colouring ( k ≥
4) is NP -complete for H -free graphs if H has acycle.A classical result of Holyer [32] is that 3 -Colouring is NP -complete for line graphs(and Leven and Galil [41] proved the same for k ≥ -Colouring is NP -complete for H -free graphswhenever H has an induced claw. For Acyclic -Colouring , this follows from Alon andZaks’ result [3], which we extend to work for k ≥
4. For
Injective k -Colouring ( k ≥ H is a linear forest. InSection 2 we will use a result of Atminas et al. [5] to prove a general result from which itfollows that for fixed k , all three problems are polynomial-time solvable for H -free graphs if H is a linear forest. Hence, we have full complexity dichotomies for the three problems when k is fixed. However, these positive results do not extend to the case where k is part of theinput: we prove NP -completeness for graphs that are P r -free for some small value of r orhave a small independence number, i.e., that are sP -free for some small integer s .Our complexity results for H -free graphs are summarized in the following three theorems,proven in Sections 3–5, respectively; see Table 1 for a comparison. For two graphs F and G ,we write F ⊆ i G or G ⊇ i F to denote that F is an induced subgraph of G . (cid:73) Theorem 1.
Let H be a graph. For the class of H -free graphs it holds that:(i) Acyclic Colouring is polynomial-time solvable if H ⊆ i P and NP -complete if H isnot a forest or H ⊇ i P , P or P ;(ii) For every k ≥ , Acyclic k -Colouring is polynomial-time solvable if H is a linearforest and NP -complete otherwise. (cid:73) Theorem 2.
Let H be a graph. For the class of H -free graphs it holds that:(i) Star Colouring is polynomial-time solvable if H ⊆ i P and NP -complete for any H = 2 P .(ii) For every k ≥ , Star k -Colouring is polynomial-time solvable if H is a linear forestand NP -complete otherwise. (cid:73) Theorem 3.
Let H be a graph. For the class of H -free graphs it holds that: . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 5 polynomial time NP-complete Colouring [39] H ⊆ i P or P + P else Acyclic Colouring H ⊆ i P else except for at most 1991 open cases Star Colouring H ⊆ i P else except for 1 open case Injective Colouring H ⊆ i P or P + P else except for 5 open cases k -Colouring (see [14, 28, 38]) depends on k infinitely many open cases for all k ≥ Acyclic k -Colouring ( k ≥ ) H is a linear forest else Star k -Colouring ( k ≥ H is a linear forest else Injective k -Colouring ( k ≥ H is a linear forest else Table 1
The state-of-the-art for the three problems in this paper and the original
Colouring problem; both when k is fixed and when k is part of the input. (i) Injective Colouring is polynomial-time solvable if H ⊆ i P or H ⊆ i P + P or H ⊆ i P + P and NP -complete if H is not a forest or P ⊆ i H or P ⊆ i H .(ii) For every k ≥ , Injective k -Colouring is polynomial-time solvable if H is a linearforest and NP -complete otherwise. In Section 6 we give a number of open problems that resulted from our systematic study; inparticular we will discuss the distance constrained labelling framework in more detail. A biclique or complete bipartite graph is a bipartite graph on vertex set S ∪ T , such that S and T are independent sets and there is an edge between every vertex of S and everyvertex of T ; if | S | = s and | T | = t , we denote this graph by K s,t , and if s = t , the biclique is balanced and of order s . We say that a colouring c of a graph G satisfies the balance bicliquecondition (BB-condition) if c uses at least k + 1 colours to colour G , where k is the order ofa largest biclique that is contained in G as a (not necessarily induced) subgraph.Let π be some colouring property; e.g., π could mean being acyclic, star or injective.Then π can be expressed in MSO (monadic second-order logic with edge sets) if for every k ≥
1, the graph property of having a k -colouring with property π can be expressed in MSO .The general problem Colouring ( π ) is to decide, on a graph G and integer k ≥
1, if G has a k -colouring with property π . If k is fixed, we write k -Colouring( π ) . We now prove thefollowing result. (cid:73) Theorem 4.
Let H be a linear forest, and let π be a colouring property that can be expressedin MSO , such that every colouring with property π satisfies the BB-condition. Then, forevery integer k ≥ , k - Colouring( π ) is linear-time solvable for H -free graphs. Proof.
Atminas, Lozin and Razgon [5] proved that that for every pair of integers ‘ and k ,there exists a constant b ( ‘, k ) such that every graph of treewidth at least b ( ‘, k ) contains aninduced P ‘ or a (not necessarily induced) biclique K k,k . Let G be an H -free graph, and let ‘ be the smallest integer such that H ⊆ i P ‘ ; observe that ‘ is a constant. Hence, we can useBodlaender’s algorithm [6] to test in linear time if G has treewidth at most b ( ‘, k ) − G is at most b ( ‘, k ) −
1. As π can be expressed inMSO , the result of Courcelle [16] allows us to test in linear time whether G has a k -colouring Acyclic Colouring, Star Colouring and Injective Colouring for H -Free Graphs with property π . Now suppose that the treewidth of G is at least b ( ‘, k ). As G is H -free, G is P ‘ -free. Then, by the result of Atminas, Lozin and Razgon [5], we find that G contains K k,k as a subgraph. As π satisfies the BB-condition, G has no k -colouring with property π . (cid:74) We now apply Theorem 4 to obtain the polynomial cases for fixed k in Theorem 1–3. (cid:73) Corollary 5.
Let H be a linear forest. For every k ≥ , Acyclic k -Colouring , Star k -Colouring and Injective k -Colouring are polynomial-time solvable for H -free graphs. Proof.
All three kinds of colourings use at least s colours to colour K s,s (as the verticesfrom one bipartition class of K s,s must receive unique colours). Hence, every acyclic, starand injective colouring of every graph satisfies the BB-condition. Moreover, it is readily seenthat the colouring properties of being acyclic, star or injective can all be expressed in MSO .Hence, we may apply Theorem 4. (cid:74) In this section, we prove Theorem 1. For a graph G and a colouring c , the pair ( G, c ) has a bichromatic cycle C if C is a cycle of G with | c ( V ( C ) | = 2, i.e., the vertices of C are colouredby two alternating colours (so C is even). A path P in G is an i - j -path if the vertices of P have alternating colours i and j . We now prove the following result. (cid:73) Lemma 6.
For every g ≥ , Acyclic k -Colouring is NP -complete for graphs of girthat least g . Proof.
We reduce from
Acyclic k -Colouring , which is known to be NP -complete [15].We start by taking a graph F that has a ( k + 1)-colouring but no k -colouring and that isof girth at least g . By a seminal result of Erdős [19], such a graph F exists (and its sizeis constant, as it only depends on g which is a fixed integer). We now repeatedly removeedges from F until we obtain a graph F that is acyclically k -colourable. Let xy be thelast edge that we removed. As F has no k -colouring, the edge xy exists. Moreover, by ourconstruction, the graph F + xy is not acyclically k -colourable. As edge deletions do notdecrease the girth, F + xy and F have girth at least g .The basic idea (Case 1) is as follows. Let G be an instance of Acyclic k -Colouring .We pick an edge uv ∈ E ( G ). In G − uv we “glue” F by identifying u with x and y with v ;see also Figure 1. We then prove that G has an acyclic k -colouring if and only if G has anacyclic k -colouring. Then, by performing the same operation for each other edge of G as well,we obtain a graph G , such that G has an acyclic k -colouring if and only if G has so. Asthe size of G is polynomial in the size of G and the girth of G is at least g , we have proventhe theorem. The challenge in this technique is that we do not know how the graph F looks.We can only prove its existence and therefore have to consider several possibilities for theproperties of the acyclic k -colourings of F . Hence, we distinguish between Cases 1–3, 4a,and 4b. Case 1:
Every acyclic k -colouring of F assigns different colours to x and y . We construct the graph G as described above and in Figure 1. We claim that G is ayes-instance of Acyclic k -Colouring if and only if G is a yes-instance of Acyclic k -Colouring .First suppose that G has an acyclic k -colouring c . Let c ∗ be an acyclic k -colouring of F .We may assume without loss of generality that c ( u ) = c ∗ ( x ) and c ( v ) = c ∗ ( y ). Hence, wecan define a vertex colouring c of G with c ( w ) = c ( w ) if w ∈ V ( G ) and c ( w ) = c ∗ ( w ) if . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 7 u = xv = y G − uv F (cid:48) Figure 1
The graph G from Case 1. w ∈ V ( F ). As c and c ∗ are k -colourings of G and F , respectively, c is a k -colouring of G .We claim that c is acyclic. For contradiction, assume that ( G , c ) has a bichromatic cycle C .If all edges of C are in G or all edges of C are in F , then ( G, c ) or ( F , c ∗ ) has a bichromaticcycle, which is not possible as c and c ∗ are acyclic. Hence, at least one edge of C belongs to G and at least one edge of C belongs to F . This means that C contains both u = x and v = y . Recall that G contains the edge uv . Consequently, ( G, c ) has a bichromatic cycle,namely the cycle induced by V ( C ) ∩ V ( G ), a contradiction.Now suppose that G has an acyclic k -colouring c . Let c and c ∗ be the restrictions of c to V ( G ) and V ( F ), respectively. Then c and c ∗ are acyclic k -colourings of G − uv and F , respectively. By our assumption and because c ∗ is an acyclic k -colouring of F , we findthat c ∗ ( x ) = c ∗ ( y ), or equivalently, c ( u ) = c ( v ). This means that c is also a k -colouring of G and c ∗ is also a k -colouring of F + xy . We claim that c is acyclic on G . For contradiction,assume that ( G, c ) has a bichromatic cycle C . As c is an acyclic k -colouring of G − uv , wededuce that C must contain the edge uv = xy . As F + xy has no acyclic k -colouring byconstruction and c ∗ is a k -colouring of F + xy , we find that ( F + xy, c ∗ ) has a bichromaticcycle D . As c ∗ is an acyclic k -colouring of F , this means that D contains the edge xy = uv .However, then ( G , c ) has a bichromatic cycle, namely the cycle induced by V ( C ) ∪ V ( D ), acontradiction.Let F ∗ be the graph obtained from F by adding a new vertex x and edges xx and x y . As F + xy has girth at least g , we find that F ∗ and F ∗ − x y have girth at least g . As x hasdegree 1 in F ∗ − x y and F has an acyclic k -colouring, F ∗ − x y has an acyclic k -colouring. u = x (cid:48) v = y G − uv F (cid:48) x Figure 2
The graph G from Case 2. Case 2:
All acyclic k -colourings of F assign the same colour to x and y and F ∗ has noacyclic k -colouring. In this case we let G be the graph obtained from G − uv and F ∗ − x y by identifying u with x and v with y ; see also Figure 2. We claim that G is a yes-instance of Acyclic k -Colouring if and only if G is a yes-instance of Acyclic k -Colouring . Acyclic Colouring, Star Colouring and Injective Colouring for H -Free Graphs First suppose that G has an acyclic k -colouring c . Let c ∗ be an acyclic k -colouringof F ∗ − x y . Then the restriction of c ∗ to F is an acyclic k -colouring of F . By ourassumption, it holds therefore that c ∗ ( x ) = c ∗ ( y ) and thus c ∗ ( x ) = c ∗ ( y ). We may assumewithout loss of generality that c ( u ) = c ∗ ( x ) and c ( v ) = c ∗ ( y ). Hence, we can define a vertexlabelling c of G with c ( w ) = c ( w ) if w ∈ V ( G ) and c ( w ) = c ∗ ( w ) if w ∈ V ( F ∗ ). As c and c ∗ are k -colourings of G and F ∗ − x y , respectively, c is a k -colouring of G . We claim that c is acyclic. For contradiction, assume that ( G , c ) has a bichromatic cycle C . If the edgesof C are all in G or all in F ∗ − x y , then ( G, c ) or ( F ∗ − x y, c ∗ ) has a bichromatic cycle,which is not possible as c and c ∗ are acyclic. Hence, at least one edge of C belongs to G andat least one edge of C belongs to F . This means that C contains both u = x and v = y .Recall that G contains the edge uv . Consequently, ( G, c ) has a bichromatic cycle, namelythe cycle induced by V ( C ) ∩ V ( G ), a contradiction.Now suppose that G has an acyclic k -colouring c . Let c and c ∗ be the restrictions of c to V ( G − uv ) and V ( F ∗ − x y ), respectively. Then c and c ∗ are acyclic k -colourings of G − uv and F ∗ − x y , respectively. Moreover, the restriction of c to V ( F ) is an acyclic k -colouring of F . By our assumption, this means that c ( x ) = c ( y ) and thus c ∗ ( x ) = c ∗ ( y ),or equivalently, c ( u ) = c ( v ). Consequently, c is also a k -colouring of G and c ∗ is also a k -colouring of F ∗ . We claim that c is acyclic. For contradiction, assume that ( G, c ) has abichromatic cycle C . As c is an acyclic k -colouring of G − uv , we deduce that C must containthe edge uv = x y . As F ∗ does not have an acyclic k -colouring by our assumption and c ∗ is a k -colouring of F ∗ , we find that ( F ∗ , c ∗ ) has a bichromatic cycle D . As c ∗ is an acyclic k -colouring of F ∗ − x y , this means that D must contain the edge x y = uv . However, then( G , c ) has a bichromatic cycle, namely the cycle induced by V ( C ) ∪ V ( D ), a contradiction. G − uv u = x y v = y x F (cid:48) F (cid:48) Figure 3
The graph G with the graph F + from Case 3 (before we recursively repeat g times theoperation of placing the graph F + on the y x -edge). Case 3:
All acyclic k -colourings of F assign the same colour to x and y and F ∗ has anacyclic k -colouring. We first construct a new graph F + as follows. We take the disjoint union of two copies F and F of F , where we denote the vertices x and y as x and y in F and as x and y in F . We add edges x x , x y , and y y to F + F ; see also Figure 3.We claim that F + has an acyclic k -colouring. First, observe that F + is the union oftwo copies of F ∗ sharing exactly one edge, namely y x . That is, F + x x , y x and F + y y , y x are both isomorphic to F ∗ . By our assumption on F ∗ , graphs F + x x , x y and F + y y , y x have acyclic k -colourings c and c , respectively. By our assumption on F , the restriction of c to F gives x , y the same colour and the restriction of c to F gives x and y the same colour. We may assume without loss of generality that c assigns colour 1to x and y and colour 2 to x , and that c assigns colour 2 to x and y and colour 1to y . This yields a k -colouring c + of F + . We claim that c + is acyclic. For contradiction, . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 9 suppose ( F + , c + ) has a bichromatic cycle C . As the restrictions of c + to F + x x , y x and F + y y , y x (the k -colourings c and c ) are acyclic, C must contain the edges x x and y y , so C has the chord y x . Hence, ( F + x x , y x , c ) has a bichromatic cycle onvertex set ( V ( C ) \ V ( F )) ∪ { x } , a contradiction.We now essentially reduce to Case 1. Set x = x , y = y and take the graph F + . Weproved above that F + has an acyclic k -colouring. As every acyclic k -colouring c of F + colours x and y alike, c colours x = x and y = y differently (as y x is an edge). Finally,the graph F + + xy = F + + x y has no acyclic k -colouring, as for every k -colouring c of F + + x y , the 4-vertex cycle x x y y x is bichromatic for ( F + + x y , c ). The onlydifference with Case 1 is that the graph F + + x y has girth 4 due to the cycle x x y y x whereas we need the girth to be at least g just as the graph F + xy in Case 1 has girth g .Hence, before reducing to Case 1, we first recursively repeat g times the operation of placingthe graph F + on the y x -edge; note that the size of the resulting graph G is still polynomialin the size of G . Case 4:
There exist acyclic k -colourings c and c of F with c ( x ) = c ( y ) and c ( x ) = c ( y ) . We first construct a new graph J . We take two disjoint copies F and F of F and identifythe two x -vertices with each other and also the two y -vertices with each other. We write x = x = x and y = y = y ; see also Figure 4. xy F (cid:48) F (cid:48) J Figure 4
The graph J from Case 4. We distinguish between two sub-cases.
Case 4a: J has an acyclic k -colouring. Our goal is to reduce either to Case 2 or 3 by using J instead of F . We first observe that J and J + xy have girth at least g . We also note that J + xy has no acyclic k -colouring,as otherwise F + xy , being an induced subgraph of J + xy , has an acyclic k -colouring.Hence, in order to reduce to Case 2 or 3 it remains to show that every acyclic k -colouringof J assigns the same colour to x and y . For contradiction, suppose that J has an acyclic k -colouring c such that c ( x ) = c ( y ), say c ( x ) = 1 and c ( y ) = 2. Then in at least one of thetwo subgraphs F and F of J , say F , there exists no 1-2 path from x to y ; otherwise ( J, c )has a bichromatic cycle formed by the union of the two 1-2-paths, which is not possible as c is acyclic. Let c be the restriction of c to V ( F ). Then, as c ( x ) = 1 and c ( y ) = 2, we findthat c is a k -colouring of F + xy . As there is no 1-2 path from x to y in F , we find that c is even an acyclic k -colouring of F + xy , a contradiction (recall that F + xy has no acyclic k -colouring by construction). Case 4b: J has no acyclic k -colouring. By assumption, F has an acyclic k -colouring that gives x and y different colours. We firstprove a claim. Claim 1. For every acyclic colouring c of F that colours x and y by the same colour, say h , there exist strictly less than ( k − / numbers i from the set { , . . . , k } \ { h } such that c contains no h - i path from x to y . H -Free Graphs For contradiction, suppose that F has an acyclic k -colouring c that colours x and y alike, say c ( x ) = c ( y ) = 1, such that there exist at least ( k − / i from the set { , . . . , k }\{ h } such that c contains no h - i path from x to y . Thus, since the number of possible bichromatic h - i paths is k − F contains at most ( k − / i -paths with i ∈ { , . . . , k } . Without lossof generality, we can say that F contains no 1-( b ( k − / c + 2)-path, 1-( b ( k − / c + 3)-path, . . . , and no 1- k -path. Then by swapping colours i and i + b ( k − / c for every i ∈ { , . . . , b ( k − / c + 1 } , we obtain another acyclic k -colouring c of F such that F contains no 1-2-path, 1-3-path, . . . , 1-( b ( k − / c + 1)-path from x to y . In J we now colourthe vertices of F by c and the vertices of F by c . As c ( x ) = c ( x ) = 1 and c ( y ) = c ( y ) = 1,this yields a k -colouring c J . By assumption, c J is not acyclic. Hence, ( J, c J ) contains abichromatic cycle C with colours 1 and i for some i ∈ { , . . . , k } . As the restrictions of c J to F and F are acyclic, C must contain at least one vertex of V ( F ) \ { x, y } and at least onevertex of V ( F ) \ { x, y } . Thus C consists of 1- i -paths from x to y in both F and F . As atleast one of these paths is missing in F or F , this yields a contradiction.Now we will divide the rest of this case depending on k .For k ≥
4, we shall use a slightly more involved gadget. Let us introduce the graph A k which is built from a graph G k which we will now describe (see Figures 5 and 6). Let usbegin with an edge ( x, y ) and then add vertices v , . . . , v k − so that everything is joined in aclique. Now add vertex p , joined in a clique with { x, v , . . . , v k − } and vertex q , joined in aclique with { y, v , . . . , v k − } . The gadget A k is made from G k by substituting every edgein G k by the graph F where the x and y in F represent the endpoints of the edges in G k .The reader will note that we overloaded x and y in this discussion (they appear within eachcopy of F as well as two vertices in G k ), but our usage is consistent and will not lead tomisunderstanding later.For k = 3, we introduce the gadget A built from the graph K , i.e. triangle, with vertices x, y, z . We again substitute every edge of K by the graph F in the precisely same way asbefore.We now prove some more claims that will enable us to reduce to Case 1. (i) The graphs A k and A k + xy have girth at least g . This follows directly from the fact that both F and F + xy have girth at least g . (ii) The graph A k + xy has no acyclic k -colouring. This follows directly from the fact that F + xy is an induced subgraph of A k + xy andhas no acyclic k -colouring by construction. (iii) The graph A k has an acyclic k -colouring. We give the acyclic k -colouring of A k for k ≥ A it suffices to takean acyclic coloring of F which gives its vertices x and y different colours and permute thecolours so that all three vertices x, y, z of A are coloured differently. This has to be againan acyclic colouring since any possible bichromatic cycle would need to pass through all thethree vertices of the triangle. However, these have three different colours. (iv) Every acyclic k -colouring of A k gives x and y different colours. This claim will be proved later for k ≥ k = 3.Suppose that x and y are coloured by 1. There are two cases, the first one being that z iscoloured by 1 and the second one in which z is coloured by a colour different from 1, let ussay it is colour 2.In the first case, we use Claim 1 by which we conclude that there is a 1-2-path and1-3-path between each pair of vertices from x, y, z . This means that there is a bichromaticcycle in A and thus this is not an acyclic colouring. . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 11 k − k
11 2
Figure 5
The gadget A k , k ≥
4, with its acyclic- k -colouring. In the second case, there is, by Claim 1, a 1-2-path between x and y . Furthermore, since F + xy does not have an acyclic colouring, there has to be a 1-2-path between x and z andbetween y and z . These paths form a bichromatic cycle coloured by 1 and 2.We conclude that x and y cannot be coloured by the same colour in any acyclic 3-colouringof A .By (i)-(iv) we may take A k instead of F and by that we reduce to Case 1. This completesthe proof. (cid:74)(cid:73) Lemma 7.
Suppose any acyclic k -colouring of F , that colours both x and y the samecolour, omits strictly less than k − bichromatic paths between x and y . Then, there is noacyclic k -colouring of A k that colours the bottom two vertices the same. Proof.
We give a proof by contradiction (ruling out cases) where we occasionally proceed byinduction on k . W.l.o.g., and for contradiction, we assume the bottom two vertices are bothcoloured 1.Case I. More than one colour appears more than once in the interior vertices of the toppath. Suppose the colours are i and j . This case is trivial, as there is a i - j -bichromatic4-cycle lurking already in the interior vertices on the top path.Case II. All interior vertices on the top path have been coloured 1. This case needs a shortcombinatorial argument. There is a k -clique of vertices coloured 1, where each the edges hasstrictly more than k − colours i so that there is 1- i -bichromatic path. Since the number ofpaths has to be integral and k is an integer, this translates into ≥ k colours i . The number ofedges is k ( k − therefore, let us consider the last inequality in k · k ( k − ≥ k ( k − ≥ k ( k − k −
1) is the number of available colours. The final inequality holdsfor k ≥
4, so there must exist i = 2 and k edges that have a 1- i -bichromatic path. These k edges must contain a cycle (a Hamilton cycle in the limit case), so the argument concludes.Case IIIa. Only distinct colours i = 1 appear in the interior vertices of the top path.Thus, no colour repeats (in the interior vertices of the top path) and there are k − k colours i so that there is a 1- i -bichromatic path between1 and 1 on the bottom, hence there is surely some bichromatic triangle, while k − ≥ k − which holds for k ≥ i appear in the interior vertices of the top path, nocolour repeating itself, and one of the colours is 1. There are k − i appears with a 1- i -bichromatic pathbetween any two of the three 1s, then we are done. It follows that for all j not appearingin the interior vertices of the top path, there is a 1- j -bichromatic path between each pairamong the three 1s which plainly affords a bichromatic triangle.Case IVa. Some colour i = 1 appears precisely once in the interior vertices on the top pathand the only colour that repeats is 1. Here we argue by induction where we will still need tocover the base case. We remove the vertex associated with i and note that no path from the H -Free Graphs bottom vertices to the interior vertices on the middle path that are 1 has a 1- i -bichromaticpath (if so there would already be a 1- i -bichromatic cycle through the vertex associatedwith i ). In this fashion, we remove also the colour i , which in any case wasn’t involved in abichromatic path. Eventually, we end up with m ≥ k bichromatic paths between any pair of 1s. We conclude the argumentusing Case II for the base, a fortiori.Case IVb. Some colour i = 1 appears precisely once in the interior vertices on the toppath and the only colour that repeats is j = i . W.l.o.g. j = 2. Following the same iterativemethod as in Case IVa, we eventually end up with m ≥ k · m ( m − = km ( m − ≥ m ( m − k ≥
4, so there must exist an i = 2 and m edges that have a 2- i -bichromaticpath. If m >
2, these m edges must contain a cycle (a Hamilton cycle in the limit case), andthe argument concludes similarly to Case II. For m = 2 we need a special argument.Case IVc. Some colour i = 1 appears precisely once in the interior vertices on the toppath and the only colour that repeats is j = i and there are precisely two copies of j . W.l.o.g. j = 2. We proceed as in the previous case removing coloured vertices but not colours from theedges remaining. We end up as in Figure 6. Now there is a h -2-bichromatic path between thevertices coloured 2 for all h not 1 and not a removed colour, and there is a h -1-bichromaticpath between the vertices coloured 1 for all h not 2 and not a removed colour. This is becausewe removed k − k − omitted colours. Let L be the set of colours that we removed. Let H be ([ k ] \ L ) \ { , } . If p or q is colouredwith some element h ∈ H then we have one of a 1- h - and a 2- h -bichromatic triangle. If p or q is coloured 1 then there is a 1-2-bichromatic 4-cycle. Thus, they are both coloured 2. Now,if any colour ‘ ∈ L appeared in a 2- ‘ -bichromatic path from p or q to some interior vertex ofthe middle path coloured 2, there would already have been an 2- ‘ -bichromatic triangle. Thusthe colours available for bichromatic paths from p or q to the interior vertices of the toppath coloured 2 are precisely H , indeed all of these are available. We deduce a bichromatic2- h -triangle for any h ∈ H . (cid:74) The line graph of a graph G has vertex set E ( G ) and an edge between two vertices e and f ifand only if e and f share an end-vertex of G . In Lemma 8 we modify the construction of [3]for line graphs from k = 3 to k ≥
3. In Lemma 9 we give a new construction for provinghardness when k is part of the input. (cid:73) Lemma 8.
For every k ≥ , Acyclic k -Colouring is NP -complete for line graphs. Proof.
For an integer k ≥
1, a k -edge colouring of a graph G = ( V, E ) is a mapping c : E → { , . . . , k } such that c ( e ) = c ( f ) whenever the edges e and f share an end-vertex.A colour class consists of all edges of G that are mapped by c to a specific colour i . Thepair ( G, c ) has a bichromatic cycle C if C is a cycle of G with its edges coloured by twoalternating colours. The notion of a bichromatic path is defined in a similar manner. We saythat c is acyclic if ( G, c ) has no bichromatic cycle. For a fixed integer k ≥
1, the
Acyclic k -Edge Colouring problem is to decide if a given graph has an acyclic k -edge colouring.Alon and Zaks proved that Acyclic -Edge Colouring is NP -complete for multigraphs.We note that a graph has an acyclic k -edge colouring if and only if its line graph has anacyclic k -colouring. Hence, it remains to generalize the construction of Alon and Zaks [3] There is a big gap between k − k − which shows that Case IVc does not arise at all for largeenough k . . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 13 p v v v k − v k − qx yp q Figure 6
The gadget A k (above) where edges represent the gadget F and the top row is oflength k . The top row minus the two end vertices are all joined in a clique and are termed “interiorvertices of the top path”. The interior vertices of the top path are joined with the bottom verticesin a clique of size k . The two end vertices on the top path are of degree one less than the interiorvertices of the top path. Below is drawn the gadget A with a partial colouring showing the mostinteresting situation (Case IVc). from k = 3 to k ≥
3. Our main tool is the gadget graph F k , depicted in Figure 7, aboutwhich we prove the following two claims. (i) The edges of F k can be coloured acyclically using k colours, with no bichromatic pathbetween v and v .(ii) Every acyclic k -edge colouring of F k using k colours assigns e and e the same colour. v v v v v v v v v v v v v v e e ( k −
2) ( k −
2) ( k −
2) ( k −
2) ( k − Figure 7
The gadget multigraph F k . The labels on edges are multiplicities. We first prove (ii). We assume, without loss of generality, that v v is coloured by 1, v v by2 and the edges between v and v by colours 3 , . . . , k . The edge v v has to be coloured by1, otherwise we have a bichromatic cycle on v v v v . This necessarily implies thatthe edges between v and v are coloured by 3 , . . . , k ,the edge v v is coloured by 2,the edge v v is coloured by 1,the edges between v and v are coloured by 3 , . . . , k , andthe edge v v is coloured by 1.Now assume that the edge v v is coloured by a ∈ { , . . . , k } and the edges between v and v by colours from the set A , where A = { , . . . , k } \ a . The edge v v is either coloured a or 1. However, if it is coloured 1, v v is assigned a colour b ∈ A and necessarily we haveeither a bichromatic cycle on v v v v v v , coloured by b and a , or a bichromatic cycleon v v v v , coloured by a and 1. Thus v v is coloured by a . To prevent a bichromatic H -Free Graphs cycle on v v v v , the edge v v is assigned colour 1. The rest of the colouring is nowdetermined as v v has to be coloured by 1, the edges between v and v by A , v v by a , and v v by 1. We then have a k -colouring with no bichromatic cycles of size at least3 in F k for every possible choice of a . This proves that v v and v v are coloured alikeunder every acyclic k -edge colouring.We prove (i) by choosing a different from 2. Then there is no bichromatic path between v and v .We now reduce from k -Edge-Colouring to Acyclic k -Edge Colouring as follows.Given an instance G of k -edge Colouring we construct an instance G of Acyclic k -Edge Colouring by replacing each edge uv in G by a copy of F k where u is identifiedwith v and v is identified with v .If G has an acyclic k -edge colouring c then we obtain a k -edge colouring c of G bysetting c ( uv ) = c ( e ) where e belongs to the gadget F k corresponding to the edge uv . If G has a k -edge colouring c then we obtain an acyclic k -edge colouring c of G by setting c ( e ) = c ( uv ) where e belongs to the gadget corresponding to the edge uv . The remainderof each gadget F k can then be coloured as described above. (cid:74) In our next result, k is part of the input. (cid:73) Lemma 9.
Acyclic Colouring is NP -complete for (19 P , P , P ) -free graphs. Proof.
We reduce from 3-
Colouring with maximum degree 4 which is known to be NP-complete [27]. Let G be an instance of 3- Colouring with | V ( G ) | = n vertices and maximumdegree 4. We will construct an instance G of Acyclic Colouring where k = 4 n . Ourvertex gadget is built from two k -cliques, J and J , with a matching between them. Wenumber the vertices of each of the cliques 0 to k −
1. The matching we insert into the graphis (0 , , . . . , ( k − , k − i in J to j in J if and only if b i/ c < b j/ c . Suppose that some assignment of colours is given to J . By recolouring, weassume it is the identity colouring of i to i on J . Then the possible acyclic k -colourings ofvertices ( b i/ c + 0 , b i/ c + 1 , b i/ c + 2 , b i/ c + 3) in J are( b i/ c + 1 , b i/ c + 2 , b i/ c + 3 , b i/ c + 0) , ( b i/ c + 1 , b i/ c + 3 , b i/ c + 0 , b i/ c + 2) , ( b i/ c + 2 , b i/ c + 3 , b i/ c + 1 , b i/ c + 0) , ( b i/ c + 2 , b i/ c + 0 , b i/ c + 3 , b i/ c + 1) , ( b i/ c + 3 , b i/ c + 0 , b i/ c + 1 , b i/ c + 2) , ( b i/ c + 3 , b i/ c + 2 , b i/ c + 0 , b i/ c + 1) . They are built from the permutations of (0 , , ,
3) that do not contain a transposition. Wedraw all of them, to demonstrate it is not an acyclic colouring, in Figure 8 (keep in mindthat vertices in a row are joined in a clique).In our reduction, the first two acyclic k -colourings will represent colour 1, the secondtwo colour 2 and the third two colour 3 of the sought 3-colouring of G . To force similarlycoloured copies of J we add a new k -clique J with edges from i in J to j in J if and onlyif i < j . To prevent the existence of bichromatic cycles in our later construction, we adda k -clique J with edges from i in J to j in J if and only if i < j . This enforces that inany acyclic k -colouring of G , the i -th vertices (where i ∈ { , . . . , k − } ) in cliques J , J , J would have the same colour. Therefore, by the way we placed the edges between differentcliques from { J , J , J } , there is no bichromatic path with vertices from more than oneclique in { J , J , J } . . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 15 Figure 8
Acyclic colourings in the proof of Lemma 9 for a vertex representing one of the threecolours (left and middle). Sample failures for an acyclic colouring from other permutations of(0 , , ,
3) together with a failure cycle (right). Note that each row of quadruples is joined in a clique.
We now construct edge gadgets. We take another two k -cliques to join J , say J and J . We will want them coloured exactly like J , so for i in J and j in J or J , where i < j , we will add an edge ij . Suppose we have an edge in G between p and q for some p, q ∈ { , . . . , n − } . Then we place an edge from the vertex 4 p in J to 4 q + 1 in J andfrom 4 q in J to 4 p + 1 in J (recall that p, q ∈ { , . . . , n − } and cliques J and J are ofsize 4 n , so these edges are well defined). See Figure 9. Now we place an edge from 4 p in J to 4 q + 2 in J and of 4 q in J to 4 p + 2 in J . Finally, we place an edge from 4 p in J to4 q + 3 in J and from 4 q in J to 4 p + 3 in J . This concludes the construction for the edge pq in E ( G ).Suppose we have an edge rs ∈ E ( G ) so that { p, q } ∩ { r, s } = ∅ . Then we build a gadgetfor rs using the same additional three cliques that we used for the edge pq . However, if wehave edges with a common endpoint, e.g. pq, ps ∈ E ( G ), then by adding the edges from 4 p in J to 4 q + 1 in J , from 4 q in J to 4 p + 1 in J , from 4 p in J to 4 s + 1 in J , and from4 s in J to 4 p + 1 in J we introduce new 4-cycles, one of them induced by the vertices 4 q and 4 p in J and 4 p + 1 and 4 s + 1 in J . To avoid this, we add three additional k -cliques tobuild the gadget for ps . By Vizing’s Theorem [50], we obtain in polynomial time a 5-edgecolouring of G (as G has maximum degree 4). Using this 5-edge colouring, we build gadgetsfor all the edges with at most 5 × k -cliques (we use 3 additional cliques foreach colour class).The clique structure of G is drawn in Figure 10. As G consists of at most 18 cliques, G is 19 P -free. Furthermore, any induced linear forest where each connected componenthas size at least 3 contains vertices in at most five cliques. Hence G is (3 P , P )-free. Itremains to prove that G has a 3-colouring if and only if G has an acyclic k -colouring.First, suppose that G has an acyclic k -colouring c . Then each k -clique of G has to useeach colour exactly once. We can permute colours so that vertex i in J (where 0 ≤ i ≤ n − i . It follows from the connections between cliques that the i -th vertices in cliques J , . . . , J also have colour i and the vertices 4 j, j + 1 , j + 2 , j + 3, (0 ≤ j ≤ n −
1) in J have colours from the set { j, j + 1 , j + 2 , j + 3 } . For each vertex i in G , set c ( i ) = 1 if thecolours of (4 i, i + 1 , i + 2 , i + 3) in J under c correspond to one of the first two possible H -Free Graphs J J J J • • • • • • • • J Figure 9
Edge construction in the proof of Lemma 9 between vertices 0 and 1 of G . Everythingin a row is joined in a clique. Edges are omitted between J and J , J , J , though they enforce thecolouring. colourings (listed above); set c ( i ) = 2 if it corresponds to one of the second two possiblecolourings; set c ( i ) = 3 if it corresponds to one of the last two colourings. We claim that c isa 3-colouring of G . Suppose that pq is an edge in G with edge gadget using cliques J , J , J .Since c is acyclic and c is identity on J , we have c (4 p ) = 4 p + 1 in J or c (4 q ) = 4 q + 1 in J . Both 4 p and 4 q are the first vertices of the respective quadruples, so p and q are notboth coloured 1. Similarly, the edges going between cliques J and J ensure that they arenot both coloured 2 and the edges going between cliques J and J ensure that they are notboth coloured 3. Hence, c ( p ) = c ( q ) and c is a 3-colouring of G .Now suppose G has a 3-colouring c . We construct a labelling c of G where we coloureach quadruple in J corresponding to a vertex of G by the first of each pair of colouringslisted in the table for each of the three colours, respectively. The labelling c in other cliquesof G is the identity. By the construction of G and particularly by the properties of edgegadgets in G , we find that c is a k -colouring of G .Finally, we need to verify that c is acyclic. We will begin with bichromatic cycles betweentwo cliques. No bichromatic cycle can appear in J and J forming the vertex gadget. Thisis due to the edges from the former to the latter always pointing to a higher number (orthe same but here we chose a 3-colouring to avoid such situation). A similar explanationworks for all the clique pairs (0 , , (2 , , . . . , (2 ,
17) in Figure 10. The last possibility is abichromatic cycle formed through J from one of the cliques J to J . However, such a cyclewould have to pass through an actual edge gadget (where it is forbidden by the 3-colouring)or through vertices in different edge gadgets, where it must form a cycle with four colours.Now we need to consider bichromatic cycles passing through three or more cliques, but theywould have to involve a bichromatic path through J , J , J which is not possible. Thiscompletes the proof. (cid:74) We combine the above results with results of Coleman and Cai [15] and Lyons [45] to proveTheorem 1.
Theorem 1 (restated).
Let H be a graph. For the class of H -free graphs it holds that: . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 17 J J J J J ... J Figure 10
Connections between cliques in the construction from the proof of Lemma 9. (i)
Acyclic Colouring is polynomial-time solvable if H ⊆ i P and NP -complete if H isnot a forest or H ⊇ i P , P , P or P ;(ii) For every k ≥ , Acyclic k -Colouring is polynomial-time solvable if H is a linearforest and NP -complete otherwise. Proof.
We first prove (ii). First suppose that H contains an induced cycle C p . If p = 3,then we use the result of Coleman and Cai [15], who proved that for every k ≥ Acyclic k -Colouring is NP -complete for bipartite graphs. Suppose that p ≥
3. If k = 3, then welet g = p + 1 and use Lemma 6. If k ≥
4, we reduce from
Acyclic -Colouring for graphsof girth p + 1 by adding a dominating clique of size k −
3. Now assume H has no cycle so H is a forest. If H has a vertex of degree at least 3, then H has an induced K , . As everyline graph is K , -free, we can use Lemma 8. Otherwise H is a linear forest and we useCorollary 5.We now prove (i). Due to (ii), we may assume that H is a linear forest. If H ⊆ i P , thenwe use the result of Lyons [45] that states that Acyclic Colouring is polynomial-timesolvable for P -free graphs. If H ⊇ i P , P , P or P , then we use Lemma 9. (cid:74) In this section we prove Theorem 2. We first prove the following lemma. (cid:73)
Lemma 10.
For every g ≥ , Star 3-Colouring is NP-complete for graphs of girth atleast g . Proof.
Let us introduce the caterpillar gadget C k,p (for k ≥
2) which is built from a path P p of length p by adding a k -star at each end (identify the centre of the star with the end ofthe path) and adding pendant edges to all the interior vertices of the path. We will require p to be 1 mod 3 and let us choose the colour set { , , } .Let us discuss some key properties of the caterpillar gadget. Firstly, it is clear that theouter vertices of any one of the stars attached to the ends of the path can not be coloured sothey use three distinct colours, as this would not be a star colouring.Now, suppose the outer vertices of the star attached to the left-hand end of the path iscoloured by two distinct colours, w.l.o.g. say 0 and 1, then the outer vertices of the star atthe right-hand end of the path are either all coloured 0 or all coloured 1. Indeed, we draw H -Free Graphs both of these possibilities in Figure 11 (top and middle) and they branch precisely on the twostar colouring possibilities for the inner neighbour of the left-hand end of the path, whichare 0 or 1 (we box these vertices in the figure). After that the continued star colouring ofthe path moving towards the right is predetermined by the rules of the star colouring.Finally, let us note that it is possible to choose a single colour, say 0, and colour the outervertices of both of the stars with this colour. This is drawn in Figure 11 (bottom). We havenow isolated the properties of the caterpillar gadget that we will need.The caterpillar gadget is not quite enough for our reduction, and we need to extend it C k,p as drawn in Figure 11. Since k ≥
2, this has the property, similar to the caterpillargadget, that at one end all of the leaves (at distance two from the star centre) are colouredwith a single colour (and it is possible to colour all of the leaves (at distance two from thestar centres) with this single colour.We now give a reduction from to Star 3-Colouring using the extensionof the caterpillar gadget. Let g be the girth we want to have as a lower bound. Let G bean input for with maximum degree d . We will make an instance G of Star3-Colouring using the caterpillar gadget C d, g +1 . Each vertex x in G becomes a singlecaterpillar gadget C d, g +1 ( x ) in G . Where there is an edge between vertices x, y ∈ V ( G ),then we make four connections between C d, g +1 ( x ) and C d, g +1 ( y ) by adding four edges.The first edge joins some free leaf (at distance two from the star centre) in the left-hand sideof C d, g +1 ( x ) with some free leaf (at distance two from the star centre) in the left-hand sideof C d, g +1 ( y ). The second edge joins some free leaf (at distance two from the star centre) inthe left-hand side of C d, g +1 ( x ) with some free leaf (at distance two from the star centre) inthe right-hand side of C d, g +1 ( y ). The third edge joins some free leaf (at distance two fromthe star centre) in the right-hand side of C d, g +1 ( x ) with some free leaf (at distance twofrom the star centre) in the left-hand side of C d, g +1 ( y ). The fourth edge joins some freeleaf (at distance two from the star centre) in the right-hand side of C d, g +1 ( x ) with somefree leaf (at distance two from the star centre) in the right-hand side of C d, g +1 ( y ). Thiscompletes the construction of G . Plainly, the girth of G is larger than g .Suppose G is 3-colourable with a colouring c . We explain how to extend this to a star3-colouring of G . If x is a vertex of G coloured by c ( x ) then colour all outer star vertices of C d, g +1 ( x ) by c ( x ). In C d, g +1 ( x ) colour the vertices adjacent to the outer star verticesby c ( x ) + 1 mod 3 ( ∗ ). The colours of the interior vertices of the path in C d, g +1 ( x ) can beread left to right (for example, according to the procedure exemplified in Figure 12 (bottom)in which the path moves cyclically through { , , } . This makes a star 3-colouring iff c was originally a 3-colouring because our colouring of the caterpillar gadgets has ruled outthe possibility of a bichromatic P anywhere. Within the caterpillar gadget this is true byconstruction and between caterpillar gadgets it is true due to ( ∗ ).Suppose G is star 3-colourable by colouring c . For each vertex x ∈ V ( G ), one end ofeach gadget C d, g +1 ( x ) is coloured by a single colour by c , let us nominate this as c ( x ). Weclaim that c is a proper 3-colouring of G and this is indeed enforced by (at least one) thefour edges that we placed between caterpillar gadgets. (cid:74) Now we begin our development for Theorem 2. (cid:73)
Lemma 11.
Let H be a graph with an even cycle. Then, for every k ≥ , Star k -Colouring is NP -complete for H -free graphs. Proof.
We reduce from 3 -Colouring for graphs of girth at least p + 1. Given an instance G of this problem, we construct an instance G of Star -Colouring as follows. Take threevertex disjoint copies of P and form a triangle using one endpoint of each; see Figure 13. . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 19 Figure 11
Star 3-colourings of the caterpillar gadget C , as used in the proof of Lemma 10. Replace each edge uv in G by this gadget with u and v identified with the non-adjacentendpoints of two paths. Then G is C p -free since, aside from triangles, the constructioncannot introduce any cycle shorter than those present in G .We first show that any star 3-colouring of G colours u and v differently. Assume not,their neighbours must be coloured differently since otherwise any 3-colouring of the remainderof the gadget will result in a bichromatic P . Without loss of generality, assume that u and v are coloured 1, the neighbour u of u is coloured 2 and the neighbour v of v is coloured 3. Let x be the neighbour of u in the triangle and y the neighbour of v in the triangle. Neither x or y can be coloured 1 since this will result in a bichromatic P . Therefore x is coloured 3, y is coloured 2 and the third vertex z of the triangle is coloured 1. This is a contradiction sincewe have a bichromatic P on the vertices u , x, y, v . Therefore, we obtain a 3-colouring c of G by setting c ( v ) = c ( v ) for some star 3-colouring c of G .We extend a given 3-colouring of G to a star 3-colouring of G , by locally star 3-colouringas in the right hand side of Figure 13 (or automorphically). Hence, G is 3-colourable if andonly if G is star 3-colourable.We obtain NP -completeness for k ≥ Star -Colouring for C p -freegraphs by adding a dominating clique of size k − (cid:74) In Lemma 12 we extend the recent result of Lei et al. [40] from k = 3 to k ≥ (cid:73) Lemma 12.
For every k ≥ , Star k -Colouring is NP -complete for line graphs. H -Free Graphs Figure 12
Star 3-colourings of the stretched gadget C , as used in the proof of Lemma 10. v u Figure 13
The gadget replacing edges uv (on the left) and its natural star 3-colouring (on theright) in the proof of Lemma 11. Proof.
Recall that for an integer k ≥
1, a k -edge colouring of a graph G = ( V, E ) is amapping c : E → { , . . . , k } such that c ( e ) = c ( f ) whenever the edges e and f share anend-vertex. Recall also that the notions of a colour class and bichromatic subgraph forcolourings has its natural analogue for edge colourings. An edge k -colouring c is a star k -edge colouring if the union of any two colour classes induces a star forest. For a fixedinteger k ≥
1, the
Star k -Edge Colouring problem is to decide if a given graph has anstar k -edge colouring. Lei et al. [40] proved that Star -Edge Colouring is NP -complete.Dvořák et al. [17] observed that a graph has a star k -edge colouring if and only if its linegraph has a star k -colouring. Hence, it suffices to follow the proof of Lei et al.[40] in order togeneralize the case k = 3 to k ≥
3. As such, we give a reduction from k -Edge Colouring to Star k -Edge Colouring which makes use of the gadget F k in Figure 14. First weconsider separately the case where the edges e = v v and e = v v are coloured alike andthe case where they are coloured differently to show that in any star k -edge colouring of thegadget F k shown in Figure 14, v v and v v are assigned the same colour.Assume c ( e ) = c ( e ) = 1. We may then assume that the edge v v is assigned colour 2and the remaining k − v v and v v . The edge v v , and similarly v v , must then be assigned colour 1 to avoid a bichromatic P on thevertices { v , v , v , v , v } using any two of the multiple edges in a single colour. The edge v v , and similarly v v must then be assigned colour 2 to avoid a bichromatic P on thevertices { v , v , v , v , v } .Next assume e and e are coloured differently. Without loss of generality, let c ( e ) = 1, c ( e ) = 2 and c ( v v ) = 3. The multiple edges v v must then be assigned colours 2and 4 . . . k and v v colour 1 and colours 4 . . . k . To avoid a bichromatic P on the vertices { v , v , v , v , v } , v v must be coloured 1. Similarly, v v must be assigned colour 2. Finally,to avoid a bichromatic P on the vertices { v , v , v , v , v } , v v must be coloured 3. By asimilar argument, v v must also be coloured 3, hence v v and v v must be coloured alike. . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 21 v v v v v v v v v v . . . k − k − . . .e e Figure 14
The gadget F k in the proof of Lemma 12. We can then replace every edge e in some instance G of k -Edge-Colouring by acopy of F k , identifying its endpoints with v and v , to obtain an instance G of Star k -Edge-Colouring . If G is k -edge-colourable we can star k -edge-colour G by setting c ( v v ) = c ( v v ) = c ( e ). If G is star k -edge-colourable, we obtain a k -edge-colouring of G by setting c ( e ) = c ( v v ). (cid:74) We now let k be part of the input. The complement of a graph G is the graph G with vertexset V ( G ) and an edge between two vertices u and v if and only if uv / ∈ E ( G ). A k -colouringof G can be seen as a partition of V ( G ) into k independent sets. Hence, a k -colouring of G corresponds to a clique-covering of G , which is a partition of V ( G ) = V ( G ) into k cliques. Agraph is co-bipartite if it is the complement of a bipartite graph. (cid:73) Lemma 13.
Star Colouring is NP -complete for co-bipartite graphs. Proof.
We show that finding an optimal star colouring of a co-bipartite graph G is equivalentto finding a maximum balanced biclique in its complement G . An optimal star colouring of G corresponds to an optimal clique-covering of G such that the graph induced by the verticesof any two cliques in the covering partition is P = P -free and C = 2 P -free. Since G istriangle-free, the clique-covering number of G is n − M where n is the number of vertices of G and M is the number of edges in a maximum matching such that no two edges induce either2 P or P . Since G is bipartite, a maximum matching of this form is a maximum balancedbiclique. It is NP -complete to find the maximum size of a balanced biclique in a bipartitegraph [27]. Therefore Star Colouring is NP -complete for co-bipartite graphs. (cid:74) We combine the above results with results of Albertson et al. [1] and a result of Lyons [45]to prove Theorem 2.
Theorem 2 (restated).
Let H be a graph. For the class of H -free graphs it holds that:(i) Star Colouring is polynomial-time solvable if H ⊆ i P and NP -complete for any H = 2 P .(ii) For every k ≥ , Star k -Colouring is polynomial-time solvable if H is a linear forestand NP -complete otherwise. Proof.
We first prove (ii). First suppose that H contains an induced odd cycle. Then theclass of bipartite graphs is contained in the class of H -free graphs. Lemma 7.1 in Albertsonet al. [1] implies, together with the fact that for every k ≥ k - Colouring is NP -complete,that for every k ≥ Star k -Colouring is NP -complete for bipartite graphs. If H containsan induced even cycle, then we use Lemma 11. Now assume H has no cycle, so H is a forest.If H contains a vertex of degree at least 3, then H contains an induced K , . As every linegraph is K , -free, we can use Lemma 12. Otherwise H is a linear forest, in which case weuse Corollary 5. H -Free Graphs We now prove (i). Due to (ii), we may assume that H is a linear forest. If H ⊆ i P , thenwe use the result of Lyons [45] that states that Star Colouring is polynomial-time solvablefor P -free graphs. If 3 P ⊆ i H , then we use Lemma 13 after observing that co-bipartitegraphs are 3 P -free. Otherwise H = 2 P , but this case was excluded from the statement ofthe theorem. (cid:74) In this section we prove Theorem 3. We first show a hardness result for fixed k . (cid:73) Lemma 14.
For every k ≥ , Injective k -Colouring is NP -complete for bipartitegraphs. Proof.
We reduce from
Injective k -Colouring ; recall that this problem is NP -completefor every k ≥
4. Let G = ( V, E ) be a graph. We construct a graph G as follows. For eachedge uv of G , we remove the edge uv and add two vertices u v , which we make adjacent to u , and v u , which we make adjacent to v . Next, we place an independent set I uv of k − u v and v u . Note that G is bipartite: we can let one partition classconsist of all vertices of V ( G ) and the vertices of the I uv -sets and the other one consist of allthe remaining vertices (that is, all the “prime” vertices we added). It remains to show that G has an injective k -colouring if and only if G has an injective k -colouring.First assume that G has an injective k -colouring c . Colour the vertices of G correspondingto vertices of G as they are coloured by c . We can extend this to an injective k -colouring c of G by considering the gadget corresponding to each edge uv of G . Set c ( u v ) = c ( v )and c ( v u ) = c ( u ). We can now assign the remaining k − c creates no bichromatic P involving vertices in at most oneedge gadget. Assume there exists a bichromatic P involving vertices in more than one edgegadget, then this path must consist of a vertex u of G together with two gadget vertices u v and u w which are coloured alike. This is a contradiction since it implies the existence of abichromatic path v, u, w in G .Now assume that G has an injective k -colouring c . Let c be the restriction of c to thosevertices of G which correspond to vertices of G . To see that c is an injective colouring of G , note that we must have c ( u v ) = c ( v ) and c ( v u ) = c ( u ) for any edge uv . Therefore,if c induces a bichromatic P on u, v, w , then c induces a bichromatic P on v u , v, v w . Weconclude that c is injective. (cid:74) We now turn to the case where k is part of the input and first prove five positive resultscaptured by the following lemma. (cid:73) Lemma 15.
Injective Colouring is polynomial-time solvable for the classes of P -freegraphs, (3 P + P ) -free graphs, (2 P + P ) -free graphs and ( P + P )-free graphs. Proof.
Since connected P -free graphs have diameter at most 2, no two vertices can becoloured alike in an injective colouring. Hence the injective chromatic number of a P -freegraph is equal to the number of its vertices.Next we consider (3 P + P )-free graphs. We first present a polynomial-time algorithmfor 4 P -free graphs. Note that an injective colouring of G is equivalent to a clique-covering We note that Janczewski et al. [34] proved that L ( p, q ) -Labeling is NP -complete for planar bipartitegraphs, but in their paper they assumed that p > q . . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 23 of its complement G such that the graph induced by the vertices of the union of any twoclique classes is ( P + P )-free. We call this a ( P + P )-free clique-covering.Since G is 4 P -free, each clique class in a clique-covering of G has size at most 3. Theminimum size of a clique-covering of G such that every clique class is either an isolatedvertex or an edge can be found in polynomial time since this problem is equivalent to findinga maximum matching among the dominating edges of G .If such a clique-covering is not optimal then any optimal ( P + P )-free clique-covering of G contains a clique class T of size 3. In this case every vertex of G \ T is adjacent to exactlytwo vertices of T since G is K -free and the union of any two clique classes is ( P + P )-free.This implies that the vertices of G \ T can be partitioned into three independent sets X , Y and Z , each dominated by a different pair of vertices of T .Given some clique class T of size 3, we divide the remaining vertices of G into threecategories with respect to T . Firstly, if a vertex v belonging to one of the three independentsets does not dominate either of the other two then it must be a single vertex class in any( P + P )-free clique-covering of G which includes T since any edge including v is part of someinduced P + P . We call these type 1 vertices. Secondly, we consider those vertices whichdominate exactly one of the two independent sets to which they do not belong. Verticesof this form are called type 2 vertices and belong to clique classes of maximum size 2 ina ( P + P )-free clique-covering of G which includes T . Finally, we call the vertices whichdominate both of the two independent sets to which they do not belong type 3 vertices. Theseare the vertices which may belong to clique classes of size 3 in a ( P + P )-free clique-coveringof G including T .Consider a clique class T of size 3 in any optimal ( P + P )-free clique-covering C of G .Assume some vertex v forms a single vertex clique class in C . If v is of type 3, We obtain anew optimal ( P + P )-free clique-covering C of G which does not contain T by reassigningsome vertex of T adjacent to v to form a clique class with v . If v is of type 2, Without lossof generality, we may assume that v belongs to the independent set X and dominates Y . Let w be the vertex of T which dominates X and Z . We obtain a new optimal ( P + P )-freeclique-covering which does not contain T by reassigning the vertex w to form a clique classwith v .Therefore, if every optimal ( P + P )-free clique-covering of G contains a clique class ofsize 3, then every optimal ( P + P )-free clique-covering contains a triangle T such thatevery vertex of type 2 or 3 with respect to T belongs to a clique class of size at least 2. Wesay that a triangle T forms a clique class of the form T in a ( P + P )-free clique-covering ifit forms a clique class with this property.Next, observe that any further clique class of size 3 in an optimal ( P + P )-free clique-covering of G must contain exactly one vertex from each of the three independent sets X , Y and Z . Additionally, since any two vertices of type 3 belonging to the same independentset have identical neighbourhoods, we may swap the assignments of any two type 3 verticesbelonging to the same independent set to obtain a new optimal ( P + P )-free clique-coveringwith the same number of clique classes of size 3. In other words, if we label the type 3 verticesof the independent set X by x . . . x p , Y by y . . . y q and Z by z . . . z r , we may assume that G has a ( P + P )-free clique-covering containing T of minimum size which contains s cliqueclasses of size 3 in addition to T if and only if it has such a covering where these cliqueclasses are of the form C . . . C s where C i = { x i , y i , z i } .Therefore, we can find an optimal ( P + P )-free clique-covering of G as follows. Firstfind the minimum size of a ( P + P )-free clique-covering of G where the maximum size of aclique class is 2. If this covering is not optimal then some optimal covering contains a clique H -Free Graphs class T of size 3 as described above. We then consider each triangle T of G in turn to decidewhether it can form a clique class T in some ( P + P )-free clique-covering of G and if sofind the minimum size of such a covering.To do this, we check whether every vertex of G is adjacent to exactly two vertices of T and the non-neighbourhood of each vertex of T is an independent set. If this is not the case,then T does not form a clique class in any ( P + P )-free clique-covering of G and we moveon to the next triangle.Otherwise, we must now decide whether T forms a clique class of the form T in any( P + P )-free clique-covering and if so find the minimum size of such a covering. We labelthe vertices of type 3 in the independent set X x . . . x p , the type 3 vertices in Y y . . . y q and the type 3 vertices in Z z . . . z r . Without loss of generality, assume p ≥ q ≥ r . Thenthe number of clique classes of size 3 among the vertices of ¯ G \ T is at most r . The size of a( P + P )-free clique-covering of G such that T is of the form T is 1+ s + t +(( n − s − t − / s is the number of type 1 vertices with respect to T and t is the maximum number ofclique classes of size 3 in G \ T since we may assume that every vertex of type 2 or 3 withrespect to T belongs to a clique class of size at least 2. This value is minimised in a cliquecovering with the greatest possible number of clique classes of size 3 in G \ T . We begin byconsidering the triangles C i = x i , y i , z i for i = 1 . . . i = r . If There is a perfect matchingamong the dominating edges of G between the remaining vertices of type 2 or 3 then we havea ( P + P )-free clique-covering of G where T is a clique class of the form T which contains r further clique classes of size 3. If not, then there is no such covering of this size. In thiscase we then consider each value u < r of the number of clique classes of size 3 in G \ T untileither we find a value of u which provides a proper ( P + P )-free clique covering or u = 0. Inthe later case there is no ( P + P )-free clique covering where T is a clique class of the form T unless there is a perfect matching among the dominating edges between vertices of type 2or 3. The size of a minimum ( P + P )-free clique-covering of G is then the minimum value,over all triangles T of G which can form a clique class T , of s + t + 1 + (( n − s − t − / Injective Colouring is polynomial-time solvable for P + 3 P -freegraphs.Assume that the maximum size of a clique class K in any optimal ( P + P )-free clique-covering of G is st least 4. Any vertex of G is non-adjacent to at most one vertex of K . Infact, since G is ( K − e )-free, G is a clique. In other words, since we may assume that it isconnected, G consists of a single vertex.Next assume that any optimal covering contains a clique class of size 3. Since every edgeof K dominates G , we partition the vertices of G \ K into 4 sets as follows. Let K = xyz and let X be the set of vertices non-adjacent to x , Y the set of vertices non-adjacent to y and Z the set of vertices non-adjacent to z . Additionally, let W be the set of vertices of G \ K adjacent to every vertex of K .The vertices of W form a clique as G is K − e -free. Also, since G is ( K − e )-free, novertex of W is adjacent to any vertex of X , Y or Z . Therefore, unless G is a clique, no twovertices of W belong to the same clique class. Hence each vertex of W forms a single vertexclique class. In fact, if W is non-empty, K is the only clique class of size greater than 1 andthe minimum size of a P + P -free clique-covering of G including K is n − W is empty. Since G is ( K − e )-free, each of X , Y and Z are P -free. Therefore each connected component of X , Y or Z is a clique. If some optimal( P + P )-free clique-covering contains a clique class of size 3 T = x y z in addition to K ,this clique class consists of one vertex from each of the sets X , Y and Z since no edge insideone of these sets dominates K . The vertex x must dominate each component of Y which . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 25 does not contain y . Therefore, since G is ( K − e )-free, each of these components has sizeat most one. In other words X , Y and Z each have at most one connected component ofsize at least 2 and any clique class of size 3 contains a vertex from this component.At least one of the three sets, say X , contains a connected component C of size at leasttwo since we may assume that G contains 4 P . Since the edge y z dominates X , C has sizeexactly 2. Therefore each ( P + P )-free clique-covering including k contains either 0, 1 or 2clique classes of size 3 in addition to K .Therefore we can find an optimal ( P + P )-free clique-covering of G as follows. Foreach triangle T of G , we first test whether G \ T can be divided into sets X , Y and Z asdescribed above. If so, we first find the maximum size of a matching among the edges of G \ K which dominate G to decide the minimum size of a ( P + P )-free clique-covering withno clique class of size at least 3 except K . We then consider each of at most 2 n possibletriangles T in G \ T which dominate G , again finding the maximum size of a matchingamong edges of G \ T \ T which dominate G to decide the minimum size of a ( P + P )-freeclique-covering whose only clique classes of size at least 3 are T and T . Finally we considermaximum matchings among the edges of G − T − T − T which dominate G for each of atmost n possible pairs of triangles T and T to find the minimum size of a ( P + P )-freeclique-covering with three clique classes of size 3. Let m be the minimum, over all triangles T , of the minimum size of a ( P + P )-free clique-covering including T as a clique class. Theminimum size of a ( P + P )-free clique-covering of G is then the minimum of m and n − M where M is the size of a maximum matching among the dominating edges of G .Next we consider (2 P + P )-free graphs. Again, note that G has an injective colouringwith k colours if and only if G has a ( P + P )-free clique-covering with k clique classes.Wefirst show that if any optimal ( P + P )-free clique-covering of G contains a clique class ofsize at least 4 then G is a clique.Assume such a clique-covering C contains a clique class K of size at least 3. Each vertexof G is non-adjacent to at most one vertex of K since C is ( P + P )-free. If no vertex of G \ K has a non-neighbour in K then G = K since we may assume that G is connectedand in this case there is no path in G between K and G \ K . Since G is connected and thevertices of K induce an independent set in G , K has size 1, a contradiction. Therefore theremust exist a vertex of G with a non-neighbour in K . However the set of vertices of G \ K dominating K is complete to the set of vertices of G with a non-neighbour in K since G is2 P + P -free. To see this note that the graph induced by a vertex v which dominates K , avertex u non-adjacent to v and one vertex x of K and two further vertices x and x of K is isomorphic to 2 P + P . Therefore no vertex of G \ K dominates K since otherwise G isdisconnected.Let K = x . . . x p and partition the vertices of G into sets X . . . X p of vertices non-adjacent to x i . First note that each set X i is independent since otherwise two adjacentvertices of X i together with x i and two further vertices of K induce 2 P + P . The graphinduced by the sets X . . . X p is complete multipartite since any two non-adjacent vertices u and v of different sets X i and X j together with x i and two further vertices of K induces2 P + P . This implies that G is the disjoint union of cliques, hence G is a clique since wemay assume it is connected.Therefore, either G is a clique with injective chromatic number n or each colour class inany optimal colouring of G has size at most 2. Finding an optimal colouring of this form isequivalent to finding s maximum matching among the dominating edges of G .Finally, we consider the case of ( P + P )-free graphs. We may assume the input graph G contains P as an induced subgraph since Injective Colouring is polynomial-time H -Free Graphs solvable for P -free graphs.Let P = x x x x be some induced P . Each vertex of G \ P has at least one neighbouron P since G is ( P + P )-free. We first show that any colour class in an injective colouringof G has size at most 2. Assume some colour class has size at least 3. We first considerthe case where this colour appears twice on P , therefore we may assume c ( x ) = c ( x ) = 1.However, any other vertex of this colour class must be adjacent to at least one of x and x , inducing a bichromatic P . Next consider the case where a colour class C has size atleast 3 and this colour is assigned to one vertex v of P . If v is an internal vertex of P thenany other vertex of this colour class must be adjacent only to the non-neighbour of v on P . Therefore C contains at most one further vertex. Finally, consider the case where somecolour class C does not appear on P but has size at least 3. No two vertices of C share aneighbour on P but each one has at least one neighbour on P . Therefore there exist twovertices u and v of C with adjacent neighbours on P . These four vertices, together with athird vertex of C , induce a copy of P + P , a contradiction. Therefore each colour class inan injective colouring of G has size at most 2 and we can find the minimum size of such acolouring by finding a maximum matching among the dominating edges of G . (cid:74) We now prove the following hardness result, again for the case where k is part of the input. (cid:73) Lemma 16.
Injective Colouring is NP -complete for P -free graphs. Proof.
We first show that
Colouring remains NP -complete given a partition of the instance G into four cliques. The Clique Covering problem is NP -complete for planar graphs [39].A 4-colouring of a planar graph G can be found in quadratic time [48] and gives a partitionof G into four cliques. Hence, given a planar instance G of clique-covering, we construct aninstance ( G, c ) of
Colouring where c is a 4-colouring of G such that the chromatic numberof G is equal to the clique-covering number of G .We now give a reduction from this problem to Injective Colouring for 6 P -free graphs.Given a graph G and a partition c into four cliques C . . . C , let G be the graph obtainedfrom G by deleting those vertices with no neighbours outside of their own clique C i . Then G can be coloured with k colours if and only if G can be coloured with k colours and themaximum size of a clique in the partition c of G is at most k . To see this, note that thevertices of G \ G then have degree at most k −
1, hence we can greedily colour these verticesgiven a k -colouring of G .This instance ( G , c ) of Colouring given a partition of G into four cliques can thenbe transformed in polynomial time to an instance G of Injective Colouring as follows.Add a fifth clique C with one vertex v e for each edge e = xy in G which has endpoints intwo different cliques of c . For each such edge, replace e by two edges xv e and yv e . G hasa colouring with k colours if and only if G has an injective colouring with k + m colourswhere m is the number of edges in G with endpoints in different cliques. To see this, notethat in any injective colouring of G , the set of colours used in C is disjoint from the set ofthose used in the cliques C . . . C . Therefore if G can be injective coloured with m + k colours then G can be coloured with k colours. On the other hand, colour the vertices of C . . . C as they are coloured in some k colouring of G and C with m further colours. Thisis an injective colouring of G since any induced P contains either two vertices of C or onevertex of C and two vertices adjacent in G . In either case the path must be coloured withthree distinct colours. This implies that G has an injective colouring with k + m colours ifand only if G has a colouring with k colours. (cid:74) . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 27 We combine the above results with results of Bodlaender et al. [7] and Mahdian [46] to proveTheorem 3.
Theorem 3 (restated).
Let H be a graph. For the class of H -free graphs it holds that:(i) Injective Colouring is polynomial-time solvable if H ⊆ i P or H ⊆ i P + P or H ⊆ i P + P and NP -complete if H is not a forest or P ⊆ i H or P ⊆ i H .(ii) For every k ≥ , Injective k -Colouring is polynomial-time solvable if H is a linearforest and NP -complete otherwise. Proof.
We first prove (ii). If C ⊆ i H , then we use Lemma 14. Now suppose C p ⊆ i H forsome p ≥
4. Mahdian [46] proved that for every g ≥ k ≥ Injective k -Colouring is NP -complete for line graphs of bipartite graphs of girth at least g . These graphs may notbe C -free but for g ≥ p + 1 they are C p -free. Now assume H has no cycle, so H is a forest.If H contains a vertex of degree at least 3, then H contains an induced K , . As every linegraph is K , -free, we can use the aforementioned result of Mahdian [46] again. Otherwise H is a linear forest, in which case we use Corollary 5.We now prove (i). Due to (ii), we may assume that H is a linear forest. If H ⊆ i P or H ⊆ i P + P , then we use Lemma 15. Now suppose that 2 P ⊆ i H . Then the class of(2 P , C , C )-free graphs (split graphs) are contained in the class of H -free graphs. Recallthat Bodlaender et al. [7] proved that Injective Colouring is NP -complete for split graphs.If 6 P ⊆ i H , then we use Lemma 16. (cid:74) Our complexity study led to three complete and three almost complete complexity classifica-tions (Theorems 1–3). Due to our systematic approach we were able to identify a number ofopen questions for future research, which we collect below.In Lemma 6 of our extended abstract [8], we proved that for every g ≥ Acyclic -Colouring is NP -complete for graphs of girth at least g . In Lemma 6 we have improvedthis result to Acyclic k -Colouring for all k ≥
3, thus answering the first open problemfrom [8].We would like to prove an analogous result for the third problem we considered (recallthat
Injective -Colouring is polynomial-time solvable for general graphs). (cid:66) Open Problem 1.
For every g ≥
4, determine the complexity of
Injective Colouring and
Injective k -Colouring ( k ≥
4) for graphs of girth at least g .This problem has eluded us and remains open and is, we believe, challenging. We have madeprogress for the corresponding high-girth problem for Star -Colouring in Lemma 10.However, we leave the high-girth problem for Star k -Colouring open for k >
3, as follows.We believe it represents an interesting technical challenge. (cid:66)
Open Problem 2.
For every g ≥
4, determine the complexity of
Star k -Colouring ( k ≥
4) for graphs of girth at least g .Naturally we also aim to settle the remaining open cases for our three problems in Table 1.In particular, there is one case left for Star Colouring . (cid:66) Open Problem 3.
Determine the complexity of
Star Colouring for 2 P -free graphs. H -Free Graphs Recall that the other two problems and also
Colouring are all NP -complete for 2 P -freegraphs. However, none of the hardness constructions carry over to Star Colouring . Inthis context, the next open problem for a subclass of 2 P -free graphs, namely split graphs,or equivalently (2 P , C , C )-free graphs, is also interesting. (cid:66) Open Problem 4.
Determine the complexity of
Star Colouring for split graphs.Finally, we recall that
Injective Colouring is also known as L (1 , L ( a , . . . , a p ) -Labelling is to decide if a graph G hasa labelling c : V ( G ) → { , . . . , k } for some integer k ≥ i ∈ { , . . . , p } , | c ( u ) − c ( v ) | ≥ a i whenever u and v are two vertices of distance i in G (in this setting, itis usually assumed that a ≥ . . . ≥ a p ). If k is fixed, we write L ( a , . . . , a p ) - k -Labelling instead. By applying Theorem 4 we obtain the following result. (cid:73) Theorem 17.
For all k ≥ , a ≥ , . . . , a k ≥ , the L ( a , . . . , a p ) - k -Labelling problemis polynomial-time solvable for H -free graphs if H is a linear forest. We leave a more detailed and systematic complexity study of problems in this frameworkfor future work (see, for example, [12, 24, 25] for some complexity results for both generalgraphs and special graph classes).We would like also to settle the remaining five open cases for
Injective k -Colouring that are left in Table 1. We have improved this from the ten open cases remaining fromour extended abstract [8] and these appear as cases (3 P + P )-free, (2 P + P )-free and( P + P )-free in Lemma 15.Finally, we should address Open Problem 5 from our extended abstract [8], to determinethe complexity of Injective Colouring for bipartite graphs. In fact, we posed this questionin error, it was already solved, since the construction of Lemma 12 in [8] is bipartite. In thispaper, the corresponding result appears as Lemma 14 (note we prove hardness for fixed k whereupon hardness for k part of the input follows a fortiori). References Michael O. Albertson, Glenn G. Chappell, Henry A. Kierstead, André Kündgen, and RadhikaRamamurthi. Coloring with no 2-colored P ’s. Electronic Journal of Combinatorics , 11, 2004. Noga Alon, Colin McDiarmid, and Bruce A. Reed. Acyclic coloring of graphs.
RandomStructures and Algorithms , 2:277–288, 1991. Noga Alon and Ayal Zaks. Algorithmic aspects of acyclic edge colorings.
Algorithmica ,32:611–614, 2002. Patrizio Angelini and Fabrizio Frati. Acyclically 3-colorable planar graphs.
Journal ofCombinatorial Optimization , 24:116–130, 2012. Aistis Atminas, Vadim V. Lozin, and Igor Razgon. Linear time algorithm for computing asmall biclique in graphs without long induced paths.
Proceedings of SWAT 2012, LNCS ,7357:142–152, 2012. Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth.
SIAM Journal on Computing , 25:1305–1317, 1996. Hans L. Bodlaender, Ton Kloks, Richard B. Tan, and Jan van Leeuwen. Approximations forlambda-colorings of graphs.
Computer Journal , 47:193–204, 2004. Jan Bok, Nikola Jedli˘cková, Barnaby Martin, Daniël Paulusma, and Siani Smith. Acyclic, starand injective colouring: A complexity picture for h -free graphs. In , LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik,2020. . Bok, N. Jedli˘cková, B. Martin, D. Paulusma and S. Smith 29 Marthe Bonamy, Konrad K. Dabrowski, Carl Feghali, Matthew Johnson, and Daniël Paulusma.Independent feedback vertex set for P -free graphs. Algorithmica , 81:1342–1369, 2019. Oleg V. Borodin. On acyclic colorings of planar graphs.
Discrete Mathematics , 25:211–236,1979. Hajo Broersma, Petr A. Golovach, Daniël Paulusma, and Jian Song. Updating the complexitystatus of coloring graphs without a fixed induced linear forest.
Theoretical Computer Science ,414:9–19, 2012. Tiziana Calamoneri. The L ( h, k )-labelling problem: An updated survey and annotatedbibliography. Computer Journal , 54:1344–1371, 2011. Christine T. Cheng, Eric McDermid, and Ichiro Suzuki. Planarization and acyclic colorings ofsubcubic claw-free graphs.
Proc. of WG 2011, LNCS , 6986:107–118, 2011. Maria Chudnovsky, Shenwei Huang, Sophie Spirkl, and Mingxian Zhong. List-three-coloringgraphs with no induced P + rP . CoRR , abs/1806.11196, 2018. Thomas F. Coleman and Jin-Yi Cai. The cyclic coloring problem and estimation of sparseHessian matrices.
SIAM Journal on Algebraic Discrete Methods , 7:221–235, 1986. Bruno Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finitegraphs.
Information and Computation , 85:12–75, 1990. Zdeněk Dvořák, Bojan Mohar, and Robert Šámal. Star chromatic index.
Journal of GraphTheory , 72(3):313–326, 2013. Thomas Emden-Weinert, Stefan Hougardy, and Bernd Kreuter. Uniquely colourable graphsand the hardness of colouring graphs of large girth.
Combinatorics, Probability and Computing ,7:375–386, 1998. Paul Erdős. Graph theory and probability.
Canadian Journal of Mathematics , 11:34–38, 1959. Guillaume Fertin, Emmanuel Godard, and André Raspaud. Minimum feedback vertex set andacyclic coloring.
Information Processing Letters , 84:131–139, 2002. Guillaume Fertin and André Raspaud. Acyclic coloring of graphs of maximum degree five:Nine colors are enough.
Information Processing Letters , 105:65–72, 2008. Guillaume Fertin, André Raspaud, and Bruce A. Reed. Star coloring of graphs.
Journal ofGraph Theory , 47(3):163–182, 2004. Jiří Fiala, Petr A. Golovach, and Jan Kratochvíl. Parameterized complexity of coloringproblems: Treewidth versus vertex cover.
Theoretical Computer Science , 412:2513–2523, 2011. Jiří Fiala, Petr A. Golovach, Jan Kratochvíl, Bernard Lidický, and Daniël Paulusma. Distancethree labelings of trees.
Discrete Applied Mathematics , 160:764–779, 2012. Jiří Fiala, Ton Kloks, and Jan Kratochvíl. Fixed-parameter complexity of lambda-labelings.
Discrete Applied Mathematics , 113:59–72, 2001. Esther Galby, Paloma T. Lima, Daniël Paulusma, and Bernard Ries. Classifying k -edgecolouring for H -free graphs. Information Processing Letters , 146:39–43, 2019. Michael R. Garey and David S. Johnson.
Computers and Intractability; A Guide to the Theoryof NP-Completeness . W. H. Freeman & Co., USA, 1990. Petr A. Golovach, Matthew Johnson, Daniël Paulusma, and Jian Song. A survey on thecomputational complexity of colouring graphs with forbidden subgraphs.
Journal of GraphTheory , 84:331–363, 2017. Petr A. Golovach, Daniël Paulusma, and Jian Song. Coloring graphs without short cycles andlong induced paths.
Discrete Applied Mathematics , 167:107–120, 2014. Geňa Hahn, Jan Kratochvíl, Jozef Širáň, and Dominique Sotteau. On the injective chromaticnumber of graphs.
Discrete Mathematics , 256:179–192, 2002. Pavol Hell, André Raspaud, and Juraj Stacho. On injective colourings of chordal graphs.
Proc.LATIN 2008, LNCS , 4957:520–530, 2008. Ian Holyer. The NP-completeness of edge-coloring.
SIAM Journal on Computing , 10:718–720,1981. Shenwei Huang, Matthew Johnson, and Daniël Paulusma. Narrowing the complexity gap forcolouring ( C s , P t )-free graphs. Computer Journal , 58:3074–3088, 2015. H -Free Graphs Robert Janczewski, Adrian Kosowski, and Michal Malafiejski. The complexity of the L ( p, q )-labeling problem for bipartite planar graphs of small degree. Discrete Mathematics , 309:3270–3279, 2009. Jing Jin, Baogang Xu, and Xiaoyan Zhang. On the complexity of injective colorings and itsgeneralizations.
Theoretical Computer Science , 491:119–126, 2013. Ross J. Kang and Tobias Müller. Frugal, acyclic and star colourings of graphs.
Discret. Appl.Math. , 159:1806–1814, 2011. T. Karthick. Star coloring of certain graph classes.
Graphs and Combinatorics , 34:109–128,2018. Tereza Klimošová, Josef Malík, Tomáš Masařík, Jana Novotná, Daniël Paulusma, and VeronikaSlívová. Colouring ( P r + P s )-free graphs. Proc. ISAAC 2018, LIPIcs , 123:5:1–5:13, 2018. Daniel Král’, Jan Kratochvíl, Zsolt Tuza, and Gerhard J. Woeginger. Complexity of coloringgraphs without forbidden induced subgraphs.
Proc. WG 2001, LNCS , 2204:254–262, 2001. Hui Lei, Yongtang Shi, and Zi-Xia Song. Star chromatic index of subcubic multigraphs.
Journal of Graph Theory , 88:566–576, 2018. Daniel Leven and Zvi Galil. NP-completeness of finding the chromatic index of regular graphs.
Journal of Algorithms , 4:35–44, 1983. Cláudia Linhares-Sales, Ana Karolinna Maia, Nícolas A. Martins, and Rudini Menezes Sampaio.Restricted coloring problems on graphs with few P ’s. Annals of Operations Research , 217:385–397, 2014. Errol L. Lloyd and Subramanian Ramanathan. On the complexity of distance-2 coloring.
Proc.ICCI 1992 , pages 71–74, 1992. Vadim V. Lozin and Marcin Kamiński. Coloring edges and vertices of graphs without short orlong cycles.
Contributions to Discrete Mathematics , 2(1), 2007. Andrew Lyons. Acyclic and star colorings of cographs.
Discrete Applied Mathematics , 159:1842–1850, 2011. Mohammad Mahdian. On the computational complexity of strong edge coloring.
DiscreteApplied Mathematics , 118:239–248, 2002. Debajyoti Mondal, Rahnuma Islam Nishat, Md. Saidur Rahman, and Sue Whitesides. Acycliccoloring with few division vertices.
Journal of Discrete Algorithms , 23:42–53, 2013. Neil Robertson, Daniel P. Sanders, Paul D. Seymour, and Robin Thomas. The four-colourtheorem.
Journal of Combinatorial Theory, Series B , 70:2–44, 1997. Arunabha Sen and Mark L. Huson. A new model for scheduling packet radio networks.
Wireless Networks , 3:71–82, 1997. Vadim Georgievich Vizing. On an estimate of the chromatic class of a p -graph. Diskret Analiz ,3:25–30, 1964. David R. Wood. Acyclic, star and oriented colourings of graph subdivisions.
DiscreteMathematics and Theoretical Computer Science , 7:37–50, 2005. Xiao-Dong Zhang and Stanislaw Bylka. Disjoint triangles of a cubic line graph.
Graphs andCombinatorics , 20:275–280, 2004. Xiao Zhou, Yasuaki Kanari, and Takao Nishizeki. Generalized vertex-coloring of partial k -trees. IEICE Transactions on Fundamentals of Electronics, Communication and Computer Sciences ,E83-A:671–678, 2000. Enqiang Zhu, Zepeng Li, Zehui Shao, and Jin Xu. Acyclically 4-colorable triangulations.