An FPT algorithm for planar multicuts with sources and sinks on the outer face
AAN FPT ALGORITHM FOR PLANAR MULTICUTSWITH SOURCES AND SINKS ON THE OUTER FACE
C´edric Bentz ∗ Abstract
Given a list of k source-sink pairs in an edge-weighted graph G ,the minimum multicut problem consists in selecting a set of edges ofminimum total weight in G , such that removing these edges leaves nopath from each source to its corresponding sink. To the best of ourknowledge, no non-trivial FPT result for special cases of this problem,which is APX -hard in general graphs for any fixed k ≥
3, is knownwith respect to k only. When the graph G is planar, this problem isknown to be polynomial-time solvable if k = O (1), but cannot be FPTwith respect to k under the Exponential Time Hypothesis .In this paper, we show that, if G is planar and in addition all sourcesand sinks lie on the outer face, then this problem does admit an FPTalgorithm when parameterized by k (although it remains APX -hardwhen k is part of the input, even in stars). To do this, we provide anew characterization of optimal solutions in this case, and then use itto design a “divide-and-conquer” approach: namely, some edges thatare part of any such solution actually define an optimal solution for apolynomial-time solvable multiterminal variant of the problem on someof the sources and sinks (which can be identified thanks to a reducedenumeration phase). Removing these edges from the graph cuts it intoseveral smaller instances, which can then be solved recursively. Keywords : Multicuts, Planar graphs, FPT algorithms.
Given a list of k pairs (source s i , sink s (cid:48) i ) in an undirected edge-weightedgraph G , the minimum multicut problem ( MinMC ) consists in selecting aset of edges of minimum total weight in G , in such a way that removingthese edges leaves no path between s i and s (cid:48) i for each i . As the weight w ( e ) of each edge e is commonly assumed to be a rational number, we canactually assume without loss of generality that each w ( e ) is an integer (bymultiplying all w ( e )’s by one sufficiently large integer). ∗ CNAM & CEDRIC Laboratory, 292 rue Saint Martin, 75003 Paris (France).Phone: +33 (0) 1 58 80 86 14. E-mail address: [email protected] a r X i v : . [ c s . D S ] A ug well-known special case of MinMC is the minimum multiway cut prob-lem , or minimum multiterminal cut problem ( MinMTC ): in any instance ofthis problem, we are given a set of terminals T = { t , . . . , t |T | } , and thesource-sink pairs in the associated MinMC instance are ( t i , t j ) for i (cid:54) = j .We shall only consider undirected graphs here. When k = 1, MinMC (which is then equivalent to
MinMTC with |T | = 2) turns into the fa-mous minimum cut problem , and can therefore be solved in polynomial time.Moreover,
MinMC remains polynomial-time solvable when k = 2 [14]. How-ever, MinMTC is APX -hard for any fixed value of |T | ≥ |T | = 3,
MinMTC is actually a special case of
MinMC with k = 3.When k is part of the input, MinMC is tractable in chains, but
APX -hard even in stars with weights 1 [10], and hence also in planar graphswhere all sources and sinks lie on the outer face. However, when k = O (1),it becomes tractable in trees, and even in graphs of bounded tree-width [1].Some results are known about the parameterized complexity of MinMC .For instance, it is known to be FPT with respect to the solution size [4, 13],but we are not aware of any non-trivial FPT result when the parameter to beconsidered is k . Recall that a problem parameterized by some parameter p isFPT with respect to p if it admits an FPT algorithm with respect to p , i.e.,an algorithm solving it in time O ( f ( p ) n c ), where f ( · ) is some computablefunction of p , n is the input size, and c is a constant independent of p [9].Let us now turn to the case where G is planar. On the one hand, when allsources and sinks lie on the outer face, it was proved that, unlike MinMC , MinMTC can be solved in polynomial time, even when |T | is part of theinput [5]. On the other hand, when sources and sinks can lie anywhere,it was proved in [12] that, under the
Exponential Time Hypothesis (ETH),
MinMTC cannot be FPT with respect to |T | in planar graphs. Hence,under the same hypothesis,
MinMC cannot be FPT with respect to k inthese graphs. However, when k = O (1), it was proved that MinMC ispolynomial-time solvable in planar graphs if all sources and sinks lie on theouter face [2], and later it was proved that
MinMC remains polynomial-timesolvable in planar graphs even when sources and sinks can lie anywhere [3, 6].(It was already known for
MinMTC in planar graphs when |T | = O (1) [8].)In the present paper, we prove the first non-trivial FPT result concerning MinMC parameterized by k only, and at the same time settle the last caseleft open by the results shown in [2, 3, 6, 12]. Namely, we show that MinMC is FPT with respect to k when G is planar and all sources and sinks lie on itsouter face. In order to do this, we provide a new characterization of optimalsolutions for MinMC in such graphs, on which our algorithm is based.In [2], it was proved that any
MinMC instance in such a graph can bereduced to a set of
MinMTC instances in planar graphs (i.e., where sourcesand sinks can lie anywhere). Actually, a limited number of configurationswere enumerated, and for each configuration one planar
MinMTC instancewas solved (using a non-FPT algorithm, such as the one in [8]).2ere, we prove a stronger result: there exist optimal multicuts such thatsome part (i.e., some of the edges) of such a solution actually defines anoptimal solution for a
MinMTC instance, obtained in the same graph byremoving some of the sources and sinks (or, equivalently, by keeping onlysome of them). (In practice, determining the sources and sinks that belongto this
MinMTC instance requires some enumeration, but fortunately itcan be done in FPT time.) In the
MinMTC instance obtained in this way, all terminals lie on the outer face (and hence we can use the polynomial-time algorithm given in [5]). Moreover, removing the edges of the optimalsolution for this
MinMTC instance cuts the initial graph into several pieces(i.e., connected components), which can then be solved recursively as smaller
MinMC instances satisfying the same assumptions as the initial one.The proposed algorithm is thus based on a divide-and-conquer approach:we enumerate a limited (but larger than in [2], as we will need to “guess”slightly more information) number of configurations, and for each one wesolve a set of planar
MinMTC instances (and not one planar
MinMTC instance anymore), in which, unlike in [2], all terminals lie on the outer face.This enables us to obtain a nearly linear-time algorithm when k = O (1).When considering any planar MinMC (or
MinMTC ) instance, loopsand parallel edges are useless (loops can be removed, and edges having thesame endpoints can be merged into a single edge, whose weight is the sumof the weights of the merged edges), and connected components actuallydefine independent instances, so we shall assume without loss of generalitythat the input graph is connected and contains neither loops nor paralleledges, and that it is already embedded in the plane without crossings (andwith all the sources/sinks or terminals lying on the outer face, if needed).Furthermore, as in [2] (where all the necessary details are provided),we assume without loss of generality that all terminals are distinct and thatthe input graph is 2-vertex-connected (which can easily be achieved in lineartime by doubling all edge weights, then obtaining a 2-edge-connected graph,and finally replacing any articulation vertex by a cycle). This means, inparticular, that the boundary of the outer face is a simple cycle.
The starting point of our FPT algorithm is basically the same as in [3]:in any connected graph (planar or not), removing the edges of any optimalmulticut yields several connected components, each of them containing atleast one source or sink. The sources/sinks belonging to a same connectedcomponent define a cluster . We shall call such a set of clusters a clustering (a clustering is thus a partition of the sources and sinks), and we shallsay that the considered solution induces these clusters (and the connectedcomponents containing them), or equivalently this clustering.3ence, finding an optimal multicut is equivalent to finding a set of edgesof minimum total weight that isolates all the clusters of the clustering in-duced by this optimal multicut. By definition, this clustering is such thatno cluster contains both s i and s (cid:48) i for each i . In practice (i.e., from an algo-rithmic point of view), since we do not know this clustering as long as wedo not know the optimal multicut itself, we need to enumerate all possibleclusterings in order to ensure that the one induced by the optimal solutionwe are looking for will be considered as well.The number of possible clusterings only depends on the number k ofsource-sink pairs: in other words, it is FPT with respect to k (we shallgive more details later). This immediately implies that MinMC can bereduced in FPT time (with respect to k ) to the following problem, called the minimum multi-cluster cut problem ( MinMCC ): given k (cid:48) sets (or clusters)of terminals T , T , . . . , T k (cid:48) in an edge-weighted graph G , find a set of edges ofminimum total weight in G , in such a way that removing these edges leavesno path between any vertex in T i and any vertex in T j , for any i (cid:54) = j . When |T i | = 1 for each i , MinMCC simply turns into
MinMTC . Also note that
MinMCC is actually a special case of
MinMC , in which the source-sinkpairs are ( u, v ), for each i (cid:54) = j and each u ∈ T i and v ∈ T j .In the remainder of this paper, we shall focus on solving MinMCC inFPT time (with respect to k (cid:48) ), and this will immediately enable us to solve MinMC in FPT time (with respect to k ) as well. Indeed, it is not hard to seethat the above-mentioned reduction from MinMC to MinMCC is actuallyan FPT-reduction, as we have k (cid:48) ≤ k . One can even show a sharper boundon k (cid:48) : we have actually k (cid:48) ≤ k + 1, and this bound is tight (to see this,simply consider a chain with 2 k vertices, in the order s , s (cid:48) , s , s (cid:48) , . . . , s k , s (cid:48) k ,where the only optimal multicut induces k + 1 clusters). This will not haveany significant impact on the asymptotic running time of our algorithm, butwe give a short proof of this fact anyway, for the sake of completeness.Assume by contradiction that, in a given instance of MinMC , there ex-ists an optimal multicut inducing at least k + 2 connected components. Anyedge of this optimal multicut lies between two of these connected compo-nents, and there must exist an i such that one component contains s i andthe other s (cid:48) i (otherwise, this edge would be useless). Hence, when addingto the (at least) k + 2 connected components induced by such an optimalmulticut the edges lying between the two connected components containing s and s (cid:48) (if there exist such edges), we obtain at least k + 1 connectedcomponents. We do the same for s and s (cid:48) (adding edges of the optimalmulticut only if they have not already been added so far), and then for each s i and s (cid:48) i for i from 3 to k . In the end, we have all the edges from theinitial graph, and we have reduced by at most k the number of connectedcomponents. Therefore, there remain at least two connected components,which contradicts the fact that the initial graph was connected.4 A characterization using planar duality
Let us now consider planar duality. It is well-known that, to any planargraph G embedded in the plane, one can associate a dual planar graph G ∗ .More precisely, to any face in G corresponds a vertex (called a dual vertex)in G ∗ , and any ( dual ) edge between two dual vertices corresponds to the edge(or one of the edges, if there are more than one) shared by the correspondingfaces in G . This also holds for the outer face of G . Furthermore, since G is2-vertex-connected, there exists no edge belonging to only one face.Given an optimal solution S for a MinMCC instance in a planar graph G , we shall denote by S ∗ the set of dual edges corresponding to S in thedual graph G ∗ , and, for each i , by V i the set of vertices of the i th connectedcomponent induced by S , and by S i ⊆ S the set of edges of G havingexactly one endpoint in V i . It is well-known that S ∗ i , the set of dual edgescorresponding to each S i , is a set of (non necessarily simple) cycles in G ∗ .Moreover, if we look at the embedding of G ∗ as a set of curves in theplane (which intersect at the dual vertices), then each S ∗ i is represented bya set of closed curves, denoted by C ∗ i . Each S ∗ i is actually composed of oneor several simple cycles { S ∗ i , S ∗ i , . . . } , i.e., each C ∗ i is composed of one orseveral simple closed curves { C ∗ i , C ∗ i , . . . } . By the Jordan curve theorem ,each such simple closed curve divides the plane into an interior region andan exterior region (a region being a set of points such that any two ofthese points can be linked by a curve without crossing any closed curve):intuitively, the interior region is the region of the plane that is enclosed by (or that lies inside ) this closed curve. The C ∗ i ’s thus partition the planeinto several regions. Among all these regions, there is one and only one thatis unbounded (and one and only one C ∗ i is associated with it , i.e., containsall the curves adjacent to this region). Actually, the C ∗ i ’s may be seen asdefining the boundary of the V i ’s, that form a partition of the vertex set of G , and hence the interior regions of any two distinct simple closed curvesthat compose them cannot overlap (except if one lies inside the other).The following lemma summarizes well-known facts for planar MinMCC : Lemma 1 ([3, 6, 8]) . Given a
MinMCC instance in a planar graph G , anyoptimal solution S for this instance satisfies the following properties: (1) for each C ∗ i = { C ∗ i , C ∗ i , . . . } and for any j (cid:54) = j , either the interiorregions of C ∗ j i and C ∗ j i are disjoint, or one lies inside the other, (2) each C ∗ i = { C ∗ i , C ∗ i , . . . } , except the one associated with the un-bounded region, contains one simple closed curve, say C ∗ i , such thatall the vertices of V i lie inside C ∗ i , but not inside C ∗ ji for any j ≥ , (3) for each C ∗ i , except the one associated with the unbounded region, andfor each j ≥ , C ∗ ji lies inside C ∗ i , and, for each j ≥ and j ≥ with j (cid:54) = j , the interior regions of C ∗ j i and C ∗ j i are disjoint. roof. Each of these three properties has been more or less explicitly provedor used for solving
MinM(T)C or MinMCC in planar graphs in [3, 6, 8].Property (1) is clear from [8], and we will justify the other two briefly.Concerning Property (2), it was noticed in [8] for
MinMTC (and it caneasily be extended to
MinMCC ) that, except for the C ∗ i associated with theunbounded region, each C ∗ i must enclose a region containing the terminalsin T i . By definition, this region lies inside either the interior region or theexterior region associated with each C ∗ ji . Obviously, it cannot lie insideseveral of these interior regions: indeed, from Property (1), for any two ofthese interior regions, either they are disjoint (and thus it is clearly notpossible), or one lies inside the other (and thus this other one is useless).Therefore, for each i , the region containing the terminals in T i lies inside oneof these interior regions (the one associated with C ∗ i ) and outside all theother interior regions (or, equivalently, inside all the other exterior regions).Concerning Property (3), it is sufficient to notice that, from Property(2), the only way for the interior region of C ∗ i to intersect the exteriorregion of C ∗ ji for any j ≥ C ∗ ji lying inside C ∗ i for any j ≥ C ∗ j i and C ∗ j i with j ≥ j ≥ j (cid:54) = j , the interior region of one cannot lie inside the interior regionof the other, and hence, from Property (1), they must be disjoint.For the special case considered here, we can prove the following lemma: Lemma 2.
Given a
MinMCC instance in a planar graph G where all theterminals lie on the outer face, any optimal solution S is such that each S ∗ ji contains the dual vertex corresponding to the outer face of G , and, for each i , any two S ∗ ji ’s have only this vertex in common.Proof. We begin by proving the first part of the statement. If some S ∗ ji didnot contain the dual vertex corresponding to the outer face of G , then theinterior region of C ∗ ji would not enclose any terminal (as any terminal lieson the outer face of G ), and hence it would be useless in an optimal solution.Moreover, it is easy to see that, for each i , any two S ∗ ji ’s have at mostone vertex in common, even in the case where the terminals can lie anywherein the planar graph (and hence, in our special case, they have exactly onevertex in common). Indeed, if two S ∗ ji ’s had two or more vertices in common,then they could not belong to the boundary of a single region.Lemma 2 implies, in particular, that, if the input graph is planar and anyterminal lies on the outer face, then any C ∗ i , including the one associatedwith the unbounded region, actually consists of a single closed curve (thatmay not be simple). Let us assume without loss of generality that the closedcurve associated with the unbounded region is C ∗ . From Lemma 1, we calla cluster T i with i ≥ top cluster if there is no j ≥ j (cid:54) = i such that C ∗ i lies inside C ∗ j . (Besides, T will be referred to as a top cluster as well.)6his notion can be interpreted in the initial graph G as well. For each i and each j , let S ji be the set of edges in G associated with S ∗ ji . Removingfrom G the edges of any S i for i ≥ T i (and possibly vertices from other clusters),and one that does not. We shall denote the former one by V (cid:48) i : we have V i ⊆ V (cid:48) i for each i . Then, T i with i ≥ V (cid:48) i is not containedin any V (cid:48) j for j ≥ j (cid:54) = i . In other words, the vertices of any V (cid:48) j with j ≥ T j is not a top cluster are included in some V (cid:48) i with i ≥ i (cid:54) = j . As such, any V (cid:48) i such that T i is a top cluster and i ≥ V (cid:48) j ’s.However, this notion is still not strong enough to state our main result.We refine it as follows. Take any top cluster except T (say, T ), and define itas a good top cluster. Then, we define the other good top clusters iteratively:any top cluster T i such that S ∗ i with i ≥ S ∗ j for some good top cluster T j with j ≥ T will be defined as a good top cluster as well.)All the previous notions are illustrated in Figure 1, where the terminalsare the small black rectangles, while the other vertices are the small blackcircles. The clusters are numbered from 1 to 9, and any terminal is labeledby the number of the cluster it belongs to. The dual vertices and edges asso-ciated with the optimal solution drawn in Figure 1 are respectively the smallgrey diamonds and the grey dashed lines. The top clusters are numbered1, 2, 5, 7 and 8, and the good top ones are numbered 1, 2 and 5 (anotherpossible choice would be the ones numbered 1, 7 and 8). Moreover, the biggrey diamond is the dual vertex associated with the outer face, and the three S ∗ j ’s are indicated on the associated dual edges, as well as some other S ∗ ji ’s.Our main result is the following lemma: Lemma 3.
Assume we are given a
MinMCC instance I in a planar graph G where any terminal lies on the outer face, and let S be an optimal solution for I . Then, (cid:83) i : i is a good top cluster S i is an optimal solution for the MinMTC instance I (cid:48) obtained as follows: ( i ) the input graph G (cid:48) is the graph G withoutthe edges in S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) , and with one terminal for eachgood top cluster, and ( ii ) all the terminals lie on the outer face.Proof. Consider the planar graph G (cid:48) as defined above, and assume thatthe embedding of G (cid:48) is computed by taking the one of G and then simplyremoving the edges in S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) . Clearly, if, for eachgood top cluster T i , we add in G (cid:48) a new vertex (called a cluster vertex )linked by an edge (called a cluster edge ) having a sufficiently large weightto each terminal of T i (assume for now that it can be done in such a waythat ( ii ) holds), then, by the definitions of S and G (cid:48) , removing the edges in (cid:83) i : i is a good top cluster S i leaves no path between any two cluster vertices. Inother words, (cid:83) i : i is a good top cluster S i is actually a feasible solution to I (cid:48) .7
56 78 S* S* = S* S* = S* S* = S* S* Figure 1: A planar
MinMCC instance and the associated optimal solution,whose edges have weight 1 (while all the other edges have large weights).8oreover, any edge in (cid:83) i : i is a good top cluster S i lies between two con-nected components associated with two good top clusters. Indeed, on theone hand, by definition of a good top cluster, such an edge cannot belong to S ∗ i (and hence, from Property (3) in Lemma 1, to S ∗ i ) for some top cluster T i which is not good. On the other hand, from Property (3) in Lemma 1 andthe definition of a top cluster, a connected component associated with a nontop cluster lies inside a closed curve of the form C ∗ ji for some j ≥
2, where i ≥ T i is a top cluster. From Lemma 2, the set of edges S ∗ ji associated with such a closed curve has one and only one vertex in commonwith any other S ∗ hi , and hence, in particular, S ∗ ji shares no edge with S ∗ i .This implies that in G (cid:48) there is no path from any terminal of any goodtop cluster to any other terminal, except for the terminals of any othergood top cluster. Therefore, replacing (cid:83) i : i is a good top cluster S i in G (cid:48) byany feasible solution to I (cid:48) , whose total weight does not exceed the one of (cid:83) i : i is a good top cluster S i and that contains no cluster edge, yields anotherfeasible solution to I in G which is at least as good as S . As S is an op-timal solution to I , and as any optimal solution to I (cid:48) contains no clusteredge (their common weight being too large), this implies in particular that (cid:83) i : i is a good top cluster S i is an optimal solution to I (cid:48) .It remains to prove the last part of the lemma: namely, let us prove thatwe can add the cluster vertices and edges in such a way that ( ii ) holds.To do this, we shall proceed in a way similar to the one described in [2]:the claim that the cluster vertices can then be assumed to lie on the outerface will simply come from the fact that, unlike in [2], there is not a clustervertex associated with each cluster, but only with each good top one. Todescribe our way of achieving this, we shall need some additional definitions.Clearly, from the definition of a top cluster, all the terminals of such acluster, except T , are consecutive on the outer face (among all the terminalsof top clusters), as otherwise C ∗ i would lie inside C ∗ j for two distinct topclusters T i and T j with i ≥ j ≥
2, which would be a contradiction.Therefore, if we go through the outer face of the graph G clockwise (whichcan be done in a well-defined way, as G is 2-vertex-connected), then, foreach top cluster T i of S with i ≥
2, there is a “first” terminal of this clusterthat is encountered when doing so while staying inside C ∗ i . In other words,each such top cluster T i has a unique terminal (which we shall call the first terminal of T i ) from which we can encounter every other terminal of T i bygoing through the outer face of the graph G clockwise and without leavingthe interior region of C ∗ i . From this first terminal, we can then define aunique ordering of the other terminals of T i , which is simply the order inwhich they are encountered while going through this outer face clockwise.We can define the first (and last) terminal of T in a similar way, i.e., asthe unique terminal of T from which we can encounter every other terminalof T by going through the outer face of the graph G clockwise and without9 ntering the interior region of C ∗ i for any good top cluster T i with i ≥ T are not consecutiveon the outer face. In other words, it would mean that, for any choice of afirst terminal of T , there is a good top cluster T i with i ≥ T j with j ≥ j (cid:54) = i ) whose terminals are encounteredwhile going clockwise (resp. counterclockwise) from the first terminal of T to its last one on the outer face. However, S ∗ i and S ∗ j for such i and j couldnot share an edge (as otherwise either the first or the last terminal of T would lie inside a closed curve belonging to S , contradicting the definitionof T ), which would contradict the fact that T i and T j are good.Hence, the point of introducing the notion of good top clusters is toextend the consecutiveness property associated with top clusters, even whenconsidering the cluster T . In other words, all the terminals of any good topcluster are consecutive on the outer face among all the terminals of goodtop clusters. The notion of first vertices is illustrated in Figure 1, where thefirst vertex of each of the three good top clusters (numbered 1, 2 and 5) inthe optimal solution to the considered instance is indicated as follows: thenumber of the corresponding cluster is underlined and written in bold.Now we can proceed almost as in [2]. For each good top cluster T i of S that contains at least two terminals (otherwise, there is nothing to do),we draw a curve (called a cluster curve ) from the first terminal of T i to itslast one. Thanks to the consecutiveness property associated with good topclusters, these curves can easily be drawn in such a way that no two of themintersect, and the curve corresponding to each T i must be homotopic , withrespect to the boundary of the outer face of G , to the chain µ i that goesclockwise from the first terminal of T i to its last one, and uses only verticeslying on the boundary of this outer face. As in [2], being homotopic meansthat it can be continuously transformed into µ i without being blocked bythe boundary of this outer face while doing so (see also [7]).Then, we let each cluster vertex lie on the associated cluster curve, andadd the cluster edges, in such a way that they do not intersect and all lieinside the region bounded by the cluster curve and µ i . This allows us toconclude that, after adding the cluster vertices and edges as above, all thecluster vertices do lie on the outer face, which ends the proof. We now focus on using the results from the two previous sections tocome up with an algorithm solving
MinMC in time FPT with respect to k .Let I be an instance of MinMC in a planar graph where all sources andsinks lie on the outer face, and let S be an optimal multicut for I ( S exists,even if we do not know it yet explicitly).10irst of all, we can “guess” the clustering associated with S by enumer-ating all the possible clusterings containing at most k + 1 clusters, and thiscan be done in time FPT with respect to k (see Section 2).Then, we have to know the structure of the clusters in S , i.e., in par-ticular, which clusters are the top ones, and which are the good top ones(see Section 3): we can “guess” this structure by using another enumeration(which, again, can be done in time FPT with respect to k ).Moreover, recall from the proof of Lemma 3 in Section 3 that, if wego through the outer face of the input graph G clockwise, then, for eachgood top cluster T i of S with i ≥
2, there is a first terminal lying inside C ∗ i that is encountered while doing so (a similar notion of a first terminalholds for T as well). As mentioned in this proof, we will need to know thisterminal in order to ensure that, in the planar MinMTC instance that wewill construct, all the terminals will lie on the outer face.Again, for each good top cluster T i , we can “guess” such a terminal byenumerating all the possibilities (i.e., trying the |T i | terminals of T i one byone). Once we know the first terminal of each such cluster, we can constructa planar MinMTC instance as explained in the proof of Lemma 3.By solving the above-defined planar
MinMTC instance (where all theterminals lie on the outer face), we obtain from Lemma 3 a set of edges S (cid:48) that we can use to replace (cid:83) i : i is a good top cluster S i in S . However, the maindrawback of Lemma 3 is that it considers a MinMTC instance defined ona graph G (cid:48) that is obtained from the input graph G , but that we do notknow explicitly (as it would require to already know some part of an optimalsolution). We now show how we can overcome this issue, by considering a particular optimal solution to the MinMCC instance we wish to solve:
Corollary 1.
Assume we are given a
MinMC instance I in a planar graph G where all the sources and sinks lie on the outer face, and consider an op-timal solution S for I that induces the maximum number of clusters. Then, (cid:83) i : i is a good top cluster S i is an optimal solution for the MinMTC instance I (cid:48) obtained as follows: ( i ) the input graph is G , with one additional terminalfor each good top cluster, and ( ii ) all the terminals lie on the outer face.Proof. From Lemma 3, we just have to prove that, in this case (i.e., when weconsider an optimal solution S to I inducing the maximum number of con-nected components), we do not have to know S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) explicitly in order to define I (cid:48) . In other words, that any optimal solution to I (cid:48) does not interact with S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) , i.e., does not shareany edge with it. If these sets of edges did intersect, then from the proof ofLemma 3 this would yield another optimal solution for I , that would inducemore connected components than S does, contradicting the choice of S .11ince the first step of our algorithm is to enumerate all the possible cluster-ings containing at most k + 1 clusters, we will in particular consider the oneassociated with such an optimal solution S .By solving the above-defined planar MinMTC instance with n ver-tices (where all the terminals lie on the outer face), which can be donein time O ( k n + k n log n ) thanks to the algorithm proposed in [5], weobtain from this corollary a set of edges S (cid:48) that we can use to replace (cid:83) i : i is a good top cluster S i in S , and, furthermore, that does not intersect S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) . Moreover, the graph of this instance is obtainedfrom G simply by adding cluster vertices and edges, and hence we do nothave to know S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) explicitly. After removing S (cid:48) from G , we obtain two or more connected components (and hence knowing S \ (cid:16)(cid:83) i : i is a good top cluster S i (cid:17) explicitly or not is irrelevant).These components, in turn, define smaller MinMCC instances, whichcan then be solved recursively by using the same strategy as above (withoutthe first step, where we guessed the clustering), in a divide-and-conquerway. Each time an instance is solved, the number of connected componentsincreases by at least one: as S contains at most k + 1 such components,there is a total of at most k instances to be solved.Putting all together, we obtain the following algorithm A , which makesa call to another algorithm, that will be detailed after A : Algorithm A Input:
A connected planar graph G with n vertices, and a set of k source-sink pairs ( s , s (cid:48) ) , . . . , ( s k , s (cid:48) k ) lying on the outer face of G . Output:
An optimal multicut for the input graph. • For each clustering containing 2 k terminals and ≤ k + 1 clusters do: – Build the associated planar
MinMCC instance, where any ter-minal lies on the outer face of G , and the clusters are T , T , . . . , – Run Algorithm A ( G, {T , T , . . . } ), and store its output. • Output the best feasible solution found.Observe that the input of Algorithm A is a MinMC instance, while theinput of Algorithm A will be a MinMCC instance. If a given clustering isinduced by an optimal multicut but does not contain the maximum numberof clusters, then the solution computed by A for this cluster may not beoptimal (which simply means that we need to consider another clustering).Moreover, in Algorithm A , each call to Algorithm A is actually thefirst call of a series of recursive calls. In other words, Algorithm A is arecursive algorithm, that can be described as follows:12 lgorithm A Input:
A connected planar graph G with n vertices, and a set {T , T , . . . } of clusters of terminals, all lying on the outer face of G . Output:
An optimal multi-cluster cut for the input graph. • For each possible choice of good top clusters among all the clusters ofthe clustering {T , T , . . . } , and for each possible choice of first termi-nals for all these good top clusters, do: – Construct and solve the associated planar
MinMTC instance,where the terminals, that are the cluster vertices associated withthe good top clusters, all lie on the outer face (see Corollary 1), – Remove from the input graph the edges of the optimal solu-tion computed above, obtaining several connected components G , G , . . . , and then store these edges in the current solution, – For each of these connected components G i that contains theterminals of at least two clusters, run Algorithm A ( G i , T ( G i )),where T ( G i ) is the set of clusters whose terminals belong to G i ,and then add the associated output to the current solution. • Output the best feasible solution found.Thanks to the above discussion, it should be clear that Algorithm A is correct, and runs in time O ( f ( k ) n log n ), for some function f ( · ) to bespecified, in graphs with n vertices. This running time is actually obtainedby multiplying the different factors associated with the successive steps:1. Enumerating all the possible clusterings containing 2 k terminals andat most k + 1 clusters incurs a factor O (cid:16) ( k +1) k ( k +1)! (cid:17) , as noted in [8],2. Enumerating all the possible good top clusters among the (at most k + 1) clusters of a given clustering, and then all their possible firstterminals (among O ( k )), incurs a factor O ( k k +1 ) = O ( k k ),3. Solving each planar MinMTC instance with all the terminals lying onthe outer face can be done in time O ( k ( kn + n log n )),4. Finally, there are at most k such instances to solve.The overall running time is thus O (cid:16) k k ( k +1) k ( k +1)! ( kn + n log n ) (cid:17) , i.e., it isnearly linear when k = O (1). Hence, we have proved: Theorem 1.
In planar graphs where all sources and sinks lie on the outerface,
MinMC is FPT with respect to the number k of source-sink pairs. Extensions and open problems
In this paper, we have provided an FPT algorithm for
MinMC param-eterized by the number k of source-sink pairs, in the case where the inputgraph is planar and all the sources and sinks lie on the outer face. Thisalgorithm actually runs in O ( n log n ) time when k = O (1), where n is thenumber of vertices of the input graph. In [2], it was proved that the timefor solving this problem can be improved to linear when k = 2, but theproof cannot be generalized to greater values of k . Therefore, this set ofresults leaves as open the following question: does there exist a linear-timealgorithm (i.e., running in time O ( n ) for any k = O (1)) in this case?Moreover, our FPT algorithm can easily be extended to a generalizationof MinMC , called partial
MinMC (or k -multicut problem [11]), which asksto select a minimum-weight set of edges whose removal leaves no path from s i to s (cid:48) i , for at least a given number of source-sink pairs ( s i , s (cid:48) i ). Indeed,partial MinMC can be reduced in FPT time to
MinMC , by “guessing” thesubset of source-sink pairs between which there will remain no path in anoptimal solution (there are O (2 k ) such possible subsets to enumerate).Let us now consider MinMCC . On the one hand, it is easy to see that
MinMCC is polynomial-time solvable in general graphs with two clusters(by reducing it to the minimum cut problem), but Dahlhaus et al. (that callit the colored multiterminal cut problem ) proved in [8] that it is NP -hardin planar graphs, even with only four clusters (and they claimed that thisremains true with only three clusters). On the other hand, when the inputgraph is planar and has all its terminals lying on the outer face, MinMTC (the special case of
MinMCC where clusters have size 1) is polynomial-time solvable, even when |T | is part of the input [5], and our FPT algorithmprecisely solves
MinMCC parameterized by the total number of terminals insuch a graph (or, equivalently, parameterized both by the number of clusters and by the maximum number of terminals per cluster).However, when the number of clusters is part of the input, we do noteven know the complexity of
MinMCC in such a graph. Observe that thisquestion remains open even if there are O (1) terminals in each cluster.When the number of clusters is viewed as a parameter, one may hope thatour approach is able to solve the problem even when there is an arbitrarynumber of terminals in each cluster, as we only need to “guess” the firstterminal of each good top cluster. Unfortunately, this is true only if eachcluster induces exactly one connected component in any optimal solution(see Corollary 1 and the discussion preceding its statement), and hence,when such a property does not hold, this question remains open as well.14 eferences [1] C. Bentz. On the complexity of the multicut problem in bounded tree-width graphs and digraphs. Discrete Applied Mathematics 156 (2008)1908–1917.[2] C. Bentz. A simple algorithm for multicuts in planar graphs with outerterminals. Discrete Applied Mathematics 157 (2009) 1959–1964.[3] C. Bentz. A Polynomial-Time Algorithm for Planar Multicuts with FewSource-Sink Pairs. Proceedings IPEC (2012) 109–119.[4] N. Bousquet, J. Daligault and S. Thomass´e. Multicut is FPT. Proceed-ings STOC (2011) 459–468.[5] D.Z. Chen and X. Wu. Efficient algorithms for k -terminal cuts on planargraphs. Algorithmica 38 (2004) 299–316.[6] ´E. Colin de Verdi`ere. Multicuts in Planar and Bounded-Genus Graphswith Bounded Number of Terminals. Algorithmica 78 (2017) 1206–1224.[7] ´E. Colin de Verdi`ere and J. Erickson. Tightening Nonsimple Paths andCycles on Surfaces. SIAM Journal on Computing 39 (2010) 3784–3813.[8] E. Dahlhaus, D.S. Johnson, C.H. Papadimitriou, P.D. Seymour and M.Yannakakis. The complexity of multiterminal cuts. SIAM Journal onComputing 23 (1994) 864–894.[9] R.G. Downey and M.R. Fellows. Parameterized Complexity. Springer-Verlag (1999).[10] N. Garg, V.V. Vazirani and M. Yannakakis. Primal-dual approxima-tion algorithms for integral flow and multicut in trees. Algorithmica 18(1997) 3–20.[11] D. Golovin, V. Nagarajan and M. Singh. Approximating the kk