Linear-Time FPT Algorithms via Network Flow
aa r X i v : . [ c s . D S ] J u l Linear-Time FPT Algorithms via Network Flow
Yoichi Iwata ∗ Keigo Oka † Yuichi Yoshida ‡ Abstract
In the area of parameterized complexity, to cope with NP-Hard problems, we introduce aparameter k besides the input size n , and we aim to design algorithms (called FPT algorithms)that run in O ( f ( k ) n d ) time for some function f ( k ) and constant d . Though FPT algorithms havebeen successfully designed for many problems, typically they are not sufficiently fast because ofhuge f ( k ) and d .In this paper, we give FPT algorithms with small f ( k ) and d for many important problemsincluding Odd Cycle Transversal and
Almost 2-SAT . More specifically, we can choose f ( k ) asa single exponential (4 k ) and d as one, that is, linear in the input size. To the best of ourknowledge, our algorithms achieve linear time complexity for the first time for these problems.To obtain our algorithms for these problems, we consider a large class of integer programs,called BIP2 . Then we show that, in linear time, we can reduce
BIP2 to Vertex Cover Above LP preserving the parameter k , and we can compute an optimal LP solution for Vertex Cover AboveLP using network flow.Then, we perform an exaustive search by fixing half-integral values in the optimal LP solutionfor
Vertex Cover Above LP . A bottleneck here is that we need to recompute an LP optimalsolution after branching. To address this issue, we exploit network flow to update the optimalLP solution in linear time.
Assuming P = NP, there are no polynomial-time algorithms for NP-Hard problems in the worstcase. However, since many important problems are actually NP-Hard, it is natural to study inwhich case these problems become polynomial-time tractable. Parameterized complexity is one ofsuch direction, in which we measure the time complexity of algorithms with respect to the inputsize and another parameter. A problem is called fixed parameter tractable (FPT) with respectto a parameter k if it can be solved in time f ( k ) n O (1) , where n is the input size and f is somecomputable function. See [5, 7, 17] for books for parameterized complexity.Though the initial motivation of parameterized complexity is making NP-Hard problems moretractable, unfortunately many FPT algorithms have a disadvantage in their time complexity. Forexample, the function f ( k ) might be an astronomical tower of exponentials such as 2 k or the degree ∗ Department of Computer Science, Graduate School of Information Science and Technology, The University ofTokyo. Research Fellow of Japan Society for the Promotion of Science. [email protected] † Department of Computer Science, Graduate School of Information Science and Technology, The University ofTokyo. JST, ERATO, Kawarabayashi Large Graph Project. [email protected] ‡ National Institute of Informatics, and Preferred Infrastructure, Inc. [email protected]
Supported by JSPSGrant-in-Aid for Research Activity Start-up (24800082), MEXT Grant-in-Aid for Scientific Research on InnovativeAreas (24106001), and JST, ERATO, Kawarabayashi Large Graph Project. of the polynomial in n might be quite huge such as n . Thus, it is desirable to improve theseFPT algorithms so that f ( k ) and d become small simultaneously , and our main contribution in thispaper is giving FPT algorithms for many important problems whose running time is O ( c k n ) forsome constant c >
1. That is, the polynomial part is only linear whereas the function f ( k ) is onlya single exponential.To describe the problems we are concerned with, we need to review previous results. Indeed,there have been many studies on FPT algorithms with small f ( k ) and d . However, we note thatmany works pursuing small d often neglect how large f ( k ) is, and many works pursuing small f ( k )often neglect how large d is. Odd Cycle Transversal is a problem of finding the minimum vertex set whose removal makes theinput graph to be bipartite. We use the size of the optimal solution as a parameter. Reed et al. [22]proved that the problem is FPT by introducing a technique called iterative compression . Therunning time of their algorithm is O (3 k knm ). Based on the graph minor theory, Fiorini et al. [6]improved the polynomial part to be linear for planar graphs. For general graphs, Kawarabayashiand Reed [11] developed an O ( f ( k )( n + m ) α ( n + m ))-time algorithm, where α ( · ) denotes the inverseof the Ackermann function.In Max 2-SAT , given a CNF with each clause containing two literals, we want to find an assign-ment so as to maximize the number of satisfied clauses.
Almost 2-SAT is a parameterized versionof
Max 2-SAT , in which a parameter is the minimum number of unsatisfied clauses. Razgon andO’Sullivan [21] proved that
Almost 2-SAT is FPT by designing an O (15 k km )-time algorithm, where m is the number of clauses. Their algorithm is also based on iterative compression. Raman et al. [19]improved the function f ( k ) to 9 k by reducing the problem to Vertex Cover parameterized by thedifference between the size of the optimal solution and the size of the maximum matching. Here,
Vertex Cover is the problem of finding a minimum set of vertices S in a graph so that every edgeis incident to S . Cygan et al. [4] further improved f ( k ) to 4 k by reducing the problem to NodeMultiway Cut , which is a problem of finding a small subset of vertices whose removal makes a givenset of terminals separated, parameterized by the difference between the size of the optimal solutionand the LP lower bound. And finally, Lokshtanov et al. [14] obtained an O ∗ (2 . k ) algorithmby reducing the problem to Vertex Cover parameterized by the difference between the size of theoptimal solution and the LP lower bound (we call the problem
Vertex Cover Above LP ). They alsoshowed that many other problems such as
Odd Cycle Transversal can be reduced to
Vertex CoverAbove LP and obtained faster algorithms.Our first result is generalizing [14] so that we can handle any problem in Binarized
IP2 . Binarized
IP2 ( BIP2 in short) is a class of integer programs introduced by Hochbaum [10]. In an instanceof
BIP2 , each constraint has the form of a i,j x i + b i,j x j + z i,j ≥ c i,j , where a i,j , b i,j , and c i,j areinteger constants with a i,j , b i,j ∈ {− , , } , x i and x j are variables that can freely appear in otherconstraints, and z i,j is a variable that can appear only in this constraint. The objective function isa non-negative linear function of variables. The variables can take any non-negative integer values.We say that a variable is binary if its domain is { , } , and if all variables in BIP2 are binary, wecall it as
Binary
BIP2 . See Section 2 for the formal definition of
BIP2 . Many important problemsincluding
Vertex Cover , Almost 2-SAT , and
Odd Cycle Transversal can be easily written in the formof (Binary)
BIP2 .For an instance I of BIP2 , we define its integrality gap as gap ( I ) = opt ( I ) − lp ( I ), where opt ( I ) is the optimal IP value and lp ( I ) is the optimal LP value of its LP relaxation. Then, BIP2 Above LP is the problem of finding an optimal IP solution for an instance I parameterized1y gap ( I ). Note that Vertex Cover Above LP is a special case of
BIP2 Above LP . We give a genericprocedure that reduces
BIP2 Above LP to Vertex Cover Above LP in linear time. Note that instancesthat contain non-binary variables can also be reduced to
Vertex Cover Above LP . To this end, weuse the property that any instance of
BIP2 admits half-integral optimal primal/dual solutions [9].More specifically, we show the following.
Theorem 1.
Let I be an instance of BIP2 with n variables and m constraints. Suppose we have apair of half-integral optimal primal/dual solutions for I . Then we can construct an instance G of Vertex Cover of O ( n + m ) vertices and edges with gap ( G ) = gap ( I ) in O ( n + m ) time, Furthermore,we can compute half-integral optimal primal/dual solutions for G in O ( n + m ) time. Our second and main result is showing an algorithm that, given half-integral optimal pri-mal/dual solutions, solves
Vertex Cover Above LP in linear time.
Theorem 2.
Suppose that we are given an instance G = ( V, E ) of Vertex Cover and its half-integraloptimal primal/dual solutions. Then, we can solve
Vertex Cover Above LP in O (4 k ( | V | + | E | )) time. A key ingredient in our algorithm is network flow. During exhaustive search, the instancegradually changes and we need to update the optimal LP solution. To avoid computing it fromscratch, we express the LP solution as a flow. Then for each branching, in linear time, we updatethe flow and extract the optimal LP solution for the resulting instance from the flow. We give adetailed explanation later.From Theorem 1, we obtain the following corollary.
Corollary 1.
Given an instance I of BIP2 with n variables and m constraints and its half-integraloptimal primal/dual solutions, we can solve BIP2 Above LP in O (4 k ( n + m )) time. In order to obtain linear-time FPT algorithms from Corollary 1, the only remaining part is tocompute half-integral optimal primal/dual solutions in linear time. Hochbaum [9] showed that forBinary
BIP2 , we can compute them in O ( ℓ ( n + m )) time, where ℓ is the optimal LP value. Thus,by applying Corollary 1 with these half-integral solutions, we obtain the following. Note that wecan assume ℓ ≤ k . Theorem 3.
We can solve
BIP2 in O (4 k ( n + m )) time, where n is the number of variables and m is the number constraints. As we have mentioned, Theorem 3 immediately implies linear-time FPT algorithms for
OddCycle Transversal and
Almost 2-SAT . To the best of our knowledge, they are first linear-time FPTalgorithms for these problems. To show the generality of Theorem 3, we give a list of other problemsthat can be written in the form of Binary
BIP2 in Appendix A.We mention here that, independently of our work, Ramanujan and Saurabh [20] also haveobtained an O (4 k k n )-time algorithm for Almost 2-SAT via a different approach.
Proof Sketch.
We now give a proof sketch of Theorem 2. Let G = ( V, E ) be a
Vertex Cover instance and y ∗ be its half-integral optimal dual solution. Then, we construct a network G from G and a flow f ∗ from y ∗ . These network and flow will play a central role in our algorithm. Wealso construct an optimal primal solution x ∗ from the residual graph G f ∗ of G with respect to f ∗ .Using x ∗ , we can fix variables v with x ∗ v = 0 or x ∗ v = 1. Further, we want to find a set of variables2 that can be assigned integers without changing lp ( G ). To this end, we will show that it sufficesto find a strongly connected component S in G f ∗ with a certain property. We now assign integersto the corresponding set S and this operation causes removal of S from G .Again, we want to find other variables that can be assigned integers. Naively speaking, we cando so by recomputing a half-integral optimal dual solution, a feasible flow, the residual graph, andstrongly connected components. However, from the property of the network G , we can reuse almostall information in the previous step. It turns out that we can assign integers by keep finding andremoving strongly connected components with a certain property from G f ∗ . We can also keep theoptimal flow f ∗ at hand, and this process takes only linear time in total.After this preprocess, the unique primal solution of G = ( V, E ) is the one consisting of only. Then, we can follow a standard approach to design an FPT algorithm. That is, we pick anarbitrary edge { u, v } ∈ E that is not covered yet by a variable assigned 1, and we invoke recursionafter assigning x u = 1 or x v = 1. To continue the process, instead of updating y ∗ , we directlyupdate f ∗ by augmenting paths.We can show that k decreases by ∆2 if the number of augmenting paths is ∆. Since other partstakes only linear time, the total running time becomes O (2 k ( | V | + | E | )) = O (4 k ( | V | + | E | )). Related Work:
Before Lokshtanov et al. [14] gave parameterized reductions from
Odd CycleTransversal and
Almost 2-SAT to Vertex Cover Above LP , Cygan et al. [4] had given parameterizedreductions to
Node Multiway Cut Above LP . The reductions are one-way and it seems very difficultto express
Node Multiway Cut as BIP2 . This is because
Vertex Cover Above LP and thus
BIP2 areknown to have polynomial kernels [13] whereas obtaining polynomial kernel for
Node Multiway Cut remains a (famous) open problem. To the best of our knowledge, there is no linear-time FPTalgorithm for
Node Multiway Cut in the literature, and the fastest one (in terms of the input size)is O (4 k ℓn )-time algorithm by Chen et al. [2], where ℓ is the number of terminals. We note that,D´aniel Marx mentioned that a linear-time FPT algorithm for Node Multiway Cut is a folklore in hislecture talk at GRAPH CUTS workshop in 2013. However, we show an FPT algorithm for
NodeMultiway Cut that runs in O (4 k ( | V | + | E | ))-time by exploiting the network flow approach to makethe result more accessible and show the general applicability of our approach (Appendix C). Notethat by the reduction from Odd Cycle Transversal or Almost 2-SAT to Node Multiway Cut AboveLP , though the difference between the size of the optimal solution and the LP lower bound doesnot change, the optimal solution size itself increases. Thus, a linear-time FPT algorithm for
NodeMultiway Cut does not imply linear-time FPT algorithms for
Odd Cycle Transversal and
Almost2-SAT .Compare to works pursuing small f ( k ), there are a fewer number of works that pursue smalldegree d of the polynomial. However, several important results are known. Bodlaender [1] developeda linear time FPT algorithm for computing tree-decompositions of width k , and Courcelle [3] showedthat any graph property that can be expressed in monadic second-order logic can be tested in lineartime for graphs of fixed tree-width. Kawarabayashi and Reed [12] showed that the crossing number k of a graph can be computed in linear time for a fixed k , where crossing number is the minimumnumber of crossings of edges when we draw the graph on the plane. Fomin et al. [8] developed asingle exponential and linear time FPT algorithm for Planar- F Deletion . Marx et al. [15] showedthat we can reduce the treewidth of a graph while preserving all the minimal ( s, t )-separators of sizeup to k in linear time for a fixed k , and obtained faster algorithms for several problems including Bipartite Contraction . However, they concluded that their approach is very difficult to be generalized3o other problems such as
Almost 2-SAT . Organization:
We give definitions used in this paper and introduce
BIP2 in Section 2. In Sec-tion 3, we give a linear-time FPT algorithm for
Vertex Cover Above LP and prove Theorem 2. InAppendix A, we give a list of problems that can be expressed as Binary
BIP2 . We give a proof ofTheorem 1 in Appendix B. In Appendix C, we show a linear-time FPT algorithm for
Node MultiwayCut . In this section, we give definitions used in this paper and introduce binarized integer programming(
BIP2 ). We denote a set of non-negative integers by N , and a set of non-negative half-integers by N / , where a half-integer is a multiple of .Let G = ( V, E ) be an undirected graph. The neighborhood N ( v ) of a vertex v is { u ∈ V |{ u, v } ∈ E } , and the neighborhood N ( S ) of a vertex set S ⊆ V is S v ∈ S N ( v ) \ S . We denote a setof edges incident to a vertex v by δ ( v ). For a subset S ⊆ V , let G [ S ] denote the subgraph inducedby S .For a directed graph G = ( V, E ) and its vertex v ∈ V , we denote the set of incoming edges of v by δ − ( v ) and the set of outgoing edges of v by δ + ( v ). Similarly, for a vertex set S , we define δ − ( S )as the set of incoming edges of S and δ + ( S ) as the set of outgoing edges of S . We say that a vertexset S ⊆ V is a strongly connected component if, for any two vertices u, v ∈ S , there is a directedpath from u to v . We say that S is a tail strongly connected component if it is strongly connectedand δ + ( S ) = ∅ . A directed graph is called strongly connected if the whole vertex set V is stronglyconnected. It is known that we can compute strongly connected components in O ( | V | + | E | ) time.A weighted graph is a pair of a graph G = ( V, E ) and a function w : V → N . For a vertex set S ⊆ V , we denote the sum P v ∈ S w ( v ) by w ( S ). Similarly, an edge-weighted graph is a pair of agraph G = ( V, E ) and a function w : E → N .A network is a pair of a directed graph G = ( V, E ) and an edge capacity function c : E → N .For vertices s, t ∈ V , an s - t flow is a function f : E → N satisfying that, for some F ≥ P e ∈ δ + ( s ) f ( e ) = P e ∈ δ − ( t ) f ( e ) = F , P e ∈ δ + ( v ) f ( e ) = P e ∈ δ − ( v ) f ( e ) for all v ∈ V \ { s, t } , and0 ≤ f ( e ) ≤ c ( e ) for all e ∈ E . We call F the amount of the flow. Given a flow f and a setof vertices S , the out-flow of S refers to the restriction of f to edges e ∈ δ + ( S ) with f ( e ) > in-flow of S refers to the restriction of f to edges e ∈ δ − ( S ) with f ( e ) >
0. A residualgraph of a network (
G, c ) with respect to its flow f is a directed graph G f = ( V, E f ) with E f = { ( u, v ) | (( u, v ) ∈ E and f ( u, v ) < c ( u, v )) or (( v, u ) ∈ E and 0 < f ( v, u )) } . It is known that wecan compute an s - t flow of an amount F (if exists) in O ( F ( | V | + | E | )) time using the Ford-Fulkersonalgorithm.Now, we define a class of integer programs, called IP2 , introduced by Hochbaum [9, 10]. An4nstance of
IP2 is of the following form:minimize X i ∈ V w i x i + X ( i,j ) ∈ E d i,j z i,j subject to a i,j x i + b i,j x j + z i,j ≥ c i,j for ( i, j ) ∈ E ,a i,j x i + b i,j x j ≥ c i,j for ( i, j ) ∈ E ,x i ∈ N for i ∈ V,z i,j ∈ N for ( i, j ) ∈ E . Here E , E ⊆ V × V are sets of pairs, x i and z i,j are non-negative integer variables, w i and d i,j are non-negative integers, and a i,j , b i,j , and c i,j are integers. We call the variables x i,j , which canappear in several constraints, shared variables , and call the variables z i,j , which can appear in onlyone constraint, independent variables . In IP2 , each constraint imposed on E or E can containonly two shared variables and at most one independent variable. When all coefficients of everyconstraint, a i,j and b i,j , are from {− , , } , the problem is called binarized IP2 ( BIP2 in short).Additionally, when all variables of
BIP2 are binary, i.e., they are from { , } , the problem is called Binary
BIP2 .For an IP instance I , we denote by opt ( I ) the optimal IP value. Its LP relaxation can beobtained by replacing the constraint of the form x ∈ N by a constraint of the form x ≥ x . For an IP instance I , we denote by lp ( I ) the optimal value of its LP relaxation. For a(primal or dual) solution x , val ( I , x ) denotes the LP value obtained by x . We define the integralitygap of I as gap ( I ) = opt ( I ) − lp ( I ). The LP relaxation of
BIP2 and its dual LP admit half-integral optimal solutions [9]. Moreover,for Binary
BIP2 , we can compute the optimal LP solutions both in the primal problem and thedual problem in O ( F ( n + m )) time, where F is the optimal LP value [9]. Many important problemscan be formulated as BIP2 . Some examples are given in Appendix A.
Vertex Cover Above LP
In this section, we give an O (4 k ( | V | + | E | ))-time algorithm for Vertex Cover Above LP and proveTheorem 2. Given a graph G = ( V, E ), the (primal) LP relaxation of
Vertex Cover can be writtenas follows: (Primal-VC) minimize X v ∈ V w ( v ) x v subject to x v + x u ≥ { u, v } ∈ E,x u ≥ u ∈ V. The all-half vector refers to a vector x ∈ R V such that x v = for every v ∈ V . We write x ≡ if x ∈ R V is the all-half vector. Lemma 1 ([16]) . The primal LP relaxation of
Vertex Cover satisfies the following.(1) It admits a half-integral optimal solution.(2) For any optimal LP solution x L ∈ R V , there is an optimal integer solution x I ∈ { , } V suchthat x Iv = x Lv holds for every v ∈ V for which x Lv is an integer. In the context of approximation algorithms, the integrality gap is often defined as the ratio of lp ( I ) to opt ( I )
3) If the all-half vector is an optimal LP solution, then w ( S ) ≤ w ( N ( S )) holds for every inde-pendent set S ⊆ V .(4) If the all-half vector is an optimal LP solution and w ( S ) = w ( N ( S )) holds for some indepen-dent set S ⊆ V , the following x ∈ N V / is also an optimal LP solution: If v ∈ S , then x v = 0 .If v ∈ N ( S ) , then x v = 1 . Otherwise, x v = .(5) If w ( S ) < w ( N ( S )) for every independent set S , the all-half vector is the unique optimal LPsolution. By using Properties (1) and (2), it is not hard to design an FPT algorithm by naive exhaustivesearch. First, as long as the optimal LP solution x L ∈ R V contains a variable v such that x Lv is aninteger, we fix the value of v as x Lv . Then, for each vertex v ∈ V , we try to fix x Lv = 1 and checkwhether the optimal LP value increases. If it remains the same, we can fix the value of v to 1, andif it increases, we restore the value of v to . By checking every vertex, the all-half vector becomesthe unique optimal LP solution. Now we pick an arbitrary edge { u, v } ∈ E that is not covered yetby a variable whose value is fixed to 1, and we invoke recursion after setting x u = 1 or x v = 1.Since the all-half vector is the unique optimal LP solution, the value of the optimal LP solutionincreases by ∆ ≥ . Thus, by setting x u = 1 or x v = 1, we can decrease k by ∆. Hence, the depthof the search tree is bounded by 2 k . In each node in the search tree, we might need to solve theLP relaxation n times. Let T ( n ) be the running time to solve the LP relaxation, then the totalrunning time is O (4 k nT ( n )), which is a huge polynomial.The outline of our algorithm is similar to the naive exhaustive search. However, we exploit allthe properties in Lemma 1 to improve the running time to be linear. We introduce the dual LPrelaxation of Vertex Cover to describe our algorithm. (Dual-VC) maximize X e ∈ E y e subject to X e ∈ δ ( v ) y e ≤ w ( v ) for v ∈ V,y e ≥ e ∈ E. As a preprocess, we construct a network and its half-integral flow f ∗ from the given half-integraloptimal dual solution y ∗ ∈ R E . A step in our exhaustive search consists of three parts.(I) From the current graph and the half-integral flow f ∗ , we compute a corresponding half-integraloptimal primal solution x ∗ ∈ R V . (Though we have x ∗ in the beginning, we need this forrecursive steps.)(II) We find all variables that can be fixed to integers without changing lp ( G ), and we transformthe current graph G so that the all-half vector is the unique optimal primal solution.(III) We pick an arbitrary edge { u, v } ∈ E that is not covered yet, and we go back to part (I)recursively after setting x u = 1 or x v = 1. In order to perform the following steps, we removecovered edges from G and update the half-integral flow f ∗ .We will show that these three parts can be performed in linear time, and the depth of the searchtree is bounded by 2 k . Thus, the total running time of the algorithm is O (4 k ( | V | + | E | )).6 reprocess: From the current graph G = ( V, E ), we construct a network ( G = ( V ∪ { s, t } , E ) , c )as follows. V = L ∪ R, L = { l v | v ∈ V } , R = { r v | v ∈ V } ,E = { ( s, l v ) | v ∈ V } ∪ { ( l u , r v ) | { u, v } ∈ E } ∪ { ( r v , t ) | v ∈ V } ,c ( e ) = ( w ( v ) ( e = ( s, l v ) or e = ( r v , t )) , ∞ (otherwise) . Proposition 1.
Given a dual solution y , define f : E → R as f ( s, l v ) = f ( r v , t ) = P e ∈ δ ( v ) y e for v ∈ V , and f ( l u , r v ) = y e for e = { u, v } ∈ E . Then f is a flow in G of amount val ( G, y ) .Proof. Since y is a feasible dual solution, we have f ( s, l v ) = f ( r v , t ) = P e ∈ δ ( v ) y ∗ e ≤ w ( v ) for any v ∈ V . Also, f clearly satisfies the condition P e ∈ δ + ( v ) f ( e ) = P e ∈ δ − ( v ) f ( e ) for any v ∈ V . It iseasy to see that the amount of f is 2 val ( G, y ). Proposition 2.
Given a flow f of G , define a solution y as y ( u, v ) = ( f ( l u , r v ) + f ( l v , r u )) for e = { u, v } ∈ E. Then y is a feasible dual solution for G and val ( G, y ) is half the amount of f .Proof. Since f is a flow, we have P { u,v }∈ δ ( v ) y ( e ) = P { u,v }∈ δ ( v ) ( f ( l u , r v ) + f ( l v , r u )) ≤ w ( v ) forany v ∈ V . Also, val ( G, y ) = P e ∈ E y ( e ) = P { u,v }∈ E ( f ( l u , r v ) + f ( l v , r u )), which is half theamount of f .From the correspondence between a dual solution and a flow, we have the following. Corollary 2.
From a maximum flow f ∗ for G , we can compute an optimal dual solution y ∗ for G (and vice versa). As a preprocess, we construct an optimal flow f ∗ from the optimal dual solution y ∗ usingProposition 1. Note that f ∗ is also half-integral. Part (I):
Given an optimal flow f ∗ , we create a primal solution x ∗ ∈ N V / from the residualgraph G f ∗ as follows: x ∗ v = l v is reachable from s and r v is not reachable from s in G f ∗ ) , l v is not reachable from s and r v is reachable from s in G f ∗ ) , (otherwise) . Lemma 2 ([16]) . x ∗ is an optimal primal solution. Part (II):
Now we have an optimal primal solution x ∗ from Lemma 2. We denote by y ∗ theoptimal dual solution created from f ∗ . From Property (2), we can assume that there is a vertexcover of the minimum weight containing all vertices v with x ∗ v = 1 and no vertices v with x ∗ v = 0.Let V ′ be the set of vertices v with x ∗ v = and E ′ ⊆ E be the set of edges that are not covered byvertices v with x ∗ v = 1. We define G ′ = ( V ′ , E ′ ). Lemma 3.
Let x ′ and y ′ be the restriction of x ∗ and y ∗ to V ′ and E ′ , respectively. Then, x ′ and y ′ are optimal primal and dual solutions for G ′ , respectively. roof. The solution x ′ must be an optimal primal solution in G ′ since we have set integers tovariables according to x ∗ .Let U ⊆ V be the set of vertices v with x ∗ v = 1. Note that val ( G, x ∗ ) − val ( G ′ , x ′ ) = P v ∈ U w ( v ). On the other hand, val ( G, y ∗ ) − val ( G ′ , y ′ ) = P e ∈ E :incident to U y ∗ ( e ) ≤ P v ∈ U w ( v ).Since val ( G, x ∗ ) = val ( G, y ∗ ), it follows that val ( G ′ , x ′ ) ≤ val ( G ′ , y ′ ). Since x ′ is an optimal primalsolution, y ′ must be an optimal dual solution.Note that x ′ in the lemma above is again the all-half vector in R V ′ . Now we restrict our attentionto G ′ and replace G by G ′ . Also, we can recompute the residual graph just by ignoring vertices in V corresponding to vertices in V \ V ′ . Since the restriction of y ∗ is an optimal dual solution of G ′ ,the restriction of f ∗ is a maximum flow of ¯ G ′ .In order to transform the current graph G so that it admits the all-half vector as its uniqueoptimal LP solution, we need several properties of the residual graph G f ∗ . To avoid confusion, weuse · to denote a vertex set in V , e.g., S . For a subset S ⊆ V , we define S L = { v ∈ V | l v ∈ S ∩ L } and S R = { v ∈ V | r v ∈ S ∩ R } . For a subset T ⊆ V , we define L T = { l v ∈ V | v ∈ T } and R T = { r v ∈ V | v ∈ T } . Lemma 4.
For a vertex set S ⊆ V , the following are equivalent:(1) There is no edge from S to V \ S in G f ∗ .(2) N ( S L ) = S R and w ( S L ) = w ( S R ) .Proof. In the proof, we use the notation of a neighbor set N ( · ) for G (neither G nor G f ∗ ).Since the all-half vector is an optimal primal solution, the optimal LP value is P v ∈ V w ( v ).However in the dual, P e ∈ E y e = P v ∈ V P e ∈ δ ( v ) y e ≤ P v ∈ V w ( v ). Thus, P e ∈ δ ( v ) y e = w ( v ) musthold for every v ∈ V . Hence, in the flow f ∗ , every edge incident to s or t is saturated. This meansthat the amount of the out-flow of S ∩ L is w ( S L ) and the amount of the in-flow of S ∩ R is w ( S R ).We define E L = { ( l u , r v ) ∈ E | l u ∈ S, r v S } and E R = { ( r v , l u ) | ( l u , r v ) ∈ E, f ( l u , r v ) > , r v ∈ S, l u S } .(1) ⇒ (2): Note that no edge from L to R can be saturated. Thus, the set of edges outgoingfrom S to V \ S in G f ∗ is E L ∪ E R (Recall that V does not contain s and t ). Hence, E L = E R = ∅ from the assumption. We have N ( S L ) ⊆ S R from E L = ∅ . Also, we have w ( S R ) ≤ w ( S L ) from E R = ∅ . Since the amount of the out-flow of S ∩ L is at most the amount of the in-flow of R N ( S L ) ,we have w ( S L ) ≤ w ( N ( S L )). Therefore, we obtain w ( S L ) ≤ w ( N ( S L )) ≤ w ( S R ) ≤ w ( S L ), whichimplies N ( S L ) = S R and w ( S L ) = w ( S R ).(2) ⇒ (1): Since N ( S L ) = S R , E L must be an empty set. Moreover, since w ( S L ) = w ( S R ), allthe in-flow of R N ( S L ) = R S R = S ∩ R must come from S ∩ L . Therefore E R must be an empty set.Thus, there is no edge from S to V \ S . Lemma 5.
If a tail strongly connected component S of G f ∗ satisfies S L ∩ S R = ∅ , then S L is anindependent set of G and w ( S L ) = w ( N ( S L )) .Proof. Since there is no edge from S to V \ S , N ( S L ) = S R and w ( S L ) = w ( S R ) hold from Lemma 4.From the former property, S L ∩ N ( S L ) = S L ∩ S R = ∅ , and therefore S L is an independent set.From the both properties, w ( S L ) = w ( S R ) = w ( N ( S L )) holds.Indeed, the converse is also true. 8 emma 6. If there is an independent set S ⊆ V of G that satisfies w ( S ) = w ( N ( S )) , then thereexists a tail strongly connected component T of G f ∗ that satisfies T L ∩ T R = ∅ .Proof. Let S ⊆ V be the minimal independent set that satisfies w ( S ) = w ( N ( S )). We prove that T = L S ∪ R N ( S ) satisfies the properties above. Since N ( T L ) = N ( S ) = T R and w ( T L ) = w ( S ) = w ( N ( S )) = w ( T R ) hold, from Lemma 4, there is no edge from T to V \ T .Suppose for contradiction that T is not strongly connected. Then, there is a subset T ′ ( T suchthat there is no edge from T ′ to T \ T ′ . Since there is no edge from T to V \ T , this implies thereis no edge from T ′ to V \ T ′ . Therefore, from Lemma 4, w ( T ′ L ) = w ( T ′ R ) = w ( N ( T ′ L )) holds. Thiscontradicts the minimality of S as T ′ L ⊆ S . Thus, T must be a tail strongly connected component.Since S is an independent set, T L ∩ T R = S ∩ N ( S ) = ∅ holds.From Property (4), as long as there is an independent set S ⊆ V with w ( S ) = w ( N ( S )), wecan safely assign integers to S and N ( S ). That is, we set x u = 1 for all u ∈ N ( S L ) and set x u = 0for all u ∈ S L , and we remove them from the graph. From Property (5), if we no longer have suchan independent set, the all-half vector becomes the unique optimal primal solution.From Lemmas 5 and 6, such an independent set exists if and only if there is a tail stronglyconnected component S in G f ∗ with S L ∩ S R = ∅ . Thus, it suffices to keep finding such tailstrongly connected components. An issue here is that (apparently) we have to recompute residualgraphs. Fix an independent set S with w ( S ) = w ( N ( S )) and let G ′ be the graph obtained from G by removing vertices in S ∪ N ( S ) and removing edges incident to N ( S ). To avoid recomputing theresidual graph of G ′ again, we use the following fact. Lemma 7.
The restriction of x ∗ to V ′ and the restriction of y ∗ to E ′ are optimal primal and dualsolutions for G ′ , respectively. In particular, since x ∗ is the all-half vector, the all-half vector in R V ′ is an optimal primal solution of G ′ .Proof. Let x ′ ∈ R V ′ and y ′ ∈ R E ′ be the restrictions of x ∗ and y ∗ , respectively. Since the amountof out-flow from S ∩ L is w ( S L ) and w ( S L ) = w ( N ( S L )), all out-flow from S ∩ L flows into R N ( S L ) .Thus, val ( G, y ∗ ) − val ( G ′ , y ′ ) = w ( S L ). Also, val ( G, x ∗ ) − val ( G ′ , x ′ ) = ( w ( S L ) + w ( N ( S L ))) = w ( S L ). Hence val ( G ′ , x ′ ) = val ( G ′ , y ′ ) holds, and it follows that x ′ and y ′ are optimal primal/dualsolutions.By seeing the construction of the residual graph, we have the following. Corollary 3.
The residual graph of G ′ is obtained from G f ∗ by removing the tail strongly connectedcomponent S . Thus, what we have to do is keep finding and removing tail strongly connected components S with S L ∩ S R = ∅ in a fixed residual graph! We can perform this process in linear time, and in theend we obtain a graph for which the all-half vector is the unique optimal primal solution. Part (III):
In this part, we choose an arbitrary edge { u, v } ∈ E that is not covered yet, andinvoke recursion after setting x u = 1 or x v = 1.Suppose that we have set x u = 1. (The other case is similar.) We explain how to update theoptimal dual solution. Let f ∗ be the current flow. Then, we remove all flow passing through l u or r u . Since all edges between L and R are directed from L to R , we can remove them in O ( | δ ( u ) | )time. After removing l u and r u from G , we augment the flow as long as we can. If the amount of9he augmentation is ∆, the running time is O (∆( | V | + | E | )) from the half-integrality of f ∗ . Thus,the running time in this step is bounded by O ( | δ ( v ) | + ∆( | V | + | E | )).Now we calculate the total running time spent in Part (III). To this end, we see the connectionbetween ∆ and the change of the optimal LP value in one step. Since we have changed x u from to 1, we gain w ( u )2 . Note that the amount of the flow decreases by w ( u ) − ∆. From Proposition 2,we lose w ( u )2 − ∆2 . In total, the LP value increases by ∆2 . Thus, we can decrease k by ∆2 .Throughout the algorithm, the sum of | δ ( v ) | is bounded by | E | and the sum of ∆ is bounded by2 k . Since the number of leaves in the search tree is at most 2 k = 4 k , the running time caused by | δ ( v ) | is at most O (4 k | E | ). Since we spend O (∆( | V | + | E | )) time to decrease k by ∆2 , the runningtime caused by augmenting the flow is at most O (4 k ( | V | + | E | )). In total, the running time of Part(III) is O (4 k ( | V | + | E | )) and this is dominant in the whole algorithm. References [1] H. L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth.
SIAM Journal on Computing , 25(6):1305–1317, 1996.[2] J. Chen, Y. Liu, and S. Lu. An improved parameterized algorithm for the minimum nodemultiway cut problem.
Algorithmica , 55(1):1–13, 2009.[3] B. Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finite graphs.
Inf. Comput. , 85(1):12–75, 1990.[4] M. Cygan, M. Pilipczuk, M. Pilipczuk, and J. O. Wojtaszczyk. On multiway cut parameter-ized above lower bounds. In
IPEC’12: Proceedings of the 7th International Symposium onParameterized and Exact Computation , pages 1–12, 2012.[5] R. G. Downey and M. R. Fellows.
Parameterized Complexity . Springer Verlag, 2012.[6] S. Fiorini, N. Hardy, B. A. Reed, and A. Vetta. Planar graph bipartization in linear time.
Discrete Applied Mathematics , 156(7):1175–1180, 2008.[7] J. Flum and M. Grohe.
Parameterized Complexity Theory . Springer, 2010.[8] F. V. Fomin, D. Lokshtanov, N. Misra, and S. Saurabh. Planar F -deletion: Approximation,kernelization and optimal fpt algorithms. In FOCS’12: Proceedings of the 53rd Annual IEEESymposium on Foundations of Computer Science , pages 470–479, 2012.[9] D. S. Hochbaum. Solving integer programs over monotone inequalities in three variables: Aframework for half integrality and good approximations.
European Journal of OperationalResearch , 140(2):291–321, 2002.[10] D. S. Hochbaum, N. Megiddo, J. S. Naor, and A. Tamir. Tight bounds and 2-approximationalgorithms for integer programs with two variables per inequality.
Mathematical Programming ,62(1):69–83, 1993.[11] K. Kawarabayashi and B. Reed. An (almost) linear time algorithm for odd cycles transversal.In
SODA’10: Proceedings of the 21st Annual ACM-SIAM Symposium on Discrete Algorithms ,pages 365–378, 2010. 1012] K. Kawarabayashi and B. A. Reed. Computing crossing number in linear time. In
STOC’07:Proceedings of the 39th Annual ACM Symposium on Theory of Computing , pages 382–390,2007.[13] S. Kratsch and M. Wahlstrom. Representative sets and irrelevant vertices: New tools forkernelization. In
FOCS’12: Proceedings of the 53rd Annual IEEE Symposium on Foundationsof Computer Science , pages 450–459, 2012.[14] D. Lokshtanov, N. S. Narayanaswamy, V. Raman, M. S. Ramanujan, and S. Saurabh. Fasterparameterized algorithms using linear programming. arXiv.org , cs.DS, 2012.[15] D. Marx, B. O’Sullivan, and I. Razgon. Finding small separators in linear time via treewidthreduction.
CoRR , abs/1110.4765, 2011.[16] G. L. Nemhauser and L. E. Trotter, Jr. Vertex packings: Structural properties and algorithms.
Mathematical Programming , 8(1):232–248, 1975.[17] R. Niedermeier.
Invitation to Fixed-Parameter Algorithms . Oxford University Press on De-mand, 2006.[18] J.-C. Picard and M. Queyranne. On the structure of all minimum cuts in a network and applica-tions. In V. Rayward-Smith, editor,
Combinatorial Optimization II , volume 13 of
MathematicalProgramming Studies , pages 8–16. Springer Berlin Heidelberg, 1980.[19] V. Raman, M. S. Ramanujan, and S. Saurabh. Paths, flowers and vertex cover. In
ESA’11:Proceedings of the 19th European conference on Algorithms , pages 382–393, 2011.[20] M. S. Ramanujan and S. Saurabh. Linear time parameterized algorithms via skew-symmetricmulticuts.
CoRR , abs/1304.7505, 2013.[21] I. Razgon and B. O’Sullivan. Almost 2-SAT is fixed-parameter tractable.
Journal of computerand system sciences , 75(8):435–450, 2009.[22] B. Reed, K. Smith, and A. Vetta. Finding odd cycle transversals.
Operations Research Letters ,32(4):299–301, 2004.[23] M. Xiao. Simple and improved parameterized algorithms for multiterminal cuts.
TheoryComput. Syst. , 46(4):723–736, 2010. 11 ppendixA List of Binary
BIP2
Problems
Many important problems can be formulated as BIP2. Below we see several examples.
Example 1 ( Vertex Cover ) . Given a graph G = ( V, E ), by introducing a variable x v that representswhether a vertex v ∈ V is contained in a vertex cover, the problem can be formulated as Binary BIP2 as follows: minimize X v ∈ V w ( v ) x v subject to: x v + x u ≥ { u, v } ∈ E. Example 2 ( Odd Cycle Transversal ) . Given a graph G = ( V, E ), by introducing variables x v , l v ,and r v each describing whether a vertex v is contained in an odd cycle transversal S , in the leftside of the bipartite graph G [ V \ S ], and in the right side of G [ V \ S ], respectively, the problem canbe formulated as Binary BIP2 as follows:minimize X v ∈ V w ( v ) x v subject to: l v + r v + x v ≥ v ∈ V,l u + l v ≤ { u, v } ∈ E,r u + r v ≤ { u, v } ∈ E. Example 3 ( Almost 2-SAT ) . Given a 2-CNF C over variables V , by introducing a variable x v representing the assigned value of a variable v and a variable z C representing whether a clause C is unsatisfied, the problem can be formulated as Binary BIP2 as follows:minimize X C ∈C z C subject to: x u + x v + z C ≥ C = ( v ∨ u ) ∈ C ,x u + (1 − x v ) + z C ≥ C = ( v ∨ ¯ u ) ∈ C , (1 − x u ) + x v + z C ≥ C = (¯ v ∨ u ) ∈ C , (1 − x u ) + (1 − x v ) + z C ≥ C = (¯ v ∨ ¯ u ) ∈ C . Below is a list of other problems that can be written in the form of Binary
BIP2 . All theseproblems can be solved in O (4 k ( n + m )) time, where k is the solution size. In graph problems, n and m denote the number of vertices and the number of edges, respectively, and in problems relatedto SAT, n and m denote the number of variables and the number of constraints, respectively. • Split Vertex Deletion : An undirected graph G = ( V, E ) is called a split graph if there is a vertexset C ⊆ V such that G [ C ] is a clique and G [ V \ C ] is an independent set. Given a weightedundirected graph G = ( V, E ), Split Vertex Deletion is a problem of finding a minimum weightvertex set S ⊆ V such that G [ V \ S ] becomes a split graph. • Edge Bipartization:
Given an edge-weighted undirected graph G = ( V, E ), Edge Bipartization is a problem of finding a minimum weight edge set S ⊆ E such that the graph G ′ = ( V, E \ S )becomes bipartite. 12 Min SAT:
Given a CNF C over variables V , Min SAT is a problem of finding a Booleanassignment that minimizes the number of satisfied clauses. • Generalized Vertex Cover:
The instance of
Generalized Vertex Cover is a weighted undirectedgraph G = ( V, E ) together with three edge weight functions d , d , d that satisfy d ( e ) ≥ d ( e ) ≥ d ( e ) ≥ e ∈ E . Generalized Vertex Cover is a problem of finding avertex set S ⊆ V that minimizes the weight P v ∈ S w ( v ) + P e ∈ E d | e ∩ S | ( e ). • Generalized 2-SAT:
For a given 2-CNF formula C over variables V and a function w : V → N , Generalized 2-SAT is a problem of finding a Boolean assignment that makes the formula trueand minimizes the total cost of variables that are assigned true. • Complement of Maximum Clique:
For a given graph,
Complement of Maximum Clique is aproblem of finding a minimum weight vertex set S such that G [ V \ S ] becomes a clique. • Almost Boolean 2-CSP:
Given a Boolean 2-CSP C over variables V , Almost Boolean 2-CSP is aproblem of finding a Boolean assignment that minimizes the number of unsatisfied constraints. • Directed Min UnCut:
Given an edge-weighted directed graph G = ( V, E ), Directed Min UnCut is a problem of finding a partition (
S, V \ S ) that minimizes the number of edges not goingfrom S to V \ S . B Linear-Time Reduction to
Vertex Cover Above LP
Let I be an BIP2 instance. An
LP solution pair of I refers to a pair of primal/dual solutions for I . We say that an LP solution pair is optimal if both the primal solution and the dual solution areoptimal, and is half-integral if both the primal solution and the dual solution are half-integral. Inthis section, we prove Theorem 1 by showing a linear-time algorithm that, given a BIP2 instance I and its half-integral optimal LP solution pair, outputs a vertex cover instance G with gap ( G ) = gap ( I ) and its half-integral optimal LP solution pair.Our algorithm consists of a sequence of reductions and we have mainly three parts.(I) We transform the instance so that each constraint has the form of x i + x j + z i,j ≥ c i,j , i.e., thecoefficient of every shared variable is one and every constraint has an independent variable.(II) We remove all independent variables.(III) We construct an instance of Vertex Cover by restricting the domain of variables to be binary.
Part (I).
Let I be an instance of BIP2 . We simplify I so that each constraint has an independentvariable as follows. For each constraint of the form a i,j x i + b i,j x j ≥ c i,j , we create an independentvariable z i,j of sufficiently large weight and replace the constraint with a i,j x i + b i,j x j + z i,j ≥ c i,j .Let I be the resulting instance. Lemma 8.
We have gap ( I ) = gap ( I ) . From a (half-integral) optimal LP solution pair for I , wecan compute a (half-integral) optimal LP solution pair for I in linear time.Proof. Note that z i,j must be zero in any optimal LP/IP solution. Thus, the modification does notchange optimal LP/IP values, and we can directly use the given optimal LP solution pair for I asthe one for I . 13ow we partition the constraint set E to E + , E = , and E − as follows. For each constraint of theform a i,j x i + b i,j + z i,j ≥ c i,j , we add it to E + if ( a i,j , b i,j ) = (1 , E = if ( a i,j , b i,j ) = (1 , − E − if ( a i,j , b i,j ) = ( − , − a i,j , b i,j ) = ( − , E = after swapping i and j .) We regard E + and E − as sets of unordered pairs and E = as a set ofordered pairs.Though all LP variables in this section are constrained to be non-negative, in what follows, weomit them from LP formalizations for brevity. The LP relaxation of I and its dual can be writtenas follows. (Primal-1) minimize X i ∈ V w i x i + X ( i,j ) ∈ E d i,j z i,j subject to x i + x j + z i,j ≥ c i,j for ( i, j ) ∈ E + ,x i − x j + z i,j ≥ c i,j for ( i, j ) ∈ E = , − x i − x j + z i,j ≥ c i,j for ( i, j ) ∈ E − . (Dual-1) maximize X ( i,j ) ∈ E c i,j y i,j subject to X ( i,j ) ∈ E + ∪ E = y i,j − X ( j,i ) ∈ E = ∪ E − y j,i ≤ w i for i ∈ V,y i,j ≤ d i,j for ( i, j ) ∈ E. Now, we want to transform the instance so that each constraint has the form of x i + x j + z i,j ≥ c i,j ,i.e., a i,j = b i,j = 1 for every ( i, j ) ∈ E . Let X and M be sufficiently large integers. For a variable x i of weight w i , we create two variables x + i and x − i . We set the weight of x + i to be w + i = M + w i and the weight of x − i to be w − i = M . For each constraint, we replace + x i with x + i and − x i with x − i − X . Finally, we add a new constraint of the form x + i + x − i ≥ X . Let I be the resultinginstance.The primal and dual LP relaxations of I can be written as follows: (Primal-2) minimize X i ∈ V (( M + w i ) x + i + M x − i ) + X ( i,j ) ∈ E d i,j z i,j subject to x + i + x + j + z i,j ≥ c i,j for ( i, j ) ∈ E + ,x + i + x − j + z i,j ≥ c i,j + X for ( i, j ) ∈ E = ,x − i + x − j + z i,j ≥ c i,j + 2 X for ( i, j ) ∈ E − ,x + i + x − i ≥ X for i ∈ V, (Dual-2) maximize X ( i,j ) ∈ E c i,j y i,j + X X ( i,j ) ∈ E = y i,j + 2 X X ( i,j ) ∈ E − y i,j + X X i ∈ V γ i subject to X ( i,j ) ∈ E + ∪ E = y i,j + γ i ≤ M + w i for i ∈ V, X ( j,i ) ∈ E = ∪ E − y j,i + γ i ≤ M for i ∈ V,y i,j ≤ d i,j for ( i, j ) ∈ E. Lemma 9.
We have gap ( I ) = gap ( I ) . Furthermore, from a (half-integral) optimal LP solutionpair for I , we can compute a (half-integral) optimal LP solution pair for I in linear time. roof. Because M is sufficiently large, for any optimal primal/IP solution of I , the constraint ofthe form x + i + x − i ≥ X must be satisfied with equality. Therefore, we can assume that x − i = X − x + i holds in any optimal primal/IP solution.For any primal/IP solution x ∈ R V of I , we can obtain a primal/IP solution of I by setting x + i = x i and x − i = X − x i , and for any primal/IP solution ( x + , x − ) of I , we can obtain aprimal/IP solution of I by setting x i = x + i . Thus, optimal LP/IP values increase exactly by P i ∈ V (( M + w i ) x i + M ( X − x i ) − w i x i ) = | V | XM . Hence, gap ( I ) = gap ( I ) and we can computethe optimal primal solution for I in linear time.We can obtain an optimal dual solution ( y, γ ) of I from an optimal dual solution y ∗ of I bysetting y = y ∗ and γ i = M − X ( j,i ) ∈ E = ∪ E − y j,i . We can easily check that it is feasible and its value is exactly lp ( I ).For readability, we restate (Primal-2) and (Dual-2) as follows. (Primal-2’) minimize X i ∈ V w i x i + X { i,j }∈ E d i,j z i,j subject to x i + x j + z i,j ≥ c i,j for { i, j } ∈ E, (Dual-2’) maximize X { i,j }∈ E c i,j y i,j subject to X { i,j }∈ E y i,j ≤ w i for i ∈ V,y i,j ≤ d i,j for { i, j } ∈ E. Part (II).
We want to remove independent variables from an instance I of the form (Primal-2’) . For a constraint of the form x i + x j + z i,j ≥ c i,j with an independent variable z i,j of weight d i,j , we create two variables z ii,j and z ji,j of weight d i,j . Then, we replace the constraint with thefollowing three constraints: x i + z ii,j ≥ c i,j , x j + z ji,j ≥ c i,j , z ii,j + z ji,j ≥ c i,j . Let I be the resulting instance.Let y ii,j , y ji,j , and y zi,j be dual variables corresponding to the newly added three constraints.Then, the primal and dual LP relaxations of I can be written as follows: (Primal-3) minimize X i ∈ V w i x i + X { i,j }∈ E d i,j ( z ii,j + z ji,j )subject to x i + z ii,j ≥ c i,j for { i, j } ∈ E,x j + z ji,j ≥ c i,j for { i, j } ∈ E,z ii,j + z ji,j ≥ c i,j for { i, j } ∈ E, (Dual-3) maximize X { i,j }∈ E c i,j ( y ii,j + y ji,j + y zi,j )subject to X { i,j }∈ E y ii,j ≤ w i for i ∈ V,y ii,j + y zi,j ≤ d i,j for { i, j } ∈ E. emma 10. We have gap ( I ) = gap ( I ) . Furthermore, from a (half-integral) optimal LP solutionpair for I , we can compute a (half-integral) optimal LP solution pair for I in linear time.Proof. For any primal/IP solution x ∈ R V of I , we can obtain a primal/IP solution of the I bysetting z ii,j = max(0 , c i,j − x i ) and z ji,j = max( c i,j − z ii,j , c i,j − x j ). This is feasible since x i + z ii,j =max( x i + c i,j ) ≥ c i,j , x j + z ji,j = max( x j + c i,j ) ≥ c i,j , and z ii,j + z ji,j = c i,j +max(0 , c i,j − x i − x j ) ≥ c i,j .Suppose we have an optimal primal/IP solution of I . Since z i,j appears only in one constraint,we can assume that, in the optimal primal/IP solution, z i,j = max(0 , c i,j − x i − x j ) holds. Therefore, z ii,j + z ji,j = z i,j + c i,j holds. Since z ii,j and z ji,j appear only in these constraints, in the optimalprimal/IP solution, we can assume that z ii,j = max(0 , c i,j − x i ) and z ji,j = max( c i,j − z ii,j , c i,j − x j )hold. Then, we can obtain a solution for I by setting z i,j = z ii,j + z ji,j − c i,j . This is feasible because x i + x j + z i,j = x i + x j + z ii,j + z ji,j − c i,j ≥ c i,j .Thus, optimal LP/IP values increase by P { i,j }∈ E d i,j ( z ii,j + z ji,j − z i,j ) = P { i,j }∈ E d i,j c i,j . Hence, gap ( I ) = gap ( I ) and we can compute the optimal primal solution for I in linear time.We can obtain a dual optimal solution ( y i , y j , y z ) of I from the given dual optimal solution y of I as follows: y ii,j = y ji,j = y i,j , y zi,j = d i,j − y i,j . We can easily check that the obtained dual solution is feasible and has the same value as the primalsolution obtained above.For readability, we restate (Primal-3) and (Dual-3) as follows. (Primal-3’) minimize X i ∈ V w i x i subject to x i + x j ≥ c i,j for { i, j } ∈ E, (Dual-3’) maximize X { i,j }∈ E c i,j y i,j subject to X { i,j }∈ E y i,j ≤ w i for i ∈ V. Part (III).
Let I be an instance of the form (Primal-3’) . Finally, we reduce it to an instanceof Vertex Cover by restricting the domain of variables to be binary. We use the following lemma.
Lemma 11.
For any half-integral optimal primal solution x L ∈ N V / of I , there exists an optimalIP solution x ∈ N V that satisfies the following: x i = x Li ( x Li ∈ N ) , ⌊ x Li ⌋ ≤ x i ≤ ⌈ x Li ⌉ ( otherwise ) . Proof.
Let x I be an optimal IP solution. We construct an optimal IP solution that satisfies theproperty above. We define the set of variables as follows: X I = { i ∈ V | x Li ∈ N } , X H = { i ∈ V | x Li N } ,X < = { i ∈ V | x Li < x Ii } , X = = { i ∈ V | x Li = x Ii } , X > = { i ∈ V | x Li > x Ii } . w L = lp ( I ) and w I = opt ( I ). For a set of variables S , we define w ( S ) = P i ∈ S w i . Let w I = w ( X I ∩ X < ) − w ( X I ∩ X > ) and w H = w ( X H ∩ X < ) − w ( X H ∩ X > ).First, we construct an IP solution x ∈ N V by rounding the non-integral part of x L towards x I : x i = x Li ( i ∈ X I ) ,x Li + ( i ∈ X H ∩ X < ) ,x Li − ( i ∈ X H ∩ X > ) . We can check the feasibility of x by considering the following three cases. Fix a constraint x i + x j ≥ c i,j . If i, j ∈ X I , then x i + x j = x Li + x Lj ≥ c i,j . If i ∈ X I and j ∈ X H , then x i + x j ≥ x Li + x Lj − ≥ c i,j since x Li + x Lj is not an integer. If i, j ∈ X H , then x i + x j ≥ min( x Li + x Lj , x Ii + x Ij ) ≥ c i,j . We have val ( I , x ) = w L + w H . From the optimality of x I , we obtain w L + 12 w H ≥ w I . (1)Then, we construct another IP solution x ∈ N V by shifting x L towards x I : x i = x Li ( i ∈ X = ) ,x Li + 1 ( i ∈ X I ∩ X < ) ,x Li − i ∈ X I ∩ X > ) ,x Li + ( i ∈ X H ∩ X < ) ,x Li − ( i ∈ X H ∩ X > ) . The feasibility of x can be checked by considering the following two cases. Fix a constraint x i + x j ≥ c i,j . If i ∈ X I and j ∈ X H , then x i + x j ≥ min( x Li + x Lj − , x Ii + x Ij ) ≥ c i,j . Otherwise, x i + x j ≥ min( x Li + x Lj , x Ii + x Ij ) ≥ c i,j . We have val ( I , x ) = w L + w H + w I . From the optimalityof x I , we obtain w L + 12 w H + w I ≥ w I . (2)Finally, we construct a half-integral primal solution x ∈ N V / by shifting x I towards x L : x i = x Ii ( i ∈ X = ) ,x Ii − ( i ∈ X < ) ,x Ii + ( i ∈ X > ) . Since x i + x j ≥ min( x Li + x Lj , x Ii + x Ij ) ≥ c i,j holds, x is feasible. We have val ( I , x ) = w I − w H − w I . From the optimality of x L , we obtain w I − w H − w I ≥ w L . (3)From (1)+(3), we obtain w I ≤
0, and from (2)+(3), we obtain w I ≥
0. Therefore, w I = 0holds. Then, from (1) and (3), we obtain w L + w H = w I . Thus, x is an optimal IP solution thatsatisfies the given property. 17ow we show how to construct an instance G of Vertex Cover . Let x ∗ be a half-integral optimalprimal solution for I . For each variable x i , we replace it with ( ⌊ x ∗ i ⌋ + x i ). A constraint x i + x j ≥ c i,j that is satisfied in x ∗ with strict inequality is always satisfied. Thus, only constraints that is satisfiedwith equality remain. If it consists of two integral variables, c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ = 0 holds, and if itconsists of two half-integral variables, c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ = 1 holds. Let E ′ be the set of the lattertype of constraints. Then, the primal and dual LP relaxations can be written as follows: (Primal-VC’) minimize X i ∈ V w i ⌊ x ∗ i ⌋ + X i ∈ V w i x i subject to x i + x j ≥ { i, j } ∈ E ′ , (Dual-VC’) maximize X i ∈ V w i ⌊ x ∗ i ⌋ + X { i,j }∈ E ′ y i,j subject to X { i,j }∈ E ′ y i,j ≤ w i for i ∈ V. Note that we do not need an upper bound on x i since it always has a binary value in an optimalprimal/IP solution. The primal problem G is Vertex Cover with the vertex set V and the edge set E ′ . Lemma 12.
We have gap ( G ) = gap ( I ) . Furthermore, from a half-integral optimal LP solutionpair for I , we can compute a half-integral optimal LP solution pair for G in linear time.Proof. It is clear that the optimal LP value does not change. Also from Lemma 11, it does notchange the optimal IP value. Thus, we have gap ( G ) = gap ( I ) and we can compute a (half-integral) optimal primal solution for G in linear time.Let y ∗ be the given half-integral optimal dual solution. It is obviously feasible in the reducedproblem. From the complementary slackness, for each variable x i > P { i,j }∈ E y ∗ i,j = w i holds,and for each constraint x i + x j > c i,j , y ∗ i,j = 0 holds. Therefore, val ( G, y ∗ ) = X i ∈ V w i ⌊ x ∗ i ⌋ + X { i,j }∈ E ′ y ∗ i,j = X i ∈ V X { i,j }∈ E y i,j ⌊ x ∗ i ⌋ + X { i,j }∈ E ′ y ∗ i,j (complementary slackness)= X { i,j }∈ E y ∗ i,j ( ⌊ x ∗ i ⌋ + ⌊ x ∗ j ⌋ ) + X { i,j }∈ E ′ y ∗ i,j = X { i,j }∈ E y ∗ i,j ( ⌊ x ∗ i ⌋ + ⌊ x ∗ j ⌋ ) + X { i,j }∈ E ′ ( c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ ) y ∗ i,j ( c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ = 1 for ( i, j ) ∈ E ′ )= X { i,j }∈ E y ∗ i,j ( ⌊ x ∗ i ⌋ + ⌊ x ∗ j ⌋ ) + X { i,j }∈ E ( c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ ) y ∗ i,j ( c i,j − ⌊ x ∗ i ⌋ − ⌊ x ∗ j ⌋ = 0 for ( i, j ) ∈ E \ E ′ )= X { i,j }∈ E c i,j y ∗ i,j . Thus, y ∗ is a (half-integral) optimal dual solution in G .As a result, an instance I of BIP2 is reduced to an instance G of Vertex Cover with gap ( G ) = gap ( I ). Moreover, we can compute a half-integral optimal LP solution pair for G from a half-integral optimal LP solution pair for I in linear time.18 A Linear-Time FPT Algorithm for
Node Multiway Cut
In this section, we give an O (4 k ( | V | + | E | ))-time FPT algorithm for Node Multiway Cut . Let G = ( V, E ) be an undirected graph and T ⊆ V be a terminal set. In Node Multiway Cut , theobjective is to find the minimum set of vertices S so that every pair of terminals becomes separatedby removing S . We use the size of the optimal solution as a parameter.For a terminal t ∈ T , we call a subset C t of vertices an isolating cut of t if its removal separates t from T \ { t } . We denote the connected component containing t after removing an isolating cut C t by R ( C t ). Xiao [23] proved the following lemma. Lemma 13 ([23]) . Let C t be a minimum isolating cut of a terminal t in a graph G . Then thereexists a minimum multiway cut C of G that contains no vertices of R ( C i ) . A farthest minimum isolating cut of t is an isolating cut C t that has the largest R ( C t ) amongall isolating cuts of the minimum cardinality. The farthest minimum isolating cut C t is uniqueand can be computed in O ( | C t | ( | V | + | E | )) time by a single maximum flow computation from t to T \ { t } . Moreover, if we are given the maximum flow, it can be computed in O ( | V | + | E | ) time [18].Now, we describe our algorithm for Node Multiway Cut . First, if the number of terminals | T | is at most 1, we return YES. Otherwise, we choose an arbitrary terminal t ∈ T . If t is adjacentto T \ { t } , there is no multiway cut. If t is already separated from T \ { t } , we remove the set ofvertices that are reachable from t and choose another terminal. Otherwise, we compute the farthestminimum isolating cut C t of t by computing a maximum flow from t to T \ { t } . If the size of thecut (and thus the amount of the flow) exceeds k , we immediately return NO. We keep and reusethe maximum flow for future updates. From Lemma 13, there exists a minimum multiway cut thatdoes not contain any vertices of V ( R ( C t )), thus we can safely contract V ( R ( C t )) to t .After the contraction of V ( R ( C t )), the farthest minimum isolating cut becomes N ( t ). Wechoose an arbitrary vertex v ∈ N ( t ) and branch into two cases, i.e., the minimum multiway cutcontains v or not. For the former case, we include v into the output and remove it from the graph.The farthest minimum isolating cut changes to C t \ { v } and we can update the maximum flowby simply removing the flow passing throw v . For the latter case, we contract v to t . We updatethe maximum flow by searching augmenting paths in the residual graph, recompute the farthestminimum isolating cut C t of t , and then contract V ( R ( C t )) to t . Then, we apply the algorithmrecursively.Finally, we analyze the running time of the algorithm. For simplicity, we fix the ordering t , . . . , t | T | of handling terminals. Let T i ( N, ℓ, λ ) be the running time of the algorithm to handle t i .where N is the sum of the number of vertices and edges, ℓ is the size of a multiway cut we wantto find, and λ is the size of the minimum isolating cut of t i in the current graph. Then, we wantto bound T ( | V | + | E | , k, λ ), where k is the given parameter on the solution size and λ is thesize of the minimum isolating cut of t in the input graph G . For notational simplicity, we define T | T | +1 ( · , · , · ) = 0.Suppose λ = 0. Then, we can find the set R of vertices reachable from t i in O ( N ′ ) time, where N ′ is the sum of the numbers of vertices and edges in R . Let λ ′ be the size of the minimum isolatingcut for the next terminal t i +1 . Then, we can compute the maximum flow in O ( λ ′ ( N − N ′ )) time.Therefore, T i ( N, ℓ, ≤ T i +1 ( N − N ′ , ℓ, λ ′ ) + O ( N ′ + λ ′ ( N − N ′ )) holds.Suppose λ >
0. We can compute the farthest minimum isolating cut in O ( N ) time from thegiven maximum flow. Let v ∈ N ( t ) be the chosen vertex. If we include v into the output, ℓ and λ decrease by 1. In this case, we can update the maximum flow in O ( N ) time. If we contract v to t , ℓ λ increases by at least one because C t = N ( t ) is the unique minimum isolatingcut of t . Let ∆ be the increase of λ . In this case, we can update the maximum flow by findingaugmenting paths ∆ times. Therefore, T i ( N, ℓ, λ ) ≤ T i ( N, ℓ − , λ −
1) + T i ( N, ℓ, λ + ∆) + O (∆ N )holds.From the above two recurrences of T i , we can obtain T i ( N, ℓ, λ ) = O (2 ℓ − λ N ). Thus the totalrunning time is bounded by O (2 k − λ ( | V | + | E | )) = O (4 k ( ||
1) + T i ( N, ℓ, λ + ∆) + O (∆ N )holds.From the above two recurrences of T i , we can obtain T i ( N, ℓ, λ ) = O (2 ℓ − λ N ). Thus the totalrunning time is bounded by O (2 k − λ ( | V | + | E | )) = O (4 k ( || V ||
1) + T i ( N, ℓ, λ + ∆) + O (∆ N )holds.From the above two recurrences of T i , we can obtain T i ( N, ℓ, λ ) = O (2 ℓ − λ N ). Thus the totalrunning time is bounded by O (2 k − λ ( | V | + | E | )) = O (4 k ( || V || + ||
1) + T i ( N, ℓ, λ + ∆) + O (∆ N )holds.From the above two recurrences of T i , we can obtain T i ( N, ℓ, λ ) = O (2 ℓ − λ N ). Thus the totalrunning time is bounded by O (2 k − λ ( | V | + | E | )) = O (4 k ( || V || + || E ||