Complexity of Local Search for CSPs Parameterized by Constraint Difference
Abstract
In this paper, we study the parameterized complexity of local search, whose goal is to find a good nearby solution from the given current solution. Formally, given an optimization problem where the goal is to find the largest feasible subset of a universe , the new input consists of a current solution (not necessarily feasible) as well as an ordinary input for the problem. Given the existence of a feasible solution , the goal is to find a feasible solution as good as in parameterized time , where denotes the distance . This model generalizes numerous classical parameterized optimization problems whose parameter is the minimum number of elements removed from to make it feasible, which corresponds to the case .
We apply this model to widely studied Constraint Satisfaction Problems (CSPs), where is the set of constraints, and a subset of constraints is feasible if there is an assignment to the variables satisfying all constraints in . We give a complete characterization of the parameterized complexity of all boolean-alphabet symmetric CSPs, where the predicate’s acceptance depends on the number of true literals.
Keywords and phrases:
Constraint Satisfaction Problems, Parameterized Local Search, OptimizationFunding:
Anupam Gupta: Supported in part by NSF awards CCF-2224718 and CCF-2422926.Copyright and License:
Debmalya Panigrahi, and Sijin Peng; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithmsEditors:
Akanksha Agrawal and Erik Jan van LeeuwenSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The classical theory of NP-hardness sets limits on the polynomial-time tractability of a vast array of algorithmic problems. This raises the question: what additional information about the problem instance can one use to help overcome complexity barriers? A very successful line of research that aims to address this broad question is that of fixed parameter tractable (FPT) algorithms. The idea is to identify a parameter that has a small value in typical instances, and design an algorithm whose running time is exponential in the value of the parameter but polynomial in the overall size of the instance.
This philosophy has been widely applied to the following general class of optimization problems: let be a universe and let be an (often implicitly given) collection of feasible subsets of , and the goal is to find that maximizes , or equivalently to find the smallest that puts . For instance, given a graph , if and if is -colorable, the problem corresponds to the famous MaxCut/MinUncut pair. Or given , if and denotes the collection of all independent sets, then we have Independent Set/Vertex Cover. In this class, there are many situations where typical (or at least interesting) instances have the optimal value for the minimization version much smaller than . (I.e., the universe is already close to feasible.) Consequently, numerous results in the FPT literature study a problem from the above class - we let the parameter be the optimal value for the minimization version, and give an algorithm of running time (better than the naive running time of ).
Can we extend the applicability of this framework? We can interpret the algorithms in the above paragraph as one-step local search, where we are given a current solution (not necessarily feasible) close to some feasible solution with the optimal value, and the algorithm finds a feasible solution as good as . This motivates us to ask: if the algorithm is provided any current solution (as a solution for the max version) and there is a feasible solution close to , can the algorithm efficiently recover a solution as good as ? Formally, we define the parameter as the distance , and our goal is to design an algorithm whose runtime is arbitrary in but polynomial in the size of the problem instance.111Actually, since , this parameter remains the same for both maximization and minimization versions.
We apply this model to Constraint Satisfaction Problems (CSPs), one of the most important classes of optimization problems in the theory of computation. Given a predicate , MaxCSP() is the computational problem whose input consists of the set of variables and the set of constraints . Given an assignment , each constraint is satisfied when the values of the specified literals (variables or their negations) belong to . (See Section 2 for formal definitions.) The goal is to find an assignment that satisfies as many constraints as possible. Generalizing the MaxCut example above, we apply MaxCSP() to our model where and a subset of constraints is feasible if there exists an assignment that satisfies all of (i.e., is satisfiable); so the current solution is a set of constraints and we assume that it is close to some set of satisfiable constraints. It yields the following computational task.
Problem: ImproveMaxCSP
Input: A instance , an integer , and .
Parameter:
Promise: There exists an assignment with the property , where is the set of clauses satisfies, and represents symmetric difference.
Output: A good assignment , where the word good simply means .
(We do not require to satisfy .)
Note that, given an instance , , ), the problem is essentially equivalent to find such that is at least ; in words, find a feasible solution as good as any feasible -neighbor of . (Formally, we still will keep the fixed promised assignment as part of the instance and define a good assignment based on .)
We also observe that if the decision version of (i.e., finding an assignment that satisfies every constraint) can be solved in polynomial time, an easy -time algorithm for ImproveMaxCSP follows by exhaustively guessing and solving the decision version with constraints ; otherwise it is NP-hard even when (just letting ), which concludes that ImproveMaxCSP is in if and only if the decision version is in . Also, if MaxCSP is NP-hard, there is no -time algorithm for ImproveMaxCSP.
In this paper, we provide a complete characterization of the parameterized complexity of ImproveMaxCSP, where is restricted to a symmetric predicate, whose acceptance only depends on the number of true literals. This still includes many well-known CSPs including LIN (which generalizes MaxCut), SAT, AND, NAE, and AE, where AE and NAE abbreviate All-Equal and Not-All-Equal respectively. Namely, the main contribution of this paper is the following theorem:
Theorem 1 (Main Theorem (Informal)).
For any symmetric predicate , ImproveMax CSP() is either FPT or W[1]-hard.
It turns out that among nontrivial predicates, AND for any and AE (generalizing MaxCut) are the only ones in FPT. We design parameterized algorithms for them extending the previous algorithms for MinCSP. While many predicates inherit their hardness result from the hardness of MinCSP, we also prove hardness for the problems whose MinCSP is tractable, namely AE for and -out-of-SAT for . See Section 2.3 for our formal characterization.
In the context of local search, a natural special case of ImproveMaxCSP() is when the input is restricted to be for some assignment . Theorem 1 addresses this special case as well, in the sense that our W[1]-hard reductions indeed have for some assignment .
Related Work and Discussion
The parameterized complexity of local search, whose goal is to improve the current solution to a strictly better solution nearby, was indeed studied in the parameterized complexity literature. Fellows, Fomin, Lokshtanov, Rosamond, Saurabh, and Villanger [8] study various problems like -Center, Vertex Cover, Odd Cycle Transversal, Max-Cut, and Max-Bisection on special classes of sparse graphs like planar, minor-free, and bounded-degree graphs, and Szeider [25] considers a similar framework for SAT and MaxSAT.
This (strict) local search model can be relaxed to another model called permissive local search [19]. Here we are given a solution , and the goal is to find a solution which has lower cost (which may differ from in more than vertices), or correctly conclude that every solution which differs from in at most vertices has higher cost. This model has been studied for a few problems - including a variant of stable marriage [19], Vertex Cover [9] and also in the context of Min Ones CSPs [14], extending Marx’s complete classification of the parameterized complexity of CSPs based on if there is a solution with exactly ones [17].
One crucial difference between our model and all previous models on CSPs is how the distance between the two solutions is defined. The previous papers define it as the number of variables with different values in two solutions, but our definition concerns the set of constraints whose satisfaction changes between two solutions. In fact, recall that our definition of a solution is an arbitrary set of constraints not necessarily feasible (i.e., corresponding to a variable assignment), which allows and captures algorithms parameterized by the number of unsatisfied constraints. In that sense, our model is slightly broader than traditional local search where one maintains a feasible solution and tries to strictly improve in every step.
Fixed parameter tractability of CSPs parameterized by the number of unsatisfied constraints has been an important and active research area [2, 11, 12, 13], where a complete classification for Boolean relations was obtained very recently. Their definition of CSPs is strictly more general than ours, where each constraint language contains multiple predicates, even with different arities. It is an exciting research direction to extend our framework for every CSP.
Our negative results can be interpreted as demonstrating the importance of near-perfect instances for classical FPT algorithms. For instance, we show ImproveMaxCSP(2SAT) is -hard while MinCSP(2SAT) is known to admit an FPT algorithm [23, 22, 6, 21], so the fact that the optimal solution indeed satisfies all but constraints affects the parameterized complexity.
There are several natural research directions based on this paper. We believe that the following directions will be interesting to study further:
-
1.
The most immediate one is to extend our characterization for all CSPs. One notable set of boolean relations whose complexity is still open in our model is .
-
2.
A natural variant of our model is when the solution is represented as an assignment to the variables, which is guaranteed to have a Hamming distance at most to a strictly better solution. For Min Ones CSP, where the goal is to find a satisfying assignment with the minimum number of true variables, this variant has been studied previously [14].
-
3.
Other than CSPs, one framework that captures numerous results in the FPT literature is covering (resp. packing) problems, especially on graphs, where we want to select the smallest (resp. largest) subset subject to some covering (resp. packing) constraints. Local search naturally extends to this setting (i.e., we are given with ), and it will be interesting to see if classical FPT results on graph covering/packing problems extend to this model, including Multicut [3, 18], Min Bisection [5], -Cut [10], Disjoint Paths [24].
-
4.
In the approximation algorithms literature, there are numerous studies about CSPs on structured instances, most notably dense and expanding instances (see [1] and references therein). It would be interesting to see whether these structures, if suitably parameterized, help the problems become more tractable in our model.
2 Our Results
2.1 Constraint Satisfaction Problems
In this section we recall basic definitions of constraint satisfaction problems.
For integer , a boolean relation is a subset of . The integer is called the arity of . For a boolean relation of arity and , define the boolean relation where is the addition operator over . When considering as a clause in a CSP instance, operator can be seen as variable negations. For a relation with index and define the projection relation , where means extracting the value on coordinates in .
A boolean relation of arity is symmetric if for all and any permutation , . Equivalently, is symmetric if there exists such that (where the addition is performed in ). We define to be such .
A boolean constraint language is a set of boolean relations. Two constraint languages are equivalent if they contain exactly the same set of relations. A clause over a boolean constraint language is a pair , where and is an -tuple of variables where is the arity of . We refer to as the scope of the clause . An assignment satisfies clause if , and violates the clause otherwise.
In this paper, we only consider a restricted set of boolean constraint languages, where the language includes all possible negation patterns for some symmetric predicate of arity and . We use the notation for such , where stands for “symmetric language with negation”. We further define to be .
For a boolean constraint language , a instance is a pair , where is the set of variables, and is the set of clauses over the boolean constraint language , all of which have scope inside . We say a variable is incident to a clause if belongs to the scope of .
For an assignment , define to be the set of clauses satisfies in . We further define , the number of unsatisfied clauses, to be the cost of the assignment. We define the size of an instance as and denote it by . We ignore the subscripts when the instance is clear in the context.
Now we give formal definitions for the problems we consider. We first define MinCSP(), and then define our central problem ImproveMaxCSP(). In this paper, our main goal is to characterize the parameterized complexity of ImproveMaxCSP() when for some and .
Problem: MinCSP()
Input: A CSP() instance , an integer .
Parameter: .
Output: An assignment with if it exists, otherwise report that such an assignment does not exist.
Problem: ImproveMaxCSP()
Input: A CSP() instance , an integer , and
Parameter:
Promise: There exists an assignment such that .
Output: A good assignment ,
where the word good simply means .
(We do not require the output to satisfy .)
From the definition, MinCSP() is a special case of ImproveMaxCSP() by setting to be the constraint set .
A boolean constraint language is trivial if or for some and nontrivial otherwise. When is trivial, MinCSP() and ImproveMaxCSP() can be solved by trivial algorithms. So in the following we only consider nontrivial boolean constraint languages.
2.2 Abbreviations for Special CSPs
For simplicity, we abbreviate boolean constraint languages mentioned in the paper. Here we introduce the following simple but useful claim in identifying equivalence between boolean constraint languages.
Claim 2.
and are equivalent boolean constraint languages.
Proof.
From , where is the element in that has value 1 in each coordinate, we have for any
We will use the following abbreviations in this paper.
-
.
-
.
-
(All Equal) = .
-
= .
We also use abbreviations for the corresponding MinCSP and ImproveMaxCSP problems. For example, ImproveMaxCSP( and ) corresponds to the problem ImproveMaxCSP.
2.3 Our Characterization
Having defined our framework, we first provide the formal version of Theorem 1:
Theorem 3 (Main Theorem (Formal)).
For any and , the problem ImproveMaxCSP is either FPT or W[1]-hard.
As is a special case of ImproveMaxCSP, the W[1]-hardness of the former implies that of the latter. The recent characterization of parameterized tractability of [13] implies the following theorem.
Theorem 4.
For nontrivial for some and that is not equivalent to or , ImproveMaxCSP is W[1]-hard.
It remains to study the remaining problems.
Remark 5.
We say that an algorithm solves ImproveMaxCSP, if for any instance that satisfies the promise, outputs a good assignment. However, the run time is measured on all possible instances. In other words, runs in time if it terminates and outputs some assignment in time no matter whether the input instance satisfies the promise. Clearly, only the run time on instances satisfying the promise is critical, as we can always set a run time limit to the algorithm to rule out instances that require too much time to indicate their violation of promise.
For ImproveMaxCSP, a color-coding combined with the LP rounding for Densest Subhypergraph yields the following result proved in Section 3.
Theorem 6.
There exists an algorithm that solves ImproveMaxCSP( and ) in time for all .
For , its tractability depends on . When , we use the celebrated unbreakability framework [10, 4, 5, 16] to design a parameterized algorithm in Section 4.
Theorem 7.
There exists an algorithm that solves ImproveMaxCSP(AE) in time .
However, for with , we show nontrivial reductions from Paired Minimum -Cut to show the following hardness.
Theorem 8.
ImproveMaxCSP is W[1]-hard for all .
Finally, for , we prove that even the first nontrivial case , which is equivalent to , is already W[1]-hard. Even though is in FPT, this result follows from the (slightly informal) fact that Vertex Cover and Independent Set are equivalent in our model.
Theorem 9.
ImproveMaxCSP is W[1]-hard for any .
The hardness proofs can be found in the full version. It is easy to see that the other theorems imply Theorem 3 in a straightforward way.
3 FPT Algorithm for AND
The main goal of this section is to prove Theorem 6. During the course of the algorithm, we create instances involving and constraints of different arities. Hence, we will show a slightly stronger result:
Theorem 10.
There is an algorithm that solves ImproveMaxCSP() in time for all .
Since , Theorem 10 immediately shows that for any , the problem is FPT.
3.1 Preliminaries
In this section we recall basic definitions about hypergraphs. A hypergraph is a generalization of graph where an edge can contain multiple vertices. For and , say is incident to and is incident to if contains . For a hypergraph and , we denote as the induced subhypergraph of in , and denote to be the edge set of the induced subhypergraph.
In the main algorithm in this section (provided in Theorem 14), we need to solve the following problem:
Problem: Maximum Induced Subhypergraph with Vertex Weights.
Input: A hypergraph and a weight function .
Output: A vertex subset that maximizes .
The problem is closely related to Densest Subgraph (See [15] for a survey) and has a polynomial-time algorithm based on similar algorithms for Densest Subgraph. One algorithm is to observe that is supermodular and run a submodular minimization algorithm.222We thank an anonymous reviewer for this observation. The below is an LP-based algorithm specific to our setting.
Lemma 11.
There exists a polynomial-time exact algorithm that solves Maximum Induced Subhypergraph with Vertex Weights.
Proof.
Consider the following LP:
Since we use to mimic the constraint that “one should select a vertex before selecting incident edges”, if the LP is integral (i.e. ) then the set of vertices with in the optimal solution of the LP corresponds to the correct output to the Maximum Induced Subhypergraph with Vertex Weights problem.
The algorithm solves the LP, providing optimal fractional solution , and rounds the solution to an integer solution in the following way: Arbitrarily select and set , where denotes the Iverson bracket and equals to if is true otherwise for some statement . The solution is clearly an integral solution to the LP.
Now we show that any such produces an integral solution that has the same value as that of , denoted as . Define to be the objective function value of the solution . Clearly we have . We further have
| (1) | ||||
So the set has zero measure. Further from the fact that is a step function of finite number of “steps” and each “step” has nonzero length, such set must be empty, and .
Our FPT algorithms in Section 3 and Section 4 will use the technique of color coding and its derandomization given below.
Theorem 12 ([20]).
Given a set of size and integers , one can in time construct a family of at most colorings such that the following holds: for any sets , , , , there exists a coloring with for all and for all .
3.2 Algorithm with Variable Solution
Given an instance , we say that is satisfiable if some assignment satisfies all clauses in . We will give an algorithm that runs in time and solves when the instance satisfies an additional promise that is satisfiable.
When this additional promise is satisfied, it is easy to find an assignment satisfying all the clauses of in polynomial time, so in the following we assume that the instance is equipped with such an assignment . In the full version, we show how to transform any instance into instances where this additional promise is true.
Equipped with this additional assignment, we then restructure the instance in the following way: Define and , and replace with , to keep to be maximal in accordance with . In other words, we reset to be the set of clauses satisfied by . If the instance satisfies the promise (that some good assignment is close to the ), the good assignment satisfies at most clauses, which implies that , and . If , we return an arbitrary assignment (to handle cases where the promise is not met).
Now we show that, there exists an good assignment close to whose Hamming distance to is small.
Lemma 13.
For a instance , there exists a good assignment with and .
Proof.
Choose a good with , and if there are multiple ones, choose the one with the smallest hamming distance to .
For any with , consider assignment that differs from only on . has smaller Hamming distance to than , so either is not good, or is good but does not satisfy the promise. Both cases require that some clause is satisfied in but violated in . Since all clauses are AND clauses and , such clause is violated in . Therefore, all variables contributing to the hamming distance are incident to some clauses in , and the statement follows from the fact that and that the arity of all relations in is no more than .
Now we use the (derandomized) color coding technique along with the algorithm of Lemma 11 for Maximum Induced Subhypergraph with Vertex Weights to solve our problem .
Theorem 14.
There is an algorithm solving ImproveMaxCSP() in time when the input instance satisfies an additional promise that is satisfiable.
Proof.
First use Theorem 12 with to obtain a family of at most colorings with binary labels for variables. The algorithm then produces an assignment for each coloring and reports the best among them. In the following we fix a particular coloring.
Let be the set of variables with label . Construct a binary relation on , where if or some clause is incident to both and . Since is reflexive and symmetric, its transitive closure is an equivalence relation. Denote as the quotient set of the equivalence relation which includes all equivalence classes of the transitive closure. The intuition is that, the algorithm will produce the answer from by flipping several variables with label 1, and variables in one equivalence class are considered a group and would be flipped or kept at the same time.
We then construct a hypergraph with weight function as follows:
-
For each equivalence class in , introduce a vertex in , whose weight equals to the number of clauses in incident to any variable in the equivalence class. Intuitively, the weight measures that how many clauses we will lose if we flip this equivalence class.
-
For each clause , if can be satisfied by flipping from , introduce a hyperedge incident to all equivalence classes containing incident vertices of . So the clause will be satisfied if we flip all equivalence classes incident to this hyperedge.
Finally, the algorithm uses the algorithm for Maximum Induced Subhypergraph with Vertex Weights proposed in Lemma 11 to find that maximizes , and returns the assignment produced by flipping in all variables belonging to equivalence classes in .
The algorithm runs in time since the whole process can be done in polynomial time except trying all colorings produced by Theorem 12. Now we show that the algorithm produces a good assignment for instances satisfying the promise that some good assignment is close to the . Since we finally choose the best assignment among all colorings, it is sufficient to show that there exists some coloring that produces a good assignment.
Fix any good assignment with and , where is an assighnment such that . According to Lemma 13 such exists. Define to be all variables incident to any clause in . Define and . Note that both .
According to Theorem 12, there exists a coloring assigning to and to . We consider the behavior of the algorithm when trying this coloring.
We first claim that, there exists a set of equivalence classes in whose union is exactly . This is equivalent to the statement that there is no and such that . Suppose and , then some is incident to both of them. Since is incident to which satisfies , is violated by , so . Then , which finishes the proof since it implies .
The previous statement shows that, there exists some , such that by flipping from all variables in equivalence classes corresponding to , one can produce . We further show the following two claims:
-
For any , suppose is produced by flipping from all variables in every equivalence class in , then . Notice that the latter is the objective of the Maximum Induced Subhypergraph with Vertex Weights problem. In other words, the cost of would not be underestimated. To see this, consider clauses in . Clauses satisfied in but unsatisfied in are those belonging to and incident to , counted exactly by . Clauses satisfied in but unsatisfied in are partially counted by , since it does not include satisfied clauses in violated by the assignment produced from flipping in . However, all hyperedges in correspond to clauses satisfied in but unsatisfied in .
-
, i.e. the cost of is correctly estimated by the Maximum Induced Subhypergraph with Vertex Weights objective. We only need to show that contains all clauses satisfied in but unsatisfied in . Since the coloring colors with and with , all clauses satisfied in but unsatisfied in have label-1 incident variables inside , so the clauses will introduce hyperedges in whose scope is inside , so they are all counted by .
The previous two claims imply that, is one of the optimal solutions to the Maximum Induced Subhypergraph with Vertex Weights problem for the constructed hypergraph 5, and any optimal solution of the Maximum Induced Subhypergraph with Vertex Weights problem corresponds to a good assignment to the CSP instance, which finishes the proof.
4 FPT Algorithms for
In this section we prove Theorem 7.
4.1 Preliminaries
We recall useful definitions about graphs. Let be a multigraph, where parallel edges and loops are allowed. For two disjoint vertex sets , we denote by the set of edges between and . When is a partition, then is the set of edges in the corresponding cut. For a vertex subset , we denote by the subgraph of induced by We write for the set of edges in For a set we denote by the multigraph For , we let be the open neighborhood of . We say two cuts and are -close if . When the graph is clear in the context, we define to be the size of the graph.
Notice that we can see clauses as edges connecting variables, assigning boolean values to variables as partitioning the variable set into two sets, and the equality and non-equality constraints correspond to uncut and cut constraints respectively. This motivates us to introduce the following graph problem. Given a graph , an edge type function and a partition of , define to be the set of edges satisfied by , where edges of type need to be separated, while edges of type should be inside some vertex set.
Problem: ImproveMaxCut-Uncut
Input: A connected multigraph , an integer , , and an edge type function .
Parameter:
Promise: There exists some that maximizes and satisfies
Output: Any partition of vertices that maximizes . (Notice that we do not require for the output.)
Clearly, if the given graph for ImproveMaxCut-Uncut is not connected, we can solve each connected component separately, so connectivity of does not lose any generality for the problem. The following claim is straightforward.
Claim 15.
and ImproveMaxCut-Uncut are equivalent.
In the following, we present the algorithm for ImproveMaxCut-Uncut.
4.2 From Edge Solution to Vertex Solution
We first apply a pre-processing algorithm to the given ImproveMaxCut-Uncut instance, intending to make it in accordance with some partition of the vertex set.
Lemma 16.
There exists an algorithm that given a ImproveMaxCut-Uncut instance, runs in time and finds a bipartition of the vertex set such that there exists a good partition which satisfies and .
Proof.
Fix any satisfying . We first find the largest subset that can be simutaneously satisfied by some bipartition using a -time algorithm for [7]: Since is one possible solution, this means that . Let be any bipartition satisfying . Consider : It contains all edges in and perhaps more. However, since the size cannot be larger than , there are at most edges in . Now we have
This completes the proof.
From Lemma 16, we can set to be such and triple to change the original ImproveMaxCut-Uncut instance to an equivalent ImproveMaxCut-Uncut instance, whose is given by some for a vertex partition .
4.3 Algorithms for Instances with Vertex Solution
In the rest of this section, we prove the following theorem:
Theorem 17.
There exists an algorithm that, given a ImproveMaxCut-Uncut instance where for some partition of , finds a partition that maximizes in time .
We first show how this theorem implies the main theorem.
Proof of Theorem 7.
According to Claim 15, we only need to find such algorithm for ImproveMaxCut-Uncut. For a ImproveMaxCut-Uncut instance, we first apply the algorithm stated in Lemma 16 to produce an instance equivalent to the input whose is given by some for a vertex partition. Then we apply the algorithm stated in Theorem 17 to solve the new instance. The runtime is .
Recall that we are given a vertex partition as the solution, while there exists a good partition with . Let and define similarly.
Our high-level approach follows the framework first introduced by Kawarabayashi and Thorup [10] for Minimum -cut and its refinement by Chitnis et al. [4]. Let us define the following terminal version of the problem. We will fix to be the parameter of the initial instance, which remains invariant throughout the recursive calls to the terminal version.
Problem: ImproveMaxCut-Uncut Terminal Version
Input: A connected multigraph , an integer , a , an edge type function , a set of terminals with (Notice that it is rather than ) and a marked edge set .
Parameter:
Promise:
-
for some partition ;
-
is a matching allowing parallel edges: Any two edges in are either completely disjoint or parallel copies of each other.
-
There exists a good cut with and .
Requirement: For each function and , output a cut satisfying all the following or output nothing:
-
1.
consistent with : iff for all ,
-
2.
consistent with : ,
-
3.
-close to : ,
For any which is a good cut that satisfies and for some , the output , where is consistent to , should additionally be a good cut (not necessarily equal to ).
Clearly, ImproveMaxCut-Uncut is a special case with after doing the pre-processing in Lemma 16. In the following we introduce the algorithm solving ImproveMaxCut-Uncut Terminal Version.
Let . Before introducing the algorithm, we require one additional definition.
Definition 18 (-cut).
Let be a multigraph and let be the set of marked edges which is a matching allowing parallel edges. A cut is called -balanced (more simply a -cut) if the following conditions are met.
-
.
-
Both and are connected (using both edges inside and outside ).
-
Both and contains at least non-marked edges (edges outside ).
Our algorithm follows a simple win-win strategy. If there is no -cut, a simple color-coding algorithm will solve the terminal problem. If there is a -cut, by recursively solving a smaller subproblem, one can reduce the number of unmarked edges. Combining this with the algorithm to compute a -cut, one can solve the terminal version in FPT time.
Now we present each of the three parts. We start by directly solving the case where there is no -cut, using the (derandomized) coloring coding technique.
Claim 19.
One can solve ImproveMaxCut-Uncut Terminal Version in time when there is no -cut in the instance.
Proof.
Given an ImproveMaxCut-Uncut Terminal Version instance , the algorithm considers every and and does the following. Assume that and is consistent with some good cut , because apart from running time, the requirement only concerns for the correct and .
Note that the set of edges forms a cut between and , no matter how assigns type to edges. Since is connected and , has at most connected components.
Assume towards a contradiction that there are two connected components of such that and and both and have at least non-marked edges. Then the minimum cut separating and in will cut at most edges where the two resulting parts are connected and contain and respectively, which contradicts the fact that there is no -cut. 333We use the fact that any minimum -cut in a connected graph have both sides connected.
Therefore, at least one of and (say ) has the property that every connected component of contained in has at most non-marked edges. Since marked edges form a matching, the number of vertices in such a component can be at most , so we have .
Let be the connected components of . Define
and . Notice that and . Guessing the correct values of and takes at most time.
Let be the open neighbor of in . Note that . Use Theorem 12 with to have a family of at most colorings that color each vertex using . There exists a coloring that colors with and colors with . For each , find all candidates that is identical to with respect to the guessed information about . Formally, is a connected component of after deleting all vertices of color , and in line with the guessing and .
For the correct coloring , such exists since satisfies the condition. Also, finding all such candidates is easy in polynomial time since one only needs to scan connected components after deleting color- vertices.
For any that are disjoint, since and are disjoint for any , the set of edges newly cut/uncut by updating and are disjoint for all . Therefore, letting and letting and the resulting partition has and , so the solution is good and close to .
We finally need the solution to be consistent with both and . For any vertex , if has color , then if and only if (recall ), otherwise by including in , one can change the belonging of . So the consistency of requires certain components to be included into or excluded from . For , if and has the same color then if and only if which is always satisfied, otherwise if and only if the label-1 vertex is not in , so consistency of requires certain components to be excluded from .
The consistency constraints are all in the form of “removing a component from the candidates” or “impose certain components to be selected by ”, which is easy to find out and handle in polynomial time.
We finally calculate the running time of the algorithm. The algorithm first tries all possible in time, tries all colorings in time, and finally guesses the correct values of and in time. All other processes are in polynomial time. So the total running time is
Next we show how to compute a -cut if it exists.
Claim 20.
There exists an algorithm that runs in time and returns a -balanced cut for a connected graph if it exists.
Proof.
Suppose that is a -cut and . We first show that there exists that induces a connected subgraph and has at most edges but at least non-marked edges. Consider a procedure where we start from for an arbitrary vertex , and iteratively add one arbitrary vertex to until contains at least non-marked edges. Since is connected and increased by at least one while marked edges form a matching, . Then we choose that contains at least non-marked edges while is connected and . Define and similarly.
Use Theorem 12 with and to try at most colorings of edges with colors. One coloring colors with and with . After deleting all edges of color , there are two connected components and such that and . Note that because and are separated by removing edges of color .
Then, trying every pair of connected components after deleting -colored edges and computing the minimum cut separating and in the original graph will yield a cut of size at most where each side is connected has at least non-marked edges. We use the fact that in a connected graph, any minimum - cut has both of its sides connected.
Finally, we prove that the existence of a -cut, combined with a recursion, allows us to make progress by reducing the number of unmarked edges. Let be the running time of our algorithm to solve the terminal version with unmarked edges.
Claim 21.
Suppose there exists a -cut, in time , one can reduce the current instance to another ImproveMaxCut-Uncut Terminal Version instance with at least fewer unmarked edges for some .
Proof.
Let be a -cut. Without loss of generality, suppose that has at most terminals from , and let be the set of vertices that have an edge to . Letting be the new set of terminals for , we know that . Let be the number of unmarked edges in and be the total number of unmarked edges.
Recursively solve the terminal version with input . For each and , it returns a partition of that is (1) consistent with , (2) consistent with , and (3) -close to (or nothing).
Let be the correct guessing with respect to the good partition and be the correct closeness parameter in . We update with and . Note that the new is still a good cut since is good within and the interaction between and only depends on the terminals , where the previous and new solutions agree. By the guarantee (2) and (3) in the above paragraph, the new is still -close to and consistent with .
Since has at least non-marked edges and there are at most possible values for and , we have . These edges do not belong to for sure. For each such edge , perform the following operation.
-
If , which means that is not cut in the current solution, this means that is not cut in the good solution too. Contract it.
-
If , mark it. To ensure that the set of marked edges is a matching, if are both in with , then we know that will be in the same side in the good solution, so we can contract them.
By doing this, the number of unmarked edges is decreased by at least .
With the three main claims, we finish the proof of Theorem 17.
Proof of Theorem 17.
From the definition of the terminal version, given graph and the current solution , running the terminal version with and we can find a good cut given the promise for some (possibly different) good cut .
Let us analyze the running time. As defined previously, let be the running time of our algorithm with unmarked edges. Since the graph is connected and marked edges form a matching, we have . Our algorithm first uses Claim 20 to find a -cut in time . If there is none, it uses Claim 19 to solve the terminal version in time . Otherwise, it uses Claim 21 to reduce the number of unmarked edges by in time , for some . Therefore, we have the following recurrence relation:
Using , satisfies the above.
References
- [1] Aditya Anand, Euiwoong Lee, and Amatya Sharma. Min-CSPs on complete instances. In Proceedings of the 2025 ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 2025.
- [2] Edouard Bonnet, László Egri, and Dániel Marx. Fixed-parameter approximability of boolean mincsps. In 24th European Symposium on Algorithms (ESA 2016), page 246, 2016.
- [3] Nicolas Bousquet, Jean Daligault, and Stéphan Thomassé. Multicut is fpt. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 459–468, 2011. doi:10.1145/1993636.1993698.
- [4] Rajesh Chitnis, Marek Cygan, MohammadTaghi Hajiaghayi, Marcin Pilipczuk, and Michał Pilipczuk. Designing fpt algorithms for cut problems using randomized contractions. SIAM Journal on Computing, 45(4):1171–1229, 2016. doi:10.1137/15M1032077.
- [5] Marek Cygan, Daniel Lokshtanov, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Minimum bisection is fixed parameter tractable. In Proceedings of the forty-sixth annual ACM symposium on Theory of computing, pages 323–332, 2014. doi:10.1145/2591796.2591852.
- [6] Marek Cygan, Marcin Pilipczuk, Michał Pilipczuk, and Jakub Onufry Wojtaszczyk. On multiway cut parameterized above lower bounds. ACM Transactions on Computation Theory (TOCT), 5(1):1–11, 2013. doi:10.1145/2462896.2462899.
- [7] Konrad K Dabrowski, Peter Jonsson, Sebastian Ordyniak, George Osipov, and Magnus Wahlström. Almost consistent systems of linear equations. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3179–3217. SIAM, 2023. doi:10.1137/1.9781611977554.CH121.
- [8] Michael R. Fellows, Fedor V. Fomin, Daniel Lokshtanov, Frances Rosamond, Saket Saurabh, and Yngve Villanger. Local search: Is brute-force avoidable? Journal of Computer and System Sciences, 78(3):707–719, 2012. In Commemoration of Amir Pnueli. doi:10.1016/j.jcss.2011.10.003.
- [9] Serge Gaspers, Eun Jung Kim, Sebastian Ordyniak, Saket Saurabh, and Stefan Szeider. Don’t be strict in local search! In Proceedings of the AAAI Conference on Artificial Intelligence, volume 26, pages 486–492, 2012. doi:10.1609/AAAI.V26I1.8128.
- [10] Ken-ichi Kawarabayashi and Mikkel Thorup. The minimum k-way cut of bounded size is fixed-parameter tractable. In 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science, pages 160–169. IEEE, 2011. doi:10.1109/FOCS.2011.53.
- [11] Eun Jung Kim, Stefan Kratsch, Marcin Pilipczuk, and Magnus Wahlström. Solving hard cut problems via flow-augmentation. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 149–168. SIAM, 2021. doi:10.1137/1.9781611976465.11.
- [12] Eun Jung Kim, Stefan Kratsch, Marcin Pilipczuk, and Magnus Wahlström. Directed flow-augmentation. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 938–947, 2022. doi:10.1145/3519935.3520018.
- [13] Eun Jung Kim, Stefan Kratsch, Marcin Pilipczuk, and Magnus Wahlström. Flow-augmentation iii: Complexity dichotomy for boolean csps parameterized by the number of unsatisfied constraints. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3218–3228. SIAM, 2023. doi:10.1137/1.9781611977554.CH122.
- [14] Andrei Krokhin and Dániel Marx. On the hardness of losing weight. ACM Transactions on Algorithms (TALG), 8(2):1–18, 2012. doi:10.1145/2151171.2151182.
- [15] Tommaso Lanciano, Atsushi Miyauchi, Adriano Fazzone, and Francesco Bonchi. A survey on the densest subgraph problem and its variants. ACM Computing Surveys, 56(8):1–40, 2024. doi:10.1145/3653298.
- [16] Daniel Lokshtanov, Saket Saurabh, and Vaishali Surianarayanan. A parameterized approximation scheme for min k-cut. SIAM Journal on Computing, (0):FOCS20–205, 2022.
- [17] Dániel Marx. Parameterized complexity of constraint satisfaction problems. computational complexity, 14:153–183, 2005. doi:10.1007/S00037-005-0195-9.
- [18] Dániel Marx and Igor Razgon. Fixed-parameter tractability of multicut parameterized by the size of the cutset. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pages 469–478, 2011. doi:10.1145/1993636.1993699.
- [19] Dániel Marx and Ildikó Schlotter. Stable assignment with couples: Parameterized complexity and local search. Discrete Optimization, 8(1):25–40, 2011. Parameterized Complexity of Discrete Optimization. doi:10.1016/j.disopt.2010.07.004.
- [20] Moni Naor, Leonard J Schulman, and Aravind Srinivasan. Splitters and near-optimal derandomization. In Proceedings of IEEE 36th Annual Foundations of Computer Science, pages 182–191. IEEE, 1995. doi:10.1109/SFCS.1995.492475.
- [21] NS Narayanaswamy, Venkatesh Raman, MS Ramanujan, and Saket Saurabh. Lp can be a cure for parameterized problems. In 29th International Symposium on Theoretical Aspects of Computer Science (STACS 2012). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2012. doi:10.4230/LIPIcs.STACS.2012.338.
- [22] Venkatesh Raman, MS Ramanujan, and Saket Saurabh. Paths, flowers and vertex cover. In Algorithms–ESA 2011: 19th Annual European Symposium, Saarbrücken, Germany, September 5-9, 2011. Proceedings 19, pages 382–393. Springer, 2011.
- [23] Igor Razgon and Barry O’Sullivan. Almost 2-sat is fixed-parameter tractable. In Automata, Languages and Programming: 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, July 7-11, 2008, Proceedings, Part I 35, pages 551–562. Springer, 2008.
- [24] Neil Robertson and Paul D Seymour. Graph minors. xiii. the disjoint paths problem. Journal of combinatorial theory, Series B, 63(1):65–110, 1995. doi:10.1006/JCTB.1995.1006.
- [25] Stefan Szeider. The parameterized complexity of k-flip local search for sat and max sat. Discrete Optimization, 8(1):139–145, 2011. doi:10.1016/J.DISOPT.2010.07.003.
