    # Solving the r-pseudoforest Deletion Problem in Time Independent of r

The feedback vertex set problem is one of the most studied parameterized problems. Several generalizations of the problem have been studied where one is to delete vertices to obtain graphs close to acyclic. In this paper, we give an FPT algorithm for the problem of deleting at most k vertices to get an r-pseudoforest. A graph is an r-pseudoforest if we can delete at most r edges from each component to get a forest. Philip et al. introduced this problem and gave an O^*(c_r^k) algorithm for it, where c_r depends on r double exponentially. In comparison, our algorithm runs in time O^*((10k)^k), independent of r.

## Authors

##### This week in AI

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

## 1 Preliminary

The Feedback Vertex Set problem is one of the 21 problems proved to be NP-hard by Karp 

. It asks to delete a minimum number of vertices to make a given graph into a forest. The problem has important applications in artificial intelligence

[1, 2], bio-computing [3, 10], operating system research , and so on.

The Feedback Vertex Set problem has attracted a lot of attention from the parameterized complexity community. Both its undirected and directed versions are fixed-parameter tractable when parameterized by the solution size [6, 7, 8, 9]. For the undirected case, the state-of-the-art algorithm runs in time in the deterministic setting , and in the randomized setting . Here the notation hides polynomial factors in , and is the solution size.

Relaxing the acyclic requirement, researchers have defined several classes of almost acyclic graphs. A graph is an -pseudoforest if we can delete at most edges from each component in to get a forest. A pseudoforest is a 1-pseudoforest. An almost -forest is a graph from which we can delete edges to get a forest.

Philip et al. introduced the problem of deleting vertices to get an almost acyclic graph. There are several results in this line of research. In , the authors gave an algorithm for -pseudoforest deletion, which asks to delete at most vertices to get an -pseudoforest. They also gave an time algorithm for the problem of pseudoforest deletion. Bodlaender et al.  gave an improved algorithm for pseudoforest deletion running in time .

Rai and Saurabh  gave an algorithm for the Almost Forest Deletion problem, which asks to delete at most vertices to get an almost -forest. Lin et al. gave an improved algorithm for this problem that runs in time .

To the author’s knowledge, there has been no follow-up research for the problem of -pseudoforest deletion. In this paper, we provide a simple branching algorithm that runs in time . The in the algorithm by Philip et al.  is a large constant that depends on double exponentially. In contrast, the running time of our algorithm is independent of , which is somewhat surprising.

## 2 Notation and Terminology

Here we give a brief list of the graph theory concepts used in this paper; for other notation and terminology, we refer readers to .

For a graph , and are its vertex set and edge set respectively. A non-empty graph is connected if there is a path between every pair of vertices. Otherwise, we call it disconnected.

The multiplicity of an edge is the appearance number of it in the multigraph. An edge is a loop if , and we call it a loop at . The degree of a vertex is the number of its appearances as end-vertex of some edge. Bypassing a vertex of degree 2 means to delete and add an edge between its two neighbors and (even if or there is already an edge between and ). A forest is a graph in which there is no cycle and a tree is a connected forest. A graph is a subgraph of a graph , if and . A subgraph of is an induced subgraph of if for every , edge if and only if . For , denotes the subgraph of induced by .

For a positive integer , a graph is an r-pseudoforest if we can make each component into a forest by deleting at most edges.

## 3 FPT Algorithm for r-Pseudoforest Deletion

In this section, we give an FPT algorithm for -pseudoforest deletion. Let us give the formal problem definition first.

-Pseudoforest Deletion

Instance: An undirected graph , two integers and .

Parameter: .

Output: Decide if there is a set with such that is an -pseudoforest.

Let be an instance of -pseudoforest deletion, where contains edges and vertices.

Now we give some reduction rules to simplify the given instance.

Reduction Rule 1: If there is a component in that is an -pseudoforest, then delete and get a new instance .

Reduction Rule 1 is safe since there is no need to delete any vertex from a component that is an -pseudoforest.

Reduction Rule 2: If there are at least loops at a vertex , then delete and decrease by 1.

Reduction Rule 2 is safe since the graph is not an -pseudoforest and every solution must contain .

Reduction Rule 3: If contains an edge of multiplicity greater than , then reduce its multiplicity to .

Every solution intersects if edge has multiplicity at least . Reducing the multiplicity of to does not affect the set of solutions. Thus, Reduction Rule 3 is safe.

Reduction Rule 4: If contains a vertex of degree at most 1, then delete and get a new instance .

On the one hand, every solution of is a solution of . On the other hand, attaching a leaf to any component of an -pseudoforest still gives an -pseudoforest. And so every solution of is also a solution of since . Thus, Reduction Rule 4 is safe.

Reduction Rule 5: If contains a vertex of degree 2, then bypass .

###### Lemma 1.

Reduction Rule 5 is safe.

###### Proof.

Let be the graph obtained from by bypassing . Let . We show that is a yes-instance if and only if is a yes-instance.

On the one hand, assume is a yes-instance, and is a solution of it. Suppose , then . By adding as an isolated vertex or a leaf to , we get . It follows that is an -pseudoforest since is an -pseudoforest. Thus, is also a solution of . Otherwise, . In this case, the edge is in some component of the -pseudoforest . By subdividing in , we get , which is still an -pseudoforest. And so is a solution of . In both cases, is a yes-instance, and is a solution of it.

On the other hand, assume is a yes-instance, and is a solution of it. Suppose . Consider . Note that . If , then . If , then . In both cases, is an -pseudoforest. Thus is a solution for , and is a yes-instance.

Otherwise, . If , then we get from by bypassing . If , then we get from by deleting . In both cases, the number of edges and vertices decrease by the same amount, thus is also an -pseudoforest. If , then we get from by deleting the isolated vertex . Above all, we know that is a yes-instance, and is a solution of it. ∎

Reduction Rule 6: If , terminate and conclude that is a no-instance.

We call a reduced instance if none of Reduction Rules 1-6 applies to it. Observe that if is a reduced instance, then satisfies the following conditions:

1. each edge has multiplicity at most ;

2. the minimum degree is at least 3;

3. there are at most loops at any vertex.

###### Lemma 2.

If a connected graph is an -pseudoforest, then .

###### Proof.

We can make each connected component of an -pseudoforest into a forest by deleting at most edges. Since is a connected -pseudoforest, . ∎

###### Definition 1.

An -pseudoforest with one vertex and loops is called an -loop. An -pseudoforest with two vertices and edges is called an -edge.

###### Lemma 3.

Let be a reduced instance of -pseudoforest deletion. Let be a subset of vertices such that is an -pseudoforest. Suppose contains -loops, components consists of one vertex and at least loops, -edges, components consists of two vertices and at least edges. If , then the following statements hold.

1. .

2. .

3. For any , .

###### Proof.

Proof of statement 1: Because is an -pseudoforest, we know that for each component in . Since the ratio decreases when increases, we have for each component in with at least 3 vertices. It follows that .

Proof of statement 2: Vertices in each -edge have average degree and the vertex in an -loop has degree . After exhaustive applications of Reduction Rule 1, there is no -pseudoforest component in . Note that there are -loops, components consists of one vertex and at least loops, -edges, components consists of two vertices and at least edges in . Thus contains at least vertices of degree at least , vertices of degree at least and vertices of degree at least , vertices of degree at least . Combining with the fact that , we have

 2m=∑v∈V(G)d(v)≥3n+(2r+1)t1+(2(r+2)/3+1)t′1+(r+2)t2+(2(r+2)/3+1)t′2.

Proof of statement 3: Since every edge in is incident to at least one vertex in , we have It follows that

 m≤rt1+rt′1+(r+1)t2+(r+1)t′2+(r+2)s/3+∑v∈Xd(v). (1)

Since , denoting by , we have

 n=t1+t′1+2t2+2t′2+s+x. (2)

Combining (1) and (2), for any positive constant , we have

Let be an ordering of that satisfies . Let be the set of vertices with the largest degrees. The following lemma shows that every solution of a reduced instance intersects .

###### Lemma 4.

Let be any solution of -pseudoforest deletion for a reduced instance , then .

###### Proof.

Suppose there is a solution of -pseudoforest deletion on , which satisfies and . We show a contradiction by counting the number of edges in . Let be the resulting -pseudoforest after deleting from . Suppose contains -loops, components consisting of one vertex and at least loops, -edges, and components consisting of two vertices and at least edges. Denote . In the following, we assume that , as otherwise, we may solve the problem via brute force. The assumption also implies that .

By the choice of , the degree of each vertex in is at most . Since , it follows that

 10k∑i=1(d(vi)−c)≥10∑v∈X(d(v)−c) (3)

By the definition of and the assumption that , we have and so

 n∑i>10k(d(vi)−c)≥∑v∈X(d(v)−c). (4)

Combining inequalities (3) and (4), we have

 ∑v∈V(G)(d(v)−c)≥11∑v∈X(d(v)−c). (5)

Since , it follows that

 2m−cn≥11∑v∈X(d(v)−c). (6)

Thus

According to Statement 2 in Lemma 3, we have

Therefore,

Set and simplify the above inequality, we get

It follows that , a contradiction to the fact that .

The above analysis shows that the assumption is not correct, thus every solution of must intersect with . ∎

Lemma 4 enables us to design the following algorithm for -pseudoforest deletion.

###### Theorem 1.

The -pseudoforest deletion problem parameterized by the solution size can be solved in time .

###### Proof.

Let be a given instance of the -pseudoforest deletion problem, where is an undirected graph and is an integer. Each recursive call in Step 4 of Algorithm 1 decreases the parameter by 1, and thus the height of the search tree is at most . At each step, the problem branches into at most subproblems. Hence, the number of leaves in the search tree is at most . It follows that Algorithm 1 solves the problem of -pseudoforest deletion and runs in time . ∎

## 4 Conclusion

In this paper, we design an FPT algorithm for the -pseudoforest deletion problem. The running time of our algorithm is independent of , and so our algorithm improves over the result in , when is large compared with .

## 5 Acknowledgements

This research is supported by the National Natural Science Foundation of China (No. 61802178).

## References

•  Reuven Bar-Yehuda, Dan Geiger, Joseph Naor, and Ron M. Roth.

Approximation algorithms for the feedback vertex set problem with applications to constraint satisfaction and bayesian inference.

SIAM J. Comput., 27(4):942–959, 1998.
•  Ann Becker, Reuven Bar-Yehuda, and Dan Geiger. Randomized algorithms for the loop cutset problem. J. Artif. Intell. Res., 12:219–234, 2000.
•  Guillaume Blin, Florian Sikora, and Stéphane Vialette. Querying graphs in protein-protein interactions networks using feedback vertex set. IEEE/ACM Trans. Comput. Biology Bioinform., 7(4):628–635, 2010.
•  Hans L. Bodlaender, Hirotaka Ono, and Yota Otachi. A faster parameterized algorithm for pseudoforest deletion. Discrete Applied Mathematics, 236:42–56, 2018.
•  Béla Bollobás. Modern Graph Theory, volume 184 of Graduate Texts in Mathematics. Springer, 2002.
•  Yixin Cao, Jianer Chen, and Yang Liu. On feedback vertex set: New measure and new structures. Algorithmica, 73(1):63–86, 2015.
•  Jianer Chen, Fedor V. Fomin, Yang Liu, Songjian Lu, and Yngve Villanger. Improved algorithms for feedback vertex set problems. J. Comput. Syst. Sci., 74(7):1188–1198, 2008.
•  Rajesh Hemant Chitnis, Marek Cygan, Mohammad Taghi Hajiaghayi, and Dániel Marx. Directed subset feedback vertex set is fixed-parameter tractable. ACM Trans. Algorithms, 11(4):28:1–28:28, 2015.
•  Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk, and Jakub Onufry Wojtaszczyk. Subset feedback vertex set is fixed-parameter tractable. SIAM J. Discrete Math., 27(1):290–309, 2013.
•  Zheng Fu and Tao Jiang. Computing the breakpoint distance between partially ordered genomes. J. Bioinformatics and Computational Biology, 5(5):1087–1101, 2007.
•  Richard M. Karp. Reducibility among combinatorial problems. In Proceedings of a symposium on the Complexity of Computer Computations, held March 20-22, 1972, at the IBM Thomas J. Watson Research Center, Yorktown Heights, New York, USA, pages 85–103, 1972.
•  Jason Li and Jesper Nederlof. Detecting feedback vertex sets of size k in O*(2.7) time. In Shuchi Chawla, editor, Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, Salt Lake City, UT, USA, January 5-8, 2020, pages 971–989. SIAM, 2020.
•  Mugang Lin, Qilong Feng, Jianxin Wang, Jianer Chen, Bin Fu, and Wenjun Li. An improved FPT algorithm for almost forest deletion problem. Inf. Process. Lett., 136:30–36, 2018.
•  Geevarghese Philip, Ashutosh Rai, and Saket Saurabh. Generalized pseudoforest deletion: Algorithms and uniform kernel. SIAM J. Discrete Math., 32(2):882–901, 2018.
•  Ashutosh Rai and Saket Saurabh. Bivariate complexity analysis of almost forest deletion. Theor. Comput. Sci., 708:18–33, 2018.
•  Abraham Silberschatz and Peter Galvin. Operating System Concepts, 4th edition. Addison-Wesley, 1994.