Many optimization problems in graphs can be expressed as follows: given a graph , find a largest vertex set such that , the subgraph of induced by , satisfies some property. Examples include Independent Set (the property of being edgeless), Feedback Vertex Set (the property of being acyclic), and Planarization (the property of being planar). Here, Feedback Vertex Set and Planarization are customarily phrased in the complementary form that asks for minimizing the complement of : given , find a smallest vertex set such that has the desired property. While all problems considered in this paper can be viewed in these two ways, for the sake of clarity we focus on the maximization formulation.
Formally, we shall consider the following Max Induced -Subgraph problem. Fix a graph class that is hereditary, that is, closed under taking induced subgraphs. Then, given a graph , the goal is to find a largest vertex subset such that . Our focus is on exact algorithms for this problem with running time expressed in terms of , the number of vertices of . Clearly, as long as the graphs from can be recognized in polynomial time, the problem can be solved in time by brute-force; we are interested in non-trivial improvements over this approach.
The complexity of Max Induced -Subgraph was studied as early as in 1980 by Lewis and Yannakakis , who proved that when the graph class does not contain all graphs, the problem is NP-hard. Recently, Komusiewicz  inspected the reduction of Lewis and Yannakakis and concluded that under the Exponential Time Hypothesis (ETH) one can even exclude the existence of subexponential-time algorithms for the problem, that is, ones with running time . While the result of Komusiewicz  excludes significant improvements in the running time, there is still room for improvement in the base of the exponent. Indeed, for various classes of graphs , algorithms with running time for some are known; see e.g. [3, 12, 13, 14, 21] and the references therein.
Another direction, which is of main interest to us, is to impose more conditions on the input graphs in the hope of obtaining faster algorithms for restricted cases. Formally, we fix another hereditary graph class and consider Max Induced -Subgraph where the input graph is additionally required to belong to .
In this line of research, the class of edgeless graphs, which corresponds to the classical Max Independent Set (MIS) problem, has been extensively studied. Suppose is the class of -free graphs, that is, graphs that exclude some fixed graph as an induced subgraph. As observed by Alekseev , the problem is NP-hard on -free graphs unless is a path or a subdivision of the claw (); the reduction of  actually excludes the existence of a subexponential-time algorithm under ETH in these cases. On the positive side, the maximal classes for which polynomial-time algorithms are known are the -free graphs  and the fork-free graphs . It would be consistent with our knowledge if MIS was polynomial-time solvable on -free graphs whenever is a path or a subdivision of the claw.
It turns out that if we only aim at subexponential-time instead of polynomial-time algorithms, many more tractability results can be obtained for MIS, and usually they are also much simpler conceptually. Bacsó et al.  showed that MIS can be solved in time on -free graphs, for every . Very recently, Chudnovsky et al.  reported a -time algorithm on long-hole-free graphs, which are graphs that exclude every cycle of length at least as an induced subgraph.
In the light of the results above, it is natural to ask whether structural assumptions on the class from which the input is drawn, like e.g. -freeness, can help in the design of subexponential-time algorithms for other maximum induced subgraph problems, beyond being the class of edgeless graphs. This is precisely the question we investigate in this work.
We identify three properties that together provide a way to solve the Max Induced -Subgraph problem on graphs from in subexponential time, where and are hereditary graph classes. They are as follows:
The class should consist of sparse graphs. To be specific, let us assume that every -vertex graph from has edges.
The class may contain dense graphs, but they should admit balanced separators whose size is somehow governed by the density. To be specific, let us assume that every graph from with maximum degree has a balanced separator of size , or that every graph from with edges has a balanced separator of size .
The Max Induced -Subgraph problem on graphs from can be solved in time, where is the treewidth of the input graph. Here, notation hides polylogarithmic factors.
We show that if these conditions are simultaneously satisfied, then the Max Induced -Subgraph problem on graphs from can be solved in time in the presence of balanced separators of size and in time for balanced separators of size . The precise statement and proof of this result can be found in Section 2.
The conditions on look natural and are satisfied by various specific classes of interest, like forests (corresponding to Feedback Vertex Set) and planar graphs (corresponding to Planarization). On the other hand, the condition on looks more puzzling. However, there are certain non-sparse classes of graphs where the existence of such balanced separators has been established. For instance, balanced separators of size are known to exist in -free graphs for any fixed , and in long-hole-free graphs . The existence of balanced separators of size is known for string graphs, which are intersection graphs of arc-connected subsets of the plane, and more generally for intersection graphs of connected subgraphs in any proper minor-closed class . All these observations yield a number of concrete corollaries to our main result, which are gathered in Section 3. In Section 4, we discuss some lower bounds: we show that if is the class of forests (corresponding to the Feedback Vertex Set problem) and is characterized by a single excluded induced subgraph, then under the Exponential Time Hypothesis one cannot hope for subexponential-time algorithms in greater generality than provided by our main result.
2 Main result
We use standard graph notation. We assume the reader’s familiarity with treewidth. We recall some notation for tree decompositions in Section 5, where it is actually needed.
For a graph , a set is a balanced separator if every connected component of has at most vertices. It is known that small balanced separators can be used to construct tree decompositions of small width, as made explicit in the following lemma.
[] If every subgraph of a graph has a balanced separator of size at most , then the treewidth of is .
Now, we are ready to state and prove our main result.
Let and be classes of graphs that satisfy the following conditions:
Every -vertex graph from has edges.
The class is closed under taking induced subgraphs.
Given a graph with vertices and treewidth , one can find a largest set such that in time.
Furthermore, let the class satisfy one of the following conditions:
Every graph in with maximum degree has a balanced separator of size , or
Every graph in with vertices and maximum degree has a balanced separator of size .
Then, given an -vertex graph , one can find a largest set such that in time
Let a constant be defined as follows, depending on which of the two conditions is satisfied by :
We devise a branching algorithm that finds a largest set such that in time. This matches the complexity bounds from the statement of the theorem.
Let be the input graph and be the number of its vertices. Consider a fixed solution , that is, a largest set such that . Let be the set of vertices of degree greater than in . By property i, we have .
The algorithm guesses the set exhaustively, by trying all subsets of of the appropriate sizes , which results in branches. Fix one such branch and assume, for the purpose of further description of the algorithm, that it corresponds to the true set (i.e., the one obtained from the fixed solution ). Let .
Suppose that contains a vertex of degree at least . If , then has degree at most in (since ). The algorithm further guesses that and discards (one branch), or it guesses that and discards all but at most neighbors of in (at most branches). In the latter case, we do not fix the assumption that or any particular neighbor of belongs to , so that the vertices that have survived this step can still be discarded in subsequent branching steps.
The step described above is repeated exhaustively. The overall number of branches generated in this way can be bounded as follows, where :
Once the branching step can no longer be applied, we obtain an induced subgraph of of maximum degree less than . In the branch where all the choices have been made correctly (i.e., according to the fixed solution ), still contains all vertices from .
By property ii, we have . Thus satisfies either i or ii, which means that has a balanced separator of size in the former case or in the latter case. In both cases, the size of the separator is . Moreover, by the same argument, balanced separators of that size also exist in every subgraph of . Therefore, by Section 2, we conclude that has treewidth . Since , it follows that the graph also has treewidth .
We know that and, in the branch where all choices have been made correctly, this graph contains the entire maximum-size solution . Now, we apply the procedure assumed in iii to the graph and observe that in the correct branch it finds some maximum-size solution (possibly different from ). Let us point out that in this step it is not sufficient to consider only the graph , as the vertices from introduce some additional constraints on the solution we are looking for.
For the time complexity, the algorithm considers branches and in each of them it executes the procedure assumed in iii in time, which gives the total running time of . ∎
The condition i in the statement of Section 2 can be relaxed to “every -vertex graph from has edges, for some constant ”. Then, we can follow the same approach with the following modification: we choose in case of i and in case of ii, and replace the threshold for branching on high-degree vertices from to . This way, we obtain algorithms with running time for property i and for property ii. This running time is subexponential for every .
One can also imagine unifying properties i and ii into the existence of a balanced separator of size , for some constants . However, then, one needs to be careful when choosing so that it belongs to the interval . As we did not find concrete examples of interesting graph classes for which this approach would yield non-trivial results and which would not satisfy either i or ii, we refrain from discussing further details here.
In this section, we discuss possible classes and which satisfy the conditions of Section 2. For some choices of , we obtain well-studied computational problems:
for matchings, we obtain Max Induced Matching,
for forests, we obtain Max Induced Forest, also known as Feedback Vertex Set,
for graphs of maximum degree , where is fixed, we obtain Max Induced Degree- Subgraph,
for planar graphs, we obtain Max Induced Planar Subgraph, also known as Planarization,
for graphs embeddable in , where the surface is fixed, we obtain Max Induced -Embeddable Subgraph,
for graphs of degeneracy at most , where is fixed, we obtain Max Induced -Degenerate Subgraph.
Given a graph of treewidth , its tree decomposition of width at most can be computed in time (see e.g. [9, Section 7.6]). Therefore, for the purpose of verifying property iii, we can assume that a tree decomposition of width is additionally provided on input. While -time algorithms are quite straightforward and well known for the first two problems on the list, this is not necessarily the case for the others. For Max Induced Degree- Subgraph, an algorithm with running time can be easily derived from the meta-theorem of Pilipczuk . Algorithms for Max Induced Planar Subgraph and, more generally, Max Induced -Embeddable Subgraph, were provided by Kociumaka and Pilipczuk . Finally, we give a suitable algorithm for Max Induced -Degenerate Subgraph in Section 5 in Section 5.
It may be tempting to consider, as , the graphs with no even cycle (not necessarily induced), for some fixed integer . This is because such graphs have edges , and thus they satisfy the generalization of property i mentioned in Section 2 for . However, for these classes, property iii turns out to be problematic: for any fixed , there is no algorithm for a minimum set of vertices hitting all (non-induced) copies of in a graph with treewidth with running time unless the ETH fails  (this bound appears to be essentially tight, as the problem can be solved in time ). It is unclear whether the additional assumption that the input graph belongs to some class , considered here, can help.
Now, let us consider classes . Examples of classes satisfying property i in Section 2 come from forbidding some induced subgraphs. Bacsó et al.  proved that -free graphs with maximum degree have treewidth . Very recently, Chudnovsky et al.  observed that long-hole-free graphs, that is, graphs with no induced cycles of length at least , also have balanced separators of size .
An example of a class satisfying property ii is the class of string graphs—intersection graphs of arc-connected subsets of the plane. Lee  showed that they admit balanced separators of size , where is the number of edges. In fact, he proved a more general result that if is a class of graphs excluding a fixed graph as a minor, then intersection graphs of connected subgraphs of graphs from admit balanced separators of size . String graphs are precisely the intersection graphs of connected subgraphs of planar graphs.
Summing up, we obtain the following.
Each of the following problems can be solved in time on -free graphs (for every fixed ) and in long-hole-free graphs, and in time on string graphs:
Max Induced Matching,
Max Induced Forest,
Max Induced Degree- Subgraph, for every fixed ,
Max Induced Planar Subgraph,
Max Induced -Embeddable Subgraph, for every fixed surface ,
Max Induced -Degenerate Subgraph, for every fixed .
We note that subexponential-time algorithms for Max Induced Matching and Max Induced Forest on string graphs were already known , even with a better running time than provided above. As we have argued, in Section 3, we can replace string graphs with intersection graphs of connected subgraphs of graphs from , where is any class of graphs excluding a fixed graph as a minor; this is because the result of Lee  holds in that generality.
4 Max Induced Forest in -free graphs
Our original motivation was the Max Induced Forest problem. In the previous section, we discussed a subexponential-time algorithm solving it on -free graphs. We now show that as long as the considered class of inputs is characterized by a single excluded induced subgraph, that is, we investigate Max Induced Forest on -free graphs for a fixed graph , we cannot hope for more positive results. Namely, it turns out that if is not a linear forest (i.e., a collection of vertex-disjoint paths), the problem is unlikely to admit a polynomial-time or even a subexponential-time algorithm on -free graphs. Specifically, we obtain the following dichotomy.
Let be a fixed graph.
If is a linear forest, then the Max Induced Forest problem can be solved in time on -free graphs with vertices.
Otherwise, on -free graphs, the Max Induced Forest problem is NP-complete and cannot be solved in time unless the ETH fails.
Section 4 1 follows from Section 3, because every linear forest is an induced subgraph of some path. Statement 2 follows from a combination of arguments already existing in the literature. However, since the proof is simple, we include it for the sake of completeness.
We prove section 4 2 in two steps. First, we consider graphs that contain a cycle or two branch vertices, that is, vertices of degree at least . In this case, we can apply the standard argument of subdividing every edge a suitable number of times, cf. [7, Theorem 3].
Let be a fixed graph that either contains a cycle or has a connected component with at least two branch vertices. Then Max Induced Forest is NP-complete on -free graphs. Moreover, there is no algorithm solving Max Induced Forest in time for -vertex -free graphs unless the ETH fails.
We reduce from Max Induced Forest in graphs with maximum degree ; it is known that this problem is NP-complete and has no subexponential-time algorithm assuming ETH . Let be a graph with vertices and maximum degree . Let be the graph obtained from by subdividing every edge times. It is straightforward to observe that has an induced forest on vertices if and only if has an induced forest on vertices. Moreover, the number of vertices in is linear in .
Finally, we show that is -free. First, observe that if contains a cycle, then cannot be a subgraph of , as the girth of is greater than . On the other hand, the distance between any two branch vertices in is at least , so does not contain as a subgraph in case has two branch vertices in the same connected component. ∎
By Section 4, the only graphs for which we might hope for a polynomial-time or even a subexponential-time algorithm for Max Induced Forest on -free graphs are collections of disjoint subdivided stars. To resolve this case, we will show that the problem remains hard for line graphs. Recall that the line graph of a graph is the graph whose vertices are the edges of and where the adjacency relation corresponds to the relation of having a common endpoint in .
Actually, Chiarelli et al.  reported that the hardness of Max Induced Forest on line graphs was observed by Speckenmeyer in his PhD thesis . However, we were unable to find this result there. Therefore, we provide the easy proof, which boils down to essentially the same argument as in [7, Theorem 5].
Max Induced Forest is NP-complete on line graphs. Moreover, there is no algorithm solving Max Induced Forest in time for -vertex line graphs unless the ETH fails.
We reduce from the Hamiltonian Path problem, which is NP-complete and has no subexponential-time algorithm, even if the input graph has linearly many edges . Let be a graph, which is the input instance of Hamiltonian Path.
First, note that any induced forest in corresponds to a collection of vertex-disjoint paths in . More formally, consider a set , such that is a forest. We claim that the subgraph of is a collection of vertex-disjoint paths. Suppose not. This means that contains a vertex of degree at least or a cycle . In the former case, the edges incident to in form a clique in . In the latter case, the edges of the cycle form a cycle in . In either case, we get a contradiction to the assumption that is a forest.
We claim that has a Hamiltonian path if and only if has an induced forest on vertices. Indeed, the edges of a Hamiltonian path in induce a path (in particular, a forest) in . For the converse, suppose that has an induced forest on at least vertices. By the observation above, this induced forest corresponds to a collection of vertex-disjoint paths in with at least edges in total. This is only possible if this collection consists of a single path of length , that is, a Hamiltonian path in .
Finally, observe that the number of vertices of is equal to the number of edges of , which is linear in the number of vertices of . ∎
Recall that line graphs are claw-free, that is, they contain no induced copy of . Thus Section 4 implies that if contains any star with at least leaves, then Max Induced Forest remains NP-complete and has no subexponential-time algorithm on -free graphs unless ETH fails. Section 4 2 follows from combining Section 4 and Section 4.
5 Largest induced degenerate subgraph in low-treewidth graphs
This section is devoted to the proof of the following result, which we used in Section 3.
For every fixed , there is an algorithm for Max Induced -Degenerate Subgraph with running time , where is the treewidth of the input graph and is the number of its vertices.
Preliminaries on tree decompositions.
First, we introduce some notation and terminology. A tree decomposition of a graph is a tree together with a mapping that assigns a bag to each node of in such a way that the following conditions hold:
for each , the set of nodes with induces a connected non-empty subtree of ; and
for each , there exists a node such that .
The width of a tree decomposition is , and the treewidth of a graph is the minimum width of a tree decomposition of .
Henceforth, all tree decompositions will be rooted: the underlying tree has a prescribed root vertex . This gives rise a natural ancestor-descendant relation: we write if is an ancestor of (where possibly ). Then, for a node of , we define the component at as
A nice tree decomposition is a normalized form of a rooted tree decomposition in which every node is of one of the following four kinds.
Leaf node: a node with no children and with .
Introduce node: a node with one child such that for some vertex .
Forget node: a node with one child such that for some vertex .
Join node: a node with two children and such that .
Moreover, we require that the root of the nice tree decomposition satisfies .
It is known that any given tree decomposition of width of an -vertex graph can be transformed in time into a nice tree decomposition of of width at most as large, see [9, Lemma 7.4]. Moreover, given an -vertex graph of treewidth , a tree decomposition of of width at most can be computed in time , and this tree decomposition has at most nodes. By combining these two results, for the proof of Section 5, we can assume that the input graph is supplied with a nice tree decomposition of width , where . From now on, our goal is to design a suitable dynamic programming algorithm working on this decomposition with running time .
Dynamic programming states.
The main idea behind our dynamic programming algorithm is to view the notion of degeneracy via vertex orderings, as expressed in the following fact.
[Folklore] A graph is -degenerate if and only if there is a linear ordering of vertices of such that every vertex of has at most neighbors that are smaller in .
Hence, the problem considered in Section 5 can be restated as follows: find a largest set that admits a linear ordering in which every vertex of has at most neighbors in that are smaller in . Intuitively, our dynamic programming will therefore keep track of the intersection of the bag with , the restriction of to this intersection; and how many smaller neighbors of each vertex from this intersection have been already forgotten.
We now proceed with formal details. For a node of , a set , a linear ordering of , and a function , we define as follows. The value is the maximum size of a set such that admits a linear ordering with the following properties: restricted to is equal to and for every , there are at most vertices that are adjacent to and smaller than in . Note that other neighbors of that belong to are not taken into consideration when verifying the quota imposed by . Note also that such a set always exists, as satisfies the criteria.
For a fixed node , the total number of triples as above is at most
Hence, we now show how to compute the values in a bottom-up manner, so that the values for a node are computed based on the values for the children of in time. The answer to the problem corresponds to the value , where is the root of . While is just the size of a largest feasible solution, an actual solution can be recovered from the dynamic programming tables using standard methods within the same complexity: for every computed value , we store the way this value was obtained, and then we trace back the solution from in a top-down manner.
It remains to provide recursive formulas for the values of . We only present the formulas, while the verification of their correctness, which follows easily from the definition of , is left to the reader. As usual, we distinguish cases depending on the type of .
Leaf node . Then we have only one value:
Introduce node with child such that . Then
Forget node with child such that . Then we have
where is the set comprising the pairs satisfying the following:
is a vertex ordering of whose restriction to is equal to ; and
is such that for all that are adjacent to and larger than in , we have , and for all other , we have . Moreover, we require that , where is the number of vertices that are adjacent to and smaller than in .
Join node with children and . Then
where means that for each .
It is straightforward to see that using the formulas above, each value can be computed in time based on the values computed for the children of . This completes the proof of Section 5.
-  Vladimir E. Alekseev. The effect of local constraints on the complexity of determination of the graph independence number. Combinatorial-algebraic methods in applied mathematics, pages 3–13, 1982. (in Russian).
-  Gábor Bacsó, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Zsolt Tuza, and Erik Jan van Leeuwen. Subexponential-time algorithms for Maximum Independent Set in -free and broom-free graphs. Algorithmica, 81(2):421–438, 2019.
-  Ivan Bliznets, Fedor V. Fomin, Michał Pilipczuk, and Yngve Villanger. Largest chordal and interval subgraphs faster than . Algorithmica, 76(2):569–594, 2016. doi:10.1007/s00453-015-0054-2.
-  Hans L. Bodlaender, Pål Grønås Drange, Markus S. Dregi, Fedor V. Fomin, Daniel Lokshtanov, and Michał Pilipczuk. A 5-approximation algorithm for treewidth. SIAM J. Comput., 45(2):317–378, 2016. doi:10.1137/130947374.
-  John Adrian Bondy and Miklós Simonovits. Cycles of even length in graphs. J. Combin. Theory Ser. B, 16(2):97–105, 1974.
-  Édouard Bonnet and Paweł Rzążewski. Optimality program in segment and string graphs. Algorithmica, 81(7):3047–3073, 2019. doi:10.1007/s00453-019-00568-7.
-  Nina Chiarelli, Tatiana Romina Hartinger, Matthew Johnson, Martin Milanič, and Daniël Paulusma. Minimum connected transversals in graphs: New hardness results and tractable cases using the price of connectivity. Theor. Comput. Sci., 705:75–83, 2018. doi:10.1016/j.tcs.2017.09.033.
-  Maria Chudnovsky, Marcin Pilipczuk, Michał Pilipczuk, and Stéphan Thomassé. On the Maximum Weight Independent Set problem in graphs without induced cycles of length at least five. CoRR, abs/1903.04761, 2019. URL: http://arxiv.org/abs/1903.04761, arXiv:1903.04761.
-  Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
-  Marek Cygan, Dániel Marx, Marcin Pilipczuk, and Michal Pilipczuk. Hitting forbidden subgraphs in graphs of bounded treewidth. Inf. Comput., 256:62–82, 2017. doi:10.1016/j.ic.2017.04.009.
-  Zdeněk Dvořák and Sergey Norin. Treewidth of graphs with balanced separations. J. Combin. Theory Ser. B, 137:137–144, 2019. doi:10.1016/j.jctb.2018.12.007.
-  Fedor V. Fomin, Serge Gaspers, Daniel Lokshtanov, and Saket Saurabh. Exact algorithms via monotone local search. In STOC 2016, pages 764–775. ACM, 2016.
-  Fedor V. Fomin, Ioan Todinca, and Yngve Villanger. Exact algorithm for the maximum induced planar subgraph problem. In ESA 2011, volume 6942 of LNCS, pages 287–298. Springer, 2011.
-  Fedor V. Fomin, Ioan Todinca, and Yngve Villanger. Large induced subgraphs via triangulations and CMSO. SIAM J. Comput., 44(1):54–87, 2015.
-  Andrzej Grzesik, Tereza Klimošová, Marcin Pilipczuk, and Michał Pilipczuk. Polynomial-time algorithm for Maximum Weight Independent Set on -free graphs. In SODA 2019, pages 1257–1271. SIAM, 2019.
-  Tomasz Kociumaka and Marcin Pilipczuk. Deleting vertices to graphs of bounded genus. CoRR, abs/1706.04065, 2017. URL: http://arxiv.org/abs/1706.04065, arXiv:1706.04065.
-  Christian Komusiewicz. Tight running time lower bounds for vertex deletion problems. ACM Trans. on Comput. Theory (TOCT), 10(2):6:1–6:18, 2018.
-  James R. Lee. Separators in region intersection graphs. In ITCS 2017, volume 67 of LIPIcs, pages 1:1–1:8. Schloss Dagstuhl—Leibniz-Zentrum für Informatik, 2017.
-  John M. Lewis and Mihalis Yannakakis. The node-deletion problem for hereditary properties is NP-complete. J. Comput. Syst. Sci., 20(2):219–230, 1980. doi:10.1016/0022-0000(80)90060-4.
-  Vadim V. Lozin and Martin Milanič. A polynomial algorithm to find an independent set of maximum weight in a fork-free graph. J. Discrete Algorithms, 6(4):595–604, 2008.
-  Marcin Pilipczuk and Michał Pilipczuk. Finding a maximum induced degenerate subgraph faster than . In IPEC 2012, volume 7535 of LNCS, pages 3–12. Springer, 2012.
-  Michał Pilipczuk. Problems parameterized by treewidth tractable in single exponential time: A logical approach. In MFCS 2011, volume 6907, pages 520–531. Springer, 2011.
-  Ewald Speckenmeyer. Untersuchungen zum Feedback Vertex Set Problem in ungerichteten Graphen. PhD thesis, Universität Paderborn, 1983. In German.