Digraph Coloring and Distance to Acyclicity
DDigraph Coloring and Distance to Acyclicity
Ararat Harutyunyan
Université Paris-Dauphine, PSL Research University, CNRS, UMR 7243, LAMSADE, Paris, [email protected]
Michael Lampis
Université Paris-Dauphine, PSL Research University, CNRS, UMR 7243, LAMSADE, Paris, [email protected]
Nikolaos Melissinos
Université Paris-Dauphine, PSL Research University, CNRS, UMR 7243, LAMSADE, Paris, [email protected]
Abstract In k - Digraph Coloring we are given a digraph and are asked to partition its vertices into atmost k sets, so that each set induces a DAG. This well-known problem is NP-hard, as it generalizes(undirected) k - Coloring , but becomes trivial if the input digraph is acyclic. This poses the naturalparameterized complexity question what happens when the input is “almost” acyclic. In this paperwe study this question using parameters that measure the input’s distance to acyclicity in either thedirected or the undirected sense.In the directed sense perhaps the most natural notion of distance to acyclicity is directed feedbackvertex set (DFVS). It is already known that, for all k ≥ k - Digraph Coloring is NP-hard ondigraphs of DFVS at most k + 4. We strengthen this result to show that, for all k ≥ k - DigraphColoring is already NP-hard for DFVS exactly k . This immediately provides a dichotomy, as k - Digraph Coloring is trivial if DFVS is at most k −
1. Refining our reduction we obtain twofurther consequences: (i) for all k ≥ k - Digraph Coloring is NP-hard for graphs of feedback arc set (FAS) at most k ; interestingly, this leads to a second dichotomy, as we show that the problemis FPT by k if FAS is at most k −
1; (ii) k - Digraph Coloring is NP-hard for graphs of DFVS k , even if the maximum degree ∆ is at most 4 k −
1; we show that this is also almost tight, as theproblem becomes FPT for DFVS k and ∆ ≤ k − k - Digraph Coloring admits an FPT algorithm parameterized by treewidth, whose parameter dependence is (tw!) k tw .Since this is considerably worse than the k tw dependence of (undirected) k - Coloring , we pose thequestion of whether the tw! factor can be eliminated. Our main contribution in this part is to settlethis question in the negative and show that our algorithm is essentially optimal, even for the muchmore restricted parameter treedepth and for k = 2. Specifically, we show that an FPT algorithmsolving 2- Digraph Coloring with dependence td o (td) would contradict the ETH. Mathematics of computing → Graph algorithms; Theory of Com-putation → Design and Analysis of Algorithms → Parameterized Complexity and Exact Algorithms
Keywords and phrases
Digraph Coloring, Dichromatic number, NP-completeness, Parameterizedcomplexity, Feedback vertex and arc sets In Digraph Coloring , we are given a digraph D and are asked to calculate the smallest k such that the vertices of D can be partitioned into k acyclic sets. In other words, the objectiveof this problem is to color the vertices with the minimum number of colors so that no directedcycle is monochromatic. The notion of dichromatic number was introduced by V. Neumann-Lara [37]. More recently, digraph coloring has received much attention, in part because it turnsout that many results about the chromatic number of undirected graphs quite naturally carryover to the dichromatic number of digraphs [1, 2, 4, 7, 11, 20, 21, 22, 23, 24, 32, 34, 35, 38]. a r X i v : . [ c s . CC ] O c t Digraph Coloring and Distance to Acyclicity
We note that
Digraph Coloring generalizes
Coloring (if we simply replace all edges of agraph by pairs of anti-parallel arcs) and is therefore NP-complete.In this paper we are interested in the computational complexity of
Digraph Coloring from the point of view of structural parameterized complexity . Our main motivationfor studying this is that (undirected) Coloring is a problem of central importance inthis area whose complexity is well-understood, and it is natural to hope that some of theknown tractability results may carry over to digraphs – especially because, as we mentioned,
Digraph Coloring seems to behave as a very close counterpart to
Coloring in manyrespects. In particular, for undirected graphs, the complexity of
Coloring for “almost-acyclic” graphs is very precisely known: for all k ≥ O ∗ ( k tw ) algorithm, wheretw is the input graph’s treewidth, and this is optimal (under the SETH) even if we replacetreewidth by much more restrictive parameters [27, 33]. Can we achieve the same amount ofprecision for Digraph Coloring ? Our results
The main question motivating this paper is therefore the following: Does
Digraph Coloring also become tractable for “almost-acyclic” inputs? We attack thisquestion from two directions.First, we consider the notion of acyclicity in the digraph sense and study cases where theinput digraph is close to being a DAG. Possibly the most natural such measure is directedfeedback vertex set (DFVS), which is the minimum number of vertices whose removal destroysall directed cycles. The problem is paraNP-hard for this parameter, as for all fixed k ≥ k - Digraph Coloring is already known to be NP-hard, for inputs of DFVS at most k + 4[34]. Our first contribution is to tighten this result by showing that actually k - DigraphColoring is already NP-hard for DFVS of size exactly k . This closes the gap left by thereduction of [34] and provides a complete dichotomy, as the problem is trivially FPT by k when the DFVS has size strictly smaller than k (the only non-trivial part of the problem inthis case is to find the DFVS [10]).This negative result motivates us to either consider a more restricted notion of near-acyclicity, or to impose further restrictions, such as bounding the maximum degree of thegraph. Unfortunately, we show that neither of these suffices to make the problem tractable.In particular, by refining our reduction we obtain the following: First, we show that for all k ≥ k - Digraph Coloring is NP-hard for digraphs of feedback arc set (FAS) k , thatis, digraphs where there exists a set of k arcs whose removal destroys all cycles (feedbackarc set is of course a more restrictive parameter than feedback vertex set). Interestingly,this also leads us to a complete dichotomy, this time for the parameter FAS: we show that k -coloring becomes FPT (by k ) on graphs of FAS at most k −
1, by an argument thatreduces this problem to coloring a subdigraph with at most O ( k ) vertices, and hence thecorrect complexity threshold for this parameter is k . Second, we show that k -coloring adigraph with DFVS k remains NP-hard even if the maximum degree is at most 4 k −
1. Thisfurther strengthens the reduction of [34], which showed that the problem is NP-hard forbounded degeneracy (rather than degree). Almost completing the picture, we show that k -coloring a digraph with DFVS k and maximum degree at most 4 k − k , leavingopen only the case where the DFVS is exactly k and the maximum degree exactly 4 k − In the remainder, we assume the reader is familiar with the basics of parameterized complexity theory,such as the class FPT, as given in standard textbooks [12]. . Harutyunyan, M. Lampis, and N. Melissinos 3 acyclicity and hence it’s unreasonable to expect
Digraph Coloring with these parametersto be as tractable as
Coloring for treewidth. Therefore, in the second part of the paperwe make a more “fair” comparison and parameterize the problem by the treewidth of theunderlying graph. It turns out that, finally, this suffices to lead to an FPT algorithm, obtainedwith standard DP techniques. However, our algorithm has a somewhat disappointing runningtime of (tw!) k tw n O (1) , which is significantly worse than the k tw n O (1) complexity which isknown to be optimal for undirected Coloring , especially for small values of k . This raisesthe question of whether the extra (tw!) factor can be removed. Our main contribution inthis part is to show that this is likely impossible, even for a more restricted case. Specifically,we show that if the ETH is true, no algorithm can solve 2- Digraph Coloring in time td o (td) n O (1) , where td is the input graph’s treedepth, a parameter more restrictive thantreewidth (and pathwidth). As a result, this paper makes a counterpoint to the line ofresearch that seeks to find ways in which dichromatic number replicates the behavior ofchromatic number in the realm of digraphs by pinpointing one important aspect where thetwo notions are quite different, namely their complexity with respect to treewidth. Other related work
Structural parameterizations of
Digraph Coloring have been studiedin [38], who showed that the problem is FPT by modular width generalizing the algorithms of[18, 29]; and [20] who showed that the problem is in XP by clique-width (note that hardnessresults for
Coloring rule out an FPT algorithm in this case [16, 17, 30]). Our resultson the hardness of the problem for bounded DFVS and FAS build upon the work of [34].The fact that the problem is hard for bounded DFVS implies that it is also hard for mostversions of directed treewidth, including DAG-width, Kelly-width, and directed pathwidth[6, 19, 25, 28, 31]. Indeed, hardness for FAS implies also hardness for bounded eliminationwidth, a more recently introduced restriction of directed treewidth [15]. For undirectedtreewidth, a problem with similar behavior is DFVS: (undirected) FVS is solvable in O ∗ (3 tw )[13] but DFVS cannot be solved in time tw o (tw) n O (1) , and this is tight under the ETH [8].For other natural problems whose complexity by treewidth is tw Θ(tw) see [3, 5, 9]With respect to maximum degree, it is not hard to see that k - Digraph Coloring isNP-hard for graphs of maximum degree 2 k + 2, because k - Coloring is NP-hard for graphsof maximum degree k + 1, for all k ≥ . On the converse side, using a generalization ofBrooks’ theorem due to Mohar [36] one can see that k - Digraph Coloring digraphs ofmaximum degree 2 k is in P. This leaves as the only open case digraphs of degree 2 k + 1,which in a sense mirrors our results for digraphs of DFVS k and degree 4 k −
2. We notethat the NP-hardness of 2-
Digraph Coloring for bounded degree graphs is known evenfor graphs of large girth, but the degree bound follows the imposed bound on the girth [14].
We use standard graph-theoretic notation. All digraphs are loopless and have no parallelarcs; two oppositely oriented arcs between the same pair of vertices, however, are allowedand are called a digon . The in-degree (respectively, out-degree) of a vertex is the number ofarcs going out of (respectively coming into) a vertex. The degree of a vertex is the sum of itsin-degree and out-degree. For a set of arcs F , V ( F ) denotes the set of their endpoints. For a Note that this argument does not prove that 2-
Digraph Coloring is NP-hard for maximum degree 6,but this is not too hard to show. We give a proof in Theorem 11 for the sake of completeness.
Digraph Coloring and Distance to Acyclicity set of vertices S of a digraph D , D [ S ] denotes the digraph induced by S and N [ S ] denotesthe closed neighborhood of S , that is, S and all vertices that have an arc to or from S .The chromatic number of a graph G is the minimum number of colors k needed to colorthe vertices of G such that each color class is an independent set. We say that a digraph D = ( V, E ) is k -colorable if we can color the vertices of D with k colors such that eachcolor class induces an acyclic subdigraph (such a coloring is called a proper k -coloring ). The dichromatic number , denoted by ~χ ( D ), is the minimum number k for which D is k -colorable.A subset of vertices S ⊂ V of D is called a feedback vertex set if D − S is acyclic. Asubset of arcs A ⊂ E of D is called a feedback arc set if D − A is acyclic. For the definition oftreewidth and nice tree decompositions we refer the reader to [12]. A graph G has treedepthat most k if one of the following holds: (i) G has at most k vertices (ii) G is disconnectedand all its components have treedepth at most k (iii) there exists u ∈ V ( G ) such that G − u has treedepth at most k −
1. We use tw( G ) , td( G ) to denote the treewidth and treedepth ofa graph. It is known that tw( G ) ≤ td( G ) for all graphs G .The Exponential Time Hypothesis (ETH) [26] states that there is a constant c > formulas with n variables and m clauses aresatisfiable can run in time c n + m . In this paper we will use the simpler (and slightly weaker)version of the ETH which simply states that cannot be solved in time 2 o ( n + m ) .Throughout the paper, when n is a positive integer we use [ n ] to denote the set { , . . . , n } .For a set V an ordering of V is an injective function σ : V → [ | V | ]. It is a well-known factthat a digraph D is acyclic if and only if there exists an ordering σ of V ( D ) such that for allarcs uv we have σ ( u ) < σ ( v ). This is called a topological ordering of D . In this section we study the complexity of the problem parameterized by the size of thefeedback vertex set of a digraph. Throughout we will assume that a feedback vertex set isgiven to us; if not we can use known FPT algorithms to find the smallest such set [10].Our main result in this section is that k - Digraph Coloring is NP-hard for graphs ofDFVS k . We begin with an easy observation showing that this result will be best possible. (cid:73) Remark 1.
Every digraph D = ( V, E ) with feedback vertex set of size at most k − k -colorable.The remark holds because we can use distinct colors for the vertices of the feedbackvertex set and the remaining color for the rest of the graph. Building on this we can make afurther easy remark. (cid:73) Remark 2.
Let D = ( V, E ) be a digraph with feedback vertex set F of size | F | = k . If F does not induce a bi-directed clique, then D is k -colorable.Indeed, if u, v ∈ F are not connected by a digon we can use one color for { u, v } , k − F , and the remaining color for the rest of the graph. Remark 2will also be useful later in designing an algorithm, but at this point it is interesting becauseit tells us that, since the graphs we construct in our reduction have DFVS k and must insome cases have ~χ ( D ) > k , our reduction needs to construct a bi-directed clique of size k .Before we go on to our reduction let us also mention that we will reduce from a restrictedversion of with the following properties: (i) all clauses are allowed to have either onlypositive literals or only negative literals (ii) all variables appear at most 2 times positive and1 time negative. We call this Restricted-3-SAT . . Harutyunyan, M. Lampis, and N. Melissinos 5 (cid:73) Lemma 3.
Restricted-3-SAT is NP-hard and cannot be solved in o ( n + m ) time unlessthe ETH is false. Proof.
Start with an arbitrary instance φ of with n variables and m clauses. We firstmake sure that every variable appears at most 3 times as follows. Suppose that x appears ‘ ≥ φ . We replace each appearance of x with a fresh variable x i , i ∈ [ ‘ ] and add tothe formula the clauses ( ¬ x ∨ x ) ∧ ( ¬ x ∨ x ) . . . ( ¬ x ‘ ∨ x ). Repeating this for all variablesthat appear at least 4 times produces an equivalent instance φ with O ( n + m ) variables andclauses such that all literals appear at most 2 times. We now edit φ as follows: for eachvariable x of φ we replace every occurence of ¬ x with a fresh variable x . We then add theclause ( ¬ x ∨ ¬ x ). This gives a new equivalent instance φ which also has O ( n + m ) variablesand clauses and satisfies all properties of Restricted-3-SAT . (cid:74)(cid:73) Theorem 4.
For all k ≥ , it is N P -hard to decide if a digraph D = ( V, E ) is k -colorableeven when the size of its feedback vertex set is k . Furthermore, this problem cannot be solvedin time o ( n ) unless the ETH is false. Proof.
We will prove the theorem for k = 2. To obtain the proof for larger values one canadd to the construction k − k −
2. Note that thisdoes indeed construct a “palette” clique of size k , as indicated by Remark 2.We make a reduction from Restricted-3-SAT , which is NP-hard by Lemma 3. Ourreduction will produce an instance of size linear in the input formula, which leads to theETH-based lower bound. Let φ be the given formula with variables x , . . . , x n , and supposethat clauses c , . . . , c ‘ contain only positive literals, while clauses c ‘ +1 , . . . , c m contain onlynegative literals. We will assume without loss of generality that all variables appear in φ both positive and negative (otherwise φ can be simplified).We begin by constructing two “palette” vertices v , v which are connected by a digon.Then, for each clause c i , i ∈ [ m ] we do the following: if the clause has size three we constructa directed path with vertices l i, , w i, , l i, , w i, , l i, , where the vertices l i, , l i, , l i, representthe literals of the clause; if the clause has size two we similarly construct a directed pathwith vertices l i, , w i, , l i, , where again l i, , l i, represent the literals of the clause.For each variable x j , j ∈ [ n ] we do the following: for each clause c i where x j appearspositive and clause c i where x j appears negative we construct a vertex w j,i ,i and add anincoming arc from the vertex that represents the literal x j in the directed path of c i to w j,i ,i ; and an outgoing arc from w j,i ,i to the vertex that represents the literal ¬ x j in thedirected path of c i .Finally, to complete the construction we connect the palette vertices to the rest of thegraph as follows: v is connected with a digon to all existing vertices w i,j , i ∈ [ m ] , j ∈ [2]; v is connected with a digon to all existing vertices w j,i ,i ; v has an outgoing arc to the firstvertex of each directed path representing a clause and an incoming arc from the last vertexof each such path; v has an outgoing arc to all vertices that represent positive literals andan incoming arc from all vertices representing negative literals. (See Figure 1)Let us now prove that this reduction implies the theorem. First, we claim that in thedigraph we constructed { v , v } is a feedback vertex set. Indeed, suppose we remove thesetwo vertices. Now every arc in the remaining graph either connects vertices that representthe same clause, or is incident on a vertex w j,i ,i . Observe that these vertices have onlyone incoming and one outgoing arc and because of the ordering of the clauses i < i (sinceclauses that contain negative literals come later in the numbering). We conclude that every Digraph Coloring and Distance to Acyclicity ( α ) v v l i, w i, l i, w i, l i, v v l = x j w j,i ,i l = ¬ x j ( β ) ( γ ) x w , x w , x ¬ x w , ¬ x w , , w , , Figure 1 ( α ): The cycles created by { v , v } and clauses with three literals. ( β ): The cyclescreated by { v , v } and each pair { x, ¬ x } . ( γ ): An example digraph for the formula φ = ( x ∨ x ∨ x ) ∧ ( ¬ x ∨ ¬ x ), without showing v , v . directed path must either stay inside the path representing the same clause or lead to a paththe represents a later clause. Hence, the digraph is acyclic.Let us now argue that if φ is satisfiable then the digraph is 2-colorable. We give color 1to v and 2 to v . We give color 2 to each w i,j and color 1 to each w j,i ,i . Fix a satisfyingassignment for φ . We give color 1 to all vertices l i,j that represent literals set to True bythe assignment and color 2 to all remaining vertices. Let us see why this coloring is acyclic.First, consider a vertex w j,i ,i . This vertex has color 1 and one incoming and one outgoingarc corresponding to opposite literals. Because the literals are opposite, one of them hascolor 2, hence w j,i ,i cannot be in any monochromatic cycle and can be removed. Now,suppose there is a monochromatic cycle of color 1. As { v , v } is a feedback vertex set, thiscycle must include v . Since v and all w i,j have color 2 the vertex after v in the cycle mustbe some l i,j representing a positive literal which was set to True by our assignment. Theonly outgoing arc leaving from l i,j and going to a vertex of color 1 must lead it to a vertex w j ,i,i , which as we said cannot be part of any cycle. Hence, no monochromatic cycle ofcolor 1 exists. Consider then a monochromatic cycle of color 2, which must begin from v .The next vertex on this cycle must be a l i, and since we have eliminated vertices w j,i ,i thecycle must continue in the directed path of clause i . But, since we started with a satisfyingassignment, at least one of the literal vertices of this path has color 1, meaning the cyclecannot be monochromatic.Finally, let us argue that if the digraph is 2-colorable, then φ is satisfiable. Consider a2-coloring which, without loss of generality, assigns 1 to v and 2 to v . The coloring must givecolor 2 to all w i,j and color 1 to all w j,i ,i , because of the digons connecting these vertices tothe palette. Now, we obtain an assignment for φ as follows: for each x j , we find the vertex inour graph that represents the literal ¬ x j (this is unique since each variable appears exactlyonce negative): we assign x j to True if and only if this vertex has color 2. Let us argue thatthis assignment satisfies all clauses. First, consider a clause with all negative literals. If thisclause is not satisfied, then all the vertices representing its literals have color 2. Becausevertices w i,j also all have color 2, this creates a monochromatic cycle with v , contradiction.Hence, all such clauses are satisfied. Second, consider a clause c i with all positive literals. Inthe directed path representing c i at least one literal vertex must have color 1, otherwise wewould get a monochromatic cycle with v . Suppose this vertex represents the literal x j andhas an out-neighbor w j,i,i , which is colored 1. If the out-neighbor of w j,i ,i is also colored1, we get a monochromatic cycle with v . Therefore, that vertex, which represents the literal ¬ x j has color 2. But then, according to our assignment x j is True and c i is satisfied. (cid:74) . Harutyunyan, M. Lampis, and N. Melissinos 7 In this section we first present two algorithmic results: we show that k - Digraph Coloring becomes FPT (by k ) if either the input graph has feedback vertex set k and maximumdegree at most 4 k −
3; or if it has feedback arc set at most k − k - DigraphColoring is NP-hard for digraphs which have simlutaneously a FAS of size k , a feedbackvertex set of size k and maximum degree ∆ = 4 k − Our first result shows that for k - Digraph Coloring , if we are promised a feedback vertexset of size k (which is the smallest value for which the problem is non-trivial), then theproblem remains tractable for degree up to 4 k −
3. Observe that in the case of general digraphs(where we don’t bound the feedback vertex set) the problem is already hard for maximumdegree 2 k + 2 (see Other Related Work section), so this seems encouraging. However, weshow in Theorem 8 that this tractability cannot be extended much further. (cid:73) Theorem 5.
Let D = ( V, E ) be a digraph with feedback vertex set F of size | F | = k andmaximum degree ∆ ≤ k − . Then, D is k -colorable if and only if D [ N [ F ]] is k -colorable.Furthermore, a k -coloring of D [ N [ F ]] can be extended to a k -coloring of D in polynomialtime. Proof.
Let D = ( V, E ) be such a digraph. If D [ N [ F ]] is not k -colorable, then D is not k -colorable, so we need to prove that if D [ N [ F ]] is k -colorable then D is k -colorable and wecan extend this coloring to D . Assume that D [ N [ F ]] is k -colorable. By Remark 2 we canassume that D [ F ] is a bi-directed clique. Let c : N [ F ] → [ k ] be the assumed k -coloring andwithout loss of generality say that F = { v , . . . , v k } and c ( v i ) = i for all i ∈ [ k ].Before we continue let us define the following sets of vertices: we will call V i,in the set ofvertices v ∈ N [ F ] \ F such that c ( v ) = i and there exists an arc vv i ∈ E . Similarly we willcall V i,out the set of vertices v ∈ N [ F ] \ F where c ( v ) = i and there exists an arc v i v ∈ E .The sets V i,in and V i,out are disjoint in any proper coloring (otherwise we would have amonochromatic digon). Furthermore, V i,in ∪ V i,out is disjoint from V j,in ∪ V j,out for j = i (because their vertices have different colors), so all these 2 k sets are pair-wise disjoint. Wefirst show that if one of these 2 k sets is empty, then we can color D . (cid:66) Claim 6.
If for some i ∈ [ k ] one of the sets V i,in , V i,out is empty then we can extend c toa k -coloring of D in polynomial time. Proof.
We keep c unchanged and color all of V ( D ) \ N [ F ] with color i . This is a proper k -coloring. Indeed, this cannot create a monochromatic cycle with color j = i . Furthermore,if a monochromatic cycle of color i exists, since this cycle must intersect F , we conclude thatit must contain v i . However, in the current k -coloring v i either has in-degree or out-degree 0in the vertices colored i , so no monochromatic cycle can go through it. (cid:74) In the remainder we assume that all sets V i,in , V i,out are non-empty. Our strategy will beto edit the k -coloring of D [ N [ F ]] so that we retain a proper k -coloring, but one of these 2 k sets becomes empty. We will then invoke Claim 6 to complete the proof.We now define, for each pair i, j ∈ [ k ] with i < j the set E i,j which contains all arcs withone endpoint in { v i , v j } and the other in V i,in ∪ V i,out ∪ V j,in ∪ V j,out and whose endpoints Digraph Coloring and Distance to Acyclicity have distinct colors. We call E i,j the set of cross arcs for the pair ( i, j ). We will now arguethat for some pair ( i, j ) we must have | E i,j | ≤
3. For the sake of contradiction, assume that | E i,j | ≥ F we have: X i ∈ [ k ] d ( v i ) ≥ k + k (2 k −
2) + X i,j ∈ [ k ] ,i 3. We will recolor V i,in ∪ V i,out ∪ V j,in ∪ V j,out in a waythat allows us to invoke Claim 6. Since we do not change any other color, we will onlyneed to prove that our recoloring does not create monochromatic cycles of colors i or j in D [ N [ F ]]. We can assume that | E i,j | = 3, since if | E i,j | < v i has strictly more cross arcs of E i,j incident to it than v j .We now have to make a case analysis. First, suppose all three arcs of E i,j are incidenton v i . Then, there exists a set among V j,in , V j,out that has at most one arc connecting it to v i . We color this set i , and leave the other set colored j . We also color V i,in ∪ V i,out with j .This creates no monochromatic cycle because: (i) v i now has at most one neighbor colored i in V i,in ∪ V i,out ∪ V j,in ∪ V j,out , so no monochromatic cycle goes through v i ; (ii) v j has eitherno out-neighbors or no in-neighbors colored j in V i,in ∪ V i,out ∪ V j,in ∪ V j,out . With the newcoloring we can invoke Claim 6. In the remainder we therefore assume that two arcs of E i,j are incident on v i and one is incident on v j .Second, suppose that one of V j,in , V j,out has no arcs connecting it to v i . We color this set i and leave the other set colored j . Observe that one of V i,in , V i,out has no arc connecting it to v j . We color that set j and leave the other set colored i . In the new coloring both v i , v j eitherhave no out-neighbor or no in-neighbor with the same color in V i,in ∪ V i,out ∪ V j,in ∪ V j,out ,so the coloring is proper and we can invoke Claim 6. In the remainder we assume that v i hasone arc connecting it to each of V j,in , V j,out .Third, suppose that both arcs of E i,j incident on v i have the same direction (into or outof v i ). We then color V i,in ∪ V i,out with j and V j,in ∪ V j,out with i . In the new coloring v j has at most one neighbor with the same color and v i has either only in-neighbors or onlyout-neighbors with color i , so the coloring is acyclic and we again invoke Claim 6.Finally, we have the case where two arcs of E i,j are incident on v i , they have differentdirections, one has its other endpoint in V j,in and the other in V j,out . Observe that one of V i,in , V i,out has no arc connecting it to v j and suppose without loss of generality that it is V i,in (the other case is symmetric). We color V i,in with j and leave V i,out with color i . Oneof V j,in , V j,out has an incoming arc from v i ; we color this set i and leave the other colored j .Now, v i only has out-neighbors with color i , while v j has at either only in-neighbors or onlyout-neighbors colored j , so we are done in this final case. (cid:74) Our second result concerns a parameter more restricted than feedback vertex set, namelyfeedback arc set. Note that, in a sense, the class of graphs of bounded feedback arc setcontains the class of graphs that have bounded feedback vertex set and bounded degree(selecting all incoming or outgoing arcs of each vertex of a feedback vertex set produces afeedback arc set), so the following theorem may seem more general. However, a closer look . Harutyunyan, M. Lampis, and N. Melissinos 9 reveals that the following result is incomparable to Theorem 5, because graphs of feedbackvertex set k and maximum degree 4 k − k (consider for example a bi-direction of the complete graph K k, k − ), while the followingtheorem is able to handle graphs of unbounded degree but feedback arc set up to (only) k − 1. As we show in Theorem 8, this is tight. (cid:73) Theorem 7. Let D be a digraph with a feedback arc set F of size at most k − . Then D is k -colorable if and only if D [ V ( F )] is k -colorable, and such a coloring can be extended to D in polynomial time. Proof. It is obvious that if D [ V ( F )] is not k -colorable then D is not k -colorable. We willprove the converse by induction. For k = 1 it is trivial to see that if | F | = 0 then D is acyclicso is 1-colorable. Assume then that any digraph D with a feedback arc set F of size at most( k − − k − D [ V ( F )] is ( k − D with a feedback arc set F with | F | ≤ k − D [ V ( F )] is k -colorable (this can be tested in 2 O ( k ) time). Let c : V ( F ) → [ k ] be acoloring of V ( F ). We distinguish two cases: Case 1. There exists a color class (say V k ) such that at least 2 k − F are incidenton V k . Then D − V k has a feedback arc set of size at most | F | − (2 k − ≤ k − − (2 k − ≤ ( k − − V , . . . , V k − remains a valid coloring of the remainder of V ( F ). So byinductive hypothesis D − V k has a ( k − k on V k we have a k -coloring for D . Case 2. Each color class is incident on at most 2 k − V ( F ) so that all arcs of F have distinct colors on their endpoints. If weachieve this, we can trivially extend the coloring to the rest of the graph, as arcs of F becomeirrelevant. Now, let us call v ∈ V ( F ) as type one if v is incident on at least k arcs of F . Wewill show that there is at most one type one vertex in each color class. Indeed, if u, v ∈ V i areboth type one , then they are incident on at least 2 k − F (there is no digon between u and v because they share a color), which we assumed is not the case, as V i is incident onat most 2 k − F . Therefore, we can use k distinct colors to color all the type one vertices of V ( F ). Each remaining vertex of V ( F ) is incident on at most k − F . Weconsider these vertices in some arbitrary order, and give each a color that doesn’t alreadyappear on the other endpoints of its incident arcs from F . Such a color always exists, andproceeding this way we color all arcs of F with distinct colors. This completes the proof. (cid:74) In this section we improve upon our previous reduction by producing a graph which hasbounded degree and bounded feedback arc set. Our goal is to do this efficiently enough to(almost) match the algorithmic bounds given in the previous section. (cid:73) Theorem 8. For all k ≥ , it is N P -hard to decide if a digraph D = ( V, E ) is k -colorable,even if D has a feedback vertex set of size k , a feedback arc set of size k , and maximumdegree ∆ = 4 k − . Proof. Recall that in the proof of Theorem 4 for k ≥ v , v and the k − v , . . . , v k ); andthe part that represents the formula. We perform the same reduction except that we willnow edit the graph to reduce its degree and its feedback arc set. In particular, we delete thepalette vertices and replace them with a gadget that we describe below. We construct a new palette that will be a bi-directed clique of size k , whose verticesare now labeled v i , i ∈ [ k ]. Let M be the number of vertices of the graph we constructedfor Theorem 4. We construct M “rows” of 2 k vertices each. More precisely, for each ‘ ∈ [ M ] , i ∈ [ k ] we construct the two vertices v i‘,in , v i‘,out . In the remainder, when we referto row ‘ , we mean the set { v i‘,in , v i‘,out | i ∈ [ k ] } . For all i, j ∈ [ k ] , i < j we connect thevertices of row 1 to the vertices of the clique as shown in Figure 2. For all i, j ∈ [ k ] , i < j and ‘ ∈ [ M − 1] we connect the vertices of rows ‘, ‘ + 1 as shown in Figure 3.In more detail we have: For each i ∈ [ k ] the vertex v i has an arc to all v j ,out for j ≥ i , an arc to v j ,in for all j = i ,and an arc from v j ,in for all j ≤ i . For each ‘ ∈ [ M ], for all i < j we have the following four arcs: v j‘,out v i‘,out , v i‘,out v j‘,in , v j‘,in v i‘,in , and v j‘,out v i‘,in . As a result, inside a row arcs are oriented from out to in vertices;and between vertices of the same type from larger to smaller indices i . For each ‘ ∈ [ M − i ∈ [ k ] we have the arcs v i‘,out v i‘ +1 ,out and v i‘ +1 ,in v i‘,in . As aresult, the v i‘,out vertices form a directed path going out of v i and the v i‘,in vertices forma directed path going into v i . For each ‘ ∈ [ M − i, j ∈ [ k ] with i < j we have the arcs v i‘,out v j‘ +1 ,in , v i‘,out v j‘ +1 ,out , v i‘ +1 ,in v j‘,in , v j‘,out v i‘ +1 ,in . Again, arcs incident on an out and an in vertex are orientedtowards the in vertex. row 1FVS v i v j v i ,in v j ,in v i ,out v j ,out Figure 2 Graph showing the connections between two vertices of the clique palette ( v i , v j , where i < j ) and the corresponding vertices of row 1. row ‘ (for ‘ ≥ ‘ + 1 v i ‘,in v j ‘,in v i ‘,out v j ‘,out v j ‘ +1 ,out v j ‘ +1 ,in v i ‘ +1 ,in v i ‘ +1 ,out Figure 3 Here we present the way we are connecting the vertices of the rows i and i + 1 Let P be the gadget we have constructed so far, consisting of the clique of size k and the M rows of 2 k vertices each. We will establish the following properties. . Harutyunyan, M. Lampis, and N. Melissinos 11 Deleting all vertices v i , i ∈ [ k ] makes P acyclic and eliminates all directed paths from anyvertex v i‘,in to any vertex v j‘ ,out , for all i, j ∈ [ k ] , ‘, ‘ ∈ [ M ]. The maximum degree of any vertex of P is 4 k − There is a k -coloring of P that gives all vertices of { v i‘,in , v i‘,out | ‘ ∈ [ M ] } color i , for all i ∈ [ k ]. In any k -coloring of P , for all i , all vertices of { v i‘,in , v i‘,out | ‘ ∈ [ M ] } receive the samecolor as v i .Before we go on to prove these four properties of P , let us explain why they imply thetheorem. To complete the construction, we insert P in our graph in the place of the paletteclique we were previously using. To each vertex of the original graph, we associate a distinctrow of P (there are sufficiently many rows to do this). Now, if vertex u of the original graph,which is associated to row ‘ , had an arc from (respectively to) the vertex v i in the palette,we add an arc from v i‘,out (respectively to v i‘,in ).Let us first establish that the new graph has the properties promised in the theorem.The maximum degree of any vertex in the main (non-palette) part remains unchanged and is2 k + 2 ≤ k − P is now at most 4 k − 1, as weadded at most one arc to each vertex. Deleting { v i | i ∈ [ k ] } eliminates all cycles in P , butalso all cycles going through P , because such a cycle would need to use a path from a vertex v i‘,in (since these are the only vertices with incoming arcs from outside P ) to a vertex v j‘ ,out .Deleting all of P leaves the graph acyclic (recall that the palette clique was a feedback vertexset in our previous construction), so there is a feedback vertex set of size k .For the feedback arc set we remove the arcs { v j v i | j > i, i, j ∈ [ k ] } ∪ { v i ,in v j | j >i, i, j ∈ [ k ] } ∪ { v i ,in v i | i ∈ [ k ] } . Note that these are indeed k arcs. To see that this is afeedback arc set, suppose that the graph contains a directed cycle after its removal. Thiscycle must contain some vertex v i , because we argued that { v i | i ∈ [ k ] } is a feedback vertexset. Among these vertices, select the v i with minimum i . We now examine the arc of thecycle going into v i . Its tail cannot be v j for j > i , as we have removed such arcs, nor v j for j < i , as this contradicts the minimality of i . It cannot be v i ,in as we have also removedthese arcs. And it cannot be v j ,in for j < i , as these arcs are also removed. But no otherin-neighbor of v i remains, contradiction.Let us also argue that using the gadget P instead of the palette clique does not affect the k -colorability of the graph. This is not hard to see because, following Properties 3 and 4 we canassume that any k -coloring of P will give color i to all vertices of { v i }∪{ v i‘,in , v i‘,out | ‘ ∈ [ M ] } .The important observation is now that, for all ‘ ∈ [ M ] there will always exist a monochromaticpath from v i to v i‘,out and from v i‘,in to v i . We now note that, if we fix a coloring of thenon-palette part of the graph, this coloring contains a monochromatic cycle involving vertex v i of the original palette if and only if the same coloring gives a monochromatic cycle in thenew graph going through v i .Finally, we need to prove the four Properties. Property 1. Once we delete { v i | i ∈ [ k ] } we observe that for every vertex v i‘,in its onlyoutgoing arcs are to vertices v j‘,in for j < i or vertices v j‘ − ,in for j ≥ i . This shows that wehave eliminated all directed paths from v i‘,in to v j‘ ,out . Furthermore, this shows that no cyclecan be formed using v i‘,in vertices, since all their outgoing arcs either move to a previous row,or stay in the same row but decrease i . In a similar way, no directed cycle can be formedusing only v i‘,out vertices, as all their outgoing arcs either move to a later row, or stay in thesame row but decrease i . Property 2. For a vertex v i we have 2 k − arcs connecting it to v i ,in , v i ,out ; two arcs connecting it to v j ,in , v j ,out for j > i ; two arcsconnecting it to v j ,in for j < i . This gives 2 k − i + 2( k − i ) = 4 k − v i ,in we have one arc to v j for j ≤ i ; two arcs to v j for j > i ; arcs to all v jin , v jout for j = i ; arcs to v j ,in for j ≤ i . This gives i + 2( k − i ) + 2( k − 1) + i = 4 k − v i ,out we have arcs from v j for j ≤ i ; arcs to v j ,in , v j ,out for j = i ; arcs to v j ,in and v j ,out for j ≥ i ; arcs to v j ,in for all j < i . This gives i + 2( k − 1) + 2( k − i ) + i = 4 k − v i‘,in , ‘ ≥ v j‘ − ,in , for j ≥ i ; to v j‘ − ,out for j = i ; to v j‘,in , v j‘,out for j = i ; from v j‘ +1 ,in for j ≤ i . This gives ( k − i +1)+( k − k − i = 4 k − v i‘,out , ‘ ≥ v j‘ − ,out for j ≤ i ; to v j‘,in , v j‘,out for j = i ; to all v j‘ +1 ,in , for j = i ; to v j‘ +1 ,out for j ≥ i . This gives i +2( k − k − k − i +1) =4 k − Property 3. We assign color i to v i and to { v i‘,in , v i‘,out | ‘ ∈ [ M ] } . We claim that there isno monochromatic cycle in P with this coloring. Indeed, if such a cycle exists, it must use v i , as { v i | i ∈ [ k ] } is a feedback vertex set. But observe that with the coloring we gave, foreach ‘ ∈ [ M − 1] the only out-neighbor of v i‘,out with color i is v i‘ +1 ,out and v iM,out has noout-neighbor of color i . Similar examination of { v i‘,in | ‘ ∈ [ M ] } shows that the part of P colored i induces a directed path on 2 M + 1 vertices with v i in the middle. Property 4. Since the vertices v i induce a clique, we may assume without loss of generalitythat we are given a coloring c where c ( v i ) = i . We prove the property by induction on ‘ .For ‘ = 1, we will first prove that c ( v i ,in ) = i by induction on i . For the base case we havethat v ,in is connected with a digon with v j for all j > 1, so c ( v ,in ) = 1. Now, fix a j andsuppose that for all i < j we have c ( v i ,in ) = i . Then v j ,in cannot receive any color i < j ,because this would make a cycle with v i ,in , v i . It can also not receive a color i > j becauseit has a digon to all v i for i > j . Hence, c ( v j ,in ) = j . Continuing on ‘ = 1, we will prove byreverse induction on i that c ( v i ,out ) = i . For c ( v k ,out ) if we give this vertex any color j < k then we get a cycle with v j , v j ,in , so we must have c ( v k ,out ) = k . Now fix an i and supposethat for all j > i we have c ( v j ,out ) = j . If we give v i ,out a color j > i this will make a cyclewith v j , v j ,out , v i ,out , v j ,in . But if we give v i ,out a smaller color j < i , this will also make acycle with v j , v j ,in . Therefore, c ( v i ,out ) = i for all i .Suppose now that the property is true for row ‘ and we want to prove it for row ‘ + 1.We will use similar reasoning as in the previous case. We will also use the observation thatfor all i , there is a monochromatic path from v i to v i‘,out and a monochromatic path from v i‘,in to v i . First, we show by induction on i that c ( v i‘ +1 ,in ) = i for all i . For v ‘ +1 ,in weobserve that if we give this vertex color j > 1, then using the arcs from v j‘,out and to v j‘,in we have a monochromatic cycle of color j . Hence, c ( v ‘ +1 ,in ) = 1. Fix a j and suppose thatfor all i < j we have c ( v i‘ +1 ,in ) = i . If we assign c ( v j‘ +1 ,in ) a color i < j , then we get a cycleusing v i‘,out , v j‘ +1 ,in , v i‘ +1 ,in , v i‘,in . If we assign it a color i > j , then we get the cycle using v i‘,out , v j‘ +1 ,in , v i‘,in . So, for all i we have c ( v i‘ +1 ,in ) = i . To complete the proof, we do reverseinduction to show that c ( v i‘ +1 ,out ) = i . For c ( v k‘ +1 ,out ) we cannot give this vertex color j < k because this will give a cycle using v j‘,out , v k‘ +1 ,out , v j‘ +1 ,in v jell,in . Now, fix an i and assumethat for j > i we have c ( v j‘ +1 ,out ) = j . We cannot assign v i‘ +1 ,out any color j > i becausethis would give the cycle v j‘,out , v j‘ +1 ,out , v i‘ +1 ,out , v j‘ +1 ,in , v j‘,in . We can also not assign anycolor j < i as this gives the cycle using v j‘,out , v i‘ +1 ,out , v j‘ +1 ,in , v j‘,in . We conclude that for all i we have c ( v i‘ +1 ,out ) = i . (cid:74) . Harutyunyan, M. Lampis, and N. Melissinos 13 In this section we consider the complexity of Digraph Coloring with respect to parametersmeasuring the acyclicity of the underlying graph, namely, treewidth and treedepth. Before weproceed let us recall that in all graphs G we have χ ( G ) ≤ tw( G ) + 1 ≤ td( G ) + 1. This meansthat if our goal is simply to obtain an FPT algorithm then parameterizing by treewidthimplies that the graph’s chromatic number (and therefore also the digraph’s dichromaticnumber) is bounded. We first present an algorithm with complexity k tw (tw!) which, usingthe above argument, proves that Digraph Coloring is FPT parameterized by treewidth. (cid:73) Theorem 9. There is an algorithm which, given a digraph D on n vertices and a tree decom-position of its underlying graph of width tw decides if D is k -colorable in time k tw (tw!) n O (1) . Proof. The proof uses standard techniques so we sketch some details. In particular weassume that we are given a nice tree decomposition on which we will perform dynamicprogramming. Before we proceed, let us slightly recast the problem. We will say that adigraph D = ( V, E ) is k -colorable if there exist two functions c, σ such that (i) c : V → [ k ]partitions V into k sets (ii) σ is an ordering of V (iii) for all arcs uv ∈ E we have either c ( u ) = c ( v ) or σ ( u ) < σ ( v ). It is not hard to see that this reformulation is equivalent to theoriginal problem. Indeed, if we have a k -coloring, since each color class is acyclic, we can finda topological ordering σ i of the graph G [ V i ] induced by each color class and then concatenatethem to obtain an ordering of V . For the converse direction, the existence of c, σ impliesthat if we look at vertices of each color class, σ must induce a topological ordering, henceeach color class is acyclic.Now, let D be a digraph and S be a subset of its vertices. Let ( c, σ ) be a pair of coloringand ordering functions that prove that D is k -colorable. Then, we will say that the signatureof solution ( c, σ ) for set S is the pair ( c S , σ S ) where c S : S → [ k ] is defined as c S ( u ) = c ( u )and σ S : S → [ | S | ] is an ordering function such that for all u, v ∈ S we have σ S ( u ) < σ S ( v )if and only if σ ( u ) < σ ( v ). In other words, the signature of a solution is the restriction of thesolution to the set S .Given a rooted nice tree decomposition of D , let B t be a bag of the decomposition anddenote by B ↓ t the set of vertices of D which are contained in B t and bags in the sub-treerooted at B t . Our dynamic programming algorithm stores for each B t a collection of all pairs( c, σ ) such that there exists a k -coloring of D [ B ↓ t ] whose signature is ( c, σ ). If we manage toconstruct such a table for each node, it will suffice to check if the collection of signatures ofthe root is empty to decide if the graph is k -colorable.The table is easy to initialize for Leaf nodes, as the only valid signature contains theempty coloring and ordering function. For an Introduce node that adds u to a bag containing B t we consider all signatures ( c, σ ) of contained in the table of the child bag. For each suchsignature we construct a signature ( c , σ ) which is consistent with ( c, σ ) but also colors u and places it somewhere in the ordering (we consider all such possibilities). For each ( c , σ )we delete this signature if u has a neighbor in the bag who is assigned the same color by c but such that their arc violates the topological ordering σ . We keep all other producedsignatures. To see that this is correct observe that u has no neighbors in B ↓ t \ B t , becauseall bags are separators, so if we produce an ordering of B ↓ t consistent with σ the only arcsincident on u that could violate it are contained in the bag (and have been checked). ForForget nodes the table is easily update by keeping only the restrictions of valid signatures tothe new bag. Finally, for Join nodes we keep a signature ( c, σ ) if and only if it is valid forboth sub-trees. Again this is correct because nodes of one sub-tree not contained in the bag do not have neighbors in the other sub-tree, so as long as we produce an ordering consistentwith σ we can concatenate we cannot violate the topological ordering condition.For the running time observe that the size of the DP table is k tw (tw!), because we considerall colorings and all ordering of each bag. In Introduce nodes we spend polynomial time foreach entry of the child node (checking all placements of the new vertex), while computationin Join nodes can be performed in time linear in the size of the table. So the running time isin the end k tw (tw!) n O (1) . (cid:74) As we explained, even though Theorem 9 implies that Digraph Coloring is FPTparameterized by treewidth, the complexity it gives is significantly worse than the complexityof Coloring , which is essentially k tw . Our main result in this section is to show that this islikely to be inevitable, even if we focus on the more restricted case of treedepth and 2 colors. (cid:73) Theorem 10. If there exists an algorithm which decides if a given digraph on n verticesand (undirected) treedepth td is -colorable in time td o (td) n O (1) , then the ETH is false. Proof. Suppose we are given a formula φ with n variables and m clauses. We willproduce a digraph G such that | V ( G ) | = 2 O ( n/ log n ) m and td( G ) = O ( n/ log n ) and G is2-colorable if and only if φ is satisfiable. Before we proceed, observe that if we can constructsuch a graph the theorem follows, as an algorithm with running time O ∗ (td o ( td ) ) for 2-coloring G would decide the satisfiability of φ in time 2 o ( n ) .To simplify presentation we assume without loss of generality that n is a power of 2(otherwise adding dummy variables to φ can achieve this while increasing n be a factor of atmost 2). We begin the construction of G by creating log n independent sets V , . . . , V log n ,each of size d en log n e . We add a vertex u and connect it with arcs in both directions to allvertices of ∪ i ∈ [log n ] V i . We also partition the variables of φ into log n sets X , . . . , X log n ofsize at most d n log n e .The main idea of our construction is that the vertices of V i will represent an assignmentto the variables of X i . Observe that all vertices of V i are forced to obtain the same color(as all are forced to have a distinct color from u ), therefore the way these vertices representan assignment is via their topological ordering in the DAG they induce together with othervertices of the graph which obtain the same color.To continue our construction, for each i ∈ [log n ] we do the following: we enumerate allthe possible truth assignments of the variables of X i and for each such truth assignment σ : X i → { , } | X i | we define (in an arbitrary way) a distinct ordering ρ ( σ ) of the vertices of V i . We will say that the ordering ρ ( σ ) is the translation of assignment σ . Note that thereare | V i | ! ≥ ( en log n )! ≥ ( n log n ) en log2 n = 2 en log2 n (1+log n − n ) > d n log n e for n sufficiently large,so it is possible to translate truth assignments to X i to orderings of V i injectively. Note thatenumerating all assignments for each group takes time 2 O ( n/ log n ) = 2 o ( n ) .Consider now a clause c j of φ and suppose some variable of the group X i appears in c j .For each truth assignment σ to X i which satisfies c j we construct an independent set S j,i,σ of size | X i | − 1, label its vertices s ‘j,i,σ , for ‘ ∈ [ | X i | − ‘ we add an arc from ρ ( σ ) − ( ‘ ) to s ‘j,i,σ and an arc from s ‘j,i,σ to ρ ( σ ) − ( ‘ + 1). In other words, the ‘ -th vertex of S j,i,σ has an incoming arc from the vertex of V i which is ‘ -th according to the ordering ρ ( σ )which is the translation of assignment σ and an outgoing arc to the vertex of V i which isin position ( ‘ + 1) in the same ordering. Observe that this implies that if all vertices of V i and of S j,i,σ are given the same color, then the topological ordering of the induced DAG willagree with ρ ( σ ) on the vertices of V i .To complete the construction, for each clause c j we do the following: take all independentsets S j,i,σ which we have constructed for c j and order them in a cycle in some arbitrary way. . Harutyunyan, M. Lampis, and N. Melissinos 15 For two sets S j,i,σ , S j,i ,σ which are consecutive in this cycle add a new “connector” vertex p j,i,σ,i ,σ , all arcs from S j,i,σ to this vertex, and all arcs from this vertex to S j,i ,σ . Finally,we connect each connector vertex p j,i,σ,i ,σ we have constructed to an arbitrary vertex of V with a digon. This completes the construction.Let us argue that if φ is satisfiable, then G is 2-colorable. We color u with color 2, allthe vertices in V i for i ∈ [log n ] with 1 and all connector vertices p i,j,σ,i ,σ with 2. Foreach clause c j there exists a group X i that contains a variable of c j such that the supposedsatisfying assignment of φ , when restricted to X i gives an assignment σ : X i → { , } | X i | which satisfies c j . Therefore, there exists a corresponding set S j,i,σ . Color all vertices of thisset with 1. After doing this for all clauses, we color all other vertices with 2. We claim thisis a valid 2-coloring. Indeed, the graph induced by color 2 is acyclic, as it contains u (butnone of its neighbors) and for each c j , all but one of the sets S j,i,σ and the vertices p j,i,σ,i ,σ .Since these sets have been connected in a directed cycle throught connector vertices, and foreach c j we have colored one of these sets with 1, the remaining sets induce a DAG. For thegraph induced by color 1 consider for each V i the ordering ρ ( σ ), where σ is the satisfyingassignment restricted to V i . Every vertex outside V i which received color 1 and has arcs to V i , has exactly one incoming and one outgoing arc to V i . Furthermore, the directions ofthese arcs agree with the ordering ρ ( σ ). Hence, since ∪ i ∈ [log n ] V i touches all arcs with bothendpoints having color 1 and all such arcs respect the orderings of V i , the graph induced bycolor 1 is acyclic.For the converse direction, suppose we have a 2-coloring of G . Without loss of generality, u has color 2 and ∪ i ∈ [log n ] V i has color 1. Furthermore, all connecteors p j,i,σ,i ,σ also havecolor 2. Consider now a clause c j . We claim that there must be a group S j,i,σ such that S j,i,σ does not use color 2. Indeed, if all such groups use color 2, since they are linked in a directedcycle with all possible arcs between consecutive groups and connectors, color 2 would notinduce a DAG. So, for each c j we find a group S j,i,σ that is fully colored 1 and infer from thisthe truth assignment σ for the group X i . Doing this for all clauses gives us an assignmentthat satisfies every clause. However, we need to argue that the assignment we extract isconsistent, that is, there do not exist S j,i,σ and S j ,i,σ which are fully colored 1 with σ = σ .For the sake of contradiction, suppose that two such sets exist, and recall that ρ ( σ ) = ρ ( σ ).We now observe that if S j,i,σ ∪ V i only uses color 1, then any topological ordering of V i inthe graph induced by color 1 must agree with ρ ( σ ), which is a total ordering of V i . In asimilar way, the ordering of V i must agree with ρ ( σ ), so if σ = σ we get a contradiction.Finally, let us argue about the parameters of G . For each clause c j of φ we construct anindependent set of size O ( n/ log n ) for each satisfying assignment of a group X i containinga variable of c j . There are at most 3 such groups, and each group has at most 2 n/ log n satisfying assignments for c j , so | V ( G ) | = 2 O ( n/ log n ) m .For the treedepth, recall that deleting a vertex decreases treedepth by at most 1. Wedelete u and all of ∪ i ∈ [log n ] V i which are O ( n/ log n ) vertices in total. It now suffices toprove that in the remainder all components have treedepth O ( n/ log n ). In the remainderevery component is made up of the directed cycle formed by sets S j,i,σ and connectors p j,i,σ,i ,σ . We first delete a vertex p j,i,σ,i ,σ to turn the cycle into a directed “path” of length L = 2 O ( n/ log n ) . We now use the standard argument which proves that paths of length L have treedepth log L , namely, we delete the p j,i,σ,i ,σ vertex that is closest to the middle ofthe path and then recursivle do the same in each component. This shows that the remaininggraph has treedepth logarithmic in the length of the path, therefore at most O ( n/ log n ). (cid:74) In this paper we have strengthened known results about the complexity of Digraph Color-ing on digraphs which are close to being DAGs, precisely mapping the threshold of tractabilityfor DFVS and FAS; and we precisely bounded the complexity of the problem parameterizedby treewidth, uncovering an important discrepancy with its undirected counterpart. Onequestion for further study is to settle the degree bound for which k - Digraph Coloring is NP-hard for DFVS k , and more generally to map out how the tractability threshold forthe degree evolves for larger values of the DFVS from 4 k − Θ(1) to 2 k + Θ(1), which isthe correct threshold when the DFVS is unbounded. With regards to undirected structuralparameters, it would be interesting to investigate whether a vc o (vc) algorithm exists for2- Digraph Coloring , where vc is the input graph’s vertex cover, as it seems challengingto extend our hardness result to this more restricted case. References Pierre Aboulker, Nathann Cohen, Frédéric Havet, William Lochet, Phablo F. S. Moura, andStéphan Thomassé. Subdivisions in digraphs of large out-degree or large dichromatic number. Electron. J. Comb. , 26(3):P3.19, 2019. Stephan Dominique Andres and Winfried Hochstättler. Perfect digraphs. Journal of GraphTheory , 79(1):21–29, 2015. Julien Baste, Ignasi Sau, and Dimitrios M. Thilikos. A complexity dichotomy for hittingconnected minors on bounded treewidth graphs: the chair and the banner draw the boundary. InShuchi Chawla, editor, Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms,SODA 2020, Salt Lake City, UT, USA, January 5-8, 2020 , pages 951–970. SIAM, 2020. URL: https://doi.org/10.1137/1.9781611975994.57 , doi:10.1137/1.9781611975994.57 . Julien Bensmail, Ararat Harutyunyan, and Ngoc-Khang Le. List coloring digraphs. Journalof Graph Theory , 87(4):492–508, 2018. Benjamin Bergougnoux, Édouard Bonnet, Nick Brettell, and O-joung Kwon. Close relatives offeedback vertex set without single-exponential algorithms parameterized by treewidth. CoRR ,abs/2007.14179, 2020. URL: https://arxiv.org/abs/2007.14179 , arXiv:2007.14179 . Dietmar Berwanger, Anuj Dawar, Paul Hunter, Stephan Kreutzer, and Jan Obdrzálek. Thedag-width of directed graphs. J. Comb. Theory, Ser. B , 102(4):900–923, 2012. Drago Bokal, Gasper Fijavz, Martin Juvan, P. Mark Kayll, and Bojan Mohar. The circularchromatic number of a digraph. Journal of Graph Theory , 46(3):227–240, 2004. URL: https://doi.org/10.1002/jgt.20003 . Marthe Bonamy, Lukasz Kowalik, Jesper Nederlof, Michal Pilipczuk, Arkadiusz Socala,and Marcin Wrochna. On directed feedback vertex set parameterized by treewidth. InAndreas Brandstädt, Ekkehard Köhler, and Klaus Meer, editors, Graph-Theoretic Conceptsin Computer Science - 44th International Workshop, WG 2018, Cottbus, Germany, June27-29, 2018, Proceedings , volume 11159 of Lecture Notes in Computer Science , pages 65–78. Springer, 2018. URL: https://doi.org/10.1007/978-3-030-00256-5_6 , doi:10.1007/978-3-030-00256-5\_6 . Édouard Bonnet, Nick Brettell, O-joung Kwon, and Dániel Marx. Generalized feedbackvertex set problems on bounded-treewidth graphs: Chordality is the key to single-exponentialparameterized algorithms. Algorithmica , 81(10):3890–3935, 2019. URL: https://doi.org/10.1007/s00453-019-00579-4 , doi:10.1007/s00453-019-00579-4 . Jianer Chen, Yang Liu, Songjian Lu, Barry O’Sullivan, and Igor Razgon. A fixed-parameteralgorithm for the directed feedback vertex set problem. J. ACM , 55(5):21:1–21:19, 2008. Xujin Chen, Xiaodong Hu, and Wenan Zang. A min-max theorem on tournaments. SIAM J.Comput. , 37(3):923–937, 2007. URL: https://doi.org/10.1137/060649987 . . Harutyunyan, M. Lampis, and N. Melissinos 17 Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, MarcinPilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms . Springer, 2015. Marek Cygan, Jesper Nederlof, Marcin Pilipczuk, Michal Pilipczuk, Johan M. M. van Rooij, andJakub Onufry Wojtaszczyk. Solving connectivity problems parameterized by treewidth in singleexponential time. In Rafail Ostrovsky, editor, IEEE 52nd Annual Symposium on Foundationsof Computer Science, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011 , pages150–159. IEEE Computer Society, 2011. URL: https://doi.org/10.1109/FOCS.2011.23 , doi:10.1109/FOCS.2011.23 . Tomás Feder, Pavol Hell, and Carlos S. Subi. Complexity of acyclic colorings of graphsand digraphs with degree and girth constraints. CoRR , abs/1907.00061, 2019. URL: http://arxiv.org/abs/1907.00061 . Henning Fernau and Daniel Meister. Digraphs of bounded elimination width. Discret. Appl.Math. , 168:78–87, 2014. Fedor V. Fomin, Petr A. Golovach, Daniel Lokshtanov, and Saket Saurabh. Intractability ofclique-width parameterizations. SIAM J. Comput. , 39(5):1941–1956, 2010. Fedor V. Fomin, Petr A. Golovach, Daniel Lokshtanov, Saket Saurabh, and Meirav Zehavi.Clique-width III: hamiltonian cycle and the odd case of graph coloring. ACM Trans. Algorithms ,15(1):9:1–9:27, 2019. Jakub Gajarský, Michael Lampis, and Sebastian Ordyniak. Parameterized algorithms formodular-width. In IPEC , volume 8246 of Lecture Notes in Computer Science , pages 163–176.Springer, 2013. Robert Ganian, Petr Hlinený, Joachim Kneis, Daniel Meister, Jan Obdrzálek, Peter Rossmanith,and Somnath Sikdar. Are there any good digraph width measures? J. Comb. Theory, Ser. B ,116:250–286, 2016. Frank Gurski, Dominique Komander, and Carolin Rehs. Acyclic coloring of special digraphs. CoRR , abs/2006.13911, 2020. Ararat Harutyunyan. Brooks-type results for coloring of digraphs. PhD Thesis , Simon FraserUniversity, 2011. Ararat Harutyunyan, Mark Kayll, Bojan Mohar, and Liam Rafferty. Uniquely d -colorabledigraphs with large girth. Canad. J. Math. , 64(6):1310–1328, 2012. Ararat Harutyunyan, Tien-Nam Le, Stéphan Thomassé, and Hehui Wu. Coloring tournaments:From local to global. J. Comb. Theory, Ser. B , 138:166–171, 2019. Winfried Hochstättler, Felix Schröder, and Raphael Steiner. On the complexity of digraphcolourings and vertex arboricity. Discret. Math. Theor. Comput. Sci. , 22(1), 2020. Paul Hunter and Stephan Kreutzer. Digraph measures: Kelly decompositions, games, andorderings. Theor. Comput. Sci. , 399(3):206–219, 2008. Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have stronglyexponential complexity? J. Comput. Syst. Sci. , 63(4):512–530, 2001. Lars Jaffke and Bart M. P. Jansen. Fine-grained parameterized complexity analysis of graphcoloring problems. In CIAC , volume 10236 of Lecture Notes in Computer Science , pages345–356, 2017. Thor Johnson, Neil Robertson, Paul D. Seymour, and Robin Thomas. Directed tree-width. J.Comb. Theory, Ser. B , 82(1):138–154, 2001. Michael Lampis. Algorithmic meta-theorems for restrictions of treewidth. Algorithmica ,64(1):19–37, 2012. URL: https://doi.org/10.1007/s00453-011-9554-x , doi:10.1007/s00453-011-9554-x . Michael Lampis. Finer tight bounds for coloring on clique-width. In ICALP , volume 107 of LIPIcs , pages 86:1–86:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. Michael Lampis, Georgia Kaouri, and Valia Mitsou. On the algorithmic effectiveness of digraphdecompositions and complexity measures. Discret. Optim. , 8(1):129–138, 2011. Zhentao Li and Bojan Mohar. Planar digraphs of digirth four are 2-colorable. SIAM J. Discret.Math. , 31(3):2201–2205, 2017. Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Known algorithms on graphs of boundedtreewidth are probably optimal. ACM Trans. Algorithms , 14(2):13:1–13:30, 2018. Marcelo Garlet Millani, Raphael Steiner, and Sebastian Wiederrecht. Colouring non-evendigraphs. CoRR , abs/1903.02872, 2019. Bojan Mohar. Circular colorings of edge-weighted graphs. Journal of Graph Theory , 43(2):107–116, 2003. Bojan Mohar. Eigenvalues and colorings of digraphs. Linear Algebra and its Applications ,432(9):2273 – 2277, 2010. Special Issue devoted to Selected Papers presented at the Workshop onSpectral Graph Theory with Applications on Computer Science, Combinatorial Optimizationand Chemistry (Rio de Janeiro, 2008). URL: , doi:https://doi.org/10.1016/j.laa.2009.05.027 . Victor Neumann-Lara. The dichromatic number of a digraph. J. Comb. Theory, Ser. B ,33(3):265–270, 1982. Raphael Steiner and Sebastian Wiederrecht. Parameterized algorithms for directed modularwidth. In CALDAM , volume 12016 of Lecture Notes in Computer Science , pages 415–426.Springer, 2020. A Appendix (cid:73) Theorem 11. It is NP-hard to decide if a given digraph with maximum degree is -colorable. Proof. We perform a reduction from NAE-3-SAT , a variant of where we are askedto find an assignment that sets at least one literal to True and one to False in each clause.First we remark that this problem remains NP-hard if all literals appear at most twice. (Tosee this, we may use the trick of Lemma 3 to decrease the number of appearances of eachvariable). Suppose then that we have an instance φ with n variables x , . . . , x n , and m clauses, where each literal appears at most twice.We construct a digraph as follows: for each variable x i we make a digon and label itsvertices x i , ¬ x i . We call this part of the digraph the assignment part. For each clause wemake a directed cycle of size equal to the clause and associate each vertex of the cycle witha literal. We call this part the satisfaction part. Finally, for each vertex of the assignmentpart we connect it with digons with each vertex of the satisfaction part that represents theopposite literal.The digraph we constructed has maximum degree 6 in the assignment part, because eachliteral appears at most twice; and 4 in the satisfaction part. If there is a satisfying assignmentthen we give color 1 to all True literals of both parts and color 2 to everything else. Observethat all arcs connecting the two parts are bichromatic and if the assignment is satisfying alldirected cycles are also bichromatic. For the converse direction, if there is a 2-coloring wecan extract an assignment by setting to True all literals which have color 1 in the assignmentpart. Note that this implies that in the satisfaction part all literals which have color 1 havebeen set to True and all literals which have color 2 have been set to False, because of thedigons connecting the two parts. But this implies that our assignment is satisfying becauseall cycles are bichromatic.. We call this part of the digraph the assignment part. For each clause wemake a directed cycle of size equal to the clause and associate each vertex of the cycle witha literal. We call this part the satisfaction part. Finally, for each vertex of the assignmentpart we connect it with digons with each vertex of the satisfaction part that represents theopposite literal.The digraph we constructed has maximum degree 6 in the assignment part, because eachliteral appears at most twice; and 4 in the satisfaction part. If there is a satisfying assignmentthen we give color 1 to all True literals of both parts and color 2 to everything else. Observethat all arcs connecting the two parts are bichromatic and if the assignment is satisfying alldirected cycles are also bichromatic. For the converse direction, if there is a 2-coloring wecan extract an assignment by setting to True all literals which have color 1 in the assignmentpart. Note that this implies that in the satisfaction part all literals which have color 1 havebeen set to True and all literals which have color 2 have been set to False, because of thedigons connecting the two parts. But this implies that our assignment is satisfying becauseall cycles are bichromatic.