On finding orientations with fewest number of vertices with small out-degree
Insitute of Computer Science, University of Tartu, J. Liivi 2, 50409 Tartu, Estonia. email@example.com
Given an undirected graph, each of the two end-vertices of an edge can “own” the edge. Call a vertex “poor”, if it owns at most one edge. We give a polynomial time algorithm for the problem of finding an assignment of owners to the edges which minimizes the number of poor vertices.
In the terminology of graph orientation, this means finding an orientation for the edges of a graph minimizing the number of edges with out-degree at most 1, and answers a question of Asahiro Jansson, Miyano, Ono (2014).
Keywords: Graph orientation, Graph algorithms.
Let be a simple111Note that our main reference  uses multigraphs, but restricting to graphs is w.l.o.g. undirected graph. An orientation of is a function , which maps each undirected edge to one of the two possible directed edges or . We let be the directed graph whose vertex set is and whose set of (directed) edges is . For each , denote by the out-degree of under by
Fix an integer . A vertex is called --light (or just -light, light) if ; otherwise it is called heavy. Asahiro et al. [1, 2] study the combinatorial optimization problem Min--Light which asks for finding an orientation minimizing the number of -light vertices. For , they exhibit classes of graphs on which the problem can be solved in polynomial time, and they ask the following open question.
In this short note, we answer that question:
Min--Light on a graph with vertice of degree at least 2, vertices of degree 1, and edges can be solved by single maximum cardinality matching computation in a graph with vertices and edges.
Asahiro et al. [1, 2] mention a natural weighted version of the problem: the vertices have costs , , associated with them, and the objective is to find an orientation which minimizes the expression over all orientations , where the sum extends over all 1-light vertices . Our result also gives the complexity of the weighted case.
For nonnegative weights, weighted Min--Light on a graph with vertices and edges can be solved by single maximum weight matching computation in a graph with vertices and edges.
For weights which are not nonnegative, Min--Light is NP-hard, since it includes as a special case (when all weights are ) the problem Min--Heavy, for which Asahiro et al.  proved NP-hardness.
We mostly adhere to standard notation. Our (undirected) edges are 2-element subsets of the vertex set. For a vertex , we denote by the set of all edges incident on . The degree of a vertex is denoted by .
2. The algorithm for Min--Light.
We first deal with the case that there are no vertices of degree 1. For such a graph , construct a graph as follows. Denote by the degree of a vertex in . Start by letting be a copy of . Then replace every edge by a path , by adding three new vertices , , , and four new edges , , , . We call the vertices connecting vertices, and the edges (and also ) connecting edges, and let .
Now, for each original vertex , do the following: replace by new vertices . Add edges between the and the , for every and every . Finally, choose two edges arbitrarily, and add an edge , which we call the special edge.
In this way, contains pairwise disjoint “gadgets” ( induced subgraphs) , , each with vertices and edges. If , then the gadgets and are joined to the connecting vertex by , or , respectively, edges. Cf. Fig. 1. With and , the resulting graph has
The following fact is crucial in the consturction.
Let be a maximal matching in . For each , there exists a matching which differs from only on , and which satisfies either or , and for which the following holds: With , we have
Let be such a maximal matching. If and the special edge is not in , then, to obtain , we replace by the edges of a perfect matching of , which consists of plus a perfect bipartite matching between the and the . This increases the number of edges in the matching by 1. If and , then at least two of the vertices , are exposed. To obtain , we delete from and add two edges from exposed vertices in , , to the end-vertices of , thus increasing the number -edges in the matching by 1.
In all other cases, we leave unchanged: .
The equations (1) can now be easily derived. If , then is a perfect matching in , of size . If , then any maximal matching leaves either one or one of the vertices , , unmatched. If one is left unmatched, then the matching must contain the special edge , so , implying (1). If , then taking into account that , equation (1) readily follows. ∎
We can now prove that solving the maximum (cardinality) matching problem on is equivalent to solving Min--Light on .
If has no vertices of degree 1, then Min--Light on can be solved by computing a maximum matching in .
Firstly, consider an orientation of . We will construct a matching in with the property that, for all ,
For every directed edge in , choose the edge to be in . This means that, for every , we have
Then extend arbitrarily to a maximal matching by adding edges from the , . Note that is unchanged on the sets , , so that ( ‣ 2) still holds. Finally, for each , apply Lemma 4, and replace the edges in , by the edges of . The result is a matching satisfying (2).
Secondly, let be a maximum matching in . We will construct an orientation of satisfying (2). For each , if , let ; if , let . If the vertex is -exposed, then chose one of , arbitrarily for .
Hence, we conclude that
We conclude. Denoting by the smallest number of light vertices in any orientation of , and by the largest cardinality of a matching in , we have
which concludes the proof of the lemma. ∎
We can now prove Theorem 2.
Proof of Theorem 2..
To get rid of vertices of degree 1 in the input graph, for each such vertex , add three more vertices , and four edges , , , . In other words, we replace each degree-1 vertex by a 4-cycle. A 4-cycle can have 2 heavy vertices, opposite each other, and the other 2 vertices will be light; the edge leaving the cycle will not change that. From this, it can be readily verified that Min--Light on the original graph is equivalent to Min--Light on the modified graph. Lemma 5 now yields the result. ∎
The weighted case
The weighted case differs only in technical aspects.
Sketch of the proof of Theorem 3..
First of all, note that the degree-1 vertices can be taken care of in just the same way as in the non-weighted case: just give the new vertices a cost of 0. Then, walking through the proof of Lemma 5, we see that the argument is still valid for weighted matchings and costs punishing the light vertices. Indeed, that’s the reason why we phrased Lemma 4 in the way we did: if is the cost incurred if vertex is light, give each edge in a weight of . Then, as in the proof of Lemma 4, denoting by the cost incurred by the light vertices in any orientation of , and by the largest weight of a matching in , and with , it’s easy to show that
which concludes the proof of the theorem. ∎
Seeing as weighted Min--Light can be solved in polynomial time by matching techniques for nonnegative weights, it is natural to ask for a description by linear inequalities of the polyhedron defined by the problem: is the dominant (see  for details) of the convex hull of the points , which have if is -poor, and otherwise.
Kyncl et al.  study the so-called minimum irreversible -conversion problem, which is closely related to Min--Light. In fact, the only difference between Min--Light and Minimum Irreversible -Conversion is that the latter requires the orientations to be acyclic. Kyncl et al. prove that Minimum Irreversible -conversion is NP-hard, even for graphs of maximum degree 4, but for 3-regular graphs, it is equivalent to finding a vertex feedback set (which can be done in poly-time ).
Since the complexity of Minimum Irreversible -Conversion is open for subcubic graphs, in the light of our result, we conjecture that there might be a matching-based algorithm for that problem.
I would like to thank Dirk Oliver Theis for his support, inspiring discussions and useful comments.
-  Yuichi Asahiro, Jesper Jansson, Eiji Miyano, and Hirotaka Ono, Graph orientations optimizing the number of light or heavy vertices, ISCO, 2012, pp. 332–343.
-  by same author, Degree-constrained graph orientation: Maximum satisfaction and minimum violation, WAOA, 2013, pp. 24–36.
-  Jan Kyncl, Bernard Lidickỳ, and Tomáš Vyskocil, Irreversible 2-conversion set is np-complete, KAM-DIMATIA Series 933, 2009.
-  Alexander Schrijver, Combinatorial optimization. Polyhedra and efficiency., Algorithms and Combinatorics, vol. 24, Springer-Verlag, Berlin, 2003. MR 1956926
-  Shuichi Ueno, Yoji Kajitani, and Shin’ya Gotoh, On the nonseparating independent set problem and feedback set problem for graphs with no vertex degree exceeding three, Discrete Mathematics 72 (1988), no. 1-3, 355–360.