Theoretical Computer Science 648 (2016) 72–83
Contents lists available at ScienceDirect
Theoretical Computer Science www.elsevier.com/locate/tcs
The label cut problem with respect to path length and label frequency ✩ Peng Zhang a , Bin Fu b,∗ a b
School of Computer Science and Technology, Shandong University, Jinan 250101, China Department of Computer Science, University of Texas-Pan American, Edinburg, TX 78539, USA
a r t i c l e
i n f o
Article history: Received 16 January 2016 Received in revised form 17 July 2016 Accepted 2 August 2016 Available online 9 August 2016 Communicated by G. Ausiello Keywords: Label s-t Cut Global Label Cut Parameterized algorithm Approximation algorithm Computational complexity
a b s t r a c t Given a graph with labels defined on edges and a source-sink pair (s, t ), the Label s-t Cut problem asks for a minimum number of labels such that the removal of edges with these labels disconnects s and t. Similarly, the Global Label Cut problem asks for a minimum number of labels to disconnect G itself. For these two problems, we identify two useful parameters, i.e., lmax , the maximum length of any s-t path (only applies to Label s-t Cut), and f max , the maximum number of appearances of any label in the graph (applies to the two problems). We show that lmax = 2 and f max = 2 are two complexity thresholds for Label s-t Cut. Furthermore, we give (i) an O ∗ (ck ) time parameterized algorithm for Label s-t Cut with lmax bounded from above, where parameter k is the number of labels in a solution, and c is a constant with lmax − 1 < c < lmax , (ii) a combinatorial lmax -approximation algorithm for Label s-t Cut, and (iii) a polynomial time exact algorithm for Global Label Cut with f max bounded from above. © 2016 Elsevier B.V. All rights reserved.
1. Introduction The Label s-t Cut problem is an edge-classification Min s-t Cut problem defined as follows. Label s-t Cut Instance: We are given a (directed or undirected) graph G = ( V , E ), a source-sink pair (s, t ), and a label set L = {1 , 2 , . . . , q }. Each edge e ∈ E has a label (e ) ∈ L. Goal: A label s-t cut L ⊆ L is a subset of labels such that the removal of all edges with these labels from G disconnects s and t. The goal of the problem is to find a label s-t cut of the minimum size. Recently, the Label s-t Cut problem attracted a good deal of attention from researchers (see [7,8,15,16,25,26,30]). As introduced in [30], this problem comes from system security, in particular from intrusion detection and from the generation and analysis of attack graphs [16,25]. The reader who is interested in the origin of the problem is referred to [30] for a brief introduction. Since Label s-t Cut is NP-hard [16], people usually seek approximation algorithms [7,26,30] and parameterized algorithms for this problem. The crux is that in Label s-t Cut many edges may share the same label. Otherwise (each edge has a distinct label), Label s-t Cut degenerates to the well-known Min s-t Cut problem (to find a cut of minimum capacity that disconnects s and t in the input graph).
✩ A preliminary version of partial results in this paper appeared in the Proceedings of the 11th Annual Conference on Theory and Applications of Models of Computation (TAMC 2014) [29]. Corresponding author. E-mail addresses:
[email protected] (P. Zhang),
[email protected] (B. Fu).
*
http://dx.doi.org/10.1016/j.tcs.2016.08.006 0304-3975/© 2016 Elsevier B.V. All rights reserved.
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
73
Besides Label s-t Cut, there are still many network optimization problems which have been studied in edge-labeled graphs, such as the Minimum Spanning Tree problem [4,20,6], the Minimum Steiner Tree problem [5], the Max Flow problem [12], the Shortest Path problem [13], the Perfect Matching problem [21], and the Traveling Salesman problem [28]. Moreover, it is natural to define the Global Label Cut problem. Global Label Cut Instance: In the problem we are given an undirected graph G = ( V , E ) and a label set L = {1 , 2 , . . . , q }. Each edge e ∈ E has a label (e ) ∈ L. Goal: A global label cut L ⊆ L is a subset of labels such that G is disconnected after removing all edges with labels in L . The goal of the problem is to find a global label cut of the minimum size. Global Min Cut is the global version of the Label s-t Cut problem. This is just like that the Global Min Cut problem (to find a cut of minimum capacity that disconnects the input graph) is the global version of the Min s-t Cut problem. Notations. Throughout the paper, the symbol denotes a label in L, and also denotes a mapping from edges to labels when we write, e.g., (e ). We do not introduce more symbols to distinguish between these two cases. A similar thing happens to the symbol L: It denotes the input label set, and it also denotes a mapping from 2 E to 2 L . In the latter case, we use L ( E ) to denote the set {(e ) : e ∈ E } for an edge subset E . 1.1. Our results In this paper, we identify two parameters of the Label s-t Cut problem and the Global Label Cut problem, and show how they affect the complexity of the problems. In several cases, we get complexity thresholds and efficient algorithms. First consider the parameter lmax . This parameter only applies to the Label s-t Cut problem. Definition 1.1 (lmax ). Given a graph G = ( V , E ) with source s ∈ V and sink t ∈ V , the maximum s-t length lmax is the length of a longest simple s-t path in terms of the number of edges. We prove that Label s-t Cut is NP-hard even when restricted to instances with lmax = 2 (Theorem 2.1). Since the problem with lmax = 1 is trivial, this shows that lmax = 2 is a complexity threshold of the Label s-t Cut problem. (When lmax = 1, there is only one path between s and t, whose length is 1. This is a trivial case.) Then, we show that when lmax is upper bounded by a constant and the Label s-t Cut problem is parameterized by k, i.e., the number of labels in a solution, the problem is fixed parameter tractable and is solvable in time O ∗ (ck ) (Theorem 3.1), where c ∈ (lmax − 1, lmax ) is a constant. (Recall that in the O ∗ () notation we omit any factor polynomial in the input length.) This is compared with the O ∗ (lkmax )-time parameterized algorithm for the problem using the standard depth-bounded search tree technique [23]. We point out that the proof of Theorem 3.1 is considerably involved and this theorem is one of our main results. Moreover, we give an lmax -approximation algorithm for the Label s-t Cut problem (Theorem 4.1). The algorithm is purely combinatorial, simpler and faster than the LP-rounding algorithm in [26], and has a primal-dual explanation. Then consider the parameter f max . This parameter applies to the Label s-t Cut problem and the Global Label Cut problem. Definition 1.2 ( f max ). Given a graph G with labels in L defined on edges, the label frequency f () of label ∈ L is the number of edges in G whose label is . The maximum label frequency f max is the maximum of f () over all labels. We prove that Label s-t Cut is NP-hard when f max = 2 (Theorem 2.2). Since when f max = 1 Label s-t Cut degenerates to the Min s-t Cut problem, which is polynomial time solvable [1], this shows that f max = 2 is a complexity threshold of the Label s-t Cut problem. Furthermore, we prove that when f max is upper bounded by a constant, the Global Label Cut problem is polynomial time solvable (Theorem 3.2). Of course, besides the two parameters considered above, for the Label s-t Cut problem there are still several parameters which are potential candidates for the investigation, such as the treewidth of the input graph, the number of edges in the optimal label s-t cut, etc. The reason why we study Label s-t Cut with respect to path length and label frequency is actually already shown by our results. First, these two parameters dramatically affect the computational complexity of the problem. Second, in several cases we obtain good algorithms for the problem using these two parameters. A preliminary version of partial results in this paper appeared in the Proceedings of the 11th Annual Conference on Theory and Applications of Models of Computation (TAMC 2014) [29]. This paper is the full and extended version of [29]. More importantly, two algorithmic results in this paper, i.e., Theorem 3.1 and Theorem 3.3, are thoroughly new; we obtained them after [29] was published. In particular, Theorem 3.1 is the most important algorithmic result in this paper. However, according to the “first complexity and then algorithms” order, we present it in Section 3, after the hardness results in Section 2. 1.2. Related work It is well-known that Set Cover has a greedy polynomial time (1 + ln n)-approximation algorithm, where n is the size of the underlying set. The same algorithm can be translated to Hitting Set by duality. In [16], Jha et al. expressed the Label
74
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
Fig. 1. Reduce Vertex Cover to Label s-t Cut.
s-t Cut problem as an implicit Hitting Set problem as follows: let U = { S : S is the set of labels appearing on an s-t path}; these are the sets to hit. A set of labels is a label cut if and only if it intersects (hits) every S ∈ U . The authors [16] then translated the greedy algorithm for Set Cover to get an approximation algorithm for Label s-t Cut with approximation guarantee of 1 + ln |U |. The issue here is that in general U may be of size exponential in the number of vertices in the input graph of Label s-t Cut. In [30], Zhang et al. presented the first (polynomial time) approximation algorithm for the Label s-t Cut problem. The 1
approximation ratio is O (m 2 ), where m is the number of edges in the input graph. The authors also show that it is NP-hard 1−(log log |I |)−c
to approximate Label s-t Cut within a factor of 2(log |I |) for any constant c < 1/2, where |I | is the input length of the problem. The essentially same approximation hardness result appears independently in [7]. In [26], Tang et al. gave the first approximation algorithm for the Label s-t Cut problem whose approximation factor is 2
1
in terms of n, the number of vertices in the input graph. The approximation factor of the algorithm [26] is O (n 3 /OPT 3 ), 1 2
where OPT is the optimal value of the problem. The authors also presented an O ((m/OPT ) )-approximation algorithm for 1
the Label s-t Cut problem, improving the O (m 2 ) result in [30]. Moreover, they showed that the linear program relaxation 1
for Label s-t Cut, on which they obtain the approximation results, has integrality gap ((m/OPT ) 2 − ) for any small constant > 0. Fellows et al. [8] considered the Label s-t Cut problem in the view of parameterized complexity. They prove that when parameterized by the number of used labels (that is, | L | for a label s-t cut L ⊆ L), the Label s-t Cut problem is W[2]-hard in graphs with pathwidth at most 3, and when parameterized by the number of used edges (that is, | E | for a label s-t cut L ( E )), the Label s-t Cut problem is W[1]-hard in graphs with pathwidth at most 4. The above results mean that Label s-t Cut in the corresponding graphs is unlikely fixed parameter tractable. On the other hand, the exact computational complexity of the Global Label Cut problem is still unknown. After the conference version of [30] was published, Jegelka et al. [15] studied a more general cut problem called Cooperative Cut, which finds a global cut such that the objective function is minimized, where the objective function, defined on 2 E , can be an arbitrary submodular function. It is not difficult to show that Cooperative Cut is a generalization of Global Label Cut. Jegelka et al. [15] proved the NP-hardness of the Cooperative Cut problem. However, this hardness result does not extend to Global Label Cut. 2. Hardness results In this section, we show some hardness results for the Label s-t Cut problem with respect to the parameters lmax and f max . In the proof of the following Theorem 2.1, we shall use the well-known Vertex Cover problem. Given an undirected graph, the Vertex Cover problem asks to find a vertex subset of the minimum cardinality such that each edge in the graph has at least one endpoint in the subset. Theorem 2.1. In both undirected and directed graphs, the Label s-t Cut problem is NP-hard even if lmax = 2. Proof. We reduce an instance of Vertex Cover to an instance of Label s-t Cut. Let G be the graph in the Vertex Cover instance, and G be the graph that we shall construct in the Label s-t Cut instance. Initially G contains two vertices s and t. Then, for each edge e = ( v i , v j ) ∈ E (G ), add an s-t path P i j of length 2 to G . The two edges on path P i j are labeled with v i and v j , respectively. See Fig. 1 for an illustration. The label set L is just V (G ). Then a minimum vertex cover for G corresponds to a minimum label s-t cut for G , and vice versa. Obviously for graph G we have lmax = 2. The directed case can be easily proved by orienting each edge in Fig. 1 from s to t. 2 Remarks. (i) The purpose of Theorem 2.1 is to find the minimum lmax such that Label s-t Cut is NP-hard. The answer is 2. Obviously, Label s-t Cut with lmax = 1 is trivial. On the other hand, in the proof of Theorem 2.1 if we use a reduction from
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
75
Fig. 2. Reduce MAX SAT to Label s-t Cut.
VC(3), then we know that Label s-t Cut is NP-hard even with lmax = 2 and f max = 3. Here, VC(d) denotes the Vertex Cover problem in graphs whose maximum vertex degree is d. It is known that VC(3) is already NP-hard [18]. (ii) Actually, VC(3) is even APX-hard [2]. It is easy to verify that the reduction from Vertex Cover to Label s-t Cut in the proof of Theorem 2.1 is an L-reduction. Using this reduction, VC(3) L-reduces to Label s-t Cut with lmax = 2, f max = 3. This means that Label s-t Cut is APX-hard even when restricted to such instances. (As a consequence, even this restricted problem does not admit PTAS, if P = NP.) (iii) Starting from the UG-hardness of Vertex Cover [19] (UG means “unique games”), Theorem 2.1 already implies that Label s-t Cut with lmax = 2 cannot be approximated within 2 − for any constant > 0, if P = NP and the Unique Games Conjecture is true. (iv) The reduction in Theorem 2.1 is actually a serf-reduction (means subexponential reduction family, see [9, Section 16.1]) from Vertex Cover parameterized by the number of vertices to Label s-t Cut parameterized by the number of labels. This implies that, assuming that ETH is true, there is no 2o(q) time algorithm for the Label s-t Cut problem even when restricted to series-parallel graphs with lmax = 2, where q is the number of labels. Here, ETH denotes the Exponential Time Hypothesis [14], which says that there is no 2o(n) time algorithm for the 3SAT problem, where n is the number of variables in the problem. In the following Theorem 2.2, we shall use the classic MAX SAT problem. Given a CNF (conjunctive normal form) formula φ , the MAX SAT problem asks to find a truth assignment to the variables in φ such that the number of satisfied clauses in φ is maximized.
Theorem 2.2. In both undirected and directed graphs, the Label s-t Cut problem is NP-hard even if f max = 2. Proof. We reduce MAX SAT to Label s-t Cut. While our reduction is inspired from [7] (the reduction from MAX E3SAT to the Label Path problem therein), the notion of f max is not mentioned in [7]. Let φ be the CNF formula in the MAX SAT instance, which contains n variables x1 , x2 , . . . , xn and m clauses C 1 , C 2 , . . . , Cm . For each variable xi , which appears in ni clauses C j 1 , C j 2 , . . . , C jn (including both positive and negative appearances), i
we construct a variable gadget as shown in Fig. 2(a). In the variable gadget we have two groups { T i jh , T ij : 1 ≤ h ≤ ni } and h
{ F i jh , F ijh : 1 ≤ h ≤ ni } of labels, where T i j (F i j , resp.) means xi is assigned TRUE (FALSE, resp.) in C j . The labels of forms T ij
and F ij are just dummy labels. We do not really use them in the arguments below. They are introduced because we want to keep the finally resulting graph as a simple graph, rather than a multi-graph. For each clause C j , which contains k j literals, we construct a clause gadget as shown in Fig. 2(b). The gadget contains k j labels that reflect the appearances of literals in the clause; for example, if C j = (xi 1 ∨ xi 2 ∨ ¬xi 3 ), then the three labels should be T i 1 j , T i 2 j and F i 3 j . Finally, we merge all vertices s in the gadgets into a single source s, and all vertices t into a single sink t, finishing the construction of the graph G in Label s-t Cut. The label set L is just the union of all the labels that appeared in the construction. It is easy to verify that in the resulting instance we have | L | = 2 ni and f max = 2, and the instance can be constructed in polynomial time. Let m∗ be the optimum of the MAX SAT instance, and q∗ be the optimum of the Label s-t Cut instance. We claim that for any integer m ≥ 0,
m∗ ≥ m ⇐⇒ q∗ ≤
n
n i + m − m .
(1)
i =1
If (1) holds, this obviously reduces the decision version of MAX SAT to the decision version of Label s-t Cut, proving that Label s-t Cut is NP-hard.
76
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
For simplicity, let us define LT i = { T i jh : 1 ≤ h ≤ ni } and L F i = { F i jh : 1 ≤ h ≤ ni } for every variable xi . (=⇒) Suppose that φ has a truth assignment τ satisfying ≥ m clauses. For each xi , if xi is true, then pick all the labels in LT i , otherwise pick all the labels in L F i . In this way we pick in total ni labels and disconnect all the variable gadgets. Since τ satisfies ≥ m clauses, by the above picked labels, at least m clause gadgets have already been disconnected. For each of the remaining connected clause gadgets, pick any label in it to disconnect the gadget. Thus we get a label s-t cut with ≤ ni + m − m labels. (⇐=) Suppose that G has a label s-t cut L of size ≤ ni + m − m . Note that all the labels in L appear in the variable gadgets. Without loss of generality, we can assume that there are no labels of forms T ij or F ij in L . If for some i and j both
T i j and T ij appear in L , we can safely remove T ij from L . If for some i and j only T ij appears in L , we can replace T ij in
L with T i j . By doing so, the resulting label set remains a label s-t cut and its size can only decrease or remain unchanged. The same argument applies to labels F ij , if there are such labels in L . By the construction, a variable gadget, for xi to say, is disconnected if and only if all the labels in LT i or all the labels in L F i are picked in L . This is because if only part of the labels in LT i and part of the labels in L F i are picked in L , then s is still connected to t. Let L ◦ be the union of the sets of such labels for all variables (that is, the set LT i if LT i ⊆ L , and the set L F i if L F i ⊆ L ). If for some variable xi , both LT i and L F i are contained in L , then we arbitrarily pick all the labels in one set, to say, LT i into L ◦ . Obviously, we have L ◦ ⊆ L . The purpose of L ◦ is to lead to a truth assignment for variables in φ . By the construction of L ◦ , either LT i or L F i is contained in L ◦ . If LT i ⊆ L ◦ , then xi is assigned TRUE, otherwise xi is assigned FALSE. Denote by τ this truth assignment. Note that L ◦ does not need to be a label s-t cut. Since all variables appear ni times in φ , we know | L ◦ | = ni and hence | L − L ◦ | ≤ m − m . So, L − L ◦ can only disconnect at most m − m clause gadgets (even if each label in L − L ◦ disconnects a distinct clause gadget). Since L disconnects all the m clause gadgets, at least m clause gadgets are disconnected by L ◦ . This implies that τ , the truth assignment indicated by L ◦ , satisfies ≥ m clauses in φ . The directed case can be easily proved by orienting each edge in Fig. 2 from s to t. 2 Remarks. (i) The purpose of Theorem 2.2 is to find the minimum f max such that Label s-t Cut is NP-hard. When f max = 1, Label s-t Cut degenerates to the well-known Min s-t Cut problem, which can be solved in polynomial time by several methods [1, Chapter 7]. So, f max = 2 just acts as a threshold of the computational complexity of Label s-t Cut. (ii) In the proof of Theorem 2.2, if we use a reduction from MAX 3SAT, where MAX 3SAT is MAX SAT in which each clause contains at most 3 literals, then we know that Label s-t Cut is NP-hard even in graphs G with lmax = 4 and f max = 2. (iii) Consider the undirected version of Label s-t Cut. In each reduction in Theorem 2.1 and Theorem 2.2, the resulting graph G is a series-parallel graph, having treewidth t w (G ) exactly 2. Since when t w (G ) = 1 (i.e., G is a tree) Label s-t Cut can be trivially solved, t w (G ) = 2 is a threshold of the computational complexity of Label s-t Cut. (iv) Since Label s-t Cut is NP-hard with upper bounded lmax , f max or treewidth, it is hopeless to seek parameterized algorithms by each of these parameters (assuming P = NP). In fact, in terms of the parameterized complexity theory, these problems (Label s-t Cut with upper bounded lmax , f max or treewidth) are called para-NP-hard (see [9, Section 2.2]). 3. Algorithms for tractable cases 3.1. FPT algorithms When parameterized by the number of labels in the solution, Label s-t Cut is W[2]-hard [8]. In this section, we show that the problem is FPT when lmax is upper bounded by a constant. A straightforward FPT algorithm for Label s-t Cut with upper bounded lmax can be obtained using the standard depthbounded search tree technique (see, e.g., [9, Chapter 1] and [23, Chapter 8]), which is similar to the one for the Vertex Cover problem. Let k be the parameter, that is, the number of labels that can be used in a solution. We pick any s-t path P from the graph; it has at most lmax edges. We branch at each edge e ∈ P by removing e and all the other edges that have the same label as that of e. The depth of the rooted search tree is at most k, and the number of children of each internal node is at most lmax . This shows that Label s-t Cut with upper bounded lmax can be solved in O ∗ (lkmax ) time. In the following, we show an even better FPT algorithm in O ∗ (ck ) time for Label s-t Cut with upper bounded lmax , where lmax − 1 < c < lmax . We begin with two simple lemmas. Lemma 3.1. Given two vertices s, t and an edge e in an undirected graph, finding an s-t path P through edge e, or reporting that no such path exists, can be done in polynomial time. Proof. Let e = (u , v ). This is equivalent to finding either two vertex disjoint paths for vertex pairs (s, u ) and ( v , t ), or two vertex disjoint paths for vertex pairs (s, v ) and (u , t ). The lemma follows since a constant number of vertex disjoint paths in an undirected graph can be found in polynomial time [24]. 2 Recall that in graph theory, if two paths P 1 and P 2 do not share any common vertex, then they are called vertex disjoint.
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
77
Lemma 3.2. Given two vertices s, t and two edges e 1 = (u 1 , v 1 ) and e 2 = (u 2 , v 2 ) in an undirected graph, finding an s-t path P through e 1 and e 2 , or reporting that no such path exists, can be done in polynomial time. Proof. The proof is straightforward. This is equivalent to finding three vertex disjoint paths for the vertex pairs in any one of the following eight cases: (1) (s, u 1 ), ( v 1 , u 2 ), ( v 2 , t ), (2) (s, u 1 ), ( v 1 , v 2 ), (u 2 , t ), (3) (s, v 1 ), (u 1 , u 2 ), ( v 2 , t ), (4) (s, v 1 ), (u 1 , v 2 ), (u 2 , t ), (5) (s, u 2 ), ( v 2 , u 1 ), ( v 1 , t ), (6) (s, u 2 ), ( v 2 , v 1 ), (u 1 , t ), (7) (s, v 2 ), (u 2 , u 1 ), ( v 1 , t ), (8) (s, v 2 ), (u 2 , v 1 ), (u 1 , t ). The lemma follows since a constant number of vertex disjoint paths in an undirected graph can be found in polynomial time [24]. 2 Theorem 3.1. When parameterized by k, i.e., the number of labels to be removed, Label s-t Cut in undirected graphs with lmax bounded from above, is fixed parameter tractable and is solvable in time O ∗ (ck ), where c is a constant with lmax − 1 < c < lmax . Proof. We shall prove the theorem by giving an FPT algorithm for Label s-t Cut in undirected graphs with lmax bounded from above. The algorithm is a search-tree algorithm and hence recursive. The recursion terminates on many base problems, which are corresponding to the leaves of the depth-bounded search tree corresponding to the algorithm. To analyze the running time of the algorithm (up to any factor which is polynomial in the input size), it suffices to compute the number of nodes in the search tree, since the time expended at each node is polynomial in the input size. Moreover, since each internal node of the search tree has at least two children, the number of its nodes is within two times the number of its leaves. Thus, we just need to compute the number of leaves in the search tree. Denote it by T k . Now we describe the FPT algorithm. For notational simplicity, we use b to denote lmax . First we remove all the edges that do not appear on any s-t path. This can be done in polynomial time by Lemma 3.1. Then, we select two edges e 1 and e 2 whose labels are the same. If no such pair of edges exists, then Label s-t Cut simply reduces to the Min s-t Cut problem. Then we find
P 1 : an s-t path which goes through e 1 . Note that such a path must exist. By Lemma 3.1, P 1 can be found in polynomial time. Then we check if there is a label that is assigned to at least two edges in P 1 . If there is such a label, path P 1 contains at most b − 1 different labels. Since at least one label in L ( P 1 ) should be removed, we try each label ∈ L ( P 1 ) (that is, add to the current solution and remove all edges with label from the current graph, resulting in graph G − ) and branch into | L ( P 1 )| subproblems with parameter k − 1 (that is, the algorithm calls itself on the small graph G − for each ∈ L ( P 1 )). Thus we have the recurrence
T k ≤ (b − 1) T k−1 .
(2)
In the following we suppose that there is no such label. This means Property 3.1. At this point, every edge in P 1 has a distinct label. In particular, we know that
e2 ∈ / P1 since (e 2 ) = (e 1 ) and e 1 ∈ P 1 . Next, we check if
P 2 : an s-t path which goes through e 2 and an edge e with label (e ) ∈ / L( P 1)
(3)
exists by trying every edge e outside P 1 satisfying (e ) ∈ / L ( P 1 ). Fixing such an edge e, by Lemma 3.2, whether or not P 2 exists can be determined in polynomial time, and if there is such a path, it can be found in polynomial time. We consider the two cases of whether P 2 is found, namely, Case 1 and Case 2 in the following. Case 1. P 2 is found. Note that in this case, both P 1 and P 2 have been found. Case 1.1. There is a label that is assigned to at least two edges in path P 2 . We make recursive calls on P 2 and we have the recurrence (2). Case 1.2. Each label in L ( P 2 ) is assigned to only one edge in P 2 . Recalling from Property 3.1, we also have that each label in L ( P 1 ) is assigned to only one edge in P 1 . Let U be the set of labels that appear both in P 1 and in P 2 . In other words, U = L ( P 1 ) ∩ L ( P 2 ). Since e 1 ∈ P 1 , e 2 ∈ P 2 , and (e 1 ) = (e 2 ), we know that U is not empty ((e 1 ) ∈ U ). Since | L ( P 1 )| ≤ | P 1 | ≤ b, | L ( P 2 )| ≤ | P 2 | ≤ b, (e ) ∈ L ( P 2 ), and (e ) ∈ / L ( P 1 ) (for the edge e please refer to (3)), we know that |U | < b. In a word, we have
78
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
1 ≤ | U | ≤ b − 1.
(4)
We try each label in U , and then try each label pair in ( L ( P 1 ) − U ) × ( L ( P 2 ) − U ). Thus we branch into |U | subproblems with parameter k − 1 and (| L ( P 1 )| − |U |) · (| L ( P 2 )| − |U |) subproblems with parameter k − 2. So, we have the recurrence
T k ≤ |U | · T k−1 + (| L ( P 1 )| − |U |) · (| L ( P 2 )| − |U |) · T k−2
≤ uT k−1 + (b − u )2 T k−2 ,
(5)
where u = |U |. Case 2. P 2 is not found. This is caused by that every s-t path going through e 2 does not contain an edge e with
(e ) ∈ / L ( P 1 ). In other words, there are s-t paths going through e 2 , but every such path does not contain an edge e with (e ) ∈ / L ( P 1 ). Since (e 2 ) = (e 1 ) ∈ L ( P 1 ), this case means the following property. Property 3.2. At this point, every s-t path P that goes through e 2 must satisfy L ( P ) ⊆ L ( P 1 ).
Note that by Property 3.2, for an s-t path P which goes through e 2 , we have only two possibilities: either L ( P ) = L ( P 1 ), or L ( P ) ⊂ L ( P 1 ). Then we check if
P : an s-t path which goes through e 2 and satisfies L ( P ) ⊂ L ( P 1 ) exists. Before considering the two cases of P (found or not found), we first show how to find such a path in polynomial time. We try each label ∈ L ( P 1 ). Let G be the current graph. We make a copy G of G, and remove all edges with label from graph G . Let G be the resulting graph. Then we find an s-t path through e 2 from graph G . By Lemma 3.1, such a path, if exists, can be found in polynomial time. If it is found, then this is the path P and we are done. If we have tried every label in L ( P 1 ) and do not find the desired path, then we report that it does not exist. We are ready to deal with the two possible results of P . Case 2.1. P is found. In this case, we have a path P that has at most b − 1 labels on it. Thus, we can make recursive calls on P and again have the recurrence (2). Case 2.2. P is not found. That is, for each s-t path P through e 2 , L ( P ) = L ( P 1 ). In this case, edge e 2 can be removed directly. This is because once P 1 is disconnected by removing some labels, P is accordingly disconnected. The algorithm then goes back to its beginning and continues. For completeness, we give the pseudo-code of the algorithm after the proof. Please see Algorithm 3.1, and Procedures 3.2 and 3.3 called by Algorithm 3.1. It remains to give an upper bound of T k . For recurrence (2), we need
T k = O ((b − 1)k−1 ).
(6)
The recurrence (5) has a characteristic equation x2 = ux + (b − u )2 , which has only one positive root x =
u 2 + 4(b − u )2 . Since 1 ≤ u ≤ b − 1 (see (4)), by simple calculus, we know that x ≤
c=
1 2
1+
1 2
1+
1 2
u+
1 + 4(b − 1)2 . Let
1 + 4(b − 1)2 .
Thus, to satisfy (5), it needs
T k = O (ck−1 ). Since b > 1, we know that b − 1 < c < b. By (6) and (7), we get that T k = O (ck−1 ) = O (ck ), completing the proof of the theorem.
(7)
2
Remarks. We note that Algorithm 3.1 does not extend to directed graphs. This is because finding two vertex disjoint paths in a directed graph is NP-complete [10], and hence our method of proving Lemma 3.1 does not work in directed graphs. 3.2. Polynomial time exact algorithms We identify some tractable cases for the Global Label Cut problem. Let n be the number of vertices and m the number of edges in a given graph. Theorem 3.2. Global Label Cut is polynomial time solvable when the problem has upper bounded f max .
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
79
Algorithm 3.1 LC(G, s, t, L). Input: Graph G, source s, sink t, and label set L. Output: A minimum label s-t cut for G. 1 if s and t are disconnected in G then 2 return ∅. 3 end if 4 Remove all edges that do not appear on any s-t path. 5 if every edge has a distinct label then 6 return L (( S , T )), where ( S , T ) is a minimum s-t cut of G. 7 end if 8 Let e 1 and e 2 be two edges that share some same label. 9 Let P 1 be an s-t path through e 1 . Such a path must exist at this point. 10 if there are at least two edges in P 1 sharing the same label then 11 return B1(G , s, t , L , L ( P 1 )). 12 end if 13 if there exists an s-t path P 2 which goes through e 2 and an edge e with (e ) ∈ / L ( P 1 ) then 14 if there are at least two edges in P 2 sharing the same label then 15 return B1(G , s, t , L , L ( P 2 )). 16 else 17 U ← L ( P 1 ) ∩ L ( P 2 ), A ← L ( P 1 ) − U , B ← L ( P 2 ) − U . 18 return the label subset with the minimum size among B1(G , s, t , L , U ) and B2(G , s, t , L , A , B ). 19 end if 20 else 21 if there exists an s-t path P which goes through e 2 and satisfies L ( P ) ⊂ L ( P 1 ) then 22 return B1(G , s, t , L , L ( P )). 23 else 24 Remove e 2 , then goto step 1. 25 end if 26 end if
Procedure 3.2 B1(G, s, t, L, A). Input: Graph G, source s, sink t, label set L, and label subset A ⊆ L. Output: A minimum label s-t cut for G. 1 i ← 0. 2 for each label a ∈ A do 3 i ← i + 1. 4 Let G i be the resulting graph obtained by removing from G all edges with (e ) = a. 5 L i ← {a} ∪ LC(G i , s, t , L ). 6 end for 7 return the label subset with the minimum size in { L i : 1 ≤ i ≤ | A |}.
Procedure 3.3 B2(G, s, t, L, A, B). Input: Graph G, source s, sink t, label set L, label subset A ⊆ L, and label subset B ⊆ L. We have A ∩ B = ∅. Output: A minimum label s-t cut for G. 1 i ← 0. 2 for each label pair (a, b) ∈ A × B do 3 i ← i + 1. 4 Let G i be the resulting graph obtained by removing from G all edges with (e ) = a or (e ) = b. 5 L i ← {a, b} ∪ LC(G i , s, t , L ). 6 end for 7 return the label subset with the minimum size in { L i : 1 ≤ i ≤ | A × B |}.
Proof. Let E ∗ and L ∗ be respectively the edge set and the label set in an optimal solution. Since each label associates with at most f max edges, we have
| E ∗ | ≤ f max | L ∗ |. Let c ∗ be the capacity (number of edges) of a minimum cut C ∗ of the input graph G. Since C ∗ is a feasible global label cut of G, we have
| L ∗ | ≤ | L (C ∗ )| ≤ c ∗ . Together by these two inequalities, we have
| E ∗ | ≤ f max c ∗ . This means a minimum global label cut is an f max -approximate cut, where by α -approximate cut we mean a cut whose capacity is at most α times the capacity of a minimum cut. By [17], there are only O (n2α ) α -approximate cuts in an undirected graph. By [22], all these α -approximate cuts can be found in O (m2 n + mn2α ) time. In our setting, α = f max is upper bounded, implying that all f max -approximate cuts can be
80
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
found in polynomial time. Among these cuts, the one with the minimum labels must be an optimal global label cut. The time complexity of the above algorithm is O (mn2 f max ). 2 Remarks. Originally, we proved Theorem 3.2 independently in the conference version [29, Theorem 4(iii)]. After [29] was published, we just learned that the same result was also appeared in [7]. It is well-known that in a graph with treewidth at most w, there is a vertex of degree at most w (see, e.g., [3]). So, we can remove at most w edges to disconnect the input graph G. That is, the optimal solution contains at most w edges. By enumerating all edge subsets of size at most w, we can find the optimal solution in O (m w ) time. This means that Global Label Cut is polynomial time solvable in graphs with upper bounded treewidth (i.e., when the treewidth is no greater than a given constant). Then consider planar graphs. In general, planar graphs are not of bounded treewidth. However, planar graphs possess a nice property which says that, in every planar graph there is a vertex of degree at most 5 [27, Theorem 6.3.1]. So, by similar technique discussed above, we know that Global Label Cut is polynomial time solvable in planar graphs. These facts, together with Theorem 3.2, mean that Global Label Cut is tractable either in graphs with upper bounded treewidth, or in planar graphs, or in instances with upper bounded f max . In contrast, by Theorem 2.2, Label s-t Cut is NP-hard in each of these cases. In the following we give a polynomial time exact algorithm for a special case of Label s-t Cut. This is inspired by the reduction in Theorem 2.1. This reduction gives a very simple graph shown in Fig. 1. Let us call a graph of this type a disjoint-path graph, see Definition 3.1 for its formal definition. Knowing that Label s-t Cut is NP-hard in disjoint-path graphs with lmax = 2 and f max = 3 (see remark (i) after Theorem 2.1), it is natural to ask when Label s-t Cut will be polynomial time solvable in graphs of this type. This is answered in Algorithm 3.4 and Theorem 3.3. Recall that in graph theory, if two paths P 1 and P 2 do not share any common vertex except the endpoints, then they are called openly disjoint. Definition 3.1 (Disjoint-path graph). A (directed or undirected) graph G is called a disjoint-path graph, if G is constituted of openly disjoint s-t paths only. For example, the graph in Fig. 1 is a disjoint-path graph. However, the graph constructed in the proof of Theorem 2.2 (cf. Fig. 2) is not a disjoint-path graph. Its undirected version is a series-parallel graph. In the proof of the following Theorem 3.3, we shall use the Min Edge Cover problem, which is defined as follows. Given an undirected graph G = ( V , E ), the Min Edge Cover problem asks to find an edge subset E ⊆ E of the minimum cardinality such that E contains every vertex (i.e., each vertex belongs to at least one edge in E ). Algorithm 3.4 Input: The input instance, satisfying that f max = 2, consists of disjoint-path graph G, source s, sink t, and label set L. Output: A minimum label s-t cut for G. 1 L ← ∅. 2 If there is a path P such that all its labels do not appear on any other path, then pick any ∈ L ( P ), add l to L , and remove all the edges from G whose label is . Do this until there is no such path. 3 If a path P contains a label that does not appear on any other path, then contract all the edges e ∈ P whose label is and remove from L. Do this until there is no such path. {Comment. After step 2 and step 3, each label ∈ L appears in exactly two paths.} 4 Construct an undirected graph as follows. For each path P in G, add a vertex v P . For each label ∈ L, add an edge e = ( v P 1 , v P 2 ) where P 1 and P 2 are the two paths containing label . Let G = ( V , E ) be the resulting graph. 5 Compute a maximum matching M ⊆ E of G . Add all labels in M to L . 6 For each vertex v ∈ V − V ( M ), add to L , where is the label corresponding to an (arbitrary) edge e incident to v . 7 return L .
Theorem 3.3. When restricted to disjoint-path graphs, Label s-t Cut with f max = 2 is polynomial time solvable. Proof. The algorithm for Label s-t Cut in disjoint-path graphs with f max = 2 is shown in Algorithm 3.4. This algorithm actually consists of two phases, with steps 2 and 3 constituting the first phase, and steps 4 to 6 constituting the second phase. The first phase tries to get rid of the “trivial” s-t paths (step 2) and edges (step 3) to form an optimal label s-t cut. The second phase tries to disconnect the remaining “non-trivial” s-t paths. In step 2 we disconnect each s-t path whose labels do not appear outside this path. After step 2, every two paths in G must have common labels and thereby we need only to consider these common labels to construct an optimal label s-t cut. So, a label that appears in only one path is useless and all such labels are removed in step 3. Since each label appears at most twice in G, after step 2 and step 3, each label ∈ L appears in exactly two paths. Therefore, we can construct a new undirected graph G to represent the Label s-t Cut problem on the current graph G. In
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
81
graph G , each vertex v P ∈ V corresponds to an s-t path P in G. Each edge e ∈ E corresponds to a label appearing in G, and the two endpoints v P 1 and v P 2 of e just correspond to the two paths P 1 and P 2 (in G) in which label appears. Recall that the Min Edge Cover problem tries to find a minimum cardinality edge subset in an undirected graph such that each vertex belongs to at least one edge in this subset. So, finding a minimum label s-t cut of the current graph G is equivalent to finding a minimum edge cover of graph G . Furthermore, it is known that the Min Edge Cover problem is polynomial time solvable [11]: A minimum edge cover can be obtained by the union of a maximum matching (so we have step 5) and the set of such edges that for each vertex not in the matching, we have just one edge in this set which is an arbitrary edge incident to the vertex (so we have step 6). 2 Remarks. Theorem 3.3 says that Label s-t Cut in disjoint-path graphs with f max = 2 is polynomial time solvable. If we relax either of these two conditions (i.e., “disjoint-path graphs” and “ f max = 2”), Label s-t Cut may become NP-hard. For example, by remark (ii) after Theorem 2.1, Label s-t Cut is NP-hard in disjoint-path graphs with f max = 3. By Theorem 2.2, Label s-t Cut is NP-hard in series-parallel graphs with f max = 2. Note that undirected disjoint-path graph is a special case of series-parallel graph. 4. Approximation algorithms As usual, let OPT be the optimal value of an optimization problem in concern. It is a folklore that Label s-t Cut can be approximated within a factor of f max in both undirected and directed graphs. This is done as follows. We just compute a minimum s-t cut E and use L ( E ) as the label s-t cut. It is well-known that the undirected minimum s-t cut and directed minimum s-t cut can be computed in polynomial time. (Note that a directed s-t cut only contains the directed edges from the s-side to the t-side.) Let L ∗ be an optimal label s-t cut and E ∗ be the corresponding edge cut. Then, E ∗ is obviously a feasible s-t cut and contains at most f max | L ∗ | edges. So, we have | L ( E )| ≤ | E | ≤ | E ∗ | ≤ f max OPT. In the following, we propose a polynomial time lmax -approximation algorithm for the Label s-t Cut problem, see Algorithm 4.1. In [26], it is shown that Label s-t Cut can be approximated within a factor of lmax via LP-rounding. (That is, the strategy is first to solve a linear program and then to round the fractional optimal solution just obtained to an integral feasible solution.) In contrast, Algorithm 4.1 is purely combinatorial (it does not need to solve linear program) and hence is much simpler than the approximation algorithm in [26]. Algorithm 4.1 Input: The input consists of graph G, source s, sink t, and label set L. Graph G can be directed or undirected. Output: A label s-t cut for G. 1 Find any s-t path P from the current graph. 2 Pick all the labels in L ( P ) and remove all edges whose labels are in L ( P ). 3 Repeat the above procedure until s and t are disconnected.
We give two analyses for Algorithm 4.1, with one being purely combinatorial and the other being primal-dual based. Here is the first one. Theorem 4.1. Algorithm 4.1 is an lmax -approximation algorithm for the Label s-t Cut problem in both directed and undirected graphs. Proof. An s-t path can be easily found in a directed or undirected graph by breadth-first search. So Algorithm 4.1 runs in polynomial time. Let P 1 , P 2 , . . . , P h be the paths found in the algorithm. The number of labels picked by the algorithm is thus ≤ lmax h. A crucial observation is that all the L ( P i )’s (1 ≤ i ≤ h) are disjoint sets, and all the P i ’s are edge-disjoint paths. So, the optimal solution must pick at least one label from each L ( P i ), implying OPT ≥ h. Therefore, the approximation ratio is lmax . The theorem follows. 2 The second analysis is a linear programming explanation for Algorithm 4.1. While the algorithm has nothing to do with linear programming in its form, its analysis can be primal-dual. The linear program relaxation for Label s-t Cut and its dual are given below.
min
x
(LP)
∈ L
s.t.
x ≥ 1,
∀ P ∈ Pst
∈ L ( P )
x ≥ 0,
∀ ∈ L
(8)
82
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
max
yP
(DP)
P ∈Pst
s.t.
y P ≤ 1,
∀ ∈ L
P ∈Pst : ∈ L ( P )
y P ≥ 0,
∀ P ∈ Pst
In (LP), for each label we have a decision variable x to indicate whether is included in the solution. The notation Pst denotes the set of all (simple) s-t paths. Constraint (8) says that for every s-t path P , there is at least one label in L ( P ) picked in the solution. This implies that a feasible solution x to the integer version of (LP) is really a label s-t cut of the input graph. (DP) is just the dual program of (LP). The second proof of Theorem 4.1. Let x, y be the solutions to (LP) and (DP), respectively. Initially, ∀, x = 0 and ∀ P , y P = 0. So, x is infeasible and y is feasible. When we pick a path P and all its labels in the algorithm, we set y P = 1 and x = 1 for all ∈ L ( P ). When the algorithm terminates, there is no s-t path in the current graph. So, x becomes a feasible solution to (LP). Since when we find an s-t path we pick all labels on the path, for each label ∈ L there is at most one s-t path, say P , whose y P is one, implying that y remains feasible to (DP) when the algorithm terminates. Let L be the set of labels we pick in the algorithm. Recalling that lmax is the length of a longest s-t path, it is easy to get
|L | =
x ≤
∈ L
P : y P =1
|P | =
P
| P | y P ≤ lmax
y P ≤ lmax OPT .
2
P
5. Conclusions In this paper we mainly study the Label s-t Cut problem with respect to the maximum path length lmax and the maximum label frequency f max . We prove that lmax = 2 and f max = 2 are two complexity thresholds for the Label s-t Cut problem. Moreover, we obtain good algorithms for the problem in several special cases using these two parameters. Some open questions remain interesting. First, one may consider to improve the algorithmic results in this paper, e.g., the O ∗ (ck ) time fixed parameter algorithm for Label s-t Cut with upper bounded lmax . Second, the exact computational complexity of the related Global Label Cut problem is still unknown. Third, it is also interesting to study Label s-t Cut from other parameters than lmax and f max . Acknowledgements We are very grateful to the anonymous reviewer for his/her warm suggestions which help to clarify the proof of Theorem 3.1, simplify one of our original proofs (so we have remark (iv) after Theorem 2.1), and improve the presentation of the paper. We also thank the reviewer for introducing to us some notions in parameterized complexity theory, such as para-NP-hard and serf-reduction. Peng Zhang is supported by the Natural Science Foundation of Shandong Province (ZR2013FM030, ZR2015FM008), and the Fundamental Research Funds of Shandong University (2015JC006). Bin Fu is supported by NSF Career Award 0845376. References [1] Ravindra Ahuja, Thomas Magnanti, James Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice Hall, 1993. [2] Paola Alimonti, Viggo Kann, Some APX-completeness results for cubic graphs, Theoret. Comput. Sci. 237 (2000) 123–134. [3] Hans L. Bodlaender, Treewidth: characterizations, applications, and computations, in: Proceedings of the 32nd International Workshop on GraphTheoretic Concepts in Computer Science, Bergen, Norway, in: Lecture Notes in Comput. Sci., vol. 4271, 2006, pp. 1–14. [4] Ruay-Shiung Chang, Shing-Jiuan Leu, The minimum labeling spanning trees, Inform. Process. Lett. 63 (5) (1997) 277–282. ´ José Andrés Moreno-Pérez, Variable neighbourhood search for the minimum labelling [5] Sergio Consoli, Kenneth Darby-Dowman, Nenad Mladenovic, Steiner tree problem, Ann. Oper. Res. 172 (1) (2009) 71–96. ´ José Andrés Moreno-Pérez, Solving the minimum labelling spanning tree problem by intelligent optimization, Appl. [6] Sergio Consoli, Nenad Mladenovic, Soft Comput. 28 (2015) 440–452. [7] David Coudert, P. Datta, Stephane Perennes, Hervé Rivano, Marie-Emilie Voge, Shared risk resource group: complexity and approximability issues, Parallel Process. Lett. 17 (2007) 169–184. [8] Michael Fellows, Jiong Guo, Iyad Kanj, The parameterized complexity of some minimum label problems, J. Comput. System Sci. 76 (8) (2010) 727–740. [9] Jörg Flum, Martin Grohe, Parameterized Complexity Theory, Springer-Verlag, Berlin, Heidelberg, 2006. [10] Steven Fortune, John Hopcroft, James Wyllie, The directed subgraph homeomorphism problem, Theoret. Comput. Sci. 10 (1980) 111–121. [11] Michael Garey, David Johnson, Computers and Intractability, W.H. Freeman and Company, 1979. [12] Donatella Granata, Raffaele Cerulli, Maria Grazia Scutellà, Andrea Raiconi, Maximum flow problems and an NP-complete variant on edge-labeled graphs, in: Panos M. Pardalos, Ding-Zhu Du, Ronald L. Graham (Eds.), Handbook of Combinatorial Optimization, Springer, 2013, pp. 1913–1948. [13] Refael Hassin, Jérôme Monnot, Danny Segev, Approximation algorithms and hardness results for labeled connectivity problems, J. Comb. Optim. 14 (4) (2007) 437–453. [14] Russell Impagliazzo, Ramamohan Paturi, Complexity of k-sat, in: Proceedings of the 14th IEEE Conference on Computational Complexity, 1999, pp. 237–240.
P. Zhang, B. Fu / Theoretical Computer Science 648 (2016) 72–83
83
[15] Stefanie Jegelka, Jeff Bilmes, Cooperative cuts: graph cuts with submodular edge weights, Technical Report TR-189, Max Planck Institute for Biological Cybernetics, 2010. [16] Somesh Jha, Oleg Sheyner, Jeannette M. Wing, Two formal analyses of attack graphs, in: Proceedings of the 15th IEEE Computer Security Foundations Workshop (CSFW), IEEE Computer Society, 2002, pp. 49–63. [17] David Karger, Clifford Stein, A new approach to the minimum cut problem, J. ACM 43 (4) (1996) 601–640. [18] Richard Karp, Reducibility among combinatorial problems, in: R.E. Miller, J.W. Thatcher (Eds.), Complexity of Computer Computations, Plenum Press, New York, 1972, pp. 85–103. [19] Subhash Khot, Oded Regev, Vertex cover might be hard to approximate to within 2 − , J. Comput. System Sci. 74 (3) (2008) 335–349. [20] Sven Oliver Krumke, Hans-Christoph Wirth, On the minimum label spanning tree problem, Inform. Process. Lett. 66 (2) (1998) 81–85. [21] Jérôme Monnot, The labeled perfect matching in bipartite graphs, Inform. Process. Lett. 96 (2005) 81–88. [22] Hirohsi Nagamochi, K. Nishimura, Toshihide Ibaraki, Computing all small cuts in an undirected network, SIAM J. Discrete Math. 10 (3) (1997) 469–481. [23] Rolf Niedermeier, Invitation to Fixed-Parameter Algorithms, Oxford University Press, 2006. [24] Neil Robertson, Paul D. Seymour, Graph minors. XIII. The disjoint paths problem, J. Combin. Theory Ser. B 63 (1) (1995) 65–110. [25] Oleg Sheyner, Joshua Haines, Somesh Jha, Richard Lippmann, Jeannette Wing, Automated generation and analysis of attack graphs, in: Proceedings of the IEEE Symposium on Security and Privacy, Oakland, CA, May 2002, pp. 273–284. [26] Linqing Tang, Peng Zhang, Approximating minimum label s-t cut via linear programming, in: Proceedings of the 10th Latin American Theoretical Informatics Symposium (LATIN), in: Lecture Notes in Comput. Sci., vol. 7256, Springer, 2012, pp. 655–666. [27] Douglas B. West, Introduction to Graph Theory, 2nd edition, Prentice-Hall, Inc., 2001. [28] Yupei Xiong, Bruce Golden, Edward Wasil, The colorful traveling salesman problem, in: Edward K. Baker, Anito Joseph, Anuj Mehrotra, Michael Trick (Eds.), Extending the Horizons: Advances in Computing, Optimization, and Decision Technologies, Springer, 2007, pp. 115–123. [29] Peng Zhang, Efficient algorithms for the label cut problems, in: Proceedings of the 11th Annual Conference on Theory and Applications of Models of Computation (TAMC), in: Lecture Notes in Comput. Sci., vol. 8402, 2014, pp. 259–270. [30] Peng Zhang, Jin-Yi Cai, Linqing Tang, Wenbo Zhao, Approximation and hardness results for label cut and related problems, J. Comb. Optim. 21 (2) (2011) 192–208, Conference version in: Proceedings of the 6th International Conference of Theory and Applications of Models of Computation (TAMC), in: Lecture Notes in Comput. Sci., vol. 5532, 2009, pp. 460–469.