Keywords

1 Introduction

Crossings are one of the main aspects that negatively affect the readability of drawings [20]. It is therefore natural to try and modify a given graph in such a way that it can be drawn without crossings while preserving as much of the information as possible. We consider three different operations.

A deletion operation simply removes a vertex from the graph. A vertex explosion replaces a vertex v by \(\deg (v)\) degree-1 vertices, each incident to exactly one edge that was originally incident to v. Finally, a vertex split replaces a vertex v by two distinct vertices \(v_1\) and \(v_2\) and distributes the edges originally incident to v arbitrarily to \(v_1\) and \(v_2\).

Nöllenburg et al. [18] have recently studied the vertex splitting problem, which is known to be NP-complete [11]. In particular, they gave a non-uniform FPT-algorithm for deciding whether a given graph can be planarized with at most k splits. We observe that, since degree-1 vertices can always be inserted into a planar drawing, the vertex explosion model and the vertex deletion model are equivalent for obtaining planar graphs. Note that this is not necessarily the case for other target graph classes (see, for example, Fig. 1). The problem of deleting vertices to obtain a planar graph is also known as Vertex Planarization and has been studied extensively in the literature [13, 15,16,17]. In particular, Jansen et al. [13] gave an FPT-algorithm with running time \(O(2^{O(k \log k)} \cdot n)\).

Ahmed et al. [2] investigated the problem of splitting the vertices of a bipartite graph so that it admits a 2-layered drawing without crossings. They assume that the input graph is bipartite and only the vertices of one of the two sets in the bipartition may be split. Under this condition, they give an \(O(k^6)\)-kernel for the vertex explosion model, which results in an \(O(2^{O(k^6)}m)\)-time algorithm. They ask whether similar results can be obtained in the vertex splitting model. Figure 1 illustrates the three operations in the context of 2-layered drawingsFootnote 1.

Fig. 1.
figure 1

Given the shown bipartite graph, a crossing-free 2-layered drawing can be obtained using one vertex deletion (a), two vertex explosions (b), or three vertex splits (c).

We note that a graph admits a 2-layer drawing without crossings if and only if it has pathwidth at most 1, i.e., it is a disjoint union of caterpillars [3, 9]. Motivated by this, we more generally consider the problem of turning a graph \(G=(V,E)\) into a graph of pathwidth at most 1 by the above operations. In order to model the restriction of Ahmed et al. [2] that only one side of their bipartite input graph may be split, we further assume that we are given a subset \(S \subseteq V\), to which we may apply modification operations as part of the input. We define that the new vertices resulting from an operation are also included in S.

More formally, we consider the following problems, all of which have been shown to be NP-hard [1, 19].

figure a
figure b

We note that the analogous problem with the deletion operation has been studied extensively [8, 19, 23]. Here, a branching algorithm with running time \(O(3.888^k \cdot n^{O(1)})\) [23] and a quadratic kernel [8] are known. Our results are as follows.

First, in Sect. 3, we show that POVE admits a kernel of size \(O(k^2)\) and an algorithm with running time \(O(4^km)\), thereby improving over the results of Ahmed et al. [2] in a more general setting.

Second, in Sect. 4, we show that POVS has a kernel of size 16k and it admits an algorithm with running time \(O((6k+12)^k \cdot m)\). This answers the open question of Ahmed et al. [2].

Finally, in Sect. 5, we consider the problem \(\varPi \ \textsc {Vertex Splitting} \)(\(\varPi \textsc {-VS} \)), the generalized version of the splitting problem where the goal is to obtain a graph of a specific graph class \(\varPi \) using at most k split operations. Eppstein et al. [10] recently studied the similar problem of deciding whether a given graph G is k-splittable, i.e., whether it can be turned into a graph of \(\varPi \) by splitting every vertex of G at most k times. For graph classes \(\varPi \) that can be expressed in monadic second-order graph logic (MSO\(_2\), see [7]), they gave an FPT algorithm parameterized by the solution size k and the treewidth of the input graph. We adapt their algorithm for the problem \(\varPi \textsc {-VS} \), resulting in an FPT algorithm parameterized by the solution size k for MSO\(_2\)-definable graph classes \(\varPi \) of bounded treewidth. Using a similar algorithm, we obtain the same result for the problem variant using vertex explosions.

2 Preliminaries

A parameterized problem L with parameter k is non-uniformly fixed-parameter tractable if, for every value of k, there exists an algorithm that decides L in time \(f(k) \cdot n^{O(1)}\) for some computable function f. If there is a single algorithm that satisfies this property for all values of k, then L is (uniformly) fixed-parameter tractable.

Given a graph G, we let n and m denote the number of vertices and edges of G, respectively. Since we can determine the subgraph of G that contains no isolated vertices in O(m) time, we assume, without loss of generality, that \(n \in O(m)\). For a vertex \(v \in V(G)\), we let \(N(v) {:}{=}\{u \in V(G) \mid {{\,\textrm{adj}\,}}(v, u)\}\) and \(N[v] {:}{=}N(v) \cup \{v\}\) denote the open and closed neighborhood of v in G, respectively.

We refer to vertices of degree 1 as pendant vertices. For a vertex v of G, we let \({\mathrm {deg^*}(v) {:}{=}|\{u \in N(v) \mid \deg (u) > 1\}|}\) denote the degree of v ignoring its pendant neighbors. If \(\mathrm {deg^*}(v) = d\), we refer to v as a vertex of degree* d. A graph is a caterpillar (respectively a pseudo-caterpillar), if it consists of a simple path (a simple cycle) with an arbitrary number of adjacent pendant vertices. The path (the cycle) is called the spine of the (pseudo-)caterpillar.

Fig. 2.
figure 2

(a) The graph \(T_2\). (b) Two graphs that do not contain \(T_2\) as a subgraph, but both contain \(N_2\) (marked in orange) as a substructure. (Color figure online)

Philip et al. [19] mainly characterized the graphs of pathwidth at most 1 as the graphs containing no cycles and no \(T_2\) (three simple paths of length 2 that all share an endpoint; see Fig. 2a) as a subgraph. We additionally use slightly different sets of forbidden substructures. An \(N_2\) substructure consists of a root vertex r adjacent to three distinct vertices of degree at least 2. Note that every \(T_2\) contains an \(N_2\) substructure, however, the existence of an \(N_2\) substructure does not generally imply the existence of a \(T_2\) subgraph; see Fig. 2b. In the following proposition, we state the different characterizations for graphs of pathwidth at most 1 that we use in this work.

Proposition 1

(\(\star \)Footnote 2). For a graph G, the following statements are equivalent.

  1. a)

    G has pathwidth at most 1

  2. b)

    every connected component of G is a caterpillar

  3. c)

    G is acyclic and contains no \(T_2\) subgraph

  4. d)

    G is acyclic and contains no \(N_2\) substructure

  5. e)

    G contains no \(N_2\) substructure and no connected component that is a pseudo-caterpillar.

We define the potential of \(v \in V(G)\) as \(\mu (v) {:}{=}\textrm{max}(\mathrm {deg^*}(v) - 2, 0)\). The global potential \({\mu (G) {:}{=}\sum _{v \in V(G)} \mu (v)}\) is defined as the sum of the potentials of all vertices in G. Observe that \(\mu (G) = 0\) if and only if G contains no \(N_2\) substructure. The global potential thus indicates how far away we are from eliminating all \(N_2\) substructures from the instance.

Recall that, for the problems POVE and POVS, the set \(S \subseteq V(G)\) marks the vertices of G that may be chosen for the respective operations. We say that a set \(W \subseteq S\) is a pathwidth-one explosion set (POES) of G, if the graph resulting from exploding all vertices in W has pathwidth at most 1.

3 FPT Algorithms for Pathwidth-One Vertex Explosion

In this section, we first show that POVE can be solved in time \(O(4^k \cdot m)\) using bounded search trees. Subsequently, we develop a kernelization algorithm for POVE that yields a quadratic kernel in linear time.

3.1 Branching Algorithm

We start by giving a simple branching algorithm for POVE, similar to the algorithm by Philip et al. [19] for the deletion variant of the problem. For an \(N_2\) substructure X, observe that exploding vertices not contained in X cannot eliminate X, because the degrees of the vertices in X remain the same due to the new degree-1 vertices resulting from the explosion. To obtain a graph of pathwidth at most 1, it is therefore always necessary to explode one of the four vertices of every \(N_2\) substructure by Proposition 1. Our branching rule thus first picks an arbitrary \(N_2\) substructure from the instance and then branches on which of the four vertices of the \(N_2\) substructure belongs to the POES. Recall that S denotes the set of vertices of the input graph that can be exploded.

Branching Rule 1

Let r be the root of an \(N_2\) substructure contained in G and let x, y, and z denote the three neighbors of r in \(N_2\). For every vertex \(v \in \{r, x, y, z\} \cap S\), create a branch for the instance \((G', S \setminus \{v\}, k - 1)\), where \(G'\) is obtained from G by exploding v.

If \(\{r, x, y, z\} \cap S = \emptyset \), reduce to a trivial no-instance instead.

Note that an \(N_2\) substructure can be found in O(m) time by checking, for every vertex v in G, whether v has at least three neighbors of degree at least 2. Also note that vertex explosions do not increase the number of edges of the graph. Since Branching Rule 1 creates at most four new branches, each of which reduces the parameter k by 1, exhaustively applying the rule takes \(O(4^k \cdot m)\) time. By Proposition 1, it subsequently only remains to eliminate connected components that are a pseudo-caterpillar. Since a pseudo-caterpillar can (only) be turned into a caterpillar by exploding a vertex of its spine, the remaining instance can be solved in linear time.

Theorem 1

The problem Pathwidth-One Vertex Explosion can be solved in time \(O(4^k \cdot m)\).

3.2 Quadratic Kernel

We now turn to our kernelization algorithm for POVE. In this section, we develop a kernel of quadratic size, which can be computed in linear time.

We adopt our first two reduction rules from the kernelization of the deletion variant by Philip et al. [19] and show that these rules are also safe for the explosion variant. The first rule reduces the number of pendant neighbors of each vertex to at most one; see Fig. 3a.

Fig. 3.
figure 3

Examples for Reduction Rules 1 (a), 2 (b), 3 (c), and 4 (d). The vertices of S are marked in green (Color figure online).

Reduction Rule 1

(\(\star \)). If G contains a vertex v with at least two pendant neighbors, remove all pendant neighbors of v except one to obtain the graph \(G'\) and reduce the instance to \((G',~{S \cap V(G')},~k)\).

Since a caterpillar has pathwidth at most 1 by Proposition 1, we can safely remove any connected component of G that forms a caterpillar; see Fig. 3b for an example.

Reduction Rule 2

If G contains a connected component X that is a caterpillar, remove X from G and reduce the instance to \((G-X,~{S \setminus V(X)},~k)\).

If G contains a connected component that is a pseudo-caterpillar, then exploding an arbitrary vertex of its spine yields a caterpillar. If the spine contains no vertex of S, the spine is a cycle that cannot be broken by a vertex explosion. However, by Proposition 1, acyclicity is a necessary condition for a graph of pathwidth at most 1. Hence we get the following reduction rule; see Fig. 3c for an illustration.

Reduction Rule 3

Let X denote a connected component of G that is a pseudo-caterpillar. If the spine of X contains a vertex of S, remove X from G and reduce the instance to \((G-X,~{S \setminus V(X)},~k-1)\). Otherwise reduce to a trivial no-instance.

Recall that the degree* of a vertex is the number of its non-pendant neighbors. Our next goal is to shorten paths of degree*-2 vertices to at most two vertices. If we have a path xyz of degree*-2 vertices, we refer to y as a 2-enclosed vertex. Note that exploding a 2-enclosed vertex y cannot eliminate any \(N_2\) substructures from the instance. By Proposition 1, vertex y can thus only be part of an optimal solution if exploding y breaks cycles. If we want to shorten the chain xyz by contracting y into one of its neighbors, we therefore need to ensure that the shortened chain contains a vertex of S if and only if the original chain contained a vertex of S. If \(y \in S\), we cannot simply add one of its neighbors, say x, to S in the reduced instance, because exploding x may additionally remove an \(N_2\) substructure; see Fig. 4 for an example. While shortening paths of degree*-2 vertices to at most three vertices is simple, shortening them to length at most 2 (i.e., eliminating all 2-enclosed vertices) is therefore more involved. In the following, we briefly sketch how this can be achieved in linear time. For the specific reduction rules and the corresponding correctness proofs, we refer to the full version of the paper [4].

Fig. 4.
figure 4

A graph G that has no POES, because the highlighted \(N_2\) substructure contains no vertex of S. For the graph \(G'\) resulting from contracting y into x, the set \(\{x\}\) is a POES. The two instances are therefore not equivalent.

Lemma 1

(\(\star \)). Given an instance of POVE, an equivalent instance without 2-enclosed vertices can be computed in O(m) time.

Sketch of Proof

Given a 2-enclosed vertex y, we show that we can decide greedily whether y is contained in an optimal solution or not. This means that we can either immediately explode y, or we can safely contract it into one of its degree*-2 neighbors. Since y is 2-enclosed, y is not contained in any \(N_2\) substructures and we thus only have to consider cycles containing y. If there exists a cycle C in G with \(C \cap S = \{y\}\) (i.e., y is the only splittable vertex of C), then we can immediately explode y. Otherwise, every cycle containing y contains at least one additional vertex of S. In this case, we can show that there exists a minimum POES of G that does not contain y, thus we can remove y from S and contract it into one of its neighbors, thereby preserving all cycles of the instance. To achieve linear running time, we can show that the set of 2-enclosed vertices that should be exploded can be computed globally using a specialized spanning tree.   \(\square \)

To simplify the instance even further, the following reduction rule removes all degree*-2 vertices v that are adjacent to a vertex x of degree* 1; see Fig. 3d for an illustration. Roughly speaking, since v cannot be contained in a cycle and x substitutes v in all \(N_2\) substructures v is contained in, all forbidden substructures are preserved.

Reduction Rule 4

(\(\star \)). Let v be a degree*-2 vertex of G with non-pendant neighbors x and y, such that x has degree* 1. Remove v from G and add a new edge xy. If \(v \in S\), reduce to \((G - v + xy, (S \setminus \{v\}) \cup \{x\}, k)\). Otherwise reduce to \((G - v + xy, S \setminus \{x\}, k)\).

Recall that the global potential \(\mu (G)\) indicates how far away we are from our goal of eliminating all \(N_2\) substructures from G. With the following lemma, we show that our reduction rules ensure that the number of vertices in the graph G is bounded linearly in the global potential of G.

Lemma 2

After exhaustively applying Reduction Rules 14 and Lemma 1, it holds that \(|V(G)| \le 8 \cdot \mu (G)\).

Proof

Reduction Rule 2 ensures that G contains no vertices of degree* 0. For \(i \in \{1,2\}\), let \(V_i\) denote the set of non-pendant degree*-i vertices of G and let \(V_3\) denote the set of vertices with degree* at least 3. Recall that we defined the global potential as

$$\begin{aligned} \mu (G) = \sum _{v \in V(G)} \mu (v) = \sum _{v \in V(G)}\max (0, \mathrm {deg^*}(v) - 2). \end{aligned}$$

Since all vertices of \(V_1\) and \(V_2\) have degree* at most 2, their potential is 0 and we get

$$\begin{aligned} \mu (G) = \sum _{v \in V_3}(\mathrm {deg^*}(v) - 2) = \sum _{v \in V_3}\mathrm {deg^*}(v) - 2\cdot |V_3|. \end{aligned}$$

Note that \(|V_3| \le \mu (G)\), because each vertex of degree* at least 3 contributes at least 1 to the global potential. We therefore get

$$\begin{aligned} \sum _{v \in V_3}\mathrm {deg^*}(v) \le 3 \cdot \mu (G). \end{aligned}$$
(1)

By Lemma 1, every vertex in \(v \in V_2\) is adjacent to a vertex of \(V_1 \cup V_3\), since otherwise, v would be 2-enclosed. However, Reduction Rule 4 additionally ensures that vertices of \(V_2\) cannot be adjacent to vertices of \(V_1\), thus every vertex of \(V_2\) must be adjacent to a vertex of \(V_3\). Note that two adjacent vertices of \(V_1\) would form a caterpillar, which is prohibited by Reduction Rule 2. Therefore, every vertex of \(V_1\) is also adjacent to a vertex of \(V_3\).

Overall, every vertex of \(V_1\) and \(V_2\) is thus adjacent to a vertex of \(V_3\). Note that every vertex \(v \in V_1\) must additionally have a pendant neighbor, because otherwise, v itself would be a pendant vertex. Hence every vertex of \(V_1\) and \(V_2\) has degree at least 2 and thus contributes to the degree* of its neighbor in \(V_3\). We therefore have \(|V_1| + |V_2| \le \sum _{v \in V_3}\mathrm {deg^*}(v)\), hence \(|V_1| + |V_2| \le 3\cdot \mu (G)\) by Eq. 1. Recall that \(|V_3| \le \mu (G)\), thus \(|V_1| + |V_2| + |V_3| \le 4\cdot \mu (G)\). By Reduction Rule 1, each of these vertices can have at most one pendant neighbor and thus \(|V(G)| \le 8\cdot \mu (G)\).

With Lemma 2, it now only remains to find an upper bound for the global potential \(\mu (G)\). We do this using the following two reduction rules.

Reduction Rule 5

Let v be a vertex of G with potential \(\mu (v) > k\). If \(v \in S\), explode v to obtain the graph \(G'\) and reduce the instance to \((G',~{S \setminus \{v\}},~k-1)\). Otherwise reduce to a trivial no-instance.

Proof

of Safeness. Since exploding a vertex \(u \in V(G)\setminus \{v\}\) decreases \(\mu (v)\) by at most one, after exploding at most k vertices in \(V(G)\setminus \{v\}\) we still have \(\mu (v) > 0\). Because \(\mu (v) > 0\) implies that G contains an \(N_2\) substructure, it is therefore always necessary to explode vertex v by Proposition 1.   \(\square \)

Reduction Rule 6

If \(\mu (G) > 2k^2 + 2k\), reduce to a trivial no-instance.

Proof

of Safeness. By Reduction Rule 5 we have \(\mu (v) \le k\) and consequently \(\mathrm {deg^*}(v) \le k + 2\) for all \(v \in V(G)\). Hence exploding a vertex v decreases the potential of v by at most k and the potential of each of its non-pendant neighbors by at most 1. Overall, k vertex explosions can therefore only decrease the global potential \(\mu (G)\) by at most \(k \cdot (2k + 2)\).   \(\square \)

Because Reduction Rule 6 gives us an upper bound for the global potential \(\mu (G)\), we can now use Lemma 2 to obtain the kernel.

Theorem 2

(\(\star \)). The problem Pathwidth-One Vertex Explosion admits a kernel of size \(16k^2 + 16k\). It can be computed in time O(m).

4 FPT Algorithms for Pathwidth-One Vertex Splitting

In this section, we briefly outline how the results from Sect. 3 can be adapted for the split operation. For detailed proofs, we refer to the full version [4].

4.1 Linear Kernel

One can prove that Reduction Rules 14 and Lemma 1 we used for POVE are also safe for the problem POVS. Since only these are needed to establish the upper bound of \(|V(G)| \le 8 \cdot \mu (G)\) in Lemma 2, the lemma also applies for POVS.

The main difference to the kernelization of POVE lies in the way the global potential changes due to splits. While a vertex explosion can decrease the global potential linearly in k, we can show that a single vertex split decreases \(\mu (G)\) by at most 2. If \(\mu (G) > 2k\), we can thus again reduce to a trivial no-instance. Using Lemma 2 with \(\mu (G) \le 2k\), we obtain the following result.

Theorem 3

(\(\star \)). The problem Pathwidth-One Vertex Splitting admits a kernel of size 16k. It can be computed in time O(m).

4.2 Branching Algorithm

As in Sect. 3.1, our branching algorithm for POVS eliminates every \(N_2\) substructure of G by branching on which of its four vertices should be split. In this case, however, we need to additionally consider the possible ways to split a single vertex. The following lemma helps us limit the number of suitable splits.

Lemma 3

(\(\star \)). For every instance of POVS, there exists a minimum sequence of splits such that every split operation splits off at most two edges.

Theorem 4

(\(\star \)). The problem POVS can be solved in time \(O((6k + 12)^k \cdot m)\).

Sketch of Proof

From the kernelization, we use Reduction Rule 1 reducing pendant vertices, and the above rule that yields the bound \(\mu (G) \le 2k\). Together, these two rules ensure that each vertex has degree at most \(2k+3\). We now branch on the way of splitting an \(N_2\) substructure with root r and neighbors \(\{x,y,z\}\) as above (see Fig. 5). If we split r, then, by Lemma 3, we may assume that we split off one of the neighbors \(\{x, y, z\}\), together with at most one other neighbor of r; these are \(3 \cdot (2k + 3)\) choices. If we split a vertex \(v \in \{x, y, z\}\), then it is necessary that we only split off the edge rv at v, thus there is only one possibility for each of them. Overall, we thus find a branching vector of size \(6k + 12\).   \(\square \)

Fig. 5.
figure 5

(a) An \(N_2\) substructure \(\{r, x, y, z\}\). (b)-(c) Two possible branches eliminating the \(N_2\) substructure. The former splits off edge rx at x, the latter splits off the edges rz and ra at r.

5 FPT Algorithms for Splitting and Exploding to MSO\(_2\)-Definable Graph Classes of Bounded Treewidth

While Sect. 4 focused on the problem of obtaining graphs of pathwidth at most 1 using at most k vertex splits on the input graph, we now consider the problem of splitting vertices to obtain other graph classes. With the following problem, we generalize the problem POVS.

figure c

Nöllenburg et al. [18] showed that, for any minor-closed graph class \(\varPi \), the graph class \(\varPi _k\) containing all graphs that can be modified to a graph in \(\varPi \) using at most k vertex splits is also minor-closed. Robertson and Seymour [21] showed that every minor-closed graph class has a constant-size set of forbidden minors and that it can be tested in cubic time whether a graph contains a given fixed graph as a minor. Since \(\varPi _k\) is minor-closed, this implies the existence of a non-uniform FPT-algorithm for the problem \(\varPi \textsc {-VS} \). Because the graphs of pathwidth at most 1 form a minor-closed graph class, this includes the problem POVS.

Proposition 2

([18]). For every minor-closed graph class \(\varPi \), the problem \(\varPi \textsc {-VS} \) is non-uniformly FPT parameterized by the solution size k.

We say that a graph class \(\varPi \) is MSO\(_2\)-definable, if there exists an MSO\(_2\) (monadic second-order graph logic, see [7]) formula \(\varphi \) such that \(G \models \varphi \) if and only if \(G \in \varPi \). In the following, we show that the problem \(\varPi \textsc {-VS} \) is uniformly FPT parameterized by k if \(\varPi \) is MSO\(_2\)-definable and has bounded treewidth. Since every minor-closed graph class is MSO\(_2\)-definable, this improves the result from Proposition 2 for graph classes of bounded treewidth.

Eppstein et al. [10] showed that the problem of deciding whether a given graph G can be turned into a graph of class \(\varPi \) by splitting each vertex of G at most k times can be expressed as an MSO\(_2\) formula on G, if \(\varPi \) itself is MSO\(_2\)-definable. Using Courcelle’s Theorem [6], this yields an FPT-algorithm parameterized by k and the treewidth of the input graph. Their algorithm exploits the fact that the split operations create at most k copies of each vertex in the graph. Since the same also applies for the problem \(\varPi \textsc {-VS} \), where we may apply at most k splits overall, their algorithm can be straightforwardly adapted for \(\varPi \textsc {-VS} \), thereby implying the following result.

Corollary 1

For every MSO\(_2\)-definable graph class \(\varPi \), the problem \(\varPi \textsc {-VS} \) is FPT parameterized by the solution size k and the treewidth of the input graph.

For a graph class \(\varPi \) of bounded treewidth, we let \(\textrm{tw}(\varPi )\) denote the maximum treewidth among all graphs in \(\varPi \). With the following lemma, we show that, if the target graph class \(\varPi \) has bounded treewidth, then every yes-instance of \(\varPi \textsc {-VS} \) must also have bounded treewidth.

Proposition 3

For a graph class \(\varPi \) of bounded treewidth, let \(\mathcal {I} = (G, S, k)\) be an instance of \(\varPi \textsc {-VS} \). If \(\textrm{tw}(G) > k + \textrm{tw}(\varPi )\), then \(\mathcal {I}\) is a no-instance.

Proof

We first show that a single split operation can reduce the treewidth of G by at most 1. Assume, for the sake of contradiction, that we can obtain a graph \(G'\) of treewidth less than \(\textrm{tw}(G) - 1\) by splitting a single vertex v of G into vertices \(v_1\) and \(v_2\) of \(G'\). Let \(\mathcal {T}\) denote a minimum tree decomposition of \(G'\). Remove all occurences of \(v_1\) and \(v_2\) in \(\mathcal {T}\) and add v to every bag of \(\mathcal {T}\). Observe that the result is a tree decomposition of size less than \(\textrm{tw}(G)\) for G, a contradiction. A single split operation thus decreases the treewidth of the graph by at most 1. Since every graph \(G' \in \varPi \) has \(\textrm{tw}(G') \le \textrm{tw}(\varPi )\), it is thus impossible to obtain a graph of \(\varPi \) with at most k vertex splits if \(\textrm{tw}(G) > k + \textrm{tw}(\varPi )\).   \(\square \)

Given a graph class \(\varPi \) of bounded treewidth, we first determine in time \(f(k + \textrm{tw}(\varPi )) \cdot n\) whether the treewidth of G is greater than \(k + \textrm{tw}(\varPi )\) [5]. If this is the case, then we can immediately report a no-instance by Proposition 3. Otherwise, we know that \(\textrm{tw}(G) \le k + \textrm{tw}(\varPi )\). Since \(\textrm{tw}(\varPi )\) is a constant, we have \(\textrm{tw}(G) \in O(k)\), and thus Corollary 1 yields the following result.

Theorem 5

For every MSO\(_2\)-definable graph class \(\varPi \) of bounded treewidth, the problem \(\varPi \textsc {-VS} \) is FPT parameterized by the solution size k.

Vertex Explosion. We now briefly sketch how these results extend to the problem variant \(\varPi \ \textsc {Vertex Explosion} \)(\(\varPi \textsc {-VE} \)) using vertex explosions instead of vertex splits. In this case, for minor-closed graph classes \(\varPi \), the set of yes-instances of \(\varPi \textsc {-VE} \) is not minor-closed in general, thus the non-uniform FPT algorithm used to obtain Proposition 2 does not work for \(\varPi \textsc {-VE} \). Additionally, the FPT-algorithm by Eppstein et al. [10] for MSO\(_2\)-definable graph classes cannot be straightforwardly adapted for \(\varPi \textsc {-VE} \), since the number of new vertices resulting from explosions is not bounded by a function in k. However, using the approach illustrated in Fig. 6, we obtain the following results.

Lemma 4

(\(\star \)). For every MSO\(_2\)-definable graph class \(\varPi \), the problem \(\varPi \textsc {-VE} \) is FPT parameterized by the treewidth of the input graph.

Theorem 6

(\(\star \)). For every MSO\(_2\)-definable graph class \(\varPi \) of bounded treewidth, the problem \(\varPi \textsc {-VE} \) is FPT parameterized by the solution size k.

We remark that, for arbitrary graph classes \(\varPi \), the question whether a graph of \(\varPi \) can be obtained by applying arbitrarily many vertex splits to at most k vertices in the input graph is not equivalent to \(\varPi \textsc {-VE} \).

Fig. 6.
figure 6

(a) An instance (GS, 2) of \(\varPi \textsc {-VE} \). (b) The corresponding auxiliary graph \(G^\times \) obtained by subdividing each edge in G twice. (c) The graph obtained by exploding \(\{x_1, x_2\}\) in G is the highlighted minor of \(G^\times \). Since \(\varPi \) is MSO\(_2\)-definable, one can express \(\varPi \textsc {-VE} \) using an MSO\(_2\) formula on \(G^\times \).

6 Conclusion

In this work, we studied the problems Pathwidth-One Vertex Explosion and Pathwidth-One Vertex Splitting, obtaining an efficient branching algorithm and a small kernel for each variant. Subsequently, we more generally considered the problem of obtaining a graph of a specific graph class \(\varPi \) using at most k vertex splits (respectively explosions). For MSO\(_2\)-definable graph classes \(\varPi \) of bounded treewidth, we obtained an FPT algorithm parameterized by the solution size k. These graph classes include, for example, the outerplanar graphs, the pseudoforests, and the graphs of treewidth (respectively pathwidth) at most c for some constant c.

Instead of splitting vertices to obtain a graph of pathwidth at most 1, one can also consider obtaining graphs of treewidth at most 1, i.e., forests. Since, in this context, the degree-1 vertices resulting from an explosion can simply be reduced, the explosion model is equivalent to the problem Feedback Vertex Set, a well-studied NP-complete [14] problem that admits a quadratic kernel [22]. In the full version of this paper [4], we show that the problem of splitting vertices of a graph to obtain a forest is equivalent to the problem Feedback Edge Set, which asks whether a given graph can be made acyclic using at most k edge deletions; a problem that can be solved by computing an arbitrary spanning forest of the graph. Firbas [12] independently obtained the same result.