Degree-Constrained Orientation of Maximum Satisfaction: Graph Classes and Parameterized Complexity

The problem MaxW-Light (MaxW-Heavy) for an undirected graph is to assign a direction to each edge so that the number of vertices of outdegree at most W (resp. at least W) is maximized. It is known that these problems are NP-hard even for fixed W. For example, Max 0-Light is equivalent to the problem of finding a maximum independent set. In this paper, we show that for any fixed constant W, MaxW-Heavy can be solved in linear time for hereditary graph classes for which treewidth is bounded by a function of degeneracy. We show that such graph classes include chordal graphs, circular-arc graphs, d-trapezoid graphs, chordal bipartite graphs, and graphs of bounded clique-width. To have a polynomial-time algorithm for MaxW-Light, we need an additional condition of a polynomial upper bound on the number of potential maximal cliques to apply the metatheorem by Fomin et al. (SIAM J Comput 44:54–87, 2015). The aforementioned graph classes, except bounded clique-width graphs, satisfy such a condition. For graphs of bounded clique-width, we present a dynamic programming approach not using the metatheorem to show that it is actually polynomial-time solvable for this graph class too. We also study the parameterized complexity of the problems and show some tractability and intractability results.


Introduction
Let G = (V, E) be an undirected graph.An orientation of G is a function that maps each undirected edge {u, v} oe E to one of the two possible directed edges (u, v) and (v, u).For

20:2
Degree-Constrained Orientation of Maximum Satisfaction any orientation of G, define (E) = t eoeE { (e)} and let (G) denote the directed graph (V, (E)).For any vertex u oe V , the outdegree of u under is defined as d + (u) = |{(u, v) : (u, v) oe (E)}|, i.e., the number of outgoing edges from u in (G).For any non-negative integer W , a vertex u oe V is called W -light in (G) if d + (u) AE W , and W -heavy in (G) if d + (u) Ø W .
For any fixed integer W Ø 0, the following optimization problems (introduced in [3], see also [4]) are defined, where the input is an undirected graph G = (V, E): Max Observe that Max W -Light (resp., Max W -Heavy) and Min (W + 1)-Heavy (resp., Min (W ≠ 1)-Light) are supplementary problems in the sense that an exact algorithm for one gives an exact algorithm for the other, though their approximability properties and fixed-parameter tractability may di er.Since this paper mainly focuses on the polynomial-time solvability, we consider only Max W -Light and Max W -Heavy. 1It is shown in [3] that Max W -Light is NP-hard for any fixed W Ø 0, and Max W -Heavy is NP-hard for any fixed W Ø 3.They also show that for W AE 1 Max W -Heavy can be solved in polynomial time.Recently Khoshkhah [23] has closed the gap by showing that Max 2-Heavy can be solved in polynomial time.
For these problems, the same authors of [3] investigate the approximability [4].They got comprehensive results on the approximability of the problems.Due to the work, the general (in)approximability of the problems is well understood.In this paper, we thus investigate the problem from another aspect, that is, graph classes.For the two problems Max W -Light and Max W -Heavy, we take similar but slightly di erent approaches.
The main tool for Max W -Light is the metatheorem of Fomin, Todinca, and Villanger [16] that can be seen as an extension of Courcelle's theorem [1,12].It provides a polynomialtime algorithm for finding a maximum induced subgraph of bounded treewidth satisfying a counting monadic second-order logic formula from a given graph with polynomially many potential maximal cliques.We show that if a hereditary graph class has a polynomial upper bound on the number of potential maximal cliques and has a function depending only on degeneracy as an upper bound of treewidth, then the metatheorem of Fomin et al. can be applied to Max W -Light.
Similarly, for Max W -Heavy, we consider hereditary graph classes with treewidth bounded by a function of degeneracy.However, we do not require polynomial upper bounds on the number of potential maximal cliques.We first show that the problem for graphs of bounded treewidth can be solved in linear time.Next we present a linear-time reduction from graphs with a function of degeneracy as an upper bound of treewidth to graphs of bounded treewidth.Combining these results, we obtain a linear-time algorithm for Max W -Heavy on graph classes with the aforementioned property.
We then show that our algorithms can be applied to several well-known graph classes.It is known that chordal graphs, circular-arc graphs, d-trapezoid graphs, and chordal bipartite graphs have polynomial upper bounds on the number of potential maximal cliques (see Section 4).We show that these hereditary graph classes have functions of degeneracy as upper bounds on treewidth, and thus our algorithms can be applied.Additionally, we observe that graphs of bounded clique-width admit a function of degeneracy as an upper bounded of treewidth, and thus Max W -Heavy can be solved in linear time.To show that Max W -Light can be solved in polynomial time for graphs of bounded clique-width, we present a dynamic programming based algorithm.
We also consider the parameterized complexity of the problems.We show that for any fixed W , Max W -Light is W[1]-complete, while Max W -Heavy admits a kernel of O(W k) vertices, where the parameter k is the solution size.

Related work
Graph orientations that optimize certain objective functions involving the resulting directed graph or that satisfy some special property such as acyclicity [39] or k-edge connectivity [10,33,37] have many applications to graph theory, combinatorial optimization, scheduling (load balancing), resource allocation, and e cient data structures.For example, an orientation that minimizes the maximum outdegree [5,9,40] can be used to support fast vertex adjacency queries in a sparse graph by storing each edge in exactly one of its two incident vertices' adjacency lists while ensuring that all adjacency lists are short [9].There are many optimization criteria for graph orientation other than these.See [2] or Chapter 61 in [38] for more details and additional references.
On the other hand, degree-constrained graph orientations [17,18,21,29] arise when a degree lower bound W l (v) and a degree upper bound W u (v) for each vertex v in the graph are specified in advance or as part of the input, and the outdegree of v in any valid graph orientation is required to lie in the interval [W l (v), . . ., W u (v)].Obviously, a graph does not always have such an orientation, and in this case, one might want to compute an orientation that best fits the outdegree constraints according to some well-defined criteria [2,3].In case W l (v) = 0 and W u (v) = W for every vertex v in the input graph, where W is a non-negative integer, and the objective is to maximize (resp., minimize) the number of vertices that satisfy (resp., violate) the outdegree constraints, then we obtain Max W -Light (resp., Min (W + 1)-Heavy).Similarly, if W l (v) = W and W u (v) = OE for every vertex v in the input graph, then we obtain Max W -Heavy and Min (W ≠ 1)-Light.
Another related problem is to find a maximum vertex set that induces a subgraph of bounded degeneracy.(See the next section for the definition of degeneracy.)This problem can be seen as a variant of Max W -Light, where we can use acyclic orientations only.This problem is studied in the context of parameterized [31] and exact [36] computation.Concerning graph classes, we can obtain a result similar to the one for Max W -Light as we observe in the final section of this paper.

Preliminaries
The degree of The degeneracy of a graph G, denoted by "(G), is the maximum of the minimum degrees over all induced subgraphs of G. where It is known that such an ordering can be computed in linear time and that "(G) = max 1AEiAEn "(G i ) [32].For any U ™ V (G), the subgraph induced by For an integer W Ø 0, an orientation of a graph is called a W -light orientation if the maximum outdegree is at most W .If a W -light orientation exists, we say that the graph is W -light orientable.By replacing "at most" with "at least" in these definitions, we similarly define W -heavy orientations and W -heavy orientable graphs.

Minimal triangulations and potential maximal cliques
and T is a tree such that for each v oe V , there is i oe I with v oe X i ; for each {u, v} oe E, there is i oe The width of a tree-decomposition is the size of a maximum bag minus 1.A graph has treewidth at most t if and only if it has a tree-decomposition of width at most t.We denote the treewidth of G by tw(G).
A graph is chordal I Proposition 2.1 (Bouchitté and Todinca [8]).For every n-vertex graph G, it holds that

Metatheorems
In this section we present metatheorems for Max W -Light and Max W -Heavy.We apply them to some well-studied graph classes in the next section.We now introduce the monadic second-order logic (MSO) of graphs.The syntax of MSO of graphs includes (i) the logical connectives ‚, •, ¬, …, ∆, (ii) variables for vertices, edges, vertex sets, and edge sets, (iii) the quantifiers ' and ÷ applicable to these variables, and (iv) the following binary relations: In the counting monadic second-order logic (CMSO) of graphs, we have an additional sentence of checking the cardinality of a set modulo some constant.
I Lemma 3.1.For any fixed W , Max W -Heavy and Max W -Light for graphs of bounded treewidth can be expressed in an optimization version of MSO and thus solved in linear time.
Proof (sketch).Let G = (V, E) be a graph of treewidth at most k.It is known that for such a graph, an edge orientation can be expressed in MSO by a proper coloring " : V ae {1, . . ., k+1} and an edge set For an edge e oe E and a vertex v oe V , there is an MSO formula out V1,...,V k+1 ,F (e, v) that means e is an out-going edge from v.Under the orientation represented by (V 1 , . . ., V k+1 ) and F , W -heaviness and W -lightness of a vertex can be expressed in MSO.Let W -heavy V1,...,V k+1 ,F (v) and W -light V1,...,V k+1 ,F (v) be such formulas.The problems are equivalent to finding a maximum vertex set X in the following formulas: It is known that for a fixed MSO formula on a graph of bounded treewidth, one can find in linear time a maximum vertex subset satisfying the formula (see [1,12]).J I Corollary 3.2.For fixed W and k, the property of being W -light orientable can be expressed in MSO for graphs of treewidth at most k.

Max W -Light
We can see that the problem of finding a maximum W -light orientable induced subgraph is polynomially equivalent to Max W -Light.

I Lemma 3.3. A graph G has a W -light orientable induced subgraph of at least k vertices if and only if the edges of G can be oriented so that at least k vertices have outdegree at most
) time, where m and n are the numbers of edges and vertices in G, respectively.
I Proposition 3.4 (Fomin, Todinca, and Villanger [16]).For any fixed t and a CMSOexpressible property P, the following problem can be solved in polynomial time for any class of graphs with a polynomial number of potential maximal cliques: Given a graph G, find a maximum induced subgraph H of treewidth at most t that has the property P.
This metatheorem is quite powerful and allows us to solve many problems for graphs with polynomially many potential maximal cliques.However, we cannot apply it to our problem Max W -Light in general because W -light orientable graphs may have large treewidth.For example, grid graphs are 2-light orientable but have unbounded treewidth.
In the following, we show that with an additional restriction to graph classes, we can apply the metatheorem of Fomin, Todinca, and Villanger to Max W -Light.

Max W -Heavy
Unlike Max W -Light, the problem Max W -Heavy is not equivalent to the problem of finding a maximum orientable induced subgraph.We here present a way of directly finding an orientation with as many W -heavy vertices as possible for graphs with treewidth bounded by a function of degeneracy.By Lemma 3.1, an orientation Õ of H Õ with the maximum number of W -heavy vertices can be found in linear time.Note that all vertices in C are W -heavy under Õ even in H Õ [C].Otherwise, by Proposition 3.7, we can change the directions of edges in H Õ [C] so that all vertices in C become W -heavy.Since this modification does not decrease the outdegree of any vertex in V (H), the new orientation has strictly more W -heavy vertices than Õ .This contradicts the optimality of Õ .
Let ÕÕ be a W -heavy orientation of G h = G[{v h , . . ., v n }].By Proposition 3.7, such an orientation can be found in linear time.We next construct an orientation of G from Õ and ÕÕ as follows: for each edge in E(H) or E(G h ), we use the direction in Õ or ÕÕ , respectively; for each edge between V (H) and V (G h ), we use the direction from V (H) to V (G h ).All vertices in V (G h ) are W -heavy in G under .Under , each vertex in V (H) has at least as many out-neighbors as under Õ .Thus a vertex in We now show the optimality of .Suppose to the contrary that there is an orientation OPT of G with strictly more W -heavy vertices than .Let F and F OPT be the W -heavy vertices in V (H) under and OPT , respectively.Since the vertices in V (G h ) are W -heavy under , we have |F | < |F OPT |.Now let Õ OPT be an orientation of H Õ such that the edges in H are oriented as in OPT , the edges between V (H) and C are oriented from V (H) to C, and the edges in H[C] are oriented so that all the vertices in C become W -heavy.Then To prove Theorems 4.1 and 4.2, we show for each graph class that it satisfies conditions of Theorems 3.6 and 3.8 in the following subsections.To solve Max W -Light for graphs of bounded clique-width, we present a direct solution as we cannot apply the metatheorem.Note that all graph classes studied in this section are hereditary.

Chordal graphs, d-trapezoid graphs, and circular-arc graphs
It is well known that a chordal graph of n vertices has at most n maximal cliques (see [22]).Since a chordal graph is the unique minimal triangulation of itself, the number of potential maximal cliques is at most n for every n-vertex chordal graph.From the definition of chordal graphs, the following equality follows.
The co-comparability graph of a partial order (V, ª) is a graph with the vertex set V in which two vertices u and v are adjacent if and only if they are incomparable, that is, u " ª v and v " ª u.A partial order (V, ª) is an interval order if each element v oe V can be represented by an interval [l v , r v ] such that u ª v if and only if r u < l v .A graph is a d-trapezoid graph if it is the co-comparability graph of a partial order defined as the intersection of d interval orders [7].It is known that every d-trapezoid graph of n vertices has at most (2n ≠ 3) d≠1 minimal separators [28].Habib and Möhring showed in the proof of Theorem 3.4 in [20] that for every d-trapezoid graph G, tw(G) AE 4d • Ê b (G) ≠ 1.This gives the following fact as a direct corollary.

I Proposition 4.4 ([20]). For every d-trapezoid graph
A graph is a circular-arc graph if it is the intersection graph of arcs on a circle.Every n-vertex circular-arc graph has at most 2n 2 ≠ 3n minimal separators [26].A graph is an interval graph if it is the intersection graph of intervals on a line.From the definition, every interval graph is a circular-arc graph.Also, every interval graph is a chordal graph [30].

Chordal bipartite graphs
A bipartite graph is a chordal bipartite graph if it has no induced cycle of length 6 or more.Every chordal bipartite graph has O(m + n) minimal separators [27].We can show that for every chordal bipartite graph G, tw(G) AE 2 "(G) ≠ 1.The proof is a bit more involved than the ones in the previous subsection.We use the techniques developed by Kloks and Kratsch [25] for computing the treewidth of a chordal bipartite graph exactly.

Graphs of bounded clique-width
A k-expression is a rooted binary tree such that each leaf has label ¶ i for some i oe {1, . . ., k}, each node with one child has a label fl i,j or ÷ i,j (i, j oe {1, . . ., k}, i " = j), and each node with two children has a label fi.Each node in a k-expression represents a vertex-labeled graph as follows: a ¶ i -node represents a graph with one vertex of label i; a fi-node represents the disjoint union of the labeled graphs represented by its children; a fl i,j -node represents the labeled graph obtained from the one represented by its child by relabeling the label-i vertices with label j; an ÷ i,j -node represents the labeled graph obtained from the one represented by its child by adding edges between the label-i vertices and the label-j vertices.A k-expression represents the graph represented by its root.The clique-width of a graph G, denoted by cw(G), is the minimum integer k such that there is a k-expression representing a graph isomorphic to G.
It is known that graphs of bounded treewidth have bounded clique-width [11].The converse is not true in general.For example, the complete graph K n (n Ø 2) has clique-width 2 and treewidth n ≠ 1.On the other hand, the following bound is known for graphs with no large complete bipartite subgraphs.
I Proposition 4.7 (Gurski and Wanke [19]).For every graph G of clique-width at most k, The proposition above with Theorem 3.8 imply that Max W -Heavy can be solved in linear time for graphs of bounded clique-width.However, we cannot apply Theorem 3.6 since graphs of bounded clique-width may have a super-polynomial number of potential maximal cliques.In the rest of this section, we directly show that Max W -Light is polynomial-time solvable for graphs of bounded clique-width.A k-expression of a graph is irredundant if for each edge {u, v}, there is exactly one node ÷ i,j that adds the edge between u and v.We will show that: I Theorem 4.8.Given a graph with an irredundant k-expression, Max W -Light can be solved in time O(n 2k(W +2)+4 log n).
For a graph of clique-width k, one can compute a (2 3k ≠ 1)-expression of it in polynomial time [34] (see also [35]), while exact computation of the clique-width and a corresponding kexpression is NP-hard [15].A k-expression of a graph can be transformed into an irredundant one with O(n) nodes in linear time [13].Now the following is a corollary to Theorem 4.8.I Corollary 4.9.For graphs of clique-width at most k, Max W -Light can be solved in time O(n 2(2 3k ≠1)(W +2)+4 log n).
We now prove Theorem 4.8.Let G be an n-vertex graph and T be an irredundant k-expression of G with O(n) nodes.We denote by r the root of T .For each node t in T , let G t be the graph represented by t with V t := V (G t ).For each i oe {1, . . ., k}, let V i t be the set of label-i vertices in G t .
For a node t in T , a k ◊ (W + 2) integer matrix A = (A i,j ) ioe{1,...,k}, joe{0,...,W +1} is an outdegree signature of G t if there is an orientation of G t such that for each i oe {1, . . ., k} and j oe {0, . . ., W }, A i,j is the number of label-i vertices with outdegree j in G t under , and for each i oe {1, . . ., k}, A i,W +1 is the number of label-i vertices with outdegree at least W + 1 H. L. Bodlaender, H. Ono, and Y. Otachi 20:9 in G t under .The weight w(A) of an outdegree signature A is q ioe{1,...,k}, joe{0,...,W } A i,j .Note that there are at most n k(W +2) outdegree signatures for each node in T .I Observation 4.10.The optimal value of Max W -Light for G is max A w(A), where the maximum is taken over all outdegree signatures A of G r = G.By Observation 4.10, if we have all possible outdegree signatures for all nodes in T , then we can obtain the optimal value of Max W -Light.We compute the outdegree signatures by a bottom-up dynamic programming over the k-expression T .In a standard way, we can modify the dynamic programming to compute an optimal solution as well.
Computing outdegree signatures for the leaf, fi-, and fl p,q -nodes is fairly straightforward.For ÷ p,q -nodes, we need the following result.
Proof.Let t be an ÷ p,q -node with the child t Õ .By the definition of k-expression, for all i.Recall that T is irredundant.Hence there is no edge between V p t and V q t in G t Õ , while G t has all possible edges between V p t and V q t .Let Õ be an orientation of G t Õ and A Õ the corresponding outdegree signature.We say that A Õ can be extended to an outdegree signature A of G t if there is an orientation of G t that corresponds to A such that (e) = Õ (e) for every e oe E(G t Õ ).  ) AE u i,h .For each candidate A, we construct B from A and A Õ .We also compute the lower and upper bounds of outdegree as described above.Then we check orientability under these bounds.By Proposition 4.11, it can be done in time O(|E B | 1.5 log |W p fi W q |).We can bound this by O(n 3 log n), and thus the lemma holds.J We have proved that for each node in T , we can compute its outdegree signatures in O(n 2k(W +2)+3 log n) time.This completes the proof of Theorem 4.8.In this section, we study the parameterized complexity of the problems.See the recent textbook [14] for standard concepts in the field of parameterized complexity.The parameter is the number of vertices of outdegree at most (at least) W in Max W -Light (resp.Max W -Heavy).We call it the solution size.By using a general theorem in [24], we can easily show the following result.

I S A AC
I Corollary 5.1.For any fixed integer W Ø 0, Max W -Light is W [1]-complete when parameterized by the solution size.
Let (G, k) be an instance of the parameterized version of Max W -Heavy, where the parameter k is the solution size.We show the following theorem.I Theorem 5.2.Max W -Heavy parameterized by the solution size k admits a kernel with at most (2W + 4)k + W ≠ 2 vertices.
In the following, we assume that W Ø 3 since otherwise the problem can be solved in polynomial time [3,23].Let A ™ V (G) be the set of vertices of degree at least W , and let B = V (G) \ A. We first bound the number of vertices in A. To see that the step 3a is always possible, observe that before an execution of the step 3a, at most W (|A| ≠ 1) edges between A and B Õ are added.On the other hand, if there are at most W ≠ 1 vertices of degree at most W ≠ 2 in B Õ , then there are at least (W ≠ 1)(|B Õ | ≠ (W ≠ 1)) Ø (W ≠ 1)(|A| • W/(W ≠ 1) + W ≠ 2 ≠ (W ≠ 1)) = W (|A| ≠ 1) + 1 edges between A and B Õ .I Lemma 5.4.(G, k) is a yes-instance if and only if so is (G Õ , k).

Concluding remarks
We have presented metatheorems to show linear-time and polynomial-time solvability of Max W -Heavy and Max W -Light, respectively.The metatheorems are applied to several important classes of graphs.We believe our metatheorems can be applied to many other graph classes.As the final remark, we present a similar result for the problem of finding a maximum induced subgraph with bounded degeneracy.
I Theorem 6.1.For any fixed W , the problem of finding a maximum set of vertices that induces a subgraph of degeneracy at most W can be solved in polynomial time for the classes of chordal graphs, d-trapezoid graphs, circular-arc graphs, and chordal bipartite graphs, and in linear time for graphs of bounded clique-width.
W -Light: Output an orientation of G such that --{u oe V : d + (u) AE W } -is maximized.Max W -Heavy: Output an orientation of G such that --{u oe V : d + (u) Ø W } -is maximized.Symmetrically, we can consider the following problems:Min W -Light: Output an orientation of G such that --{u oe V : d + (u) AE W } -is minimized.Min W -Heavy: Output an orientation of G such that --{u oe V : d + (u) Ø W } -is minimized.
if a and b are in di erent components in G ≠ S.An a, b-separator is minimal if no proper subset of it is an a, b-separator.A vertex set is a minimal separator if it is a minimal a, b-separator for some pair a, b.The set of all minimal separators of G is denoted by ∆ G .By the following proposition, graphs have a polynomial number of minimal separators if and only if they have a polynomial number of potential maximal cliques.

Lemma 3 . 5 .I Theorem 3 . 6 .
Every W -light orientable graph has degeneracy at most 2W .For any fixed W , Max W -Light can be solved in polynomial time for a hereditary graph class C with a polynomial number of potential maximal cliques if the treewidth of each graph in C is bounded from above by a function of its degeneracy.Proof.Let f be a function such that tw(G) AE f ( "(G)) for each G oe C. By Lemma 3.5, a W -light orientable graph in C has treewidth at most f (2W ).Since C is hereditary, a maximum W -light orientable induced subgraph of a graph in C can be found in polynomial time by Proposition 3.4 and Corollary 3.2.Now, by Lemma 3.3, the theorem follows.J

S A AC 2 0 1 6 20:4 Degree-Constrained Orientation of Maximum Satisfaction U
is denoted by G[U ].If G[U ] is a complete graph, then U is a clique of G.The size of a maximum clique in G is denoted by Ê(G).Let Ê b (G) be the maximum integer k such that G has a subgraph isomorphic to the complete bipartite graph K k,k .From the definition, Ê(G) ≠ 1 and Ê b (G) are lower bounds of "(G).A class C of graphs is hereditary if C is closed under taking induced subgraphs.
, at least |C| + |F OPT | > |C| + |F | vertices are W -heavy in H Õ under Õ OPT .This contradicts the optimality of Õ since at most |C| + |F | vertices are W -heavy in H Õ under Õ .JIn this section, we show that Theorems 3.6 and 3.8 can be applied to several important graph classes.More precisely, we show the following theorems.

I
Claim 4.13.If A Õ can be extended to A, then there is an orientation of G t that corresponds to A such that d + Let A be a candidate of an outdegree signature of G t .That is, A is a k ◊ (W + 2) integer matrix A = (A i,j ) ioe{1,...,k}, joe{0,...,W +1} .For i oe {p, q}, let (d i,1 , . . ., d i,|V i t | ) be the nondecreasing sequence such that for each j oe {0, . . ., W + 1}, the value j appears exactly A i,j times.From A Õ , we define (d Õ Õ (u) < d + Õ (v) implies d + (u) AE d + (v) for u, v oe V i t and i oe {p, q}.i,1 , . .., d Õ i,|V i t |) in the same way.For i oe {p, q} and h oe {1, . . ., |V i t |}, we define the lower bound l i,h and the upper bound u i,h as follows: be the complete bipartite graph, where W i = {w i,h : i oe {p, q}, h oe {1, . . ., |V t i |}} for i oe {p, q}.I Claim 4.14.A Õ can be extended to A if and only if there is an orientation B of B such that for each vertex w i,h , it holds that l i,h AE d + B (w i,h