Improved FPT Algorithms for Deletion to Forest-like Structures
Kishen N. Gowda, Aditya Lonkar, Fahad Panolan, Vraj Patel, Saket Saurabh
IImproved FPT Algorithms for Deletion toForest-like Structures
Kishen N. Gowda
IIT Gandhinagar, India, [email protected]
Aditya Lonkar
IIT Madras, India, [email protected]
Fahad Panolan
Department of Computer Science and Engineering, IIT Hyderabad, India, [email protected]
Vraj Patel
IIT Gandhinagar, India, [email protected]
Saket Saurabh
Institute of Mathematical Sciences, Chennai, India, [email protected]
Abstract
The
Feedback Vertex Set problem is undoubtedly one of the most well-studied problems inParameterized Complexity. In this problem, given an undirected graph G and a non-negative integer k , the objective is to test whether there exists a subset S ⊆ V ( G ) of size at most k such that G − S is a forest. After a long line of improvement, recently, Li and Nederlof [SODA, 2020] designed arandomized algorithm for the problem running in time O ? (2 . k ) . In the Parameterized Complexityliterature, several problems around Feedback Vertex Set have been studied. Some of theseinclude
Independent Feedback Vertex Set (where the set S should be an independent set in G ), Almost Forest Deletion and
Pseudoforest Deletion . In
Pseudoforest Deletion ,each connected component in G − S has at most one cycle in it. However, in Almost ForestDeletion , the input is a graph G and non-negative integers k, ‘ ∈ N , and the objective is to testwhether there exists a vertex subset S of size at most k , such that G − S is ‘ edges away from aforest. In this paper, using the methodology of Li and Nederlof [SODA, 2020], we obtain the currentfastest algorithms for all these problems. In particular we obtain following randomized algorithms. Independent Feedback Vertex Set can be solved in time O ? (2 . k ). Pseudo Forest Deletion can be solved in time O ? (2 . k ). Almost Forest Deletion can be solved in O ? (min { . k · . ‘ , . k · . ‘ , k · . ‘ } ). Theory of computation → Parameterized complexity and exactalgorithms
Keywords and phrases
Parameterized Complexity, Independent Feedback Vertex Set, PseudoForest,Almost Forest, Cut and Count, Treewidth
Feedback Vertex Set ( FVS ) is a classical NP-complete problem and has been extensivelystudied in all subfields of algorithms and complexity. In this problem we are given anundirected graph G and a non-negative integer k as input, and the goal is to check whetherthere exists a subset S ⊆ V ( G ) ( called feedback vertex set or in short fvs ) of size at most k such that G − S is a forest. This problem originated in combinatorial circuit design and foundits way into diverse applications such as deadlock prevention in operating systems, constraintsatisfaction and Bayesian inference in artificial intelligence. We refer to the survey by Festa Polynomial dependency on the input size is hidden in O ? notation. a r X i v : . [ c s . D S ] S e p Improved FPT Algorithms for Deletion to Forest-like Structures et al. [14] for further details on the algorithmic study of feedback set problems in a varietyof areas like approximation algorithms, linear programming and polyhedral combinatorics.
FVS has been extensively studied in Parameterized Algorithms.
FVS has played a pivotalrole in the development of the field of Parameterized Complexity. The earliest known FPTalgorithms for
FVS go back to the late 80s and the early 90s [4, 13] and used the seminalGraph Minor Theory of Robertson and Seymour. These algorithms are quite impracticalbecause of large hidden constants in the run-time expressions. Raman et al. [32] designedan algorithm with running time O ? (2 O ( k log log k ) ) which basically branched on short cyclesin a bounded search tree approach. For FVS , the first deterministic O ? ( c k ) algorithmwas designed only in 2005; independently by Dehne et al. [12] and Guo et al. [15]. It isimportant to note here that a randomized algorithm for FVS with running time O ? (4 k ) wasknown in as early as 1999 [3]. The deterministic algorithms led to the race of improvingthe base of the exponent for FVS algorithms and several algorithms [6, 7, 8, 9, 16, 21, 23],both deterministic and randomized, have been designed. Until few months ago the bestknown deterministic algorithm for
FVS ran in time O ? (3 . k ) [21], while the Cut & Count technique by Cygan et al. [9] gave the best known randomized algorithm running in time O ? (3 k ). However, just in last few months both these algorithms have been improved;Iwata and Kobayashi [16, IPEC 2019] designed the fastest known deterministic algorithmwith running time O ? (3 . k ) and Li and Nederlof [23, SODA 2020] designed the fastestknown randomized algorithm with running time O ? (2 . k ). The success on FVS has ledto the study of many variants of
FVS in literature such as
Connected FVS [9, 28],
Independent FVS [1, 24, 27],
Simultaneous FVS [2, 33],
Subset FVS [11, 17, 18, 19, 26],
Pseudoforest Deletion [5, 30],
Generalized Pseudoforest Deletion [30], and
Almost Forest Deletion [31, 25].
In this paper we study three problems around
FVS , namely,
Independent FVS , AlmostForest Deletion , and
Pseudoforest Deletion . We first define the generalizations offorests that are considered in these problems. We say that a graph F is an ‘ -forest, if we candelete at most ‘ edges from F to get a forest. That is, F is at most ‘ edges away from beinga forest. On the other hand, a pseudoforest is an undirected graph, in which every connectedcomponent has at most one cycle. Now, we are ready to define our problems. Independent FVS (IFVS) : Given a graph G and a non-negative integer k , does thereexist a fvs S of size at most k , that is also an independent set in G ? Almost Forest Deletion (AFD) : Given a graph G and two non-negative integers k and ‘ , does there exist a vertex subset S of size at most k such that G − S is an ‘ -forest? Pseudoforest Deletion (PDS) : Given a graph G and a non-negative integer k , doesthere exist a vertex subset S of size at most k such that G − S is a pseudoforest?Given an instance of FVS , by subdividing every edge we get an instance of
IndependentFVS , which is a reduction from
FVS to Independent FVS leaving k unchanged showing thatit generalizes
FVS . On the other hand setting ‘ = 0 in Almost Forest Deletion results in
FVS . The best known algorithms for
Independent FVS , Almost Forest Deletion , and
Pseudoforest Deletion are O ? (3 . k ) [24], O ? (5 k ‘ ) [25], and O ? (3 k ) [5], respectively.Our main objective is to improve over these running times for the corresponding problems.In a nutshell our paper is as follows. . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 3 Motivated by the methodology developed by Li and Nederlof [23] for
FVS , we relookat several problems around
FVS , such as
Independent FVS , Almost ForestDeletion , and
Pseudoforest Deletion , and design the current fastest randomizedalgorithm for these problems. Our results show that the method of Li and Nederlof [23]is extremely broad and should be applicable to more problems.To achieve improvements and tackle
Independent FVS and
Almost Forest Deletion at once, we propose a more generalized version of the
Almost Forest Deletion problem.
Restricted Independent Almost Forest Deletion (RIAFD)
Parameter: k and ‘ Input:
A graph G , a set R ⊆ V ( G ), and integers k and ‘ Question:
Does there exist a set S ⊆ V ( G ) of size at most k that does not containany element from R , that is also an independent set in G , and G − S is an ‘ -forest?Setting ‘ = 0 , R = ∅ we get the Independent FVS problem. A simple polynomial timereduction, where we subdivide every edge and add all the subdivision vertices to R , yieldsan instance of RIAFD , given an instance of
Almost Forest Deletion . The reductionleaves ‘ and k unchanged.To describe our results, we first summarize the method of Li and Nederlof [23](for FVS)which we adopt accordingly. The main observation guiding the method is the fact that afterdoing some simple preprocessing on the graph, we can ensure that a large fraction of edgesare incident on every solution to the problem. This leads to two-step algorithms, one for thedense case and the other for the sparse case. In particular, if we are aiming for an algorithmwith running time O ? ( α k ), then we do as follows. Dense Case:
In this case, the number of edges incident to any FVS of size k is superlinear(in k ), and we select a vertex into our solution with probability at least α . Sparse Case:
Once the dense case is done, we know that we have selected vertices, say k ,with probability ( α ) k . Now, we know that the number of edges incident to an FVSof the graph is O ( k ) and the existence of solution S of size at most k , implies thatthe input graph has treewidth at most k + 1. Now, using this fact and the fact thatdeleting the solution leaves a graph of constant treewidth, we can actually show thatgraph has treewidth (1 − Ω(1)) k = γk . This implies that if we have an algorithm ongraphs of treewidth ( tw ) with running time β tw , such that β γ ≤ α , then we get thedesired algorithm with running time O ? ( α k ).So a natural approach for our problems which are parameterized by solution size is todevise an algorithm using another algorithm parameterized by treewidth with an appropriatebase in the exponent, along with probabilistic reductions with a good success probability.However, to get the best out of methods of Li and Nederlof [23], it is important to have analgorithm parameterized by treewidth that is based on Cut & Count method [10]. However,for all the algorithms for problems we consider, only non
Cut & Count algorithms wereknown. Thus, our first result is as follows. (cid:73)
Theorem 1.1.
There exists an O ? (cid:0) tw (cid:1) time Monte-Carlo algorithm that given a treedecomposition of the input graph of width tw solves the following problems: Restricted-Independent Almost Forest Deletion in exponential space. Pseudoforest Deletion in exponential space.
Note that a yes-instance of
RIAFD has treewidth k + ‘ + 1. Thus as our first result, wedesign a randomized algorithm based on Theorem 1.1 and iterative compression with running Improved FPT Algorithms for Deletion to Forest-like Structures time O ? (3 k · ‘ ) for RIAFD . This yields O ? (3 k ) and O ? (3 k · ‘ ) running time algorithms for Independent FVS and
Almost Forest Deletion , respectively, which take polynomialspace (though, these do not appear in literature). Next, we devise probabilistic reductionrules to implement the first step in the method of Li and Nederlof [23]. We analyze theserules by modifying the analysis of their lemmas to get an O ? (2 . k · . ‘ ) time algorithmthat takes polynomial space, and an O ? (2 . k · . ‘ ) time algorithm that takes exponentialspace for solving RIAFD . All these algorithms while progressively improving the dependenceon k slightly, significantly worsen the dependence on ‘ . Therefore, to obtain an algorithmwith an improved dependence on ‘ we describe a procedure to construct a tree decompositionof width k + . ‘ + O (log( ‘ )) given a solution of size k to an instance of RIAFD . Thisprocedure when combined with an iterative compression routine yields an O ? (3 k · . ‘ )algorithm for RIAFD . This brings us to the following result. (cid:73)
Theorem 1.2.
There exist Monte-Carlo algorithms that solve
RIAFD problem in O ? (3 k · ‘ ) time and polynomial space. O ? (2 . k · . ‘ ) time and polynomial space. O ? (2 . k · . ‘ ) time and exponential space. O ? (3 k · . ‘ ) time and exponential space. As a corollary to Theorem 1.2, we get the following result about
Independent FVS . (cid:73) Theorem 1.3.
There exist Monte-Carlo algorithms that solve
Independent FVS in: O ? (3 tw ) time, given a tree decomposition of width tw . O ? (2 . k ) time and polynomial space O ? (2 . k ) time and exponential space Although we have a deterministic O ? (3 k ) algorithm for Pseudoforest deletion givenby Bodlaender et al. [5] which runs in exponential space, to make use of the techniques from[23] we develop our
Cut & Count algorithm which has the same asymptotic running time.However, even with our
Cut & Count algorithm, we cannot make full use of the methods ofLi and Nederlof [23] and only get the following improvement. (cid:73)
Theorem 1.4.
There exists a Monte-Carlo algorithm that solves
Pseudoforest Deletion in O ? (2 . k ) time and polynomial space. For a set A , (cid:0) A · , · , · (cid:1) denotes the set of all partitions of A into three subsets.Let G ( V, E ) or G = ( V, E ) be an undirected graph, where V is the set of vertices and E is the set of edges. We also denote V ( G ) to be the vertex set and E ( G ) to be the edge setof graph G . Also, | V | = n and | E | = m . For a vertex subset S ⊆ V ( G ), G [ S ] denotes thesubgraph induced on the vertex set S . For S, T ⊆ V , E [ S, T ] denotes the edges intersectingboth S and T . For a vertex subset V , the graph G − V denotes the graph G [ V \ V ]. Foran edge subset E , the graph G − E denotes the graph G = ( V, E \ E ). For a vertex v ∈ V , deg ( v ) denotes the degree of the vertex, i.e., the number of edges incident on v . For a vertexsubset S ⊆ V ( G ), deg ( S ) = P v ∈ S deg ( v ). Given an edge e = ( u, v ), the subdivision of theedge e is the addition of a new vertex between u and v , i.e. the edge e is replaced by twoedges ( u, w ) and ( w, v ), where w is the newly added vertex. Here, w is called a “subdivisionvertex”. Now, we make note of the following lemma on the number of connected componentsof a forest. . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 5 (cid:73) Lemma 2.1 ([10]) . A graph with n vertices and m edges is a forest iff it has at most n − m connected components. (cid:73) Definition 2.2. A tree decomposition of a graph G = ( V, E ) is a pair T = ( { B x | x ∈ I } , T = ( I, F )) where T a tree and { B x | x ∈ I } is a collection of subsets (called bags) of V ,such that S x ∈ I B x = V . For all ( u, v ) ∈ E there is an x ∈ I with { u, v } ⊆ B x . For all v ∈ V , the set of nodes { x ∈ I | v ⊆ B x } forms a connected subtree in T = ( V, I ) .The width of the tree decomposition T is max x ∈ I | B x | − . The treewidth of a graph G ,denoted by tw ( G ) , is the minimum width over all tree decompositions of G . We sometimes abuse notation and use tw ( T ) to denote the width of the tree decomposition T . For the definition above, if there are parallel edges or self loops we can just ignore them,i.e., a tree decomposition of a graph with parallel edges and self loops is just the treedecomposition of the underlying simple graph (obtained by keeping only one set of paralleledges and removing all self loops).There is also the notion of a nice tree decomposition, which is used in this paper. Inliterature, there are a few variants of this notion that differ in details. We use the one with introduce edge nodes and root bag and leaf bags of size zero. A nice tree decomposition isa tree decomposition ( { B x | x ∈ I } , T = ( I, F )) where T is rooted tree and the nodes areone of the following five types. With each bag in the tree decomposition, we also associate asubgraph of G ; the subgraph associated with bag x is denoted G x = ( V x , E x ). We give eachtype together with how the corresponding subgraph is formed. Leaf nodes x . x is a leaf of T ; | B x | = 0 and G x = ( ∅ , ∅ ) is the empty graph. Introduce vertex nodes x . x has one child, say y . There is a vertex v with B x = B y ∪{ v } , v / ∈ B y and G x = ( V y ∪ { v } , E y ), i.e, G x is obtained by adding an isolated vertex v to G y . Introduce edge nodes x . x has one child, say y . There are two vertices v, w ∈ B x , B x = B y and G x = ( V y , E y ∪ { ( v, w ) } ), i.e., G x is obtained from G y by adding an edgebetween these two vertices in B x . If we have parallel edges, we have one introduce edgenode for each parallel edge. A self loop with endpoint v is handled in the same way, i.e.,there is an introduce edge node with v ∈ B x and G x is obtained from G y by adding theself loop on v . Forget vertex nodes x . x has one child, say y . There is a vertex v such that B x = B y \{ v } and G x and G y are the same graph. Join nodes x . x has two children, say y and z . B x = B y = B z , V y ∩ V z = B x and E y ∩ E z = ∅ . G x = ( V y ∪ V z , E y ∪ E z ), i.e., G x is the union of G y and G z , where thevertex set B x is the intersection of the vertex sets of these two graphs.For the Cut & Count algorithms, the following lemma is essential. For a family of sets F over a universe U , we say that a weight function w : U N isolates F , if there is a uniqueset S in F with minimum weight w ( S ). Here, w ( S ) = P x ∈ S w ( x ). (cid:73) Lemma 2.3. (Isolation Lemma, [29])
Let
F ⊆ U be a non-empty set family over auniverse U . For each u ∈ U , choose a weight ω ∈ { , , . . . W } uniformly and independentlyat random. Then Pr[ ω isolates F ] ≥ − | U | /W . In the
Cut & Count algorithms and proofs, for a function f : S → T , given a set R , f | R refers to the function f with its domain restricted to R . Formally, f | R is a functionfrom R to a subset of T such that f | R ( r ) = f ( r ) for all r ∈ R . Given values u and v , Improved FPT Algorithms for Deletion to Forest-like Structures f [ u → v ] refers to a function with u in domain and v in range with all mappings from S to T preserved and u mapped to v . Formally, f [ u → v ] is a function from S ∪ { u } to T ∪ { v } such that f [ u → v ]( s ) = f ( s ) for all s ∈ S and f [ u → v ]( u ) = v . Also, we define f − ( s ) := { x | x ∈ S ∧ f ( x ) = s } . We use the Iverson’s bracket notation [ b ] for a Booleanpredicate [ b ] which denotes 1 if b is True and 0 otherwise.In this paper, we will be dealing with randomized algorithms with one-sided error-probability, i.e. only false negatives are possible. The success-probability of an algorithm isthe probability that the algorithm finds a solution, given that at least one such solution exists.We define high-probability to be probability at least 1 − c | x | or sometimes 1 − | x | c , where | x | is the input size and c is a constant. Given an algorithm with constant success-probability,we can boost it to high-probability by performing O ? (1) independent trials. We cite thefollowing folklore observation: (cid:73) Lemma 2.4. (Folklore, [23]).
If a problem can be solved with success probability S and inexpected time T , and its solutions can be verified for correctness in polynomial time, then itcan be also solved in O ? ( S · T ) time with high probability. We will use the following notion of separations in a graph from [23]: (cid:73)
Definition 2.5. (Simple Separator, [23]).
Given a graph G ( V, E ) , a partition ( A, B, S ) ∈ (cid:0) V ( G ) · , · , · (cid:1) of V is a separation if there are no edges between A and B . (cid:73) Definition 2.6. (Three-Way Separator, [23]).
Given a graph G = ( V, E ) , a three-wayseparator is a partition ( S { } , S { } , S { } , S { , } , S { , } , S { , } , S { , , } ) of V such that thereare no edges between any two sets S I , S J whose sets I and J are disjoint. A β -separator for a graph G ( V, E ) is a set of vertices whose removal from G leavesno connected component of size larger than | V | β , where β > β -separator is a balanced separator of the graph. More generally, one can define a β -separatorwith respect to a weight function on the vertices. We now give a method to construct a β -separator of a graph G given a tree decomposition (Lemma 2.7). (cid:73) Lemma 2.7.
Given a graph G ( V, E ) on n vertices with vertex weights ω ( v ) and its treedecomposition T of width tw , for any β > , we can delete a set S of β ( tw + 1) vertices sothat every connected component of G − S has weight at most ω ( V ) β in polynomial time. Proof.
Given a bag x of the T , we define the weight of the subtree rooted at x ( w ( x )) to bethe sum of weights of vertices present in the set formed by union of all bags in the subtree ofx. Formally, w ( x ) := P v ∈ V x ω ( v ). Start with an empty set S .Exhaustively, select a bag x of maximal depth such that w ( x ) > ω ( V ) β , then remove thebag x and its subtree and add all vertices in B x to the set S . Also, delete the vertices in B x from all other bags. Note that the maximality condition assures us that the subtrees rootedat the children of x have total weight at most ω ( V ) β each. Moreover, by deleting the subtreerooted at x , we remove at least ω ( V ) β weight, which can happen at most β times. As eachbag has size at most t + 1, the total vertices we select are at most β ( t + 1) to be added to S .To see how there are no connected components of size more than ω ( V ) β in G − S left,suppose that the tree decomposition left after following this algorithm is T . Now assumethat a connected component C of weight more than ω ( V ) β exists in G − S . Then all of itsvertices in their entirety must lie inside T (since all children of a deleted bag have weight atmost ω ( V ) /β ). Now, take the vertex of C which is in the least depth in T and say it liesin the bag c . All the members of its connected components therefore have to appear in the . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 7 subtree rooted at c . Therefore, w ( c ) ≥ ω ( v ) β which would mean that this is not the terminalcondition for our algorithm.From the description of the algorithm it is easy to see that it runs in polynomial time. (cid:74) In [23], the authors presented a method involving randomized reductions and smallseparators to get faster randomized algorithms for
FVS . It turns out that this method canbe generalized to work for a certain set of “vertex-deletion problems”. We will now describethe basic structure of this method and will follow this outline wherever this method is usedin the rest of the paper.Throughout this outline, assume that we are working on some vertex-deletion problem P .Let G ( V, E ) be the graph involved in a given instance of P . A valid solution S ⊆ V is a setof vertices of G which solves the given problem instance of P .The method is divided into two cases: A dense case and a sparse case. Dense Case.
The algorithm goes into this case when for a given problem all the existingsolution sets are of high average degree. In formal terms, every set S ⊆ V of size k which isa valid solution of the given instance satisfies deg ( S ) > c · k , where c = Θ(1).To handle this case, a vertex v ∈ V is sampled randomly based on a weight function ω ( v )which depends on deg ( v ), deletes v and makes appropriate updates to the parameters. Inthis paper, we use ω ( v ) = deg ( v ) − Sparse Case.
The algorithm goes into this case when for a given problem there exists asolution set which has low average degree. In formal terms, there exists a vertex subset S ⊆ V of size k which is a valid solution of the given instance and satisfies deg ( S ) ≤ c · k ,where c = O (1). Due to this reason, the number of edges in the given graph can be bounded,thus the input graph G is sparse.The proof for the small separator lemma in [23] doesn’t require the remaining graph, i.e.the graph obtained by deleting the solution set, to be a forest only. As long as there is agood β -separator of the graph G − S , the proof works. Lemma 2.7 helps to construct such a β -separator of size β ( tw + 1) for a graph with given tree decomposition of width tw .The small separator helps to construct a tree decomposition of small width, given asolution set with bounded degree. The idea suggested in [23] was to use iterative compressiontechniques to construct a solution utilizing the small separator. This also requires solvinga bounded degree version of the problem, which can be done using Cut & Count basedalgorithms. Specific details for each problem will be explained in the corresponding sectionsin due course.
In this section we give our algorithm for
RIAFD and prove Theorem 1.2 and the first partof Theorem 1.1. We first formally show that
RIAFD is a generalization of
Almost ForestDeletion . For any instance G of Almost Forest Deletion , subdivide the edges of G and add all the newly created subdivision vertices to R . The parameters k and ‘ remain thesame. (cid:73) Lemma 3.1.
Given an instance of
Almost Forest Deletion ( G ( V, E ) , k, ‘ ) , an equi-valent instance of RIAFD , ( G ( V , E ) , k , ‘ , R ) , can be constructed as follows: V = V, E = ∅ , R = ∅ . For each e = ( u, v ) ∈ E , add a vertex v e to V as well as to R . Add edge ( u, v e ) and ( v e , v ) to E (Essentially, subdivide e ). Improved FPT Algorithms for Deletion to Forest-like Structures k = k, ‘ = ‘ . In this section, we present fast randomized algorithms for
RIAFD . In Section 3.1 wepresent a O ? (3 tw ) running time algorithm based on the Cut & Count paradigm. Based onthis, we give a O ? (3 k ‘ ) time and polynomial space algorithm in Section 3.2. In Section 3.3,we further improve the dependence on k by using modified techniques from [23] to get analgorithm with running time O ? (2 . k . ‘ ) and polynomial space as well as an algorithmwith running time O ? (2 . k . ‘ ) but exponential space. Finally, in Section 3.4, we improvethe dependence on ‘ by creating a tree decomposition of width k + . ‘ and run the Cut &Count algorithm presented in Section 3.1 to get an algorithm with running time O ? (3 k . ‘ ).Henceforth, the term riafd-set corresponds to a solution for given instance of RIAFD andthe term afd-set corresponds to a solution for given instance of
AFD . tw Algorithm
We use the
Cut & Count technique to solve
RIAFD in O ∗ (3 tw ) time. First of all, we requirethe following lemma. (cid:73) Lemma 3.2.
A graph G = ( V, E ) with n vertices and m edges and non-negative integer ‘ is an ‘ -Forest if and only if it has at most n − m + ‘ connected components. Proof.
Forward Direction:
By definition of ‘ -Forest, if you are given an ‘ -Forest with n vertices and m edges, there exists a set S of ‘ edges whose removal leaves a forest with n vertices and m − ‘ edges. By Lemma 2.1, this leftover forest has at most n − ( m − ‘ )connected components. Adding back the edges from the set S to the ‘ -forest cannot resultin an increase in the number of connected components. Therefore, the ‘ -Forest also has atmost n − m + ‘ connected components. Reverse Direction:
We are given a graph G = ( V, E ) with n vertices, m edges and atmost n − m + ‘ connected components. Let the r connected components be C , C , . . . C r having n , n , . . . n r vertices each respectively. The subgraph consisting of only the spanningtrees of the connected components is a forest with r P i =0 ( n i −
1) = n − r ≥ n − ( n − m + ‘ ) ≥ m − ‘ edges. Let the edge set of the subgraph be E . Therefore, E \ E of cardinality at most ‘ isthe set of edges to be removed from G to obtain a forest. Therefore, G is an ‘ -Forest. (cid:74) Moving on to the
Cut & Count
Algorithm. Firstly, we define the set U = V . We assumethat we are given a weight function ω : U → { , . . . , N } , where N is some fixed integer. The Cut Part:
For integers
A, B, W we define: R A,BW to be the family of solution candidates: R A,BW is the family of sets X , where X ⊆ V , | X | = A , G [ X ] contains exactly B edges, ( V \ X ) ∩ R = ∅ , G [ V \ X ] is an independentset and ω ( V \ X ) = W ; S A,BW to be the set of solutions: the family of sets X , where X ∈ R A,BW and G [ X ] is an ‘ -Forest; C A,BW to be the family of pairs (cid:0) X, ( X L , X R ) (cid:1) , where X ∈ R A,BW and ( X L , X R ) is aconsistent cut of G [ X ].Observe that the graph G admits an Restricted Independent Almost Forest Deletion set F ⊆ V of size k if and only if there exist integers B, W such that the set S n − k,BW is non-empty. The Count Part:
Note that for any
A, B, W, X ∈ R
A,BW , there are 2 cc ( G [ X ]) cuts ( X L , X R )such that (cid:0) X, ( X L , X R ) (cid:1) ∈ C A,BW , where by cc ( G [ X ]) we denote the number of connectedcomponents of G [ X ]. . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 9 Now we describe a procedure that, given a nice tree decomposition T , weight function ω and integers A, B, W, t , computes |C A,BW | modulo 2 t using dynamic programming.For every bag x ∈ T , integers 0 ≤ a ≤ | V | , 0 ≤ b < | V | ≤ w ≤ ω ( V ) and s ∈ { F , L , R } B x (called the coloring), define: R x ( a, b, w ) = n X (cid:12)(cid:12) X ⊆ V x ∧ | X | = a ∧ | E x ∩ E ( G [ X ]) | = b ∧ ( V x \ X ) ∩ R = ∅ ∧| E ( G [ V x \ X ]) | = 0 ∧ ω ( V x \ X ) = W o C x ( a, b, w ) = n(cid:0) X, ( X L , X R ) (cid:1) (cid:12)(cid:12) X ∈ R x ( a, b, w ) ∧ (cid:0) X, ( X L , X R ) (cid:1) is a consistently cut subgraph of G x o A x ( a, b, w, s ) = (cid:12)(cid:12)(cid:12)n(cid:0) X, ( X L , X R ) (cid:1) ∈ C x ( a, b, w ) (cid:12)(cid:12)(cid:0) s ( v ) ∈ { L , R } = ⇒ v ∈ X s ( v ) (cid:1) ∧ (cid:0) s ( v ) = F = ⇒ v / ∈ X (cid:1)o(cid:12)(cid:12)(cid:12) The algorithm computes A x ( a, b, w, s ) for all bags x ∈ T in a bottom-up fashion for allreasonable values of a , b , w and s . We now define the recurrence for A x ( a, b, w, s ) that is usedby the dynamic programming algorithm. Let v denote the vertex introduced and containedin an introduce vertex bag, ( u, v ) the edge introduced in the introduce edge bag, and let y , z stand for the left and right child of x ∈ T . Assume all computations to be modulo 2 t . Leaf bag: A x (0 , , , ∅ ) = 1 Introduce vertex bag: A x ( a, b, w, s ∪ { ( v, F ) } ) = [ v / ∈ R ] A y ( a, b, w − ω ( v ) , s ) A x ( a, b, w, s ∪ { ( v, L ) } ) = A y ( a − , b, w, s ) A x ( a, b, w, s ∪ { ( v, R ) } ) = A y ( a − , b, w, s ) Introduce edge bag: A x ( a, b, w, s ) = [ s ( u ) = s ( v ) ⇐⇒ ( s ( u ) = F ∨ s ( v ) = F )] A y ( a, b − [ s ( u ) = s ( v ) = F ] , w, s ) Forget bag: A x ( a, b, c, w, s ) = X α ∈{ F , L , R } A x ( a, b, w, s [ v → α ]) Join bag: A x ( a, b, w, s ) = X a + a = a + | s − ( { L , R } ) | b + b = bw + w = w + ω ( s − ( { F } )) A y ( a , b , w , s ) · A z ( a , b , w , s )Let r ∈ T be the root bag. Therefore, A r ( A, B, W, ∅ ) ≡ |C A,BW | (mod 2 t ) which is ourrequired answer. (cid:73) Lemma 3.3.
Let G ( V, E ) be a graph and d be an integer. Pick ω ( v ) ∈ { , . . . , | V |} uniformly and independent at random for every v ∈ V , and define ω ( v ) := | V | ω ( v ) + deg ( v ) and n = | V | . The following statements hold: If for some integers m , W = i | V | + d we have that |C n − k,m W | 6≡ mod n − k − m + l +1 ) ,then G has a riafd-set F of size k satisfying deg ( F ) = d . If G has a riafd-set F of size k satisfying deg ( F ) = d , then with probability at least / for some m , W = i | V | + d we have that |C n − k,m W | 6≡ mod n − k − m + ‘ +1 ) . Proof.
This proof is similar to the one for fvs in [23].
Item 1:
Note that if |C n − k,m W | 6≡ n − k − m + ‘ +1 ), then there must be some vertexsubset F of size k such that F ∩ R = ∅ , G [ F ] is an independent set and the number ofchoices of X L , X R with ( V \ F, ( X L , X R )) ∈ C n − k,m W is not a multiple of 2 n − k − m + ‘ +1 . Dueto independence in choice of cuts for connected components of G [ V \ F ] on whether to put itin X L or X R G [ V \ F ] must have at most n − k − m + ‘ connected components. Therefore,by Lemma 3.2 G [ V \ F ] must be an ‘ -Forest, making F a riafd-set of size k . The conditionon degree follows from the weighting. Item 2:
First apply Lemma 2.3 with U = V and the set family F being the set of all riafd-set F satisfying deg ( F ) = d with weighting done based on ω . With probability 1 / i such that there is a unique riafd-set F with def ( F ) = d andweight i . Therefore, for the weight function ω , we have W = ω ( F ) = i | V | + d . Since ω isolated F out of F and d < | V | (for k > F which has a contributionin C n − k,m W that is not a multiple of 2 n − k − m + ‘ +1 as it has 2 cc ( G [ V \ F ]) ≤ n − k − m + ‘ validcuts. (cid:74) While it is clear from the DP and Lemma 3.3 that we can get an O ? (cid:0) tw (cid:1) running time,we will provide the details of a slightly more generalized algorithm which is able to utilizeadditional structure in the tree decomposition and improves the space bound. k + ‘ Algorithm in Polynomial Space
The above
Cut & Count algorithm utilizes exponential space. We notice that in all theproblems discussed in the paper, the tree decomposition that we have always has a large setwhich is present in all bags of the tree decomposition . We will exploit this structure to obtaina polynomial space algorithm. (cid:73)
Definition 3.4.
Given a set S ⊆ V and a function f : S ← { F , L , R } we define thequantity C A,BW,f as follows: C A,BW,f = n(cid:0) X, ( X L , X R ) (cid:1) (cid:12)(cid:12)(cid:12) X ∈ R A,BW ∧ ( X L , X R ) is a consistent cut of G (cid:2) X (cid:3) ∧ (cid:0) v ∈ S = ⇒ v agrees with f (cid:1)o . where “ v agrees with f ” means that v ∈ V \ X if f ( v ) = F , v ∈ X L if f ( v ) = L and v ∈ X R if f ( v ) = R . (cid:66) Claim 3.5.
Given a tree decomposition T with a set S ⊆ V which is present inall its bags, a fixed integer t and a function f : S → { F , L , R } , there is a routine RIAFD-FCCount ( T , R, A, B, W, f, t ) which can compute |C A,BW,f | (mod 2 t ) in time O ? (cid:0) tw −| S | (cid:1) . Proof.
We will give a brief description of the routine
RIAFD-FCCount as that will suffice toprove this claim. In every entry of the DP table described for |C A,BW | , just compute all valuesof A x ( a, b, w, s ), where s | B x ∩ S = f | B x ∩ S and ignore all computations that do not agree tothis condition. This means per bag, only O ? (3 tw −| S | ) computations are required (since in allbags only at most tw + 1 − | S | values of s are not “fixed” by f ). The required answer is inthe root bag r as the entry A r ( A, B, W, ∅ ) ≡ |C A,BW,f | (mod 2 t ). (cid:67) . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 11 Now, given a tree decomposition T with a set S ⊆ V which is present in all its bags, wecan see that, | C A,BW | = X All possible f : S →{ F , L , R } |C A,BW,f | . Now, we define a procedure
RIAFDCutandCount which given a tree decomposition T , aset S ⊆ V present in all bags of T uses the above fact to improve the space bound from O ? (cid:0) tw (cid:1) to O ? (cid:0) tw −| S | (cid:1) . Algorithm 1
RIAFDCutandCount ( T , R, k, ‘, S ) Input :
Tree decomposition T , G = ( V, E ), set R , parameters k ≤ n and ‘ = O ( n ) Output : A riafd-set F of size at most k or Infeasible begin for n − k ≤ A ≤ n , ≤ B ≤ A + ‘ − , ≤ W ≤ | V | + 2 | E | do t ← A − B + ‘ + 1 for n O (1) iterations do count ← Randomly initialize ω as stated in Lemma 3.3 considering G = G for all possible f : S → { F , L , R } do count ← count + RIAFD − FCCount ( T , R , A , B , W , f , t ) if count mod t ) then F ← a riafd-set of G constructed using self-reduction return F return Infeasible (cid:73)
Theorem 3.6.
Given a tree decomposition T , a set S ⊆ V present in all bags of T , aset R and parameters k and ‘ , RIAFDCutandCount solves
RIAFD in O ? (cid:0) tw (cid:1) time and O ? (cid:0) tw −| S | (cid:1) space with high probability. Proof.
We first prove the probability bound. By Lemma 3.3 Item (2) if a riafd-set of sizeat most k exists, then for some values satisfying n − k ≤ A ≤ | V | , 0 ≤ B ≤ A + ‘ + 1and 0 ≤ W ≤ | V | + 2 | E | , in each iteration of the for block starting at Line 5 count t ) with probability 1 /
2. Lemma 3.3 Item (1) makes it so that whenever we have count t ), there is guaranteed to be a riafd-set i.e. there are no false positives.Therefore, in n O (1) iterations, we obtain the required riafd-set , if it exist, with high probabilityand if such a set doesn’t exist, RIAFDCutandCount will always return
Infeasible .Now, to prove the time and space complexity bounds, we first take note of the fact thatby Claim 3.5 Line 8 takes O ? (cid:0) tw −| S | (cid:1) time and O ? (cid:0) tw −| S | (cid:1) space. Since the numberof possible f : S → { F , L , R } is 3 | S | , Line 8 runs for O ? (cid:0) tw (cid:1) time but since each run isindependent it still requires only O ? (cid:0) tw −| S | (cid:1) space. All other lines contribute at mostpolynomial cost overall to the total running time and space. Therefore, the time and spacebounds for Line 8 are the ones for the complete algorithm. (cid:74)(cid:73) Lemma 3.7.
Given a graph G ( V, E ) and a riafd-set F of size k you can construct atree-decomposition T which contains a set S ⊇ F of size at most k + ‘ in all bags and haswidth at most | S | + 1 in polynomial time. Proof.
Initially the set S = F . G [ V \ F ] is an ‘ -forest. Now, find any spanning tree of eachconnected component. We can see that the union of the spanning trees is the forest with maximum number of edges that spans G [ V \ F ]. Therefore, there can be at most ‘ edgesthat were left out from the forest since G [ V \ F ] is an ‘ -forest. Add one end-point fromeach of these leftover edges to the set S . This set S is now an fvs of G of size at most k + ‘ .Therefore, we can construct a tree decomposition T of width 1 of the forest G [ V \ S ]. Addthe set S to all bags of T . Therefore, width of T is now at most | S | + 1. This completes ourconstruction. It’s easy to see from the description of the construction procedure that it takespolynomial time. (cid:74) Algorithm 2
RIAFD3k3l ( G, R, k, ‘ ) Input :
Graph G = ( V, E ), set R , parameters k ≤ n and ‘ = O ( n ). Output : A riafd-set F of size at most k or Infeasible . begin Order the vertices V arbitrarily as ( v , v , . . . , v n ) F ← ∅ for i = 1 , , . . . , n do T ← Compute the tree decomposition of G [ { v , . . . , v i − } ] by Lemma 3.7 oninput F S ← F Add v i to all bags of T and to S F ← RIAFDCutandCount ( T , R , k , ‘ , S ) if F is Infeasible then return Infeasible return F Now, we restate Theorem 1.2 (1) and prove it. Also, note that we set R = ∅ in all thecases except for when there is an explicit requirement of a restricted set of vertices. (cid:73) Theorem 1.2 (1) . The randomized algorithm
RIAFD3k3l solves
Almost ForestDeletion in O ? (cid:0) k ‘ (cid:1) time and polynomial space with high probability. Proof.
Suppose that there exists a riafd-set F ? of size at most k . Let ( v , . . . , v i ) be theordering from Line 2, and define V i := { v , . . . , v i } . Observe that F ? ∩ V i is a riafd-set of G [ V i ], so RIAFD problem on Line 8 is feasible. Line 8 correctly computes a riafd-set withhigh probability on any given iteration. Therefore, with high probability, such a riafd-set for G is returned by a union bound.We now bound the running time and space complexity. On Line 5, the current set F is a riafd-set of G [ V i − ], so Lemma 3.7 guarantees tree decomposition T of width at most k + ‘ + 1, and adding v i to each bag on Line 7 increases the width by at most 1. Also Lemma3.7 guarantees a set S ≤ k + ‘ such that tw ( T ) − | S | ≤ v i to the set S increasesits size by 1. Therefore, by Theorem 3.6, Line 8 runs in time O ? (3 k + ‘ ) and space O ? (1) asdesired. (cid:74) k In this subsection, we try to reduce the dependence on k by allowing an increase in dependenceon ‘ . We use the method of [23] using the outline described in Section 2. Following are somesimple reduction rules for RIAFD : (cid:73) Definition 3.8.
Reduction : Apply the following rules exhaustively, until the remaininggraph has minimum vertex degree at least : . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 13 Delete all vertices of degree at most one in the input graph. If k < , then we have a no instance. If k > G is an ‘ -forest, we have a yesinstance. If k = 0 , we have a yes instance iff G is an ‘ -forest. Now we give a probabilistic reduction for
RIAFD that capitalizes on the fact that a largenumber of edges are incident to the riafd-set . In particular, for a yes instance we focus onobtaining a probabilistic reduction that succeeds with probability strictly greater than 1 / O ? (3 − (cid:15) ) k with high probability. (cid:73) Definition 3.9.
Reduction (P): Assume that Reduction 1 does not apply and G has avertex of degree at least . Sample a vertex v ∈ V proportional to ω ( v ) := ( deg ( v ) − if v / ∈ R , else ω ( v ) := 0 . That is, select each vertex with probability ω ( v ) ω ( V ) . Delete v and add itsneighbours to R . Decrease k by . (cid:66) Claim 3.10.
Let G be a graph, F an afd-set of G . Denote F := V \ F . We have that, deg ( F ) ≤ deg ( F ) + 2( | F | − ‘ ) Proof.
This proof is based on simple observations. Notice that deg ( F ) = 2 E ( F ) + E ( F , F ).As G [ F ] is an ‘ -forest, E ( F ) ≤ | F | − ‘ . Also, E ( F , F ) ≤ deg ( F ). Therefore, deg ( F ) ≤ | F | − ‘ ) + deg ( F ) (cid:67)(cid:73) Lemma 3.11.
Given a graph G , if there exists a riafd-set F of size k such that deg ( F ) ≥ − (cid:15) − (cid:15) ( k + ‘ ) , then success of Reduction 2, which is essentially sampling a vertex v ∈ F occurswith probability at least − (cid:15) . Proof.
Let F ∈ V is a riafd-set of G of size exactly k . For Reduction 2 to succeed withprobability at least − (cid:15) , we need ω ( F ) ω ( F ) ≥ − (cid:15) .The value of ω ( F ) can be rewritten as, ω ( F ) = X v ∈ F ( deg ( v ) −
2) = deg ( F ) − k. By Claim 3.10 (as riafd-set is also an afd-set ), ω ( F ) ≤ X v ∈ F ( deg ( v ) −
2) = deg ( F ) − | F | ≤ deg ( F ) + 2( | F | − ‘ ) − | F | ≤ deg ( F ) + 2 ‘. Therefore, ω ( F ) ω ( F ) ≥ deg ( F ) − kdeg ( F ) + 2 ‘ = 1 − k + ‘ ) deg ( F ) + 2 ‘ ( ‘ ≥ ≥ − k + ‘ ) deg ( F ) . Hence, we need 1 − k + ‘ ) deg ( F ) ≥ − (cid:15) ⇐⇒ deg ( F ) ≥ − (cid:15) − (cid:15) ( k + ‘ ) . (cid:74) For the sparse case, we first construct a small separator. Due to the presence of two variables( k and ‘ ), we have to modify the small separator lemma in [23] with a bivariate analysis.Also, though we are discussing RIAFD , we will show how to construct a small separatorassuming that we are given an afd-set , as a riafd-set is also an afd-set . The main idea, as presented in [23], is to convert an afd-set with small average degree into agood tree decomposition. In particular, suppose a graph G has an afd-set F of size k with deg ( F ) ≤ d ( k + ‘ ), where d = O (1). We show how to construct a tree decomposition ofwidth (1 − Ω(1)) k + (2 − Ω(1)) ‘ . Note that d is not exactly the average degree of F . Thisdefinition helps us to bound the width of the tree decomposition well.Before constructing this separator, we will first see a construction of a β -separator of an ‘ -Forest. We could use Lemma 2.7, but the size of the separator obtained would be ‘ · o ( k )which is huge (treewidth ≤ ‘ ). We now give a method to construct a β -separator of size ‘ + o ( k ). (cid:73) Lemma 3.12.
Given an ‘ -forest T ( V, E ) on n vertices with vertex weights ω ( v ) , for any β > , we can delete a set S of β + ‘ vertices in polynomial time so that every connectedcomponent of T − S has total weight at most ω ( V ) β . Proof.
Construct some spanning tree for each connected component of T , call this resultantforest T . Let X be the set of remaining edges which are not in T . For each edge in X ,delete one vertex from T . As | X | ≤ ‘ , we will delete at most ‘ vertices. The resultant willstill be a forest, call it T .Now, root every component of the forest T at an arbitrary vertex. Iteratively select avertex v of maximal depth whose subtree has total weight more than ω ( V ) β , and then remove v and its subtree. The subtrees rooted at the children of v have total weight at most ω ( V ) β ,since otherwise, v would not satisfy the maximal depth condition. Moreover, by removingthe subtree rooted at v , we remove at least ω ( V ) β total weight, and this can only happen β times. Thus, we delete at most β + ‘ vertices overall. (cid:74) With the help of Lemma 3.12, we will now proceed to the small separator lemma. (cid:73)
Lemma 3.13. (Small Separator).
Given an instance ( G, k, ‘ ) and an afd-set F of G of size k , define d := deg ( F ) k + ‘ , and suppose that d = O (1) . There is a randomized algorithm runningin expected polynomial time that computes a separation ( A, B, S ) of G such that: | A ∩ F | , | B ∩ F | ≥ (2 − d − o (1))( k + ‘ ) − ‘ | S | ≤ (1 + o (1))( k + ‘ ) − | A ∩ F | − | B ∩ F | Proof.
The proof will be similar to [23] (Lemma 4). First, we fix a parameter (cid:15) := ( k + ‘ ) − . throughout the proof. Apply Lemma 3.12 to the ‘ -forest G − F with β = (cid:15) ( k + ‘ ) and vertex v weighted by | E [ v, F ] | . Let S (cid:15) be the output. Observe that: | S (cid:15) | ≤ ‘ + (cid:15) ( k + ‘ ) = ‘ + o ( k + ‘ ) , and every connected component C of G − F − S (cid:15) satisfies, | E [ C, F ] | ≤ | E [ F , F ] | (cid:15) ( k + ‘ ) ≤ deg ( F ) (cid:15) ( k + ‘ ) ≤ d ( k + ‘ ) (cid:15) ( k + ‘ ) = d(cid:15) . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 15 Now form a bipartite graph H , as in [23], i.e., on the vertex bipartition F ] R , where F is the afd-set , and there are two types of vertices in R , the component vertices and thesubdivision vertices. For every connected component C in G − F − S (cid:15) , there is a componentvertex v C in R that represents that component, and it is connected to all vertices in F adjacent to at least one vertex in C . For every edge e = ( u, v ) in E [ F, F ], there is a vertex v e in R with u and v as its neighbours. Observe that: |R| ≤ | E [ F , F ] | + 2 | E [ F, F ] | = deg ( F ) . every vertex in R has degree at most d(cid:15) . the degree of a vertex v ∈ F in H is at most deg ( v ) . .The algorithm that finds a separator ( A, B, S ) works as follows. For each vertex in R , colorit red or blue uniformly and independently at random. Every component C in G − F − S (cid:15) whose vertex v C is colored red is added to A in the separation ( A, B, S ), and every componentwhose vertex v C is colored blue is added to B . Every vertex in F whose neighbors are allcolored red joins A , and every vertex in F whose neighbors are all colored blue joins B . Theremaining vertices in F , along with the vertices in S (cid:15) , comprise S . It is easy to see that( A, B, S ) is a separation. (cid:66)
Claim 3.14. ( A, B, S ) is a separation.We now show with good probability both conditions (1) and (2) hold. The algorithm canthen repeat the process until both conditions hold. (cid:66)
Claim 3.15.
With probability at least 1 − k O (1) condition (1) holds for ( A, B, S ). Proof.
Firstly, notice that F has at most (cid:15) ( k + ‘ ) vertices with degree at least d(cid:15) . These canbe ignored as they affect condition (1) only by an additive (cid:15) ( k + ‘ ) = o ( k + ‘ ) factor. Let F be the vertices with degree at most d(cid:15) . Now, consider the intersection graph I on vertices of F formed by connecting two vertices if they share a common neighbour (in R ). Since everyvertex in F and all the component vertices have degree at most d(cid:15) , the maximum degreeof I is at most (cid:16) d(cid:15) (cid:17) . Color the vertices of F with (cid:16) d(cid:15) (cid:17) + 1 colors such that the verticesof the same color class form an independent set in I , using the standard greedy algorithm.Note that, within each color class, the outcome of each vertex whether it joins A, B or S isindependent across vertices.Let F i be the set of vertices colored i . If | F i | ≤ k . , then this color class can be ignoredsince the sum of all such | F i | is at most (cid:18)(cid:16) d(cid:15) (cid:17) + 1 (cid:19) k . = o ( k ) and this affects condition(1) by an additive o ( k ) factor. Henceforth, assume | F i | ≥ k . . Each vertex v ∈ F i has atmost deg ( v ) neighbours in H . So, it can join A with an independent probability of at least2 − deg ( v ) . Let X i = | F i ∩ A | , then by Hoeffding’s inequality ,Pr[ X i ≤ E [ X i ] − k . ] ≤ · exp − · (cid:0) k . (cid:1) | F i | ! ≤ · exp (cid:18) − · k . k (cid:19) ≤ k O (1) for large enough k . We use the notation exp ( x ) to denote the function e x . By a union bound over all the ≤ k . such color classes with | F i | ≥ k . , the probabilitythat | F i ∩ A | ≥ E [ | F i ∩ A | ] − k . for each F i is 1 − k O (1) . In this case, | F ∩ A | ≥ X i : | F i |≥ k . (cid:0) E [ | F i ∩ A | ] − k . (cid:1) ≥ X i : | F i |≥ k . X v ∈ F i (cid:16) − deg ( v ) (cid:17) − k . · k . = X v ∈ F − deg ( v ) + ‘ X j =1 − ‘ − o ( k ) ≥ ( | F | + ‘ ) · − deg ( F ) | F + ‘ − ‘ − o ( k ) , where the last inequality follows from convexity of the function 2 − x . Recall that | F | ≥ k − o ( k + ‘ ), and observe that deg ( F ) | F | + ‘ ≤ deg ( F ) k + ‘ = d since the vertices in F \ F are verticeswith degree greater than some threshold. Thus, | F ∩ A | ≥ ( k + ‘ − o ( k + ‘ )) · − d − l − o ( k ) ≥ (cid:16) − d − o (1) (cid:17) ( k + ‘ ) − ‘, proving condition (1) for A . The argument for | B ∩ F | is symmetric. (cid:67)(cid:66) Claim 3.16.
With probability at least 1 − k O (1) condition (2) holds for ( A, B, S ). Proof.
Note that at most ‘ + o ( k + l ) vertices in S are from S (cid:15) , and the other vertices in S are from the set F \ (( F ∩ A ) ∪ ( F ∩ B )) which has size k − | A ∩ F | − | B ∩ F | . Thus, theoverall size of S ≤ (1 + o (1)) ( k + ‘ ) − | A ∩ F | − | B ∩ F | (cid:67)(cid:74)(cid:73) Lemma 3.17.
Let G be a graph and F be a afd-set of G of size k , and define d := deg ( F ) k + ‘ .There is a randomized algorithm that, given G and F , computes a tree decomposition of G of width at most (1 − − d + o (1)) k + (2 − − d + o (1)) ‘ , and runs in polynomial time inexpectation. Proof.
Compute a separation (
A, B, S ) following Lemma 3.13. Conditions (1) and (2) canbe checked easily in polynomial time, so we can repeatedly compute a separation until theyboth hold.Notice that G [ A ∪ S ] − ( F ∪ S ) is a forest, as S (cid:15) includes the ‘ vertices corresponding tothe ‘ extra edges of the ‘ -Forest G − F . Thus, ( A ∩ F ) ∪ S is a fvs of A ∪ S . The size of this fvs is, | ( A ∩ F ) ∪ S | = | A ∩ F | + | S | ≤ (1+ o (1))( k + ‘ ) −| B ∩ F | ≤ (1 − − d + o (1)) k +(2 − − d + o (1)) ‘. Therefore, we can compute a tree decomposition of G [ A ∪ S ] of width (1 − − d + o (1)) k +(2 − − d + o (1)) ‘ as follows: start with a tree decomposition of width 1 of the forest G [ A ∪ S ] − ( F ∪ S ), and then add all vertices in ( A ∩ F ) ∪ S to each bag. Call this treedecomposition of G [ A ∪ S ] as T . Similarly, compute a tree decomposition of G [ B ∪ S ] inthe same way, call it T .Since there is no edge connecting A to B , we can construct the tree decomposition T of G by simply adding an edge between an arbitrary node from T and T . It is evident fromthe construction procedure that T is a valid tree decomposition of G and it takes polynomialtime to compute it. (cid:74) . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 17 (cid:73) Note 3.18.
Using the tree decomposition obtained in Lemma 3.17, we can run the
Cut &Count algorithm from Section 3.1. But this will utilize exponential space. To get polynomialspace, we use the idea from Claim 3.5. In the proof of Lemma 3.17, observe that the set( A ∩ F ) ∪ S is present in every bag of T . Similarly, ( B ∩ F ) ∪ S is present in every bag of T . This observation is crucial for the proof of Lemma 3.19.As we are in the sparse case, there exists a riafd-set F of size k with bounded degree,i.e., deg ( F ) ≤ dk . We call this bounded version of the problem BRIAFD . As we saw, thesmall separator helps in constructing a tree decomposition of small width, but requires thatwe are given an afd-set of size k and bounded degree. To attain this, we use an IterativeCompression based procedure which at every iteration constructs a riafd-set of size at most k with bounded degree and uses it to construct the small separator. Using this small separatorwe construct a tree decomposition of small width and run a Cut & Count based procedureto solve bounded
RIAFD problem for the current induced subgraph, i.e, get a riafd-set ofsize at most k with bounded degree.Now, we give the claimed BRIAFD1 algorithm, which is a
Cut & Count based algorithmwhich solves
BRIAFD given a small separator.
Algorithm 3
BRIAFD1 ( G, R, k, ‘, F, A, B, S, d ) Input :
Graph G ( V, E ), a set R , an afd-set F of size at most k + 1, the parameters k, d ≤ n and ‘ ≤ m and a separation ( A, B, S ) from Lemma 3.13.
Output :
Either output a riafd-set F ? of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ), or conclude that one does not exist ( Infeasible ). begin for A ≥ n − k , ≤ B ≤ A + ‘ − , W = i | V | + d for some d ≤ d ( n − A + ‘ ) do t ← A − B + ‘ + 1 for n O (1) iterations do count ← Randomly initialize ω as stated in Lemma 3.3 Generate tree decompositions T and T as defined in proof of Lemma 3.17 for all possible f : S → { F , L , R } do for W , A , B such that ≤ W ≤ W , ≤ A ≤ A , ≤ B ≤ B do countA ← for all possible f A : ( A ∩ F ) → { F , L , R } do countA ← countA + RIAFD − FCCount ( T , R , A , B , W , f ] f A , t ) countB ← for all possible f B : ( B ∩ F ) → { F , L , R } do countB ← countB + RIAFD − FCCount ( T , R , A − A + | f − ( { L , R } ) | , B − B + (cid:12)(cid:12) E (cid:2) f − ( { L , R } ) (cid:3)(cid:12)(cid:12) , W − W + ω ( f − ( F )), f ] f B , t ) count ← count + countA . countB if count mod t ) then F ? ← a riafd-set of G of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ )constructed using self-reduction return F ? return Infeasible (cid:73)
Lemma 3.19.
Given a graph G , a set R , an afd-set F of G of size at most k + 1 , parameter d , and a separation ( A, B, S ) as given by Lemma 3.13, the Algorithm BRIAFD1 outputs an riafd-set F ? of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ) , or Infeasible if none exists.The algorithm uses O ? (3 (1 − − d + o (1)) k · (2 − − d + o (1)) ‘ ) time and polynomial space and succeedswith high probability. Proof.
For the time bound, firstly notice that lines 12 and 15 take polynomial time due to theobservation given in Note 3.18 and Claim 3.5. All other steps listed in the algorithm
BRIAFD1 are polynomial time except lines 8, 11 and 14, which jointly give rise to 3 | S | + | A ∩ F | +3 | S | + | B ∩ F | iterations. By the conditions (1) and (2) of the separator ( A, B, S ) in Lemma 3.13, we getthe desired time bound. The space bound is evident from the description of the algorithm
BRIAFD1 and Claim 3.5. Also, by Line 4 and Lemma 2.4, the algorithm succeeds with highprobability.For the correctness, first we claim that at Line 16, count = |C n − k,BW | for some A , B and W = in + d (from Lemma 3.3). To see the claim, observe that we are iterating over allpossible mappings of S . For each mapping and every possible split of the parameters W and B , the algorithm computes the number countA (resp. countB) denoting the “extensions”of the mapping in G [ A ∪ S ] (resp. G [ B ∪ S ]) that respect the split, and then multipliescountA and countB. To see why these counts are multiplied, notice that there are no edgesbetween A and B . So, extending into G [ A ∪ S ] is independent to extending into G [ B ∪ S ].This along with the correctness of RIAFD-FCCount proves the claim, thereby proving thecorrectness. (cid:74)
And now we give the Iterative Compression routine
RIAFD_IC1 , as explained above, whichsolves
BRIAFD . Algorithm 4
RIAFD _ IC1 ( G, R, k, ‘, d ) Input :
Graph G = ( V, E ), a set R and parameters k, d ≤ n and ‘ ≤ m where d = O (1). Output : A riafd-set F ? of G of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ) or Infeasible . begin Order the vertices V in ascending order of degrees and call them ( v , v , . . . , v n ) F ? ← ∅ for i = 1 , . . . , n do . Invariant: deg ( F ? ) ≤ d ( | F ? | + ‘ ) Compute a separation (
A, B, S ) of G [ { v , . . . , v i − } ] by Lemma 3.13 using F ? , d S ← S ∪ { v i } so ( A, B, S ) is a separation of G [ { v , . . . , v i } ] F ? ← BRIAFD1 ( G , R, k, ‘, F ? ∪ { v i } , A, B, S, d ) if F ? is Infeasible then return Infeasible return F ? (cid:73) Lemma 3.20.
Algorithm
RIAFD _ IC1 solves
BRIAFD in O ? (3 (1 − − d + o (1)) k · (2 − − d + o (1)) ‘ ) time and polynomial space. Proof.
Suppose there exists a riafd-set F of size k satisfying deg ( F ) ≤ d ( k + ‘ ). Let ( v , . . . , v i )be the ordering from Line 2, and define V i := { v , . . . , v i } . Observe that F ∩ V i is a riafd-set . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 19 of G [ V i ] of size at most k . Let F i = F ∩ V i and | F i | = k i ≤ k . Due to the ordering from Line2, F i are the vertices of least degrees in F . Thus, deg ( F i ) k i + ‘ ≤ deg ( F ) k + l ≤ d . Hence, BRIAFD problem on Line 7 is feasible.Line 7 correctly computes a bounded degree riafd-set of size at most k with high probability,by Lemma 3.19. Therefore, with high probability, a riafd-set of size k is returned.We now bound the running time. On Line 5, the current set F ? is a riafd-set of G [ V i − ] satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ), so Lemma 3.17 guarantees tree decompositions T and T of width at most (1 − − d + o (1)) k + (2 − − d + o (1)) ‘ , and adding v i toeach bag on Line 6 increases the width by at most 1. By Lemma 3.19, Line 7 runs intime O ? (cid:16) (1 − − d + o (1)) k · (2 − − d + o (1)) ‘ (cid:17) , as desired. The space bound is evident from thedescription of RIAFD_IC1 and Lemma 3.19. (cid:74)
Similar to small separator, a bivariate analysis has to be done in the case of the Three-Wayseparator too. The outline of the analysis is similar to Lemma 3.13. (cid:73)
Lemma 3.21. (Three-Way Separator).
Given an instance ( G, k ) and an afd-set F of size k ,define d := deg ( F ) k + ‘ , and suppose that d = O (1) . There is a randomized algorithm running in ex-pected polynomial time that computes a three-way separation ( S , S , S , S , , S , , S , , S , , ) of G such that there exists values f , f satisfying: f k ≥ (3 − d − o (1))( k + ‘ ) − ‘ f k − o ( k + ‘ ) ≤ | S i ∩ F | ≤ f k + o ( k + ‘ ) for all i ∈ [3] ( f + 2 f ) k ≥ (cid:0) ( ) d − o (1) (cid:1) ( k + ‘ ) − ‘ f k − o ( k + ‘ ) ≤ | S i,j | ≤ f k + o ( k + ‘ ) for all ≤ i < j ≤ Proof.
This proof is similar to [23](Lemma 14) and uses the idea from Lemma 3.13. Firstly,we start out the same: fix (cid:15) := ( k + ‘ ) − . , apply Lemma 3.12 on G − F (to construct S (cid:15) ),and construct the bipartite graph H on the bipartition F ] R in the same way as in Lemma3.13. Recall that, |R| ≤ | E [ F , F ] | + 2 | E [ F, F ] | = deg ( F ).every vertex in R has degree at most d(cid:15) .the degree of a vertex v ∈ F in H is at most deg ( v ).Now, instead of randomly two-coloring the vertex set R , the algorithm three-colors it. That is,for each vertex in R , color it with a color in { , , } chosen uniformly and independently atrandom. For each subset I ⊆ [3] \ { ∅ } , create a vertex set S I consisting of all vertices v ∈ F whose neighborhood in H sees the color set I precisely. More formally, let c ( v ) and N ( v ) bethe color of v ∈ R and the neighbors of v in H , and define S I = { v ∈ F : P u ∈ N ( v ) c ( u ) = I } .Furthermore, if I is a singleton set { i } , then add (to S I ) all vertices in the connectedcomponents C whose component vertex in R is colored i . Henceforth, we abuse notation,referring to sets S { } , S { , } , etc. as S , S , , etc. (cid:66) Claim 3.22. ( S , S , S , S , , S , , S , , S , , ) is a three-way separator. (cid:66) Claim 3.23.
For f := P d p d | F d || F | , condition (2) holds with probability at least 1 − k O (1) . (cid:66) Claim 3.24.
For f := P d p d | F d || F | , condition (4) holds with probability at least 1 − k O (1) .In Claim 3.24, p d is the probability of a vertex to join S i,j for any i, j ∈ [3] such that i = j . The proofs of Claims 3.22, 3.23 and 3.24 are very similar to the proofs in [23] and theproof of Lemma 3.13. Hence, they are omitted. (cid:66) Claim 3.25.
For f := P d p d | F d || F | , condition (1) holds with probability at least 1 − k O (1) Proof.
Here, p d is the probability of a vertex with degree d to join S i for any i ∈ [3]. It’seasy to see that p d = 3 − d . Observe that deg ( F ) | F | + ‘ ≤ deg ( F ) k + ‘ = d , since the vertices in F \ F are precisely vertices with degree exceeding some threshold, and | F | ≥ k − o ( k + ‘ ). Also,due to the convexity of the function 3 − x , we get f k ≥ f | F | = X d | F d | · − d = X v ∈ F − deg ( v ) + ‘ X j =1 − ‘ ≥ ( | F | + ‘ )3 − deg ( F ) | F + ‘ − ‘ ≥ (3 − d − o (1))( k + ‘ ) − ‘, proving condition (1). (cid:67)(cid:66) Claim 3.26.
For f := P d p d | F d || F | and f := P d p d | F d || F | , condition (3) holds. Proof.
Let q d be the probability that a vertex v of degree d joins one of S i , S or S , .Since this is also the probability that no neighbour of v is colored 3, we have q d = (cid:0) (cid:1) d .Let p ,d and p ,d be the probabilities p d in the Claims 3.23 and 3.24 respectively, so that q d = 2 p ,d + p ,d . Therefore,2 f k + f k ≥ f | F | + f | F | = 2 · X d p ,d · | F d | + X d p ,d · | F d | = X d | F | · q d = X v ∈ F (cid:18) (cid:19) deg ( v ) + ‘ X j =1 − ‘ ≥ ( | F | + ‘ ) (cid:18) (cid:19) deg ( F ) | F + ‘ − ‘, where the last inequality follows from convexity of (cid:0) (cid:1) x . Again, we have deg ( F ) | F | + ‘ ≤ deg ( F ) k + ‘ = d ,and | F | ≥ k − o ( k + ‘ ). So,( f + 2 f ) k ≥ (cid:18) (cid:19) d − o (1) ! ( k + ‘ ) − ‘, proving condition (3). (cid:67)(cid:74) We now describe the structure of the three-way separator in more detail which will help indesigning the algorithm utilizing it. Let’s say we are given a graph G ( V, E ), an afd-set F ofsize at most k + 1 and a three-way separation ( S , S , S , S , , S , , S , , S , , ) as in Lemma3.21. Let f and f be from the conditions of Lemma 3.21. Define f := 1 − f − f , sothat f k + ‘ − o ( k + ‘ ) ≤ | S , , | ≤ f k + ‘ + o ( k + ‘ ). . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 21 Notice that G [ S ∪ S , ∪ S , ∪ S , , ] − ( F ∪ S , , ) is a forest, as S (cid:15) (from Lemma 3.21)includes the ‘ vertices corresponding to the ‘ extra edges of the ‘ -Forest G − F . Thus,( S ∩ F ) ∪ S , ∪ S , ∪ S , , is an fvs of S ∪ S , ∪ S , ∪ S , , . The size of this fvs is, | ( S ∩ F ) ∪ S , ∪ S , ∪ S , , | = | S ∩ F | + | S , | + | S , | + | S , , | ≤ ( f +2 f + f ) k + ‘ + o ( k + ‘ )Therefore, we can compute a tree decomposition of G [ S ∪ S , ∪ S , ∪ S , , ] of width( f +2 f + f ) k + ‘ + o ( k + ‘ ) as follows: start with a tree decomposition of width 1 of the forest G [ S ∪ S , ∪ S , ∪ S , , ] − ( F ∪ S , , ), and then add all vertices in ( S ∩ F ) ∪ S , ∪ S , ∪ S , , to each bag. Call this tree decomposition T . Similarly, we can compute a tree decompositionof G [ S ∪ S , ∪ S , ∪ S , , ] and G [ S ∪ S , ∪ S , ∪ S , , ] in the same way, call them T and T respectively. It is evident from the construction procedure it takes polynomial timeto compute these tree decompositions. (cid:73) Note 3.27.
Observe that there is no edge connecting any pair among S , S and S , and S i,j has neighbours only in S i and S j . Also, the set ( S ∩ F ) ∪ S , ∪ S , ∪ S , , is present inevery bag of T . Similarly, ( S ∩ F ) ∪ S , ∪ S , ∪ S , , and ( S ∩ F ) ∪ S , ∪ S , ∪ S , , arepresent in every bag of T and T respectively. This observation and the three decompositionsobtained will be crucial for the proof of Lemma 3.28.Similar to the two-way separator case, we now give the routines BRIAFD2 and
RIAFD_IC2 which will utilize the three-way separator. (cid:73)
Lemma 3.28.
Given a graph G , an afd-set F of G of size at most k + 1 , parameter d ,and a three-way separation ( S , S , S , S , , S , , S , , S , , ) as given by Lemma 3.21, theAlgorithm BRIAFD2 outputs a riafd-set of size at most k satisfying deg ( F ) ≤ d ( | F | + ‘ ) , orInfeasible if none exists. The algorithm uses O ? (3 (1 − min { ( ) d , (3 − ω ) ( ) d +(2 ω − − d } + o (1)) k · (1+ ω − ((3 − ω ) ( ) d +(2 ω − − d )+ o (1)) ‘ ) time. Proof.
For the time bound, firstly notice that lines 15 takes polynomial time due to theobservation given in Note 3.27 and Claim 3.5. Let f , f and f be from Lemma 3.21 andNote 3.27. For each of the O ? (3 f k + ‘ + o ( k + ‘ ) ) iterations on Line 8, building the graph H (Lines 10 −
17) takes time O ? (3 (2 f + f ) k + o ( k + ‘ ) ), and running matrix multiplication on Line18 on a graph with O ? (3 f k + o ( k + ‘ ) ) vertices to compute the sum over product of weights onthe three edges of all triangles takes time O ? (3 ωf k + o ( k + ‘ ) ). Therefore, the total runningtime is O ? (3 f k + ‘ + o ( k + ‘ ) (3 (2 f + f ) k + o ( k + ‘ ) + 3 ωf k + o ( k + ‘ ) ))= O ? (3 ( f +2 f + f ) k + ‘ + o ( k + ‘ )) + 3 ( f + ωf ) k + l + o ( k + ‘ ) )= O ? (3 (1 − f − f ) k + ‘ + o ( k + ‘ )) + 3 (1 − (3 − ω ) f − f ) k + l + o ( k + ‘ ) )= O ? (3 (1 − ( f +2 f )) k + ‘ + o ( k + ‘ )) + 3 (1 − (3 − ω )( f +2 f ) − (2 ω − f ) k + l + o ( k + ‘ ) )= O ? (3 (1 − ( f +2 f )) k + ‘ + o ( k + ‘ )) + 3 (1 − (3 − ω )( f +2 f ) − (2 ω − f ) k + l + o ( k + ‘ ) ) ≤ O ? ((3 − ( ) d + o (1)) k + 3 (1 − ((3 − ω )( ) d +(2 ω − − d + o (1)) k ) · (1+ ω − ((3 − ω )( ) d +(2 ω − − d )+ o (1)) ‘ ) , where the last inequality uses the conditions (1) and (3) of Lemma 3.21, and the fact that2 ω − ≥
0. This gives the desired time bound.The proof of correctness is similar to proof of Lemma 15 in [23]. We claim that at Line 19,count = |C n − k,BW | for some A , B and W = in + d (from Lemma 3.3). First observe that thereis no edge between S and S , . So, number of extensions of S only depend on S , and S , . Algorithm 5
BRIAFD2 ( G, R, k, ‘, F, S , S , S , S , , S , , S , , S , , , d ) Input :
Graph G = ( V, E ), a set R , an afd-set of size at most k + 1, the parameters k, d ≤ n and ‘ ≤ m and a separation ( S , S , S , S , , S , , S , , S , , ) fromLemma 3.21. Output :
Either output a riafd-set F ? of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ), or conclude that one does not exist ( Infeasible ). begin for A ≥ n − k , ≤ B ≤ A + ‘ − , W = i | V | + d for some d ≤ d ( n − A + ‘ ) do t ← A − B + ‘ + 1 for n O (1) iterations do count ← Randomly initialize ω as stated in Lemma 3.3 Generate tree decompositions T , T and T as stated in Note 3.27 for all possible f : S , , → { F , L , R } do for nonnegative W i , A i , B i , i ∈ [3] such that P i W i = W + w , P i A i = A + a , P i B i = B + b do H ← an empty graph with vertices indexed by (cid:0) S , .,.,. (cid:1) ∪ (cid:0) S , .,.,. (cid:1) ∪ (cid:0) S , .,.,. (cid:1) for ( i, j, k ) in { (1 , , , (2 , , , (3 , , } do for all possible f : S i,j → { F , L , R } , f : S i,k → { F , L , R } do count3 ← for all possible f : S i ∩ F → { F , L , R } do count3 ← count3 + RIAFD − FCCount ( T i , R , A i + a i , B i + b i , W i + w i , f ] f ] f ] f ) Add edge e between vertices (cid:0) f − ( F ) , f − ( L ) , f − ( R ) (cid:1) and (cid:0) f − ( F ) , f − ( L ) , f − ( R ) (cid:1) of H Assign weight count3 (mod 2 t ) to edge e count0 ← sum over the product of the three edges of all triangles of H count ← count + count0 if count mod t ) then F ? ← a riafd-set of G of size ≤ k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ )constructed using self-reduction return F ? return Infeasible
Values of some variables are not assigned in the pseudocode above to maintain clarity. In the algorithm w , a , b are variables to account for overcounting in S , , . If we define s = f − ( { L , R } ) then w = 2 · ω ( S , , \ s ), a = 2 · | s | and b = 2 · | E [ s , s ] | . For the overcounting that takes place within S , , S , and S , wedefine the variables w i , a i and b i for i ∈ [3]. We take w = a = b = 0. If we define s = f − ( { L , R } ),then w = ω ( S , \ s ), a = | s | , b = | E [ s , s ] | . If we define s = f − ( { L , R } ) ] f − ( { L , R } ), then w = ω (( S , ] S , ) \ s ), a = | s | , b = | E [ s , s ] | . For each mapping of S , ∪ S , , imagine adding an edge between the respective mappingsin the graph H , with weight as the number of extensions in S . Proceed analogously in S and S . Thus, H will be a tripartite graph. Now, merging the solutions, i.e. finding thetotal number of extensions (for a fixed mapping of S , , ), amounts to computing the sumover product of weights of three edges forming triangles in H , which can be solved usinga standard matrix multiplication routine. This along with correctness of RIAFD-FCCount completes the proof of the claim, thereby completing the proof of correctness. (cid:74) . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 23
Algorithm 6
RIAFD _ IC2 ( G, R, k, ‘, d ) Input :
Graph G = ( V, E ), a set R and parameters k, d ≤ n and ‘ ≤ m where d = O (1). Output : A riafd-set F ? of size at most k satisfying deg ( F ? ) ≤ d ( | F ? | + ‘ ) or Infeasible . begin Order the vertices V in ascending order of degrees and call them ( v , v , . . . , v n ) F ? ← ∅ for i = 1 , , . . . , n do . Invariant: deg ( F ? ) ≤ d ( | F ? | + ‘ ) Compute a separation ( S , S , S , S , , S , , S , , S , , ) of G [ { v , . . . , v i − } ] byLemma 3.21 for given F ? , d S , , ← S , , ∪ { v i } , so ( S , S , S , S , , S , , S , , S , , ) is a three-wayseparation of G [ { v , . . . , v i } ] F ? ← BRIAFD2 ( G, R, k, ‘, F ? ∪ { v i } , S , S , S , S , , S , , S , , S , , , d ) if F ? is Infeasible then return Infeasible return F ? (cid:73) Lemma 3.29.
Algorithm
RIAFD _ IC2 solves
BRIAFD in O ? (3 (1 − min { ( ) d , (3 − ω )( ) d +(2 ω − − d } + o (1)) k · (1+ ω − ((3 − ω )( ) d +(2 ω − − d )+ o (1)) ‘ ) time. The proof is similar to the proof of Lemma 3.20, hence it is omitted.
RIAFD
Having described the
Dense and the
Sparse
Cases, we now combine them to give the finalrandomized algorithms. . k . ‘ Algorithm in Polynomial Space
Now, we give the Algorithm
RIAFD1 ( G, k, ‘ ), which is the complete randomized algorithmcombining the Dense and the Sparse Cases (small separator). (cid:73)
Lemma 3.30.
Fix the parameter (cid:15) ∈ (0 , and d := − (cid:15) − (cid:15) , let c k := max (cid:8) − (cid:15), − − d (cid:9) and c ‘ := 3 − − d . Then RIAFD1 ( G, k, ‘ ) succeeds with probability at least c − kk c − ‘‘ k and has O ? (3 o ( k + ‘ ) ) expected running time. Proof.
We will focus on running time for each iteration of the outer loop. The computationtill line 6 takes n O (1) time. For each k ∈ (0 , k ], Line 7 is executed with probability3 − (1 − d ) k · − (2 − d ) ‘ and takes time O ? (3 (1 − d + o (1)) k · (2 − d + o (1)) ‘ ). So, in expectation, thetotal computation cost of Line 7 is O ? (3 o ( k + ‘ ) ) per value of k , and also O ? (3 o ( k + ‘ ) ) overall.Note here that for all values of (cid:15) ∈ (0 , c k ≥ c l ≥ RIAFD1 ( G, k, ‘ ) succeeds with probability c − kk · c − ‘‘ k . For simplicity ofcalculations, we replace k with k . Moreover, as each iteration is an independent trial, k isan upper bound for any k that succeeds. We use Induction on k . The statement is trivialwhen k = 0, since no probabilistic reduction is used and hence it succeeds with probability1. For the inductive step, consider an instance RIAFD1 ( G, k + 1 , ‘ ). Let ( G , k , ‘ ) be thereduced instance after Line 3. Suppose that every riafd-set F of G of size k satisfies the Algorithm 7
RIAFD1 ( G, R, k, ‘ ) Input :
Graph G = ( V, E ), a set R , two parameters k ≤ n and ‘ ≤ m . Output :
Either output a riafd-set F of size at most k , or (possibly incorrectly)conclude that one does not exist ( Infeasible ). begin for ≤ k ≤ k do Exhaustively apply Reduction 1 to (
G, R, k , ‘ ) to get vertex set F and theinstance ( G , R, k , ‘ ) d ← (4 − (cid:15) ) / (1 − (cid:15) ) Flip a coin with
Heads probability 3 − (1 − d ) k · − (2 − d ) ‘ if coin flipped Heads then F ← RIAFD_IC1( G , R , k , ‘ , d ) else Apply Reduction 2 to ( G , R , k , ‘ ) to get vertex v ∈ V and instance( G , R , k − , ‘ ) F ← RIAFD1( G , R , k − , ‘ ) ∪ { v } if F ∪ F is not Infeasible then return F ∪ F return Infeasible condition deg ( F ) ≤ d ( k + l ); here, we only need the existence of one such F . In this case, ifLine 7 is executed, then it will correctly output a riafd-set F of size at most k , with highprobability by Lemma 3.20. This happens with probability at least3 − (1 − d ) k · − (2 − d ) ‘ · (cid:18) − n O (1) (cid:19) ≥ c − k k · c − ‘‘ · k ≥ c − kk · c − ‘‘ k , as desired.Otherwise, suppose that the above condition doesn’t hold for every riafd-set F of G of size k . This means that there exists a riafd-set F of size k such that deg ( F ) ≥ d ( k + l ). In thiscase, by Lemma 3.11, Reduction 2 succeeds with probability at least − (cid:15) . This is assuming,of course, that Line 7 is not executed, which happens with probability 1 − c − k k · c − ‘‘ ≥ − c − k k ≥ − − k ≥ − k , since c l ≥ c k ≥
2. By Induction, the recursive call onLine 10 succeeds with probability at least c − ( k k · c − ‘‘ ( k − . So, the overall probability of successis at least, (cid:18) − k (cid:19) · − (cid:15) · c − ( k − k · c − ‘‘ ( k − ≥ (cid:18) k − k (cid:19) · c k · c − ( k − k · c − ‘‘ ( k −
1) = c − k k · c − ‘‘ k ≥ c − kk · c − ‘‘ k , as desired. Note that on line 10 adding the neighbours of v to R in the recursive call ensuresthat F is independent on addition of v to it. (cid:74) Unless R is explicitly nonempty, we set R = ∅ to solve RIAFD . To optimize for c k ,we set (cid:15) ≈ . c k ≤ . c ‘ ≤ . . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 253.3.3.2 . k . ‘ Algorithm using Matrix Multiplication
Using Lemma 3.28 and Lemma 3.29 and the Dense Case, we now prove the main result,Theorem 1.2 (3), restated below. (cid:73)
Theorem 1.2 (3).
There is a randomized algorithm that solves
RIAFD in time O ? (2 . k . ‘ ), with high probability. Proof.
We run
RIAFD1 , replacing every occurrence of
RIAFD_IC1 with
RIAFD_IC2 . We define d := − (cid:15) − (cid:15) for some (cid:15) > d ≥ (cid:15) >
0. Since ω < . RIAFD_IC2 runs in time O ? (3 (1 − ((3 − ω )( ) d +(2 ω − − d )+ o (1)) k · (1+ ω − ((3 − ω )( ) d +(2 ω − − d )+ o (1)) ‘ ). Hence, RIAFD1 runs in time O ? ( c kk · c ‘‘ ), by Lemma 2.4to get high success probability, for c k := max (cid:8) − (cid:15), − ((3 − ω )( ) d +(2 ω − − d ) (cid:9) and c ‘ := 3 ω − ((3 − ω )( ) d +(2 ω − − d ) . For ω = 2 . c k and set (cid:15) ≈ . c k ≤ . c ‘ ≤ . ω = 2, we can alwayssubstitute it’s value and optimize on c k to get the values for c k and c ‘ , if required. (cid:74) ‘ In this subsection, we will try to reduce the dependence on ‘ in the Cut & Count algorithm.To achieve this, we will construct a tree decomposition with reduced dependence on ‘ . (cid:73) Lemma 3.31.
Given a graph G ( V, E ) with tw ( G ) > and a riafd-set F of size k , thereexists a tree decomposition of width k + . ‘ + O (log( ‘ )) for G and it can be constructed inpolynomial time. Proof.
Given G ( V, E ) with n vertices and m edges, we define the graph G ( V , E ) := G [ V /F ]. G is an ‘ -Forest from the definition of riafd-set . We apply the following reduction rulesexhaustively on G : R : If there is a v ∈ V with deg ( v ) = 0, then remove v . R : If there is a v ∈ V with deg ( v ) = 1, then remove v . R : If there is a v ∈ V with deg ( v ) = 2, then contract v , i.e. remove v and insert a newedge between its two neighbors, if no such edge exists.For the safeness of the above reduction rules refer to [20]. Let the reduced graph becalled G ( V , E ). It is trivial to see that after applying these rules the G we get is also an ‘ -Forest. Therefore, after removing at most ‘ edges from G , we are left with at most | V | − | E | ≤ | V | + ‘ −
1. Sincethe degree of each vertex in G is at least 3, | E | ≥ | V | /
2. Therefore, 1 . | V | ≤ | V | + ‘ − | V | ≤ ‘ and | E | ≤ ‘ . We need to use the followingresults from [20]. (cid:73) Theorem 3.32. [20, Theorem 4.7].
Given a graph G ( V, E ) , we can obtain a tree decom-position of G of width at most | E | / .
769 + O ( log ( | V | )) in polynomial time. This implies that, G has a tree decomposition of width at most . ‘ + O (log( ‘ )) whichcan be computed in polynomial time. (cid:73) Lemma 3.33. [20, Lemma 4.2].
Given a connected graph G , with tw ( G ) > and let G be a graph obtained from G by applying R , R and R then tw ( G ) = tw ( G ) Also, from proof of Lemma 4.2 of [20], it’s easy to see that this also works on graphs whichmight not be connected. Given these facts, we see that we can obtain a tree decompositionof G with width at most . ‘ + O (log( ‘ )) in polynomial time from the tree decompositionof G . Now to get the tree decomposition of the given graph instance G , add F (of size k which we removed) to all the bags of the tree decomposition of G . This finally gives therequired tree decomposition of G of width at most k + . ‘ + O (log( ‘ )). (cid:74) We combine the treewidth bound that can be obtained from Lemma 3.31 with
IterativeCompression , together with the 3 tw algorithm to obtain an O ? (3 k . ‘ ) algorithm for solving RIAFD .We now describe the working of the routine
RIAFD_IC3 . The iterative compressionroutine proceeds as follows. We start with an empty graph, and add the vertices of G one by one, while always maintaining a riafd-set of size at most k in the current graph.Maintaining a riafd-set for the current graph helps us utilize Lemma 3.31 to obtain a smalltree decomposition (of size k + . ‘ + O (log( ‘ ))). Then we can add the next vertex inthe ordering to all the bags in the tree decomposition to get a new riafd-set of size k in O ? (3 tw ). If we are unable to find such a riafd-set in a particular iteration, we can terminatethe algorithm early. Algorithm 8
RIAFD _ IC3 ( G, R, k, ‘ ) Input :
Graph G = ( V, E ), a set R and parameters k ≤ n and ‘ = O ( n ). Output : A riafd-set F of size at most k or Infeasible . begin Order the vertices V arbitrarily as ( v , v , . . . , v n ) F ← ∅ for i = 1 , , . . . , n do T ← Compute the tree decomposition of G [ { v , . . . , v i − } ] by Lemma 3.31 Add v i to all bags of T F ← a riafd-set of G [ { v , . . . , v i } ] with parameters k and ‘ , computed using RIAFDCutandCount on T if F is Infeasible then return Infeasible return F Now we restate Theorem 1.2 (4) and prove it. (cid:73)
Theorem 1.2 (4).
RIAFD _ IC3 solves
RIAFD problem in time O ? (3 k . ‘ ) and expo-nential space with high probability. Proof.
Suppose that there exists a riafd-set F ? of size at most k . Let ( v , v , . . . , v n ) be theordering from Line 2, and define V i := { v , . . . , v i } . We note that F ? ∩ V i is a riafd-set of G [ V i ] so RIAFD problem on Line 7 will be feasible in each iteration (and will be computedcorrectly with high probability in every iteration). Therefore, with high probability, a riafd-set is returned successfully (by union bound).We now bound the running time. On Line 5, the current set F is a riafd-set of G [ V i ], soLemma 3.31 guarantees a tree decomposition of width at most k + . ‘ + O (log( ‘ )) andadding v i to each bag on Line 6 increases the width by at most one. By the Cut & Count algorithm from Section 3.1, Line 6 runs in time O ? (3( k + . ‘ + O (log( ‘ )) )) = O ? (3( k + . ‘ ))(since ‘ = O ( | V | ) for non-trivial instance). This gives the desired time of O ? (3 k . ‘ ) on . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 27 simplification. The space bound follows directly from the description of RIAFD_IC3 , Lemma3.31 and the space bound of the
Cut & Count algorithm. (cid:74)
In this section we present faster randomized algorithms for
Pseudoforest Deletion . InSection 4.1 we present an O ? (3 tw ) Cut & Count algorithm building on techniques from [10]for
FVS . Using this we give an O ? (3 k ) time and polynomial space algorithm in Section4.2. In Section 4.3, we use the method in [23] to get an O ? (2 . k ) time and polynomialspace algorithm. Henceforth, the abbreviation pds denotes a pseudoforest deletion set, i.e., asolution to an instance of Pseudoforest Deletion . O ? (3 tw ) Algorithm (cid:73)
Lemma 4.1.
A graph G = ( V, E ) with n vertices and m edges is a pseudoforest if andonly if it has n − m connected components which are trees. Proof.
We only consider cases where n ≥ m . Note that any graph G ( V, E ) with n verticesand m edges has at least n − m connected components which are trees. This is because of asimple additive argument and the fact that for a connected component other than a treewith n vertices and m edges, the term n − m ≤ Forward Direction: If G is a pseudoforest, then its connected components can beeither a tree or a tree plus an edge. For the “tree plus edge component”, n − m = 0. Hencewe have n − m trees. Reverse Direction:
Conversely, assume for contradiction that G has greater than n − m trees. By pigeonhole principle at least one of the other components has n − m ≤ −
1, acontradiction. (cid:74)
We present a
Cut & Count technique similar to the one for
FVS in [10]. As the universewe take U = V × { P , M } + E × { M } . The main difference between our algorithm fromthe one for FVS is we account for additional M markers for the edges. For each edge,we a priori decide one of its endpoints to represent the edge. Also, given a set of markededges M , ψ ( M ) denotes the set of representative vertices of the edges in M . When anedge is marked, it is assumed to be deleted and it’s representative vertex is marked. Thisassumption will be crucial in our algorithm.We assign weights uniformly at random to the elements of our universe with the weightfunction ω : U → { , . . . , N } , where N = 2 | U | = 4 | V | + 2 | E | . The Cut Part.
For integers A , B , C , D , W we define: R A,B,C,DW to be the family of solution candidates: R A,B,C,DW is the family of triples(
X, M , M ) where X ⊆ V , | X | = A , | E ( G [ X ]) | = B + D of which D edges are marked,i.e M ⊆ E ( G [ X ]) and | M | = D , M ⊆ X , | M | = C and ω (( V \ X ) × { P } ) + ω ( M ×{ M } ) + ω ( M × { M } ) = W . S A,B,C,DW to be the set of solutions: the family of triples (
X, M , M ), where ( X, M , M ) ∈R A,B,C,DW and every connected component of G [ X ] − M is a tree containing at least one M or M marker. C A,B,C,DW to be the family of pairs ((
X, M , M ) , ( X L , X R )) where ( X, M , M ) ∈ R A,B,C,DW , M ⊆ X L , ψ ( M ) ⊆ X L and ( X L , X R ) is a consistent cut of G [ X ]. According to [10], a consistent cut ( X L , X R ) is one where there is no edge between thecuts. But, as we stated that an edge marked with a marker M is deleted, these edges areallowed to cross the cuts. But the representative vertex must belong to X L only. (cid:73) Lemma 4.2.
The graph G admits a pseudoforest deletion set of size k iff there existintegers B , D , W such that S n − k,B,n − k − B − D,DW is nonempty.
Proof.
Forward direction:
Let G have a pds P of size k . Then G = G [ V \ P ] = ( V , E )is a pseudoforest with n − k vertices. Let G have D connected components which are “atree plus an edge” and by Lemma 4.1 G has n − k − B − D connected components whichare trees, where B = | E | − D . Then we can place one M marker each for all the treecomponents. Let M be the set of these marked vertices. In each of the D “tree plus anedge components”, only one cycle exists. Choose any edge belonging to that cycle as an M marker. Thus, by definition, this edge is deleted making the component a tree. Also, asdefined above, the representative vertex of the deleted edge is marked. Let M be the set ofall the marked edges. Also, let W := ω (( V \ X ) × { P } ) + ω ( M × { M } ) + ω ( M × { M } ).We now see that ( X, M , M ) ∈ S n − k,B,n − k − B − D,DW . Reverse direction:
We have that S n − k,B,n − k − B − D,DW is non-empty for some integers B , D and W . Let us consider some ( X, M , M ) ∈ S n − k,B,n − k − B − D,DW . Then, the graph G [ X ]has n − k vertices, B + D edges and every connected component of G [ X ] − M is a tree withexactly one marker, one of M or M , by definition. Notice that if a tree component in G [ X ]is marked by an M marker, then the number of unmarked tree components remains thesame, as on marking an edge, the edge is deleted (by definition) marking it’s representativevertex. Thus, on deletion we get two trees among which one is marked while the other isstill unmarked. These unmarked tree components necessarily have to be taken care of by M markers. Therefore, the number of tree components has to be equal to the number of M markers, i.e. the number of tree components is exactly n − k − B − D . Therefore, byLemma 4.1 G [ X ] is a pseudoforest. (cid:74)(cid:73) Lemma 4.3. |C A,B,C,DW | ≡ | S A,B,C,DW | ( mod . Proof.
Consider a triple (
X, M , M ) in R A,B,C,DW . If G [ X ] − M has c connected componentswithout any marker( M or M ), then it contributes 2 c to |C A,B,C,DW | . Hence, if c ≥
1, thetriple (
X, M , M ) contributes 2 c ≡ |C A,B,C,DW | (mod 2). A triple ( X, M , M ) ∈ S A,B,C,DW iff G [ X ] − M has no unmarked connected components. Thus, it contributes1 (mod 2) to both S A,B,C,DW and C A,B,C,DW . Hence, |C A,B,C,DW | ≡ | S A,B,C,DW | (mod 2). (cid:74) The Count Part.
For
A, B, C, D, W, ( X, M , M ) ∈ R A,B,C,DW , there are 2 cc ( M ,M ,G [ X ]) consistent cuts ( X L , X R ) such that (( X, M , M ) , ( X L , X R )) ∈ C A,B,C,DW where cc ( M , M , G [ X ])denotes the number of connected components of G [ X ] which do not contain any markerfrom either of M or M . Hence for C ≤ A − B by Lemma 4.1 we have that | S A,B,C,DW | ≡|C
A,B,C,DW | (mod 2).Now we describe a dynamic programming procedure CountC( ω, A, B, C, D, W, T ) , thatgiven a nice tree decomposition T , weight function ω and integers A, B, C, D, W , computes |C A,B,C,DW | mod 2. For every bag x ∈ T , a ≤ | V | , b ≤ | V | , c ≤ | V | , d ≤ | V | , w ≤ N | V | and s ∈ { F , L , R } B x (called the colouring), define . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 29 R x ( a, b, c, d, w ) = n ( X, M , M ) (cid:12)(cid:12) X ⊆ V x ∧ | X | = a ∧ | E x ∩ E ( G [ X ]) | = b + d ∧ M ⊆ X ∧ M ⊆ E x ∩ E ( G [ X ]) ∧ | M | = c ∧ | M | = d ∧ ω (( V \ X ) × { P } ) + ω ( M × { M } ) + ω ( M × { M } ) = w o C x ( a, b, c, d, w ) = n (( X, M , M ) , ( X L , X R )) (cid:12)(cid:12) ( X, M , M ) ∈ R x ( a, b, c, d, w ) ∧ M ⊆ X L ∧ ψ ( M ) ⊆ X L ∧ ( X, ( X L , X R )) is a consistently cutsubgraph of G x o A x ( a, b, c, d, w, s ) = (cid:12)(cid:12)(cid:12)n (( X, M ) , ( X L , X R )) ∈ C x ( a, b, c, d, w ) (cid:12)(cid:12) ( s ( v ) = L = ⇒ v ∈ X L ) ∧ ( s ( v ) = R = ⇒ v ∈ X R ) ∧ ( s ( v ) = F = ⇒ v / ∈ X ) o(cid:12)(cid:12)(cid:12) Note that we may assume b ≤ | V | and d ≤ | V | because the number of edges in apseudoforest cannot exceed the number of vertices. The accumulators a, b, c, d, w keep trackof the number of vertices, edges of X , M markers, M markers and the target weightrespectively. Hence A x ( a, b, c, d, w, s ) is the number of pairs in C x ( a, b, c, d, w ) having a fixedinterface with vertices in B x . Note that we choose a vertex to be an M marker in itsrespective forget bag. For the M marker for an edge we make the choice in the introduceedge bag, where we decide to not include it in G [ X ] if it is chosen as a M marker. Alsonote that the endpoints in this case for this edge can be on opposite sides of the cut.The algorithm computes A x ( a, b, c, d, w, s ) for each bag x ∈ T and for all reasonable valuesof a, b, c, d, w and s . We now give the recurrence for A x ( a, b, c, d, w, s ) used by the dynamicprogramming algorithm. In order to simplify notation let v be the vertex introduced andcontained in an introduce bag, ( u, v ) the edge introduced in an introduce edge bag with u being the representative of the edge (i.e. ψ ( { ( u, v ) } ) = { u } ), and let y, z stand for the leftand right child of x respctively in T if present. Leaf bag: A x (0 , , , , , ∅ ) = 1 Introduce vertex bag: A x ( a, b, c, d, w, s ∪ { ( v, F ) } ) = A y ( a, b, c, d, w − ω (( v, P )) , s ) A x ( a, b, c, d, w, s ∪ { ( v, L ) } ) = A y ( a − , b, c, d, w, s ) A x ( a, b, c, d, w, s ∪ { ( v, R ) } ) = A y ( a − , b, c, d, w, s ) Introduce edge bag: If s ( u ) = L ∧ s ( v ) = R A x ( a, b, c, d, w, s ) = A y ( a, b, c, d − , w − ω (( u, v ) , M ))If s ( u ) = F ∨ s ( v ) = F ∨ s ( u ) = s ( v ) = R A x ( a, b, c, d, w, s ) = A y ( a, b − [ s ( u ) = s ( v ) = F ] , c, d, w, s )If s ( u ) = s ( v ) = L A x ( a, b, c, d, w, s ) = A y ( a, b − , c, d, w, s ) + A y ( a, b, c, d − , w − ω (( u, v ) , M ) , s ) Here we remove table entries not consistent with the edge ( u, v ), and update the accumu-lator b storing the number of edges in the induced subgraph and we mark the edge ( u, v )keeping u in X L updating the accumulator d (even in the case when u and v are in X L and X R respectively) of edges in the induced subgraph. Forget vertex bag: A x ( a, b, c, d, w, s ) = A y ( a, b, c − , d, w − ω (( v, M )) , s [ v → L ])+ X α ∈{ F , L , R } A y ( a, b, c, d, w, s [ v → α ])If the vertex v was in X L then we can mark it and update the accumulator c . If wedo not mark the vertex v then it can have any of the three states with no additionalrequirements imposed. Join bag: A x ( a, b, c, d, w, s ) = X a + a = a + | s − ( { L,R } ) | b + b = bc + c = cd + d = dw + w = w + ω ( s − ( F ) ×{ P } ) A y ( a , b , c , d , w , s ) · A z ( a , b , c , d , w , s )The only valid combinations to achieve the colouring s is the same colouring in boththe children bags. Since the vertices coloured F according to s are present in both y and z , their contribution to the weight w and the number of the vertices a needs to beaccounted for.Since |C A,B,C,DW | ≡ A r ( A, B, C, D, W, ∅ ) mod 2, we compute A r ( A, B, C, D, W, ∅ ) forall reasonable values of the parameters as mentioned before using the dynamic programmingprocedure, which takes O ? (3 tw | V | O (1) ) time. This concludes the description of the Cut &Count algorithm for pds .We state the following equivalent of Lemma 3.3. The proof is omitted as it is very similarto the equivalent proof given for
RIAFD . (cid:73) Lemma 4.4.
Let G ( V, E ) be a graph and d be an integer. Set the universe U = V ×{ P , M } ∪ E × { M } . Pick ω ( u ) ∈ { , . . . , | U |} uniformly and independent at random forevery u ∈ U . Define ω : U → N such that ω (( v, P )) := | V | ω (( v, P )) + deg ( v ) for all v ∈ V and ω ( u ) = | V | ω ( u ) for all other u ∈ U . The following statements hold: If for some integers m , D , W = i | V | + d we have that |C n − k,m ,n − k − m − D,DW | 6≡ mod ,then G has a Pseudoforest Deletion set P of size k satisfying deg ( F ) = d . If G has a Pseudoforest Deletion set P of size k satisfying deg ( P ) = d , then with probabilityat least / for some m , D , W = i | V | + d we have that |C n − k,m ,n − k − m − D,DW | 6≡ mod . O ? (3 k ) Algorithm in Polynomial Space
In this section, we present an O ? (3 k ) algorithm using polynomial space for solving Pseudo-forest Deletion . First, we state the equivalent of Claim 3.5 and Theorem 3.6 for
Pseudoforest Deletion problem. Their proofs are omitted since they work out byreplacing the
Cut & Count algorithm for
RIAFD with
Cut & Count for
PDS describedabove, replacing
RIAFD-FCCount with
PF-FCCount , taking modulo with 2 instead of 2 t andfollowing a similar line of reasoning. . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 31 (cid:66) Claim 4.5.
Given a tree decomposition T with a set S ⊆ V which is present inall its bags and a vertex assignment function f : S → { F , L , R } , there is a routine PF-FCCount ( T , R, A, B, C, D, W, f ) which can compute |C A,B,C,DW | (mod 2) in time O ? (cid:0) tw −| S | (cid:1) . (cid:73) Theorem 4.6.
Given a tree decomposition T , a set S ⊆ V present in all bags of T ,parameter k , CutandCountPF solves the pseudoforest deletion problem in O ? (cid:0) tw (cid:1) timeand O ? (cid:0) tw −| S | (cid:1) space with high probability. (cid:73) Lemma 4.7.
Given a graph G ( V, E ) and a pds P of size k , you can construct a treedecomposition T which contains the set P in all bags and has width at most k + 2 inpolynomial time. Proof. G [ V \ P ] is a pseudoforest. Let G [ V \ F ] have c connected components. Let usconsider the i th component C i and denote their individual tree decomposition as T i . C i iseither a tree or a pseudoforest. If C i is a tree there is a trivial tree decomposition T i ofwidth 1. If not, then C i is a pseudotree. Remove any edge ( u, v ) from the only cycle in C i and construct the tree decomposition of the remaining tree. Add the vertex u in all bags ofthat tree decomposition to get T i of width 2 for the pseudotree C i . Now, make an emptybag as the root and connect the root of all T i to it and call the resulting tree decomposition(of width 2) T i . Now, adding P to all bags of T i gives the desired tree decomposition T i ofwidth k + 2. The time bound is trivial from the description of the procedure. (cid:74) Now, we state the following lemma and prove it. (cid:73)
Lemma 4.8.
There exists an algorithm
PF3k that solves
Pseudoforest Deletion in O ? (3 k ) time and polynomial space with high probability. Proof.
In algorithm
RIAFD3k3l from Section 3.2, replace
RIAFDCutandCount with
CutandCountPF .Also replace the equivalent lemmas, theorems and claims. Denote this algorithm as
PF3k .The proof of correctness and success-probability is similar to Theorem 1.2 (1) in Section 3.2.The running time and space bound follow by similar arguments in the proof of Theorem 1.2(1) and Lemmas 4.6, 4.7. (cid:74) O ? (2 . k ) Algorithm in Polynomial space
In this section, we present a O ? (2 . k ) algorithm using polynomial space. We use the methodfrom [23], dividing the problem into sparse and dense cases. Following are a few basicreduction rules for Pseudoforest Deletion , which are quite similar to those for
FVS . (cid:73) Definition 4.9.
Reduction : Apply the following reduction rules exhaustively until thereis no edge of multiplicity larger than 3, there are vertices with at most one loop and degree atleast 3. If there is more than one loop at a vertex v , delete v and decrease k by 1; add v to theoutput pds . If there is an edge of multiplicity larger than 3, reduce its multiplicity to 3. If there is a a vertex v of degree at most 1, delete v . If there is a vertex v of degree 2, delete v and join its neighbours with an edge. If k < , then we have a no instance. If k > and G is a pseudoforest, then we have ayes instance. If k = 0 , we have a yes instance iff G is a pseudoforest. In this case, we apply a probabilistic reduction that capitalises on the fact that a largenumber of edges are incident to the pds . We will use the same ideas as of Reduction 2 for
RIAFD in Section 3.3. Thus, even here we aim to obtain a reduction that succeeds withprobability strictly greater than 1 / O ? (3 − (cid:15) ) k time that succeeds with high probability. (cid:73) Definition 4.10.
Reduction (P): Assume that Reduction does not apply and G hasa vertex of degree at least . Sample a vertex v ∈ V proportional to ω ( v ) := ( deg ( v ) − .That is, select each vertex with probability ω ( v ) ω ( V ) . Delete v and decrease k by . (cid:66) Claim 4.11.
Let G be a graph, P a pds of G . Denote P := V \ P . We have that, deg ( P ) ≤ deg ( P ) + 2( | P | ) . (cid:73) Lemma 4.12.
Given a graph G , if there exists a pds P of size k such that deg ( P ) ≥ − (cid:15) − (cid:15) k ,then success of Reduction which is essentially picking a vertex v from the pds P occurswith probability at least − (cid:15) . The proofs of the above claim and lemma follow a similar line of reasoning as the proofsof Claim 3.10 and Lemma 3.11, hence they are omitted.
In this case, since deg ( P ) / | P | ≤ d and d = O (1), it is possible to get a tree decomposition ofsize (1 − Ω(1)) k .We state this without proof through the following lemmas since they use the same ideasfrom [23]. (cid:73) Lemma 4.13.
Given ( G, k ) and a pds P of G of size exactly k , define d := deg ( P ) k , andsuppose that d = O (1) . There is a randomized algorithm running in expected polynomial timethat computes a separation ( A, B, S ) of G such that: | A ∩ P | , | B ∩ P | ≥ (2 − d − o (1)) k | S | ≤ (1 + o (1)) k − | A ∩ P | − | B ∩ P | Proof.
The proof is similar to that in [23]. The only difference is in the first step i.econstruction of a β -separator S (cid:15) . For this we can use Lemma 2.7 which gives a β -separatorof size at most 3 β ( tw of any pseudoforest is ≤ β = (cid:15)k = o ( k ), | S (cid:15) | = o ( k ). Allother steps and bounds remain exactly the same. (cid:74)(cid:73) Lemma 4.14.
Let G be a graph and P be a pds of G of size k , and define d := deg ( P ) k .There is an algorithm that, given G and P , computes a tree decomposition of G of width atmost (1 − − d + o (1)) k , and runs in polynomial time in expectation. As we are in the sparse case, which means that there exists a pds P of size k with boundeddegree, i.e., deg ( P ) ≤ dk . We call this bounded version of the problem, BPDS . As we saw,the small separator helps in constructing a tree decomposition of small width, but requiresthat we are given a pds of size k and bounded degree. To attain this, we use an IterativeCompression based procedure which at every iteration considers a pds of size at most k withbounded degree and uses it to construct the small separator. Using this small separator weconstruct a tree decomposition of small width and employ a Cut & Count based procedure tosolve
BPDS for the current induced subgraph, i.e, get a bpds of size at most k with boundeddegree. This bpds is used for the next iteration, and so on. . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 33 (cid:73) Note 4.15.
Using the tree decomposition obtained in 4.14, we can run the
Cut & Count algorithm from Section 4.1. But this will utilize exponential space. To get polynomial space,we use the following idea.Given an (
A, B, S ) separation of a graph G according to Lemma 4.13 along with a pds P of size at most k of bounded average degree d , we construct a tree decomposition T of G asfollows: Since A ∩ P ∪ S is a pds for A ∪ S , we construct a nice tree decomposition T of A ∪ S which forgets all vertices in S at the last(going from a leaf bag to the root bag). Hencethere is a bag B y which contains all the vertices v ∈ S and nothing else. Upto this bag, noedge e ∈ E [ S, S ] is introduced. Consider this part of the tree decomposition of T (denote as T ) up to node y . Similarly we construct a tree decomposition T for partition B as we didfor A . There is a bag B z in T which contains all vertices v ∈ S and nothing more. Denotethe tree decomposition up to node z for T as T . The final tree decomposition T for G isconstructed by joining T and T via a join node and then going toward the root we havethe introduce edge bags and forget vertex bags for v ∈ S . We use this tree decomposition T for proving the polynomial space bound in Algorithm 10.Now, we give the claimed BPDS algorithm, which is a
Cut & Count based algorithm whichsolves bounded degree
PDS given a small separator.
Algorithm 9
BPDS ( G, P, k, A, B, S ) Input:
Graph G = ( V, E ), pds P of size at most k + 1, parameters k, d ≤ n and aseparation ( A, B, S ) from Lemma 4.13.
Output: A pds P of size at most k satisfying deg ( P ) / | P | ≤ d or Infeasible if nosuch set exists. begin Set the universe U = V × { P , M } ∪ E × { M } Pick ω uniformly and independently at random as defined in Lemma 4.4 Construct the tree decomposition T as stated earlier in note 4.15 Compute C A,B,C,DW for all reasonable values of A,B,C,D,W using
CutandCountPF return A pds P with | P | ≤ k and deg ( P ) / | P | ≤ d (cid:73) Lemma 4.16.
There is an Algorithm
BPDS that, given G , a pds P of G of size at most k + 1 , parameter d , and a separation ( A, B, S ) as given by Lemma 4.13, outputs a pds ofsize at most k satisfying deg ( P ) / | P | ≤ d , or Infeasible if none exists. The algorithm uses O ? (3 (1 − − d + o (1)) k ) time and polynomial space. Proof.
Note that we reorder the computation of algorithm
CutandCountPF in a slightlydifferent way on tree decomposition T to achieve polynomial space. Follow the notationsaccording to note 4.15. The way we reorder the computation of CutandCountPF on treedecomposition T is as follows: For a fixed colouring s of S , we compute A y ( a, b, c, d, w, s )and A z ( a, b, c, d, w, s ) in polynomial space according to Claim 4.5. Now the remainingtree decomposition has bags only consisting of vertices in S . Using A y ( a, b, c, d, w, s ) and A z ( a, b, c, d, w, s ) for some colouring s of S we can compute C A,B,C,DW for T in polynomialspace by Theorem 4.6.The algorithm is clearly correct since it uses CutandCountPF as a subroutine with reorderedcomputation. By Lemma 4.4, the pds P of size at most k is found using CutandCountPF with bounded average degree d with success probability at least 1 /
2. The success probabilitycan be easily boosted by n O (1) runs of the algorithm. The width of the tree decomposition from the input according to Lemma 4.14 is (1 − − d + o (1)) k . Thus the time bound followsthe time bound of the CutandCountPF algorithm. (cid:74)
Now, we give the Iterative Compression routine which solves
BPDS , as explained above. (cid:73)
Lemma 4.17.
There exists an algorithm
PFIC1 that solves
BPDS in O ? (3 (1 − − d + o (1)) k ) time and polynomial space with high probability. Proof.
PFIC1 can be constructed by replacing every occurrence of
BRIAFD1 with
BPDS andconstructing the separator using Lemma 4.13. The proofs of correctness, space bound andsuccess-probability are similar to Lemma 3.20. (cid:74)
Having described the
Dense and the
Sparse
Cases, we now combine them to give the finalrandomized algorithm. (cid:73)
Lemma 4.18.
Fix the parameter (cid:15) ∈ (0 , and let c (cid:15) := max (cid:26) − (cid:15), − − − (cid:15) − (cid:15) (cid:27) . If c (cid:15) ≥ , there exists an algorithm PDS1 that succeeds with probability at least c − k(cid:15) . MoreoverAlgorithm PDS1 has expected polynomial running time and requires polynomial space.
Proof.
In algorithm
RIAFD1 , replace every occurrence of
RIAFDIC1 with
PFIC1 . Also, replacethe Reduction rules with the ones given for Pseudoforest Deletion. This modified algorithmis
PDS1 . The running time, space bound and success probability analysis are similar to theanalysis in proof of Lemma 3.30. (cid:74)
Note that the outer loop on k is not required here. If there exists a pds of size at most k ,we can add arbitrary vertices to get a pds of size exactly k .To optimize for c (cid:15) , we set (cid:15) ≈ . c (cid:15) ≈ . In this paper, we applied the technique of Li and Nederlof [23] to other problems aroundthe
Feedback Vertex Set problem. The technique of Li and Nederlof is inherentlyrandomized, and it uses the
Cut & Count technique, which is also randomized. Designingmatching deterministic algorithms for these problems, as well as for
Feedback VertexSet , is a long standing open problem. However, there is a deterministic algorithm for
Pseudoforest Deletion running in time O ? (3 k ) [5]. So obtaining a deterministic algorithmfor Pseudoforest Deletion running in time O ? ( c k ) for a constant c < Pseudoforest Deletion runningin time O ? (2 . k ), by designing a different Cut & Count based algorithm for this problem?Finally, could we get a O ? ( c k o ( ‘ ) ) algorithm for Almost Forest Deletion , for a constant c possibly less than 3? . Gowda, A. Lonkar, F. Panolan, V. Patel, S. Saurabh 35 References Akanksha Agrawal, Sushmita Gupta, Saket Saurabh, and Roohani Sharma. Improved al-gorithms and combinatorial bounds for independent feedback vertex set. In , volume 63, pages 2:1–2:14. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik,2016. Akanksha Agrawal, Daniel Lokshtanov, Amer E. Mouawad, and Saket Saurabh. Simultaneousfeedback vertex set: A parameterized perspective.
TOCT , 10(4):18:1–18:25, 2018. Ann Becker, Reuven Bar-Yehuda, and Dan Geiger. Randomized algorithms for the loop cutsetproblem.
J. Artif. Intell. Res. , 12:219–234, 2000. Hans L. Bodlaender. On disjoint cycles. In Gunther Schmidt and Rudolf Berghammer, editors,
WG ’91 , volume 570 of
LNCS , pages 230–238. Springer, 1992. Hans L. Bodlaender, Hirotaka Ono, and Yota Otachi. A faster parameterized algorithm forpseudoforest deletion.
Discret. Appl. Math. , 236:42–56, 2018. URL: https://doi.org/10.1016/j.dam.2017.10.018 , doi:10.1016/j.dam.2017.10.018 . Yixin Cao. A naive algorithm for feedback vertex set. In , volume 61, pages1:1–1:9. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2018. Yixin Cao, Jianer Chen, and Yang Liu. On feedback vertex set: New measure and newstructures.
Algorithmica , 73(1):63–86, 2015. Jianer Chen, Fedor V. Fomin, Yang Liu, Songjian Lu, and Yngve Villanger. Improvedalgorithms for feedback vertex set problems.
J. Comput. Syst. Sci. , 74(7):1188–1198, 2008. Marek Cygan, Jesper Nederlof, Marcin Pilipczuk, Michal Pilipczuk, Johan M. M. van Rooij,and Jakub Onufry Wojtaszczyk. Solving connectivity problems parameterized by treewidthin single exponential time. In
IEEE 52nd Annual Symposium on Foundations of ComputerScience, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011 , pages 150–159. IEEEComputer Society, 2011. Marek Cygan, Jesper Nederlof, Marcin Pilipczuk, Michal Pilipczuk, Johan M. M. van Rooij, andJakub Onufry Wojtaszczyk. Solving connectivity problems parameterized by treewidth in singleexponential time.
CoRR , abs/1103.0534, 2011. URL: http://arxiv.org/abs/1103.0534 , arXiv:1103.0534 . Marek Cygan, Marcin Pilipczuk, Michal Pilipczuk, and Jakub Onufry Wojtaszczyk. Subsetfeedback vertex set is fixed-parameter tractable.
SIAM J. Discrete Math. , 27(1):290–309, 2013. Frank K. H. A. Dehne, Michael R. Fellows, Michael A. Langston, Frances A. Rosamond, andKim Stevens. An O (2 O ( k ) n ) FPT algorithm for the undirected feedback vertex set problem. Theory Comput. Syst. , 41(3):479–492, 2007. Rodney G. Downey and Michael R. Fellows. Fixed parameter tractability and completeness.In
Complexity Theory: Current Research , pages 191–225. Cambridge University Press, 1992. Paola Festa, Panos M. Pardalos, and Mauricio G.C. Resende. Feedback set problems. In
Handbook of Combinatorial Optimization , pages 209–258. Kluwer Academic Publishers, 1999. Jiong Guo, Jens Gramm, Falk Hüffner, Rolf Niedermeier, and Sebastian Wernicke. Compression-based fixed-parameter algorithms for feedback vertex set and edge bipartization.
J. Comput.Syst. Sci. , 72(8):1386–1396, 2006. Yoichi Iwata and Yusuke Kobayashi. Improved analysis of highest-degree branching for feedbackvertex set. In , pages 22:1–22:11, 2019. Yoichi Iwata, Magnus Wahlström, and Yuichi Yoshida. Half-integrality, LP-branching, andFPT algorithms.
SIAM J. Comput. , 45(4):1377–1411, 2016. Yoichi Iwata, Yutaro Yamaguchi, and Yuichi Yoshida. 0/1/all CSPs, half-integral a-pathpacking, and linear-time FPT algorithms. In , pages 462–473. IEEEComputer Society, 2018. Ken-ichi Kawarabayashi and Yusuke Kobayashi. Fixed-parameter tractability for the subsetfeedback set problem and the s-cycle packing problem.
J. Comb. Theory, Ser. B , 102(4):1020–1034, 2012. Joachim Kneis, Daniel Mölle, Stefan Richter, and Peter Rossmanith. A bound on the pathwidthof sparse graphs with applications to exact algorithms.
SIAM J. Discrete Math. , 23:407–427,01 2009. doi:10.1137/080715482 . Tomasz Kociumaka and Marcin Pilipczuk. Faster deterministic feedback vertex set.
Inf.Process. Lett. , 114(10):556–560, 2014. François Le Gall. Powers of tensors and fast matrix multiplication. In
Proceedings of the39th International Symposium on Symbolic and Algebraic Computation , ISSAC ’14, page296–303, New York, NY, USA, 2014. Association for Computing Machinery. URL: https://doi.org/10.1145/2608628.2608664 , doi:10.1145/2608628.2608664 . Jason Li and Jesper Nederlof. Detecting feedback vertex sets of size k in O *(2.7 k ) time. In Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, SaltLake City, UT, USA, January 5-8, 2020 , pages 971–989, 2020. Shaohua Li and Marcin Pilipczuk. An improved FPT algorithm for independent feedbackvertex set. In
Graph-Theoretic Concepts in Computer Science - 44th International Workshop,WG 2018, Cottbus, Germany, June 27-29, 2018, Proceedings , volume 11159, pages 344–355.Springer, 2018. Mugang Lin, Qilong Feng, Jianxin Wang, Jianer Chen, Bin Fu, and Wenjun Li. An improvedFPT algorithm for almost forest deletion problem.
Inf. Process. Lett. , 136:30–36, 2018. URL: https://doi.org/10.1016/j.ipl.2018.03.016 , doi:10.1016/j.ipl.2018.03.016 . Daniel Lokshtanov, M. S. Ramanujan, and Saket Saurabh. Linear time parameterizedalgorithms for subset feedback vertex set.
ACM Trans. Algorithms , 14(1):7:1–7:37, 2018. Neeldhara Misra, Geevarghese Philip, Venkatesh Raman, and Saket Saurabh. On parameterizedindependent feedback vertex set.
Theor. Comput. Sci. , 461:65–75, 2012. Neeldhara Misra, Geevarghese Philip, Venkatesh Raman, Saket Saurabh, and Somnath Sikdar.FPT algorithms for connected feedback vertex set.
J. Comb. Optim. , 24(2):131–146, 2012. Ketan Mulmuley, Umesh V. Vazirani, and Vijay V. Vazirani. Matching is as easy as matrixinversion.
Combinatorica , 7(1):105–113, March 1987. URL: https://doi.org/10.1007/bf02579206 , doi:10.1007/bf02579206 . Geevarghese Philip, Ashutosh Rai, and Saket Saurabh. Generalized pseudoforest deletion:Algorithms and uniform kernel.
SIAM J. Discret. Math. , 32(2):882–901, 2018. URL: https://doi.org/10.1137/16M1100794 , doi:10.1137/16M1100794 . Ashutosh Rai and Saket Saurabh. Bivariate complexity analysis of almost forest deletion.
Theor. Comput. Sci. , 708:18–33, 2018. URL: https://doi.org/10.1016/j.tcs.2017.10.021 , doi:10.1016/j.tcs.2017.10.021 . Venkatesh Raman, Saket Saurabh, and C. R. Subramanian. Faster fixed parameter tractablealgorithms for undirected feedback vertex set. In
ISAAC , volume 2518 of
Lecture Notes inComputer Science , pages 241–248. Springer, 2002. Junjie Ye. A note on finding dual feedback vertex set.
CoRR , abs/1510.00773, 2015. arXiv:1510.00773arXiv:1510.00773