Graph Modification of Bounded Size to Minor-Closed Classes as Fast as Vertex Deletion
Abstract
A replacement action is a function that maps each graph to a collection of graphs of size at most . Given a graph class , we consider a general family of graph modification problems, called -Replacement to , where the input is a graph and the question is whether it is possible to replace some induced subgraph of on at most vertices by a graph in so that the resulting graph belongs to . -Replacement to can simulate many graph modification problems including vertex deletion, edge deletion/addition/edition/contraction, vertex identification, subgraph complementation, independent set deletion, (induced) matching deletion/contraction, etc. We present two algorithms. The first one solves -Replacement to in time for every minor-closed graph class , where poly is a polynomial whose degree depends on , under a mild technical condition on . This generalizes the results of Morelle, Sau, Stamoulis, and Thilikos [ICALP 2020, ICALP 2023] for the particular case of Vertex Deletion to within the same running time. Our second algorithm is an improvement of the first one when is the class of graphs embeddable in a surface of Euler genus at most and runs in time , where the notation depends on . To the best of our knowledge, these are the first parameterized algorithms with a reasonable parametric dependence for such a general family of graph modification problems to minor-closed classes.
Keywords and phrases:
Graph modification problems, Parameterized complexity, Graph minors, Flat Wall theorem, Irrelevant vertex technique, Algorithmic meta-theorem, Parametric dependence, Dynamic programmingFunding:
Laure Morelle: French project ELiT (ANR-20-CE48-0008-01)Copyright and License:
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithmsEditors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
A graph modification problem is typically determined by a target graph class and a prescribed set of allowed local modifications , such as vertex/edge removal or edge addition/contraction or combinations of them, and the question is, given a graph and an integer , whether it is possible to transform to a graph in by applying at most modification operations from . Graph modification problems are fundamental in algorithmic graph theory, as can be seen from the span of applications in domains as diverse as computational biology, computer vision, machine learning, networking, or sociology; see [19] and the references therein. Unfortunately, most of these problems are NP-complete [32, 49], and this justifies, among other approaches, to study them from the parameterized complexity viewpoint (see the monographs [10, 12, 15, 40] for an introduction to the field), where the number of allowed modifications is taken as the parameter.
In the recent years, there has been a very active line of research about algorithmic meta-theorems for graph modification problems where the target class is minor-closed, that is, closed under vertex deletion, edge deletion, and edge contraction. By Robertson and Seymour’s seminal result [43], a minor-closed graph class has a finite number of minor-obstructions, that is, graphs that are not in but whose all proper minors are. Combined with a minor containment algorithm [30] (see also [42, 26]) running in almost-linear time, this implies that checking membership in a minor-closed graph class can be done in almost-linear time. For some modification problems where the target class is minor-closed, such as vertex deletion, edge deletion, or vertex identification, the graphs such that is a yes-instance of the problem for a fixed form a minor-closed graph class, which immediately implies an FPT-algorithm in almost-linear time for these problems. However, not all graph modification problems define a minor-closed graph class. For instance, edge contraction to planar graphs does not. Indeed, consider the graph obtained from by adding one edge on the side with three vertices. Contracting gives the planar graph , but cannot be made planar by contracting one edge. Hence, some other algorithmic meta-theorems for graph modification problems to minor-closed graph classes were later introduced. Some of them are ad-hoc meta-theorems such as the one of Fomin, Golovach, and Thilikos [17] that gives quadratic FPT-algorithms for graph modification problems where is the class of planar graphs and the modification is any combination of edge addition and edge deletion. Much more generally, there has been a recent line of research on model-checking on minor-closed graph classes [16, 47], which in particular implies quadratic FPT-algorithms for an extremely wide family of graph modification problems where the target class is minor-closed. Unfortunately, all these algorithmic meta-theorems have a major drawback: the parametric dependence on the “amount of modification” is humongous; in fact, even a rough upper bound is not known.
On the other hand, another line of research has focused on optimizing the parametric dependence for some particular graph modification problems when the parameter is the solution size. When the target class is minor-closed, such study usually does not go much beyond being the class of forests and the class of union of paths [9, 48, 22, 39, 33, 7, 23]. To the best of our knowledge, only the case of vertex deletion has been studied in a a series of papers [45, 44, 38, 24, 37, 25, 29, 18, 28], focusing on optimizing the running time (both the dependence on and ). In particular, when the minor-obstructions of are connected and that one of them is planar, the currently fastest algorithm runs in time [18], when excludes a planar graph, in time [28], when is the class of planar graphs, in time [24], when is the class of graphs embeddable in a surface of bounded genus, in time [29], and when is any minor-closed graph class, in time [38].
This article places itself in-between these two lines of research: we consider generic “meta-modification” operations (of course, much less generic than those of the currently most general algorithmic meta-theorem in [47], but still quite versatile), and we manage to achieve the same (very reasonable) parametric dependence as the currently best one for vertex deletion [38] when the target is any minor-closed graph class. We hope that our work will trigger further research about efficient algorithmic meta-theorems for graph modification problems to minor-closed graph classes.
Our results.
We define a graph modification problem, called -Replacement to (-R- for short), which, depending on the choice of the function , called a replacement action, can simulate vertex deletion, edge deletion, edge completion, edge edition, edge contraction, vertex identification, independent set deletion, matching deletion, matching contraction, star deletion, and subgraph complementation, to name a few (see section 3 for an exposition of some problems encompassed by our result). When is minor-closed, we solve -R- in time (Theorem 2), where the degree of the polynomial depends on the maximum size of the minor-obstructions of . This is the same running time as the one achieved by the currently best algorithm for vertex deletion [38] (the degree of in poly is the same as in [38] up to an extra additive constant of one that is absolutely negligible compared to the total degree that depends (wildly) on ). For the other graph modification problems encompassed within -R-, to the authors’ knowledge, the only minor-closed classes for which a good parametric dependence was previously known, if any, were the class of forests and the class of union of paths [9, 48, 22, 39, 33].
As it is usually the case concerning meta-theorems, the degree of the polynomial in Theorem 2 is unfortunately huge. While we did not compute its exact value, we know that . Nevertheless, can improved for some specific target classes . The Euler genus of a surface that is obtained from the sphere by adding handles and crosscaps is defined to be . In particular, when is the class of graphs embeddable in a surface of Euler genus at most , we provide another algorithm solving -R- in time (Theorem 3), where the notation depends on . Note that, as opposed to Theorem 2, in Theorem 3 the contribution of the genus (that is, of the target graph class ) does not affect the degree of the parameter in the exponent.
Organization.
In section 2 we give basic definitions and conventions, and we formally define the problem and state our results. In section 3 we provide a non-exhaustive list of problems generated by different instantiations of the replacement action , and hence encompassed by our results. In section 4 we present an overview of our techniques. Due to space limitations, all proofs have been deferred to the full version of this article. In section 5 we present some directions for further research.
2 Definition of the problem and formal statement of the results
In this section we formally define the -R- problem and state our results, already informally discussed in the introduction. We use standard graph-theoretic notation, and complete preliminaries about graphs (including tree decompositions and minors) can be found in the full version. We define here the non-standard notions that are needed in order to state our results.
Minor-closed graph classes.
A graph class is minor-closed if, for each graph and each minor of , the fact that implies that . Given a collection of graphs , we denote by the class of graphs that do not contain a graph in as a minor. Obviously, is minor-closed. A (minor-)obstruction of a graph class is a graph that is not in , but whose minors are all in . The set of all the obstructions of is denoted by . By the seminal work of Robertson and Seymour [43], if is a minor-closed graph class, then is finite. Note that, if , then . The detail of a graph is .
Ordered graphs.
For the definitions of the next two paragraphs to be correct, we actually need to consider ordered graphs instead of graphs (see the “Graph modifications” paragraph). An ordered graph is a graph equipped with a strict total order on , denoted by . In other words, there exists an indexation of the vertices of such that . A subgraph of an ordered graph naturally comes equipped with the strict order such that, for each distinct , if and only if .
Replacement actions.
The any-replacement action is the function that maps each ordered graph to the collection of all the pairs , where is an ordered graph and is a function such that:
-
,
-
for each , , and
-
is the strict total order such that, for each distinct , we have if and only if where, for , is the smallest vertex (according to ) in .
A replacement action (abbreviated as R-action) is any function that maps an ordered graph (called a pattern) to a non-empty collection of its possible pattern transformations. See Figure 1 for an illustration. The vertices of mapped by to the empty set are said to be deleted, and two vertices of mapped by to the same vertex of are said to be identified. Given , we set . Note that, if , then .
Graph modifications.
Let be an R-action, let be an ordered graph, and . Let . We denote by the graph obtained from the disjoint union of and by adding an edge for each and each such that . We equip with the strict total order such that if and only if where, for , if , and is the smallest vertex in if . We also set . See Figure 1 for an illustration.
Note that we consider ordered graphs merely so that the correspondence between the vertices in and the vertices in is well-defined. We actually omit the order from the statements, but it will be implicitly assumed that vertices have a label that allows us to keep track of them during the modification procedure.
Let be an R-action and be a graph class. We define the following problem.
-Replacement to (-R-)
| Input: | A graph and . |
| Question: | Is there a set of size at most such that ? |
Such a set is called solution of -R- for the instance .
We will use the following observation, which implies that a no-instance for Vertex Deletion to is also a no-instance for -R-.
Observation 1.
Let be a hereditary graph class, let be an R-action, let be a graph, and let . If , then .
Proof.
Indeed, suppose that there is such that . Then, because is hereditary, .
Hereditary R-actions.
An R-action is said to be hereditary if, for each ordered graph , for each non-empty , and for each , we have . We say that is the restriction of to . See Figure 2 for an illustration. Informally, an R-action is hereditary if, when a modification is allowed, then modifying “less” is allowed as well. For instance, if allows us to delete exactly vertices, then also allows us to delete at most vertices.
Some conventions.
By convention, when there is no confusion, we set and . In the rest of the paper, instead of considering a minor-closed graph class , we consider its obstruction set , and thus the minor-closed graph class . We define three constants depending on that will be used throughout the paper whenever we consider such a collection . We define as the minimum apex number of a graph in , we set , and we define to be the maximum detail of a graph in . Given a tuple and two functions , we write in order to denote that there exists a computable function such that . Notice that , and thus .
Our main result is the following.
Theorem 2.
Let be a finite collection of graphs and let be a hereditary R-action. There is an algorithm that, given a graph and , runs in time and either outputs a solution of -R- for the instance or reports a no-instance. Moreover, is a polynomial whose degree depends on the maximum detail of a graph in .
As mentioned in the introduction, the main result in [47] already implies that -R- is solvable in time when is minor-closed for some huge function that is not even estimated. Our main contribution is an explicit and single-exponential dependence on .
The degree of is quite big, but we can reduce it in some specific cases.
Theorem 3.
Let be a hereditary R-action and be the class of graphs embeddable in a surface of Euler genus at most . There is an algorithm that, given a graph and , runs in time and either outputs a solution of -R- for the instance or reports a no-instance.
More generally, we study the annotated version of -R-. Let be a hereditary R-action and be a graph class. We define the following problem.
-Annotated Replacement to (-AR-)
| Input: | A graph , a set of annotated vertices , , and . |
| Question: | Is there a set of size at most and such that is the restriction of to and ? |
Obviously, we must have . Such a triple is called a solution of -AR- for the instance . An instance of -AR- where is an instance of -R-, so -AR- generalizes -R-. Two instances and are equivalent instances of -AR- if is a yes-instance of -AR- if and only if is a yes-instance of -AR-.
3 Problems generated by different instantiations of
Many graph modification problems correspond to -R- for a specific R-action and a specific target graph class . We give a few examples below. Let be a minor-closed graph class. For instance, could be the class of edgeless graphs, of forests, of graphs whose connected components have size at most , of planar graphs, or of graphs embeddable in a surface . Note that we do not mention Edge Addition to (nor Edge Edition to ) here, because when is a minor-closed graph class, adding edges is “unnecessary”, in the sense that the edge deletion variant has the same expressive power, and we can solve it. Note also that -R-, and thus in particular all problems of this section, was already known to be solvable in FPT-time (when is minor-closed) by the result of [47]. However, as mentioned before, the parametric dependence is huge and not even explicit in [47].
Given a set , we denote the identity function mapping each to itself by .
Vertex Deletion to
| Input: | A graph and . |
| Question: | Is there a set of size at most such that ? |
Vertex Deletion to reduces to -R-, where is the function that maps any graph to the singleton containing the empty graph and the constant function . Vertex Deletion to is already known [38] to be solvable within the same running time as the one of Theorem 2. Hence, the result of Theorem 2 is not an improvement for this specific problem, but it shows that our result is tight compared to the currently best known result for Vertex Deletion to .
Edge Deletion to
| Input: | A graph and . |
| Question: | Is there a set of size at most such that ? |
is a yes-instance of Edge Deletion to if and only if is a yes-instance of -R-, where is the function that maps each graph to the set of pairs over all of size at most . Algorithms with a nice parametric dependence are only known for specific target classes . Namely, when is the class of forests, Edge Deletion to corresponds to Feedback Edge Set, which can be solved in constant time given that the size of a minimum feedback edge set is (assuming the graph is connected). When is the class of graphs that are a union of paths, then there is a linear kernel for the problem [34], as well as a FPT algorithm with parametric dependence on at most [48]. We refer the reader to the survey of [9], as well as [13], for other results with explicit dependence on when is not a minor-closed graph class.
Given a graph and a set of edges , we denote by the graph obtained from after contracting the edges in .
Edge Contraction to
| Input: | A graph and . |
| Question: | Is there a set of size at most such that ? |
is a yes-instance of Edge Contraction to if and only if is a yes-instance of -R-, where is the function that maps each graph to the set of pairs over all of size at most , where maps to the corresponding vertex of . An explicit parametric dependence was given in [22] when is a class of paths (running time ) or the class of trees (running time ). Though these classes are not minor-closed, we can easily extend these results to the case when is the class of unions of paths or the class of forests (up to a factor). FPT-algorithms with an explicit parametric dependence were also studied when is a collection of generalization and restriction of trees [3, 2], or when is the class of cactus graphs [31]. We refer the reader to [21] for more results when the target class is not minor-closed.
Vertex Identification to
| Input: | A graph and . |
| Question: | Is there a set of size at most and a partition of such that the graph obtained after identifying the vertices in to a single vertex , for , belongs to ? |
Vertex Identification to reduces to -R-, where is the function that maps each graph to the set of pairs , where can be obtained from after identifying each of a partition of some set to a single vertex , and maps vertices of to and is the identity on . Vertex Identification to is known to admit a kernel of size when is the class of forests [39]. To the authors’ knowledge, this is the only known result for this problem.
Independent Set Deletion to
| Input: | A graph and . |
| Question: | Is there an independent set of size at most such that ? |
Independent Set Deletion to reduces to -R-, where is the function that maps any graph to the set of pairs over all independent sets , where maps vertices of to the empty set and is the identity on .
When is the class of forests, the problem is known to be solvable in time [33]. Concerning other target classes that are not minor-closed, mainly bipartite graphs, let us mention [20, 6, 1].
To illustrate the versatility of -R-, let us present some other problems that can be defined by particular hereditary R-actions, though they do not seem to have been studied when parameterized by the solution size.
(Induced) Matching Deletion to
| Input: | A graph and . |
| Question: | Is there an (induced) matching of size at most such that ? |
is a yes-instance of (Induced) Matching Deletion to if and only if is a yes-instance of -R-, where is defined similarly to above, but for (induced) matchings. There are some results on Matching Deletion to when and is the class of forests [41, 36] or bipartite graphs (see [35] for a small survey).
(Induced) Matching Contraction to
| Input: | A graph and . |
| Question: | Is there an (induced) matching of size at most such that ? |
is a yes-instance of (Induced) Matching Contraction to if and only if is a yes-instance of -R-, where is defined similarly to above, but for (induced) matchings.
Induced Star Deletion to
| Input: | A graph and . |
| Question: | Is there a set inducing a star with such that ? |
is a yes-instance of Star Deletion to if and only if is a yes-instance of -R-, where is the function that maps any graph to the set of pairs over all sets inducing a subgraph of .
Given a graph , the complement of , denoted by , is graph with vertex set and edge set the edges that do not belong to .
Subgraph Complementation to
| Input: | A graph and . |
| Question: | Is there a set of size at most such that the graph obtained after replacing with its complement belongs to ? |
Subgraph Complementation to reduces to -R-, where is the function that maps any graph to the singleton containing the pair . The problem was recently studied when for various target classes; we refer the reader to [4].
4 Overview of our techniques
To handle several modification problems at once, we adapt the vocabulary of Fomin, Golovach, and Thilikos [17], who introduced the notion of replacement action. Intuitively (see section 2 for the formal definition), a replacement action is a function that maps a graph to a collection of pairs where is a graph with at most vertices and maps each vertex of to either a vertex of or the empty set. Mapping a vertex of to the empty set corresponds to a deletion, while mapping several vertices to the same vertex of corresponds to an identification. Replacement actions were originally defined in [17] to solve a collection of graph modification problems where only edges are modified and where the target class is the class of planar graphs. Compared to [17], however, the size of may here be smaller than the size of , which happens when deleting or identifying vertices, while in [17] it is required that . Let us fix a replacement action and a target graph class . Recall that the -Replacement to (-R-) problem asks, given a graph and , whether there is an induced subgraph of size at most in and a pair such that can be replaced by such that the resulting graph belongs to (for and , if and only if there is such that ). For our techniques to work (see the “irrelevant vertex technique” paragraph below for more precision), we require our function to be hereditary, which essentially means if is in , then for any induced subgraph of , the corresponding induced subgraph of is in (cf. section 2 for the formal definition and Figure 2 for an illustration). For instance, this implies that we can ask whether it is possible to do at most edge editions to get a graph in , but we cannot ask whether it is possible to do exactly edge editions to get a graph in .
High-level description of our algorithms.
The techniques that we employ for our first algorithm (that is, when is any minor-closed graph class) are strongly inspired by those used by Morelle, Sau, Stamoulis, Thilikos [38] for the particular case of vertex deletion (see also [44]), namely Vertex Deletion to , achieving the same running time. Nevertheless, in order to deal with our “meta-modification” operations, we need several new technical insights compared to the approach of [44], which we proceed to sketch. In a nutshell, the algorithm of [38] employs a win/win strategy that proceeds as follows:
-
If the treewidth of the input graph is small (as a function of the parameter ), then solve the problem via a dynamic programming approach.
-
If the treewidth of the input graph is big, then either
-
–
(irrelevant vertex) find a vertex such that and are equivalent instances, or
-
–
(branching case) find a set of small size such that there exists such that and are equivalent instances,
and recurse.
-
–
Hence, we require three ingredients: one to solve the problem parameterized by treewidth, one to find an irrelevant vertex, and one to find an “obligatory set” , all with a “reasonable” parametric dependence on . Then, we need to construct an algorithm so that one of these three cases always applies and such that the overall running time is still within the desired bound, which is one of the most convoluted parts of the proof. In what follows we provide further insights about these steps, by first saying a few words about flat walls.
The need for annotation.
Let be the set of vertices recursively guessed to be modified in the branching step. An advantage when the modification consists in vertex deletion is that we can simply recurse on . For the more general case of -R-, we cannot simply delete , as the considered modification may be different from vertex deletion. We need 1) to guess how is modified, that is, to guess and 2) to remember and in order to check that we eventually find a set and an allowed modification whose restriction to is such that the modified graph is in . This is why we need to solve the annotated version of the problem, denoted by -AR-, where we add to the input a subset of vertices of that are required to be part of , as well as the modification made on .
Dynamic programming algorithm in the case of bounded treewidth.
Note that we cannot just use Courcelle’s theorem [8], since we require a nice parametric dependence on . Hence, we need to design our own dynamic programming algorithm to solve -AR- parameterized by the treewidth and . Essentially, the idea is to guess, in each bag of the decomposition, the set of vertices that are modified as well as how they are modified, and to reduce the size of the graph induced by the bag and its children using the representative-based technique of [5]. This technique is essentially based on the property that, given a graph in a minor-closed graph class with a boundary , there is a graph of bounded size with same boundary , called the representative of , such that, for any graph glued on to get and , if and only if . does not belong to , so we cannot find a representative of , but we find instead a representative of the graph modified from according to the guessed modification on and the previously guessed modification on the children of . Given that we may need to identify together vertices that are far apart in the tree decomposition, we need to remember throughout the algorithm the vertices that are guessed to be part of the solution. The fact that we keep information about these at most vertices explains the dependence on of the dynamic programming algorithm. More precisely, we prove the following result.
Theorem 4.
Let be a finite collection of graphs and be an R-action. There is an algorithm that, given , a graph of treewidth at most , a set of size at most , and , in time either outputs a solution of -AR- for the instance , or reports a no-instance.
The above result parameterized by treewidth and may be of independent interest, given that it implies an algorithm with a good parametric dependence on the treewidth and for a number of graph modification problems. Note that the question of whether -R- is FPT parameterized by only treewidth is open. Even Courcelle’s theorem only implies a running time of , given that the size of the CMSO formula expressing yes-instances of -R- depends on . Note that, in [38], the bounded treewidth part consists just in a black-box application of the algorithm of Baste, Sau, and Thilikos [5].
Flat walls.
An essential tool of our approach is the notion of flat wall, originating in the work of Robertson and Seymour [42]. Informally speaking, a flat wall is a structure made up of (non-necessarily planar) pieces, called flaps, that are glued together in a bidimensional grid-like way defining the so-called bricks of the wall. While such a structure may not be planar, it enjoys topological properties similar to those of planar graphs, in the sense that two paths that are not routed entirely inside a flap cannot “cross”, except at a constant-sized vertex set whose vertices are called apices. Hence, flat walls are only “locally non-planar”, and after removing apices we can apply useful locality arguments, in the sense that two vertices that are in “distant” flaps should also be “distant” in the whole graph without the apices. In this article we apply some variants of one of the most celebrated results in the theory of Graph Minors by Robertson and Seymour [42, 43], known as the Flat Wall theorem (see also [27, 46] for recently proved variants), which informally states that graphs of large treewidth contain either a large clique minor or a large flat wall.
In order for our formal statements to be mathematically correct, we would need to introduce a number of notions originating in [46]. Unfortunately, in the attached full version several pages are required to provide all these technical notions. Due to space limitations, in this extended abstract we only provide intuitive descriptions of the main notions required to read the statement of the results, but we skip a number of technical terms (such as renditions, tilts, influence, regular flatness pairs, etc.) that are not the main focus of this sketch. All details can be found in the attached full version, and we refer the reader to [46] for a more detailed exposition of these definitions and the reasons for which they were introduced.
An -wall is any graph obtained from a so-called elementary -wall after subdividing edges: see Figure 3 for self-explanatory illustration of a -wall.
A flat wall is illustrated in Figure 4, where the flaps mentioned above correspond to the orange cells. The perimeter of a flat wall in a graph separates into two sets and with containing the wall. The compass of a flat wall is . For example, in Figure 4, is the set of vertices in the green part, and the set of vertices in the orange part.
In order to find an irrelevant vertex, we need to deal with homogeneous flat walls. Intuitively, homogeneous flat walls are flat walls that allow the routing of the same set of (topological) minors in the augmented flaps (i.e., the flaps together with the apex set) “cropped” by each one of their bricks. Such a homogeneous wall can be detected in a big enough flat wall and this “homogeneity” property implies that some central part of a big enough homogeneous wall can be declared irrelevant.
Another very useful notion is that of a canonical partition of a graph with respect to some wall of . Informally, this refers to a partition of the vertex set of into bags that follow the grid-like structure of ; see Figure 5. Essentially, the goal is to be able to contract each of these bags to obtain a grid that is a minor of , and thus of . In particular, we prove (see Lemma 5 below) that if contains as a minor a grid along with a set whose vertices have sufficiently many neighbors in the grid, then some vertex in is obligatory. We use canonical partitions here to easily find such a structure given a wall of .
Branching step.
The branching case is not much different from what is done in [38] (originally from [45]): essentially, if there is a big enough wall (cf. Figure 3) and a set of vertices having many disjoint paths to (cf. Figure 6), then some modification must happen in and we can branch. Here, we however need to additionally prove that we must have . We stress that it is important here to guess some modification in that strictly decreases the size of , so that, after applying this partial modification to at the next step in the recursion, we will not find the exact same obligatory set . Hence, in the algorithm with input , at each step, either we find an irrelevant vertex and strictly decrease the size of , or we branch and strictly increase the size of .
More precisely, the next result is the main technical ingredient in this part of the proof, essentially stating that a part of the solution can be found in a set of size in which every vertex is adjacent to many vertices of a big enough wall. This is our “obligatory vertex” method. See Figure 6 for an illustration and Section 6 of the full version for the details.
Lemma 5.
Let be a finite collection of graphs and be a hereditary R-action. There exist three functions such that the following holds. Let . Let be a graph, be a set of size at most , and . Suppose that contains a set of size at least and that there is a wall in of height . Suppose also that there is a -canonical partition of such that each vertex of is adjacent to at least many -internal bags of . Then, for every solution of -AR- for , it holds that , where , and that . Moreover , , and .
Finding an irrelevant vertex.
As expected, we use the irrelevant vertex technique of Robertson and Seymour [42]. More specifically, we generalize the irrelevant vertex technique used in [38] (actually proved in [45]). This technique is based on the (intuitive but surprisingly hard to prove) fact that the central vertex of a homogeneous flat wall is always irrelevant. While our irrelevant vertex technique for -AR- takes inspiration from [45], it is far more involved due to the annotation and the fact that we allow a wide variety of modifications. In particular, we need to redefine what it means to be homogeneous for a flat wall, to adapt it to our new setting. The previous definition was made to handle the case when we had to remove a small vertex set, called apex set, to find a flat wall, and more specifically to handle the fact that some vertices are possibly deleted from the apex set. Now, we also need to handle any other way the apex set may be modified, hence the new definition. The fact that we ask the replacement action to be hereditary comes from the irrelevant vertex technique. Indeed, in order to prove that the central vertex of a homogeneous flat wall is irrelevant, we essentially prove that, for any solution , we can delete a small part of containing , and that the restriction of to is still a solution.
The following is the main technical result that we prove in this part, stating that an irrelevant vertex can be found in a big enough flat wall whose compass has bounded treewidth.
Theorem 6.
Let be a finite collection of graphs and be a hereditary R-action. There exist a function , whose images are odd integers, and an algorithm with the following specifications:
Irrelevant-Vertex
| Input: | Integers , a graph , a set of size at most , , a set of size at most , where , and a regular flatness pair of of height at least whose -compass has treewidth at most and does not intersect . |
| Output: | A vertex such that and are equivalent instances of -AR-. Moreover, , where , and the algorithm runs in time . |
We also prove the following result for the bounded genus case with a better dependence on and a better running time. In this case, we do not ask for our flat wall to have bounded treewidth, but to have a planar embedding instead. Note that here, instead of a single vertex , we might sometimes find an entire planar block of vertices that is irrelevant.
Theorem 7.
Let be a hereditary R-action and be the collection of obstructions of the graphs embeddable in a surface of genus at most . There exist a function , whose images are odd integers, and an algorithm with the following specifications:
Planar-Irrelevant-Vertex
| Input: | An integer , a graph , a set of size at most , , and a flatness pair of of height at least whose -compass does not intersect and is embeddable in a disk with on the boundary. |
| Output: | A non-empty set such that and are equivalent instances of -AR-. |
Moreover, and the above algorithm runs in time .
Piecing everything together.
Finally, we combine the three ingredients discussed above to find an algorithm for -AR-. We essentially proceed as follows. Let be the instance we want to solve, and be obtained by doing the modification of . In the first steps, we either find that has small treewidth, where we can use our dynamic programming algorithm to conclude, or that contains a wall . Given , we first try to find a flat wall inside, with all the necessary conditions to find an irrelevant vertex. If we manage to do so, we remove the irrelevant vertex and recurse. Otherwise, through a greedy procedure, we try to find an obligatory vertex set with many disjoint paths to in . If we find such a set, we branch and recurse. If not, we manage to argue that we must have a no-instance, and conclude.
The special case of bounded genus.
Our second algorithm (Theorem 3), when is a class of graphs embeddable in a surface of bounded Euler genus, uses two additional ideas to get an improved running time. The first one is that here, the obligatory set is a singleton. Indeed, the size of is the size of the minimum number of vertices one can remove from an obstruction of to make it planar. It is well known that, when is such a class, there is some integer depending on the Euler genus such that , and thus, . In particular, this implies that we do not need to branch on , but that we instead immediately find an obligatory vertex. The second idea is about homogeneous flat walls. In the running time of the first algorithm, the degree of poly essentially corresponds to the size of the required flat wall to find a big enough homogeneous flat wall, and hence an irrelevant vertex, inside of it. In the case where is the class of graphs embeddable in a surface of Euler genus at most , we prove that we can find a homogeneous flat wall inside a flat wall of smaller size, hence the improved running time. To do so, we prove that, after some preliminary processing, a flat wall that is furthermore embeddable in a disk with the perimeter on its boundary is already homogeneous. Hence, our second algorithm proceeds similarly to the first one, but if we find a flat wall in , we divide into disjoint smaller flat walls and check whether they belong to . By the pigeonhole principle, one of them, , does not contain a modified vertex and must thus be in , otherwise we return a no-instance. Then, we argue, using a result from [11] to guarantee additional properties of the planar embedding that are needed for technical reasons, that we can find a smaller flat wall in with a planar embedding (even if the genus of the target graph class is strictly positive). Hence, we find an irrelevant vertex in and conclude.
5 Conclusion
For a large family of graph modification problems involving a bounded number of vertices, if the target class is minor-closed, we provided an algorithm solving the problem in time . This is actually the same running time as the best known running time for Vertex Deletion to [38]. For the other graph modification problems encompassed by our result, such as Edge Deletion to , Edge Contraction to , Vertex Identification to , or Independent Set Deletion to , the only minor-closed for which an algorithm with an explicit parametric dependence in the solution size was known, to the authors’ knowledge, were the class of forests and the class of union of paths. Other problems, such as Matching Deletion to , Matching Contraction to , Induced Star Deletion to , or Subgraph Complementation to , were not even considered yet from the parameterized complexity viewpoint, other than in the meta-theorem of [47].
The degree of in the running time comes from the irrelevant vertex technique and is quite huge. In the bounded genus case, we reduce the running time to thanks to some improvement on the irrelevant vertex technique. This does not match the parametric dependence in the running time of for Vertex Deletion to [29] for of bounded genus, though we possibly have a better dependence on . To the authors’ knowledge, this is the first bounded genus result with an explicit parametric dependence in the solution size for the other graph modification problems encompassed by our result.
Improving more the parametric dependence in the general case would certainly require coming up with new techniques. On the other hand, given the recent results of [30] for minor containment, it is worth studying whether the quadratic dependence on could be improved to an almost-linear dependence while maintaining a good dependence on . Note that the approach of [30] heavily uses Courcelle’s theorem [8], which would require to be translated to a plausibly very involved dynamic programming algorithm to keep a good parametric dependence on .
Given that we require the replacement action to be hereditary for our irrelevant vertex technique to work, we unfortunately restrict the graph modification problems that we solve. For instance, Planar Subgraph Isomorphism can be expressed as an -R-Planar problem for a specific , which is not hereditary. Hence, we do not encompass this problem in our general algorithm, while such an algorithm is provided in [17], where the constraint about being hereditary is not required. While most of the “reasonable” modification problems correspond to a hereditary replacement action, it is worth investigating whether our result can be extended to non-hereditary replacement actions.
Here, we only consider modifications that affect a bounded number of vertices of the input graph. This is necessary as we want to decrease by one each time we find an obligatory vertex (or, more precisely, as we want the size of the increasingly guessed partial solution to be bounded by ), so that the depth of the branching tree is bounded. Some relevant graph modification problems, however, such as Elimination Distance to [38] or -Treewidth [14] (where we want to delete a vertex set whose “torso” has bounded treedepth or treewidth, respectively, such that ), consider a modification that affects a set of vertices that may have unbounded size. In this case, the branching method does not seem applicable. However, the irrelevant vertex technique still works, and provided that we have a dynamic programming for graphs of bounded treewidth, an algorithm can still be designed in some cases, but with a worse parametric dependence on . This is what is done, for instance, in [38] for Elimination Distance to . Therefore, we could consider extending the results of this paper to (some kinds of) modifications involving sets of vertices or edges of unbounded size.
References
- [1] Akanksha Agrawal, Pallavi Jain, Lawqueen Kanesh, Pranabendu Misra, and Saket Saurabh. Exploring the kernelization borders for hitting cycles. In Proc. of the 13th International Symposium on Parameterized and Exact Computation (IPEC), volume 115 of LIPIcs, pages 14:1–14:14, 2018. doi:10.4230/LIPICS.IPEC.2018.14.
- [2] Akanksha Agrawal, Lawqueen Kanesh, Saket Saurabh, and Prafullkumar Tale. Paths to trees and cacti. Theoretical Computer Science, 860:98–116, 2021. doi:10.1016/J.TCS.2021.01.033.
- [3] Akanksha Agrawal, Saket Saurabh, and Prafullkumar Tale. On the parameterized complexity of contraction to generalization of trees. Theory of Computing Systems, 63(3):587–614, 2019. doi:10.1007/S00224-018-9892-Z.
- [4] Dhanyamol Antony, Sagartanu Pal, and R. B. Sandeep. Algorithms for subgraph complementation to some classes of graphs. Information Processing Letters, 188:106530, 2025. doi:10.1016/J.IPL.2024.106530.
- [5] Julien Baste, Ignasi Sau, and Dimitrios M. Thilikos. Hitting Minors on Bounded Treewidth Graphs. IV. An Optimal Algorithm. SIAM Journal on Computing, 52(4):865–912, 2023. doi:10.1137/21M140482X.
- [6] Marthe Bonamy, Konrad K. Dabrowski, Carl Feghali, Matthew Johnson, and Daniël Paulusma. Independent feedback vertex set for p-free graphs. Algorithmica, 81(4):1342–1369, 2019. doi:10.1007/S00453-018-0474-X.
- [7] Jianer Chen, Iyad A. Kanj, and Ge Xia. Improved upper bounds for vertex cover. Theoretical Computer Science, 411(40-42):3736–3756, 2010. doi:10.1016/j.tcs.2010.06.026.
- [8] Bruno Courcelle. The monadic second-order logic of graphs. I. recognizable sets of finite graphs. Information and Computation, 85(1):12–75, 1990. doi:10.1016/0890-5401(90)90043-H.
- [9] Christophe Crespelle, Pål Grønås Drange, Fedor V. Fomin, and Petr Golovach. A survey of parameterized algorithms and the complexity of edge modification. Computer Science Review, 48:100556, 2023. doi:10.1016/j.cosrev.2023.100556.
- [10] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [11] Erik D. Demaine, MohammadTaghi Hajiaghayi, and Dimitrios M. Thilikos. The bidimensional theory of bounded-genus graphs. SIAM Journal on Discrete Mathematics, 20(2):357–371, 2006. doi:10.1137/040616929.
- [12] Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. Texts in Computer Science. Springer, 2013. doi:10.1007/978-1-4471-5559-1.
- [13] Maël Dumas, Anthony Perez, Mathis Rocton, and Ioan Todinca. Polynomial kernels for edge modification problems towards block and strictly chordal graphs. CoRR, abs/2201.13140, 2022. arXiv:2201.13140.
- [14] Eduard Eiben, Robert Ganian, Thekla Hamm, and O-joung Kwon. Measuring what matters: A hybrid approach to dynamic programming with treewidth. Journal of Computer and System Sciences, 121:57–75, 2021. doi:10.1016/j.jcss.2021.04.005.
- [15] Jörg Flum and Martin Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006. doi:10.1007/3-540-29953-X.
- [16] Fedor V. Fomin, Petr A. Golovach, Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. Compound logics for modification problems. In Proc. of the 50th International Colloquium on Automata, Languages, and Programming (ICALP), volume 261 of LIPIcs, pages 61:1–61:21, 2023. doi:10.4230/LIPICS.ICALP.2023.61.
- [17] Fedor V. Fomin, Petr A. Golovach, and Dimitrios M. Thilikos. Modification to planarity is fixed parameter tractable. In Proc. of the 36th International Symposium on Theoretical Aspects of Computer Science (STACS), volume 126 of LIPIcs, pages 28:1–28:17, 2019. doi:10.4230/LIPIcs.STACS.2019.28.
- [18] Fedor V. Fomin, Daniel Lokshtanov, Neeldhara Misra, and Saket Saurabh. Planar -Deletion: Approximation, Kernelization and Optimal FPT Algorithms. In Proc. of the 53rd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 470–479, 2012. doi:10.1109/FOCS.2012.62.
- [19] Fedor V. Fomin, Saket Saurabh, and Neeldhara Misra. Graph modification problems: A modern perspective. In Proc. of the 9th International Workshop on Frontiers in Algorithmics (FAW), volume 9130 of LNCS, pages 3–6. Springer, 2015. doi:10.1007/978-3-319-19647-3_1.
- [20] Hanna Furmanczyk, Marek Kubale, and Stanislaw P. Radziszowski. On bipartization of cubic graphs by removal of an independent set. Discrete Applied Mathematics, 209:115–121, 2016. doi:10.1016/J.DAM.2015.10.036.
- [21] Petr A. Golovach, Pim van ’t Hof, and Daniël Paulusma. Obtaining planarity by contracting few edges. Theoretical Computer Science, 476:38–46, 2013. doi:10.1016/J.TCS.2012.12.041.
- [22] Pinar Heggernes, Pim van ’t Hof, Benjamin Lévêque, Daniel Lokshtanov, and Christophe Paul. Contracting graphs to paths and trees. Algorithmica, 68(1):109–132, 2014. doi:10.1007/S00453-012-9670-2.
- [23] Yoichi Iwata and Yusuke Kobayashi. Improved analysis of highest-degree branching for feedback vertex set. Algorithmica, 83(8):2503–2520, 2021. doi:10.1007/S00453-021-00815-W.
- [24] Bart M. P. Jansen, Daniel Lokshtanov, and Saket Saurabh. A near-optimal planarization algorithm. In Proc. of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1802–1811, 2014. doi:10.1137/1.9781611973402.130.
- [25] Ken-ichi Kawarabayashi. Planarity allowing few error vertices in linear time. In Proc. of the 50th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 639–648, 2009. doi:10.1109/FOCS.2009.45.
- [26] Ken-ichi Kawarabayashi, Yusuke Kobayashi, and Bruce A. Reed. The disjoint paths problem in quadratic time. Journal of Combinatorial Theory, Series B, 102(2):424–435, 2012. doi:10.1016/j.jctb.2011.07.004.
- [27] Ken-ichi Kawarabayashi, Robin Thomas, and Paul Wollan. A new proof of the flat wall theorem. Journal of Combinatorial Theory, Series B, 129:204–238, 2018. doi:10.1016/j.jctb.2017.09.006.
- [28] Eun Jung Kim, Alexander Langer, Christophe Paul, Felix Reidl, Peter Rossmanith, Ignasi Sau, and Somnath Sikdar. Linear kernels and single-exponential algorithms via protrusion decompositions. ACM Transactions on Algorithms, 12(2):21:1–21:41, 2016. doi:10.1145/2797140.
- [29] Tomasz Kociumaka and Marcin Pilipczuk. Deleting Vertices to Graphs of Bounded Genus. Algorithmica, 81(9):3655–3691, 2019. doi:10.1007/s00453-019-00592-7.
- [30] Tuukka Korhonen, Michal Pilipczuk, and Giannos Stamoulis. Minor containment and disjoint paths in almost-linear time. In Proc. of the 65th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 53–61, 2024. doi:10.1109/FOCS61266.2024.00014.
- [31] R. Krithika, Pranabendu Misra, and Prafullkumar Tale. A single exponential-time FPT algorithm for cactus contraction. Theoretical Computer Science, 954:113803, 2023. doi:10.1016/J.TCS.2023.113803.
- [32] John M. Lewis and Mihalis Yannakakis. The node-deletion problem for hereditary properties is NP-complete. Journal of Computer and System Sciences, 20(2):219–230, 1980. doi:10.1016/0022-0000(80)90060-4.
- [33] Shaohua Li and Marcin Pilipczuk. An improved FPT algorithm for independent feedback vertex set. Theory of Computing Systems, 64(8):1317–1330, 2020. doi:10.1007/S00224-020-09973-W.
- [34] Wenjun Li, Qilong Feng, Jianer Chen, and Shuai Hu. Improved kernel results for some FPT problems based on simple observations. Theoretical Computer Science, 657:20–27, 2017. doi:10.1016/J.TCS.2016.06.012.
- [35] Carlos V. G. C. Lima, Dieter Rautenbach, Uéverton S. Souza, and Jayme Luiz Szwarcfiter. On the computational complexity of the bipartizing matching problem. Annals of Operations Research, 316(2):1235–1256, 2022. doi:10.1007/S10479-021-03966-9.
- [36] Carlos Vinícius G. C. Lima, Dieter Rautenbach, Uéverton S. Souza, and Jayme Luiz Szwarcfiter. Decycling with a matching. Information Processing Letters, 124:26–29, 2017. doi:10.1016/J.IPL.2017.04.003.
- [37] Dániel Marx and Ildikó Schlotter. Obtaining a planar graph by vertex deletion. Algorithmica, 62(3-4):807–822, 2012. doi:10.1007/s00453-010-9484-z.
- [38] Laure Morelle, Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. Faster parameterized algorithms for modification problems to minor-closed classes. TheoretiCS, 3, 2024. doi:10.46298/THEORETICS.24.19.
- [39] Laure Morelle, Ignasi Sau, and Dimitrios M. Thilikos. Vertex identification to a forest. CoRR, 2024. doi:10.48550/arXiv.2409.08883.
- [40] Rolf Niedermeier. Invitation to fixed parameter algorithms, volume 31. Oxford University Press, 2006. doi:10.1093/ACPROF:OSO/9780198566076.001.0001.
- [41] Fábio Protti and Uéverton S. Souza. Decycling a graph by the removal of a matching: new algorithmic and structural aspects in some classes of graphs. Discrete Mathematics & Theoretical Computer Science, 20(2), 2018. doi:10.23638/DMTCS-20-2-15.
- [42] 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.
- [43] Neil Robertson and Paul D. Seymour. Graph Minors. XX. Wagner’s conjecture. Journal of Combinatorial Theory, Series B, 92(2):325–357, 2004. doi:10.1016/j.jctb.2004.08.001.
- [44] Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. k-apices of minor-closed graph classes. II. Parameterized Algorithms. ACM Transactions on Algorithms, 18(3):21:1–21:30, 2022. doi:10.1145/3519028.
- [45] Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. k-apices of minor-closed graph classes. I. Bounding the obstructions. Journal of Combinatorial Theory, Series B, 161:180–227, 2023. doi:10.1016/J.JCTB.2023.02.012.
- [46] Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. A more accurate view of the Flat Wall Theorem. Journal of Graph Theory, 107(2):263–297, 2024. doi:10.1002/jgt.23121.
- [47] Ignasi Sau, Giannos Stamoulis, and Dimitrios M. Thilikos. Parameterizing the quantification of CMSO: model checking on minor-closed graph classes. In Proc. of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3728–3742, 2025. doi:10.1137/1.9781611978322.124.
- [48] Dekel Tsur. Faster deterministic algorithm for co-path set. Information Processing Letters, 180:106335, 2023. doi:10.1016/J.IPL.2022.106335.
- [49] Mihalis Yannakakis. Node- and Edge-Deletion NP-Complete Problems. In Proc. of the 10th Annual ACM Symposium on Theory of Computing, pages 253–264, 1978. doi:10.1145/800133.804355.
