On the parameterized complexity of 2-partitions

03/16/2020
by   Jonas Bamse Andersen, et al.
SDU
0

We give an FPT algorithm for deciding whether the vertex set a digraph D can be partitioned into two disjoint sets V_1,V_2 such that the digraph D[V_1] induced by V_1 has a vertex that can reach all other vertices by directed paths, the digraph D[V_2] has no vertex of in-degree zero and |V_i|≥ k_i, where k_1,k_2 are part of the input. This settles an open problem from[1,4].

READ FULL TEXT VIEW PDF

Authors

page 1

page 2

page 3

page 4

01/08/2019

Faster parameterized algorithm for pumpkin vertex deletion set

A directed graph G is called a pumpkin if G is a union of induced paths ...
10/10/2018

Algorithm for B-partitions, parameterized complexity of the matrix determinant and permanent

Every square matrix A=(a_uv)∈C^n× n can be represented as a digraph havi...
09/30/2019

A relaxation of the Directed Disjoint Paths problem: a global congestion metric helps

In the Directed Disjoint Paths problem, we are given a digraph D and a s...
11/23/2018

What is known about Vertex Cover Kernelization?

We are pleased to dedicate this survey on kernelization of the Vertex Co...
08/04/2020

Tree Inference: Response Time in a Binary Multinomial Processing Tree, Representation and Uniqueness of Parameters

A Multinomial Processing Tree (MPT) is a directed tree with a probabilit...
01/29/2021

r-indexing Wheeler graphs

Let G be a Wheeler graph and r be the number of runs in a Burrows-Wheele...
03/28/2019

Arc-disjoint Strong Spanning Subdigraphs of Semicomplete Compositions

A strong arc decomposition of a digraph D=(V,A) is a decomposition of it...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

A 2-partition of a digraph is a partition of into disjoint sets. Let be two (di)graph properties. Then a -partition of a digraph is a 2-partition so that has property for , where is the subdigraph induced by . A --partition of a digraph is as above, but now we also require that for . For example if is the property of being acyclic, then the set of digraphs that allow a -partition are exactly those digraphs that have dichromatic number at most 2. Recognizing such digraphs is NP-complete [6].

Problems concerning the existence of certain 2-partitions of a given input digraph has received a lot of attention in the literature, see e.g. [1, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14]. In the papers [1, 3] the authors gave, for fixed (not part of the input), a complete complexity classification, in terms of being NP-complete or in XP, for the 120 -partition problems corresponding to properties both being one of the following 15 properties: being strongly connected, being connected, minimum out-degree at least 1, minimum in-degree at least 1, minimum in- and out-degree at least 1, minimum degree at least 1, having an out-branching, having an in-branching, being acyclic, being complete, being oriented, being independent, being semicomplete, being a tournament and finally being symmetric. They left open to characterize which of those problems that are polynomial actually admit an FPT algorithm. In [4] this was settled for the 23 polynomially solvable problems coming from both and being one of the following 8 properties: strongly connected, connected, having an out-branching, having an in-branching, having minimum degree at least 1, having minimum in- and out-degree at least 1, being acyclic, being complete. One problem that was left open in [4] was to determine the parameterized complexity of deciding the existence of a 2-partition with for where the digraph induced by has an out-branching and the digraph has no vertex of in-degree zero. We prove in this paper that this problem is FPT.

2 Notation and preliminaries

The notation we use is consistent with that of [2]. For a digraph we say that two vertices and are adjacent if at least one of the arcs is in . For a set of vertices , the subdigraph induced by , denoted , is the digraph obtained from by deleting all vertices and all arcs adjacent to those vertices. For digraph we denote by the number of vertices in the graph. We use the same notation for paths and cycles, so is the number of vertices in the path . Paths and cycles will always be directed. The girth of a digraph is the length of a shortest directed cycle in . A -path is a directed path from to and the digraph is strongly connected if it contains a

-path for all ordered pairs of vertices

. A strong component of a digraph is a maximal induced subdigraph which is strong. A strong component is initial if it has no entering arc in .

The underlying graph, , of a digraph is the graph obtained from by replacing every 2-cycle by one edge and then suppressing all the directions of the other arcs. A digraph is connected if is connected. For a vertex , we denote by its neighbours, that is, the set of vertices that are adjacent to . The out-degree is the number of arcs going out of in . Similarly, the in-degree is the number of arcs going into . We denote by the minimum in-degree of a vertex in . For a subset , denotes the set of out-neighbours of in .

An out-tree rooted in is a connected digraph such that and for all . An out-branching, , of a digraph is an out-tree such that .

A digraph is acyclic if it contains no induced directed cycles, and it is complete if for every pair of vertices induce a 2-cycle .

A parameterized problem with parameter is in the complexity class XP if instances of size can be solved in time for some pair of computable functions . So if is fixed the problem can be solved in polynomial time. A problem is Fixed Parameter Tractable (FPT) if it can be solved in time for some constant and computable function .

3 The --partition problem

The following is the problem whose complexity status we settle in this paper.

--partition Input: A digraph and natural numbers Question: Is there a 2-partition of such that has an out-branching and , where for ?

In [1] the problem was shown to be polynomially solvable for every fixed pair of natural numbers , but the algorithm has a running time and hence is not an FPT algorithm.

We begin with a few simple observations. The root of the out-branching is the only vertex that can possibly have in-degree 0 in a yes-instance. Therefore, if there are two or more vertices with in-degree 0 in , it must be a no-instance. So in the following we assume the input is a digraph with at most one vertex with in-degree 0. For future reference, if there is such a vertex with in-degree 0 in the input , we will refer to it as , and in that case must be the root of the out-branching.

Throughout the solution to the --partition problem, we will say that we grow some subset of the vertices inside the graph. What we mean by grow is iteratively adding a vertex to the set that is an out-neighbour of a vertex in the set. Sometimes we want to limit this process to only growing the set to a certain size. We formalize the process in Algorithm 1.

procedure grow()
     while  and  do
          any vertex in
         
     end while
     return
end procedure
Algorithm 1

Note that if we don’t want to limit the growth we can set .

Lemma 1.

Algorithm 1 runs in polynomial time.

Proof.

Calculating the set of out-neighbours of a set can be done in polynomial time. A vertex is added to in each iteration of the while loop, so if none of the exit conditions are met before the st iteration, then after that iteration every vertex in the graph has been added to and thus its neighbourhood must be empty. So the algorithm runs in polynomial time. ∎

If , then we can solve the --partition problem in polynomial time. If we can try all possible roots of the out-branching (there is only one possible root if exists), and grow it as large as possible by using Algorithm 1, with containing the single vertex that we are trying as root and . As we start with a single vertex and each vertex that is added has at least one arc into it from the previous set, it follows by induction that the subdigraph induced by the set returned by Algorithm 1 will contain an out-branching . If one of the possible roots grows to a set with , then because none of the vertices in has arcs to vertices in , it follows from our assumption that every vertex of (except possibly ) has in-degree at least 1, that we have . Thus, is a solution.

For the case , we will use the following algorithm which will prove useful later as well.

procedure trim()
      copy of
     
     
     while  do
         
         
         
     end while
     return
end procedure
Algorithm 2

Algorithm 2 simply iteratively removes vertices with in-degree 0 in the current digraph and return the resulting digraph. Note that the resulting digraph will have .

Lemma 2.

Algorithm 2 finds the largest possible subdigraph with in polynomial time.

Proof.

It is clear that the algorithm runs in polynomial time and the other part of the claim follows from the fact that a vertex is only removed if it cannot be part of any subdigraph of minimum in-degree at least 1. ∎

To handle the case we simply apply Algorithm 2 to the input . Note that the removed vertices (if any) induce a subdigraph with an out-branching rooted at , because a vertex only has in-degree 0 if it is or if its in-neighbours were removed, implying that an arc into it existed in . Hence if the output of has then is a solution.

From now on we assume that . Let us call a 2-partition of good if has an out-branching and . As we have assumed that we have at most one vertex with in-degree 0, the following lemma, which is the basis of the polynomial algorithm of Theorem 3.9 in [1], shows that in order to verify that is a ’yes’-instance we only need to find an induced subdigraph of such that is a ’yes’-instance.

Lemma 3.

Let be an instance of the --partition problem with at most 1 vertex with in-degree 0. Then any 2-partition (with if exists) of a subset of , where

  • has an out-branching

  • ,

can be extended to a good partition of in polynomial time.

Proof.

Call a 2-partition that satisfies the conditions of the lemma a subsolution.

Fix any subsolution. Use Algorithm 1 on the graph , starting with and , and denote the result by . In other words we grow the out-branching as large as possible, while not using any vertex in . We claim that is a solution. Clearly . Since has an out-branching and Algorithm 1 only adds a vertex if it has an in-neighbour in the current set , must contain an out-branching. Secondly, because if it exists, we know that all vertices in had in-degree at least 1 in . It was also the case that . Now because was grown as large as possible in , the vertices in (if any) were not reachable from and thus must still have in-degree at least 1 in . Moreover, meaning , and thus is a solution.

As this is a simple application of Algorithm 1 a subsolution can be extended to a solution in polynomial time. ∎

So from here on, finding a subsolution is sufficient to solve the problem.

The following result, due to Shen, will be used in the proof of our main result.

Theorem 4.

[11] Suppose is a digraph of order and girth with . Let . Then

The result also holds if we let be the number of vertices with in-degree 1 (in a digraph with ), instead of out-degree 1 (just reverse all arcs and apply Theorem 4). We are now ready to prove our main result.

Theorem 5.

The --partition problem is FPT.

Proof.

We will describe an FPT algorithm which correctly decides whether the input is a yes-instance of the --partition problem.

From the previous observations, we can assume that the input satisfies that and has at most one vertex with in-degree 0. Let and define the functions by setting and .

We start by determining some arcs that cannot be part of the out-branching in any solution. We say that an arc is non-branchable if does not have a subdigraph of size at least with . Thus if an arc is non-branchable, then at least one of the vertices must belong to in any good partition . Using Algorithm 2 we can identify the set of non-branchable arcs in polynomial time. Let be the potential branching arcs and let be the subdigraph of containing exactly the arcs in . For each vertex we now define as the out-neighbours of in .

Clearly, can be calculated for each in polynomial time. We now distinguish several cases which cover all the possibilities.

Case 1.

:

In this case we can check all possible out-trees of size exactly in . We do this by trying each possible root, of which there are at most (there is only 1 if exists), and for each root the out-tree will have height at most .

For each vertex, already included in the out-tree, we can use between 0 and of at most different arcs leaving that vertex. There are at most

ways to do so.

So a very rough upper bound on the total number of out-trees that must be checked is

which means if each check can be done in polynomial time, we can solve this case in FPT time.

For each possible out-tree with vertices we run Algorithm 2 on . If the resulting graph has at least vertices, then is a subsolution. As Algorithm 2 is indeed a polynomial time algorithm, we conclude that Case 1 can be solved in FPT-time.

For the case where , we first split the case into whether or not the vertex exists, and begin with the case where does not exist.

Case 2.

and :

We will show that, if we are in this case then is a yes-instance and, in fact, any vertex with , can be the root of the out-branching in a solution.

Fix any with .

We will say that we contract into , if the arc exists. Contracting into means removing the vertex and adding arcs from to every out-neighbour of (if is not already an arc). As it turns out, we will only contract vertices into our choice for the root of the out-branching , and unless otherwise stated, we do not rely on the vertices that are contracted into for our solution.

Let be the set of strong components of and for each strong component let denote the set of out-neighbours of inside using arcs in , that is,

Note that and can easily be computed in polynomial time.

Case 2.1.

:

Fix such that . First, we look for a subsolution , where is contained completely in one of the sets .

Let be the output from Algorithm 2 on input (i.e. is a maximum subdigraph in with ). If , then is a subsolution, as has at least out-neighbours in and . Similarly, we can try Algorithm 1 on with and . If the returned vertex set has size , then, because is a strong component with at least vertices, is a subsolution. Both cases can clearly be handled in polynomial time so we may assume that neither of these cases occur, implying that we must split in some way to obtain a (sub)solution.

Iteratively contract all trivial initial strong components into (iteratively these are the vertices with in-degree 0 in the current digraph, .) and call the resulting digraph for simplicity. If is not an initial strong component of after this process, then there is a non-trivial strong component with a path into . Using Algorithm 1 on with and , we obtain a set , where because we started with a non-trivial strong component. We also have and thus has size , so is a subsolution which can be found in polynomial time. Hence we can assume that is an initial strong component after the contraction step.

Now, observe that any cycle in , small or large, that avoids at least vertices of , gives rise to a subsolution. Clearly, if such a cycle contains at least vertices, we immediately have a subsolution by taking an out-star consisting of and vertices from for and the vertices of for . If contains less than vertices, then we can grow it until it has vertices, which again leaves at least vertices for an out-branching from (we can just take an out-star from with leaves). Hence it suffices to show that such a cycle indeed exists.

We first check whether is acyclic. If this is not the case, then by the previous observation we have a subsolution and we are done. The same conclusion holds if there is a cycle in which contains only one vertex of (and the existence of such a cycle can easily be checked in polynomial time). Hence we may assume that every cycle in contains at least two vertices of .

To summarize the situation, these are some facts about the situation we are in:

  1. is an initial strong component of .

  2. has at least out-neighbours inside . We will denote this set of out-neighbours by for brevity.

  3. Every cycle in contains at least two vertices of .

  4. By definition of the arc set , for each vertex there exists a subdigraph of with and .

  5. does not have a subdigraph with and size at least , so some of the vertices of the subdigraph from fact 4 belong to . Additionally, we had from fact 1 that is initial, so some cycle in must be part of the subdigraph of minimum in-degree at least one that we are looking for.

  6. The objective is to show that there exists a cycle in that avoids at least vertices in

Figure 1: An example of the construction of . Left: the strong component with and shown inside the rectangle. Right: the final digraph with the red arc representing the path . The other new arcs are shown in blue.

Let the digraph be obtained as follows, starting from a copy of : For each ordered pair , such that there is a path in where all for , we add the arc to , if it does not already exist. Note that, does not have parallel arcs. We use () to denote the out-degree (in-degree) of vertex in .

Let and note that since is strong it contains an -path . Let be those vertices on that are in , listed in the order in which they are visited by . By the construction of it contains the path in . Since were arbitrary vertices, it follows that is strong. With a similar argument and the fact that every cycle in contains at least two vertices of , we can conclude that every cycle in corresponds to a cycle in . We also have that a cycle in corresponds to a closed walk in , so a cycle in that avoids at least vertices in is verification that there exists a cycle in which avoids at least vertices in .

Let denote the girth of and let , where , . Now we apply Theorem 4 to (recall that this holds for both and ). If , then because we have . Otherwise, by Theorem 4, we have . If we make the following calculation.

implying that every shortest cycle in avoids at least out-neighbours of in . Clearly we can find a shortest cycle in polynomial time. Hence we may assume that . This implies that at least vertices have . Denote by the set of these vertices and let . Consider , it will consist of some vertex-disjoint induced paths (as , by the definition of ). Let denote the set of these paths. Clearly can be computed in polynomial time. Note that for each path , there is exactly one pair such that and are arcs in . Use to denote a path from to using the path .

Suppose first that there is a path with at least vertices. We claim that there must be a cycle in avoiding . Assume for the sake of contradiction that there is no such cycle. Then, because every vertex on has , every cycle in must contain the entire path . Thus removing any vertex of would destroy all cycles in and hence also in . But because was initial, this means no vertices in could be part of a subdigraph with , and as we are in a case where does not have subdigraph with and size at least , we get a contradiction to the definition of (since the arc is in ).

Suppose now that every path has less than vertices. Recall that we have at most vertices in . We can represent by a directed multigraph with vertex set and with the arcs where and . See Figure 2.

Figure 2: The left part of the figure shows an example of the sets , illustrating that is a collection of vertex disjoint paths. The right part shows the extra (coloured arcs that are added when we create the digraph .

For two distinct vertices of , let

(1)

be the number of vertices in which lie on paths from to in . Note that

(2)

As there are at most vertices in , there are less than pairs. We also have that

So it follows from (2) that there must be a pair that has

Let denote the set of those paths that contribute to . Since each has , we have so if we choose as one of these that uses the fewest vertices, then we always avoid at least vertices in the union of the other paths in . Because is strong, there is also a path from to in and does not intersect any path in . Hence is a cycle that avoids at least vertices of .

In conclusion we have shown that if we are in Case (2.1), then in polynomial time we can find a cycle which avoids at least vertices of .

Case 2.2.

:

As there are out-neighbours of there must be at least strong components containing a neighbour of . From the definition of , we know that has a subdigraph with and at least vertices. We can build such a subdigraph that also leaves at least out-neighbours of for the out-branching as follows: Starting from an empty set , iteratively add the vertices of a non-trivial strong component of to and use Algorithm 1 on with and to grow it. We repeat until (when adding a non-trivial strong component we may exceed ).

As has an out-neighbour in at least strong components and at most strong components are added to during this construction, there are still at least strong components, containing a neighbour of , that can be used to form an out-tree from of size at least . So we can obtain a subsolution in polynomial time.

Case 3.

and :

As we saw in Case 2, if a vertex has and every other vertex has in-degree at least 1, then we have a yes-instance. So the idea in this case is to start with and while contract a neighbour into and recompute and . If we reach before contracting times, then we backtrack and try contracting another neighbour in , until we have tried all possible out-trees with vertices from , similar to case 1. If we instead reach then the problem is reduced to case 2, and we have a yes-instance.

Because we reduce to Case 1 and 2 in polynomial time, this case is also solvable in FPT time.

So we have shown how to find the correct answer in all cases. We also argued that it was possible in FPT time in every case. This concludes the proof.

From the proof in Case 2 we obtain the following.

Corollary 6.

Let be an instance of the --partition-problem, with . Let be defined as in the beginning of the proof of Theorem 5 and let . If there is a vertex with , then we can find a good 2-partition in polynomial time.

The --partition-problem is the analogoue of the --partition-problem where we want an in-branching in one set of the partition while the other induces a digraph of minimum out-degree at least 1. By considering the digraph that we obtain by reversing all arcs we see that the following holds.

Corollary 7.

The --partition-problem is FPT.

4 Remarks and open problems

If we relax the condition of having an out-branching to that of just being connected, we obtain the following problem.

--partition Input: A digraph and natural numbers Question: Is there a 2-partition of such that is connected, and for ?

Theorem 8.

[1] The --partition-problem (for fixed ) is NP-complete for general digraphs and polynomially solvable for strong digraphs.

Theorem 9.

The --partition-problem is FPT for digraphs with minimum in-degree at least 1.

Proof.

First observe that if has minimum indegree at least 1 and are disjoint sets such that , is connected and , then we can easily extend this to a 2-partition of with , where is connected and . Hence it suffices to show that we can find a subsolution, if one exists, in FPT time. The proof of this is an easy modification of the proof of Theorem 5. We leave the details to the interested reader. ∎

The theorem also holds for the analogous --partition-problem, for digraphs with minimum out-degree at least 1.

References

  • [1] J. Bang-Jensen, N. Cohen, and F. Havet. Finding good 2-partitions of digraphs II. Enumerable properties. Theor. Comput. Sci., 640:1–19, 2016.
  • [2] J. Bang-Jensen and G. Gutin. Digraphs: Theory, Algorithms and Applications. Springer-Verlag, London, 2nd edition, 2009.
  • [3] J. Bang-Jensen and F. Havet. Finding good 2-partitions of digraphs I. Hereditary properties. Theor. Comput. Sci., 636:85–94, 2016.
  • [4] J. Bang-Jensen, K.V. Klinkby Knudsen, S. Saurabh, and M. Zehavi. The parameterized complexity landscape of finding 2-partitions of digraphs. Theor. Comput. Sci., 795:108–114, 2019.
  • [5] J. Bensmail. On the complexity of partitioning a graph into a few connected subgraphs. J. Combin. Optim., 30:174–187, 2015.
  • [6] D. Bokal, G. Fijavz, M. Juvan, P.M. Kayll, and B. Mohar. The circular chromatic number of a digraph. J. Graph Theory, 46(3):227–240, 2004.
  • [7] T. Feder, P. Hell, and C.S. Subi. Complexity of acyclic colorings of graphs and digraphs with degree and girth constraints. CoRR, abs/1907.00061, 2019.
  • [8] D. Kühn and D. Osthus. Partitions of graphs with high minimum degree or connectivity. J. Combin. Theory Ser. B, 88:29–43, 2003.
  • [9] N. Lichiardopol. Vertex-disjoint subtournaments of prescribed minimum outdegree or minimum semidegree: Proof for tournaments of a conjecture of Stiebitz. Intern. J. Combin., Article ID 273416:1–9, 2012.
  • [10] N. Misra, G. Philip, V. Raman, S. Saurabh, and S. Sikdar. FPT algorithms for connected feedback vertex set. J. Combin. Optim., 24:131–146, 2012.
  • [11] J. Shen. On the girth of digraphs. Discrete Math., 211(1-3):167–181, 2000.
  • [12] M. Stiebitz. Decomposition of graphs and digraphs. In KAM Series in Discrete Mathematics-Combinatorics-Operations Research-Optimization 95-309. Charles University Prague, 1995.
  • [13] H. Suzuki, N. Takahashi, and T. Nishizeki. A linear algorithm for bipartion of biconnected graphs. Inform. Process. Lett., 33:227–231, 1990.
  • [14] P. van’t Hof, D. Paulusma, and G.J. Woeginger. Partitioning graphs into connected parts. Theor. Comput. Sci., 410:4834–4843, 2009.