Parameterized Algorithms for Graph Partitioning Problems
Abstract
We study a broad class of graph partitioning problems, where each problem is specified by a graph , and parameters and . We seek a subset of size , such that is at most (or at least) , where are constants defining the problem, and are the cardinalities of the edge sets having both endpoints, and exactly one endpoint, in , respectively. This class of fixed cardinality graph partitioning problems (FGPP) encompasses Max Cut, Min Vertex Cover, Densest Subgraph, and Sparsest Subgraph.
Our main result is an algorithm for any problem in this class, where is the maximum degree in the input graph. This resolves an open question posed by Bonnet et al. [IPEC 2013]. We obtain faster algorithms for certain subclasses of FGPPs, parameterized by , or by . In particular, we give an time algorithm for Max Cut, thus improving significantly the best known time algorithm.
1 Introduction
Graph partitioning problems arise in many areas including VLSI design, data mining, parallel computing, and sparse matrix factorizations (see, e.g., [1, 12, 7]). We study a broad class of graph partitioning problems, where each problem is specified by a graph , and parameters and . We seek a subset of size , such that is at most (or at least) , where are constants defining the problem, and are the cardinalities of the edge sets having both endpoints, and exactly one endpoint, in , respectively. This class encompasses such fundamental problems as Max and Min Cut, Max and Min Vertex Cover, Densest Subgraph, and Sparsest Subgraph. For example, Max Cut is a maxFGPP (i.e., maximization FGPP) satisfying and , Min Cut is a minFGPP (i.e., minimization FGPP) satisfying and , and Min Vertex Cover is a minFGPP satisfying .
A parameterized algorithm with parameter has running time for some function , where hides factors polynomial in the input size. In this paper, we develop a parameterized algorithm with parameter for the class of all FGPPs, where is the maximum degree in the graph . For certain subclasses of FGPPs, we develop algorithms parameterized by , or by .
Related Work: Parameterized by , Max and Min Cut, and Max and Min Vertex Cover are W[1]hard [8, 4, 11]. Moreover, Clique and Independent Set, two wellknown W[1]hard problems [9], are special cases of Densest Subgraph where , and Sparsest Subgraph where , respectively. Therefore, parameterized by , Densest Subgraph and Sparsest Subgraph are W[1]hard. Cai et al. [5] and Bonnet et al. [2] studied the parameterized complexity of FGPPs with respect to . Cai et al. [5] gave time algorithms for Densest Subgraph and Sparsest Subgraph. Recently, Bonnet et al. [2] presented an time algorithm for degrading FGPPs. This subclass includes maxFGPPs in which , and minFGPPs in which .^{1}^{1}1A maxFGPP (minFGPP) is nondegrading if (). They also proposed an time algorithm for all FGPPs, and posed as an open question the existence of constants and such that any FGPP can be solved in time . In this paper we answer this question affirmatively, by developing an time algorithm for any FGPP.
Parameterized by , Max and Min Vertex Cover can be solved in times and , respectively, and in randomized times and , respectively [14]. Moreover, Max Cut can be solved in time [2], and Min Cut can be solved in time [6]. Parameterized by , Min Cut can be solved in time [2].
We note that the parameterized complexity of FGPPs has also been studied with respect to other parameters, such as the treewidth and the vertex cover number of (see, e.g., [13, 3, 2]).
Contribution: Our main result is an time algorithm for the class of all FGPPs, answering affirmatively the question posed by Bonnet et al. [2] (see Section 2). In Section 3, we develop an time algorithm for Max Cut, that significantly improves the running time obtained in [2]. We also obtain (in Section 4) an time algorithm for the subclass of positive minFGPPs, in which and . Finally, we develop (in Section 5) a faster algorithm for nondegarding positive minFGPPs (i.e., minFGPPs satisfying ). In particular, we thus solve Min Vertex Cover in time , improving the previous randomized time algorithm.
Techniques: We obtain our main result by establishing an interesting reduction from nondegrading FGPPs to the Weighted Exact Cover (WEC) problem (see Section 2). Building on this reduction, combined with an algorithm for degrading FGPPs given in [2], and an algorithm for WEC given in [18], we develop an algorithm for any FGPP. To improve the running time of our algorithm, we use a fast construction of representative families [10, 17].
In designing algorithms for FGPPs, parameterized by or , we use as a key tool randomized separation [5] (see Sections 3–5). Roughly speaking, randomized separation finds a ‘good’ partition of the nodes in the input graph via randomized coloring of the nodes in red or blue. If a solution exists, then, with some positive probability, there is a set of only red nodes that is a solution, such that all the neighbors of nodes in that are outside are blue. Our algorithm for Max Cut makes nonstandard use of randomized separation, in requiring that only some of the neighbors outside of nodes in are blue. This yields the desired improvement in the running time of our algorithm.
Our algorithm for nondegrading positive FGPPs is based on a somewhat different application of randomized separation, in which we randomly color edges rather than the nodes. If a solution exists, then, with some positive probability, there is a nodeset that is a solution, such that some edges between nodes in are red, and all edges between nodes in and nodes outside are blue. In particular, we require that the subgraph induced by , and the subgraph induced by from which we delete all blue edges, contain the same connected components. We derandomize our algorithms using universal sets [16].
Notation: Given a graph and a subset , let denote the set of edges in having both endpoints in , and let denote the set of edges in having exactly one endpoint in . Moreover, given a subset , let .
2 Solving FGPPs in Time
In this section we develop an time algorithm for the class of all FGPPs. We use the following steps. In Section 2.1 we show that any nondegrading FGPP can be reduced to the Weighted Exact Cover (WEC) problem, where . Applying this reduction, we then show (in Section 2.2) how to decrease the size of instances of WEC, by using representative families. Finally, we show (in Section 2.3) how to solve any FGPP by using the results in Sections 2.1 and 2.2, an algorithm for WEC, and an algorithm for degrading FGPPs given in [2].
2.1 From NonDegrading FGPPs to Wec
We show below that any nondegrading maxFGPP can be reduced to the maximization version of WEC. Given a universe , a family of nonempty subsets of , a function , and parameters and , we seek a subfamily of disjoint sets from satisfying whose value, given by , is at least . Any nondegrading minFGPP can be similarly reduced to the minimization version of WEC.
Let be a maxFGPP satisfying . Given an instance of , we define an instance of the maximization version of WEC as follows.

.

, where contains the nodeset of any connected subgraph of on exactly nodes.

.

, and .
We illustrate the reduction in Figure 1 (see Appendix A). We first prove that our reduction is valid.
Lemma 1
is a yesinstance iff is a yesinstance.
Proof
First, assume there is a subset of size satisfying . Let , for some , be the maximal connected components in the subgraph of induced by . Then, for all , . Moreover, , and .
Now, assume there is a subfamily of disjoint sets , for some , such that and . Thus, there are connected subgraphs of , such that , for all . Let , for all . Clearly, . Since , we get that
Thus, .∎
We now bound the number of connected subgraphs in .
Lemma 2 ([15])
There are at most connected subgraphs of on at most nodes, which can be enumerated in time .
Thus, we have the next result.
Lemma 3
The instance can be constructed in time . Moreover, for any , .
2.2 Decreasing the Size of Inputs for Wec
In this section we develop a procedure, called Decrease, which decreases the size of an instance of WEC. To this end, we find a subfamily that contains ”enough” sets from , and thus enables to replace by without turning a yesinstance to a noinstance. The following definition captures such a subfamily .
Definition 1
Given a universe , nonnegative integers and , a family of subsets of size of , and a function , we say that a subfamily max (min) represents if for any pair of sets , and such that , there is a set disjoint from such that ().
The following result states that small representative families can be computed efficiently.^{2}^{2}2This result builds on a powerful construction technique for representative families presented in [10].
Theorem 2.1 ([17])
Given a constant , a universe , nonnegative integers and , a family of subsets of size of , and a function , a subfamily of size at most that max (min) represents can be computed in time .
We next consider the maximization version of WEC and max representative families. The minimization version of WEC can be similarly handled by using min representative families. Let RepAlg denote the algorithm in Theorem 2.1 where , and let , for all .
We now present procedure Decrease (see the pseudocode below), which replaces each family by a family that represents . First, we state that procedure Decrease is correct (the proof is given in Appendix C).
Lemma 4
is a yesinstance iff is a yesinstance.
Theorem 2.1 immediately implies the following result.
Lemma 5
Procedure Decrease runs in time
. Moreover, .
2.3 An Algorithm for Any FGPP
We now present FGPPAlg, which solves any FGPP in time . Assume w.l.o.g that , and let DegAlg() denote the algorithm solving any degrading FGPP in time , given in [2].
The algorithm given in Section 5 of [18] solves a problem closely related to WEC, and can be
easily modified to solve WEC in time
.
We call this algorithm WECAlg().
Let be an FGPP having parameters and . We now describe algorithm FGPPAlg (see the pseudocode below). First, if is a degrading FGPP, then FGPPAlg solves by calling DegAlg. Otherwise, by using the reduction , FGPPAlg transforms the input into an instance of WEC. Then, FGPPAlg decreases the size of the resulting instance by calling the procedure Decrease. Finally, FGPPAlg solves by calling WECAlg.
Theorem 2.2
Algorithm FGPPAlg solves in time .
3 Solving Max Cut in Time
We give below an time algorithm for Max Cut. In Section 3.1 we show that it suffices to consider an easier variant of Max Cut, that we call NCMax Cut. We solve this variant in Section 3.2. Finally, our algorithm for Max Cut is given in Section 3.3.
3.1 Simplifying Max Cut
We first define an easier variant of Max Cut. Given a graph in which each node is either red or blue, and positive integers and , NCMax Cut asks if there is a subset of exactly red nodes and no blue nodes, such that at least edges in have a blue endpoint.
Given an instance of Max Cut, we perform several iterations of coloring the nodes in ; thus, if is a yesinstance, we generate at least one yesinstance of NCMax Cut. To determine how to color the nodes in , we need the following definition of universal sets.
Definition 2
Let be a set of functions . We say that is an universal set if for every subset of size and a function , there is a function such that for all , .
The following result asserts that small universal sets can be computed efficiently.
Lemma 6 ([16])
There is an algorithm, UniSetAlg, that given a pair of integers , computes an universal set of size in time .
We now present ColorNodes (see the pseudocode below), a procedure that given an input (), where () is an instance of Max Cut and , returns a set of instances of NCMax Cut. Procedure ColorNodes first constructs a universal set . For each , ColorNodes generates a colored copy of . Then, ColorNodes returns a set , including the resulting instances of NCMax Cut.
The next lemma states the correctness of procedure ColorNodes.
Lemma 7
An instance of Max Cut is a yesinstance iff ColorNodes() returns a set containing at least one yesinstance of NCMax Cut.
Proof
If is a noinstance of Max Cut, then clearly, for any coloring of the nodes in , we get a noinstance of NCMax Cut. Next suppose that is a yesinstance, and let be a set of nodes in such that . Note that there is a set of at most nodes in such that . Let and denote the indices of the nodes in and , respectively. Since is a universal set, there is such that: (1) for all , , and (2) for all , . Thus, in , the copies of the nodes in are red, and the copies of the nodes in are blue. We get that is a yesinstance of NCMax Cut.∎
Furthermore, Lemma 6 immediately implies the following result.
Lemma 8
Procedure ColorNodes runs in time , and returns a set of size .
3.2 A Procedure for NCMax Cut
We now present SolveNCMaxCut, a procedure for solving NCMax Cut
(see the pseudocode below). Procedure SolveNCMaxCut orders the red nodes in according to the number of their blue neighbors in a nonincreasing manner. If there are at least red nodes, and the number of edges between the first red nodes and blue nodes is at least , procedure SolveNCMaxCut accepts; otherwise, procedure SolveNCMaxCut rejects.
Clearly, the following result concerning SolveNCMaxCut is correct.
Lemma 9
Procedure SolveNCMaxCut solves NCMax Cut in time .
3.3 An Algorithm for Max Cut
Assume w.l.o.g that has no isolated nodes. Our algorithm, MaxCutAlg, for Max Cut, proceeds as follows. First, if , then MaxCutAlg accepts, and if , then MaxCutAlg calls itself with instead of . Then, MaxCutAlg calls ColorNodes to compute a set of instances of NCMax Cut, and accepts iff SolveNCMaxCut accepts at least one of them.
The next lemma implies the correctness of Step 1 in MaxCutAlg.
Lemma 10 ([2])
In a graph having no isolated nodes, there is a subset of size such that .
Our main result is the following.
Theorem 3.1
Algorithm MaxCutAlg solves Max Cut in time
.
4 Solving Positive MinFGPPs in Time
Let be a minFGPP satisfying and . In this section we develop an time algorithm for . Using randomized separation, we show in Section 4.1 that we can focus on an easier version of . We solve this version in Section 4.2, using dynamic programming. Then, Section 4.3 gives our algorithm.
4.1 Simplifying the Positive MinFGPP
We first define an easier variant of . Given a graph in which each node is either red or blue, and parameters and , NC asks if there is a subset of exactly red nodes and no blue nodes, whose neighborhood outside includes only blue nodes, such that val.
The simplification process is similar to that performed in Section 3.1. However, we now use the randomized separation procedure ColorNodes, defined in Section 3.1, with instances of , and consider the set returned by ColorNodes as a set of instances of NC. We next prove that ColorNodes is correct.
Lemma 11
An instance of is a yesinstance iff ColorNodes() returns a set containing at least one yesinstance of NC.
Proof
If is a noinstance of , then clearly, for any coloring of the nodes in , we get a noinstance of NC. Next suppose that is a yesinstance, and let be a set of nodes in such that val. Let denote the neighborhood of outside . Note that . Let and denote the indices of the nodes in and , respectively. Since is a universal set, there is such that: (1) for all , , and (2) for all , . Thus, in , the copies of the nodes in are red, and the copies of the nodes in are blue. We get that is a yesinstance of NC.∎
4.2 A Procedure for Nc
We now present SolveNCP, a dynamic programmingbased procedure for solving NC (see the pseudocode below). Procedure SolveNCP first computes the nodesets of the maximal connected red components in . Then, procedure SolveNCP generates a matrix M, where each entry holds the minimum value val of a subset in , the family containing every set of exactly nodes in obtained by choosing a union of sets in , i.e., . Procedure SolveNCP computes M by using dynamic programming, assuming an access to a nonexisting entry returns , and accepts iff M.
The following lemma states the correctness and running time of SolveNCP.
Lemma 12
Procedure SolveNCP solves NC in time .
Proof
For all and , denote val. Using a simple induction on the computation of M, we get that M. Since is a yesinstance of NC iff val, we have that SolveNCP is correct. Step 1, and the computation of val for all , are performed in time . Since M is computed in time , we have that SolveNCP runs in time .∎
4.3 An Algorithm for
We now conclude PAlg, our algorithm for (see the pseudocode below). Algorithm PAlg calls ColorNodes to compute several instances of NC, and accepts iff SolveNCP accepts at least one of them.
Theorem 4.1
Algorithm PAlg solves in time .
5 Solving a Subclass of Positive MinLGPPs Faster
Let be a minFGPP satisfying . Denote . In this section we develop an time algorithm for , that is faster than the algorithm in Section 4. Applying a divideandconquer step to the edges in the input graph , Section 5.1 shows that we can focus on an easier version of . This version is solved in Section 5.2 by using dynamic programming. We give the algorithm in Section 5.3.
5.1 Simplifying the NonDegrading Positive MinFGPP
We first define an easier variant of . Suppose we are given a graph in which each edge is either red or blue, and parameters and . For any subset , let C denote the family containing the nodesets of the maximal connected components in the graph , where is the set of red edges in having both endpoints in . Also, let val. The variant EC asks if there is a subset of exactly nodes, such that all the edges in are blue, and val.
We now present a procedure, called ColorEdges (see the pseudocode below), whose input is an instance () of . Procedure ColorEdges uses a universal set to perform several iterations coloring the edges in , and then returns the resulting set of instances of EC.
The following lemma states the correctness of ColorEdges.
Lemma 13
An instance of is a yesinstance iff ColorEdges() returns a set containing at least one yesinstance of EC.
Proof
Since , val for any set and coloring of edges in . Thus, if is a noinstance of , then clearly, for any coloring of edges in , we get a noinstance of EC. Next suppose that is a yesinstance, and let be a set of nodes in such that val. Let , and . Also, choose a minimumsize subset such that the graphs and contain the same set of maximal connected components. Let and denote the indices of the edges in and , respectively. Note that . Since is an universal set, there is such that: (1) for all , , and (2) for all , . Thus, in , the copies of the edges in