The Power of Data Reduction for Matching

Finding maximum-cardinality matchings in undirected graphs is arguably one of the most central graph primitives. For $m$-edge and $n$-vertex graphs, it is well-known to be solvable in $O(m\sqrt{n})$ time; however, for several applications this running time is still too slow. We investigate how linear-time (and almost linear-time) data reduction (used as preprocessing) can alleviate the situation. More specifically, we focus on (almost) linear-time kernelization. We start a deeper and systematic study both for general graphs and for bipartite graphs. Our data reduction algorithms easily comply (in form of preprocessing) with every solution strategy (exact, approximate, heuristic), thus making them attractive in various settings.


Introduction
"Matching is a powerful piece of algorithmic magic" [18].In Matching, given a graph, one has to compute a maximum-cardinality set of nonoverlapping edges.Matching is arguably among the most fundamental graph-algorithmic primitives allowing for a polynomial-time algorithm.More specifically, on an n-vertex and m-edge graph a maximum matching can be found in O(m √ n) time [17].Improving this upper time bound, even for bipartite graphs, resisted decades of research.
Recently, however, Duan and Pettie [8] presented a linear-time algorithm that computes a (1 − ǫ)approximate maximum-weight matching, where the running time dependency on ǫ is ǫ −1 log(ǫ −1 ).For the unweighted case, the O(m √ n) algorithm of Micali and Vazirani [17] implies a lineartime (1 − ǫ)-approximation, where in this case the running time dependency on ǫ is ǫ −1 [8].We take a different route: First, we do not give up the quest for optimal solutions.Second, we focus on efficient data reduction rules-not solving an instance but significantly shrinking its size before actually solving the problem 1 .In the context of decision problems, in parameterized algorithmics this is known as kernelization, a particularly active area of algorithmic research on NP-hard problems.The spirit behind our approach is thus closer to the identification of efficiently (i.e.linearly) solvable special cases of Matching.There is quite some body of work in this direction.For instance, since an augmenting path can be found in linear time [10], the standard augmenting path-based algorithm runs in O(s(n + m)) time, where s is the number of edges in the maximum matching.Yuster [20] developed an O(rn 2 log n)-time algorithm, where r is the difference between maximum and minimum vertex degree of the input graph.Moreover, there are linear-time algorithms for computing maximum matchings in special graph classes, including convex bipartite [19], strongly chordal [7], and chordal bipartite graphs [6].
All this and the more general spirit of "parameterization for polynomial-time solvable problems" [12] (also referred to as "FPT in P" or "FPTP" for short) forms the starting point of our research.Remarkably, Fomin et al. [9] recently developed an algorithm to compute a maximum matching in graphs of treewidth k in O(k 4 n log n) randomized time.
Following the paradigm of kernelization, that is, provably effective and efficient data reduction, we provide a systematic exploration of the power of polynomial-time data reduction for Matching.Thus, our aim (fitting within FPTP) is to devise problem kernels that are computable in (almost) linear time.A particular motivation for this is that with such very efficient kernelization algorithms it is possible to transform multiplicative (O(f (k)(n+m)) into additive (O(f ′ (k)+n+m)) "(almost) linear-time FPTP" algorithms.Furthermore, kernelization algorithms (typically based on data reduction rules) can be used as a preprocessing to heuristics or approximation algorithms with the goal of getting larger matchings.
As kernelization is usually defined for decision problems, we use in the remainder of the paper the decision version of Matching.In a nutshell, a kernelization of a decision problem instance is an algorithm that produces an equivalent instance whose size can solely be upper-bounded by a function in the parameter (preferably a polynomial).The focus on decision problems is justified by the fact that all our results, although formulated for the decision version, in a straightforward way extend to the corresponding optimization version.

Input:
An undirected graph G = (V, E) and a nonnegative integer s.Question: Is there a size s subset M G ⊆ E of nonoverlapping (i.e.disjoint) edges?
Since solving the given instance and returning a trivial yes-or no-instance always produces a constant-size kernel in polynomial time, we are looking for kernelization algorithms that are faster than the algorithms solving the problem.For NP-hard problems, each kernelization algorithm, since running in polynomial time, is (presumably) faster than any solution algorithm.This is, of course, no longer true when applying kernelization to a polynomial-time solvable problem like Matching.While the focus of classical kernelization for NP-hard problems is mostly on improving the size of the kernel, we particularly emphasize that for polynomially solvable problems it now becomes crucial to also focus on the running time of the kernelization algorithm.Moreover, the parameterized complexity analysis framework can also be applied to the kernelization algorithm itself.For example, a kernelization algorithm running in O(k 5 n) time (k is the "problem specific" parameter) might be preferable to another one running in O(n 3 ) time.In this paper, we present kernelization algorithms for Matching which run in linear time (see Sections 2.1 and 3) or in almost linear time (i.e. in O(kn) time, see Section 2.2).
Our contributions.In this paper we present three efficiently computable kernels for Matching (see Table 1 for an overview).All our parameterizations can be categorized as "distance to triviality" [13].They are motivated as follows.First, note that maximum-cardinality matchings be can trivially found in linear time on trees (or forests).So we consider the corresponding edge deletion distance (feedback edge number) and vertex deletion distance (feedback vertex number).Notably, there is a trivial linear-time algorithm for computing the feedback edge number and there is a linear-time factor-4 approximation algorithm for the feedback vertex number [1].We mention in passing that the parameter vertex cover number, which is lower-bounded by the feedback vertex number, has been frequently studied for kernelization [3,4].In particular, Gupta and Peng [14] (implicitly) provided a quadratic-size kernel for Matching with respect to the parameter vertex cover number.Coming to bipartite graphs, note that our parameterization by vertex deletion distance to chain graphs is motivated as follows.First, chain graphs form one the most obvious easy cases for bipartite graphs where Matching can be solved in linear time [19].Second, we show that the vertex deletion distance of any bipartite graph to a chain graph can be 2-approximated in linear time.Moreover, vertex deletion distance to chain graphs lower-bounds the vertex cover number of a bipartite graph.
An overview of our main results is given in Table 1.We study kernelization for Matching parameterized by the feedback vertex number, that is, the vertex deletion distance to a forest (see Section 2).As a warm-up we first show that a subset of our data reduction rules for the "feedback vertex set kernel" also yields a linear-time computable linear-size kernel for the typically much larger parameter feedback edge number (see Section 2.1).As for Bipartite Matching no faster algorithm is known than on general graphs, we kernelize Bipartite Matching with respect to the vertex deletion distance to chain graphs (see Section 3).
Seen from a high level, our two main results employ the same algorithmic strategy, namely upper-bounding (as a function of the parameter) the number of neighbors in the appropriate vertex deletion set X; that is, in the feedback vertex set or in the deletion set to chain graphs, respectively.To achieve this we develop new "irrelevant edge techniques" tailored to these two kernelization problems.More specifically, whenever a vertex v of the deletion set X has large degree, we efficiently detect edges incident to v whose removal does not change the size of the maximum matching.Then the remaining graph can be further shrunk by scenario-specific data reduction rules.While this approach of removing irrelevant edges is natural, the technical details and the proofs of correctness can become quite technical and combinatorially challenging.In particular, for the case of feedback vertex number k we could only upper-bound the number of neighbors of each vertex in X by 2 O(k) .
As a technical side remark, we emphasize that in order to achieve an (almost) linear-time kernelization algorithm, we often need to use suitable data structures and to carefully design the appropriate data reduction rules to be exhaustively applicable in linear time, making this form of "algorithm engineering" much more relevant than in the classical setting of mere polynomial-time data reduction rules.
Notation and Observations.We use standard notation from graph theory.In particular all paths we consider are simple paths.Two paths in a graph are called internally vertex-disjoint if they are either completely vertex-disjoint or they overlap only in their endpoints.A matching in a graph is a set of pairwise disjoint edges.Let G = (V, E) be a graph and let M ⊆ E be a matching in G.The degree of a vertex is denoted by deg(v).A vertex v ∈ V is called matched with respect to M if there is an edge in M containing v, otherwise v is called free with respect to M .If the matching M is clear from the context, then we omit "with respect to M ".An alternating path with respect to M is a path in G such that every second edge of the path is in M .An augmenting path is an alternating path whose endpoints are free.It is well known that a matching M is maximum if and only if there is no augmenting path for it.Let M ⊆ E and M ′ ⊆ E be two matchings in G.We denote by G(M, M ′ ) := (V, M △ M ′ ) the graph containing only the edges in the symmetric difference of M and M ′ , that is, For a matching M ⊆ E for G we denote by M max G (M ) a maximum matching in G with the largest possible overlap (in number of edges) with ) consists of only odd-length paths and isolated vertices, and each of these paths is an augmenting path for M .Moreover the paths in G(M, M max G (M )) are as short as possible: Observation 1.2.Let G = (V, E) be a graph with a maximum matching M G , let X ⊆ V be a vertex subset of size k, and let M G−X be a maximum matching for G − X.Then, Kernelization.A parameterized problem is a set of instances (I, k) where I ∈ Σ * for a finite alphabet Σ, and k ∈ N is the parameter.We say that two instances (I, k) and (I ′ , k ′ ) of parameterized problems P and P ′ are equivalent if (I, k) is a yes-instance for P if and only if (I ′ , k ′ ) is a yes-instance for P ′ .A kernelization is an algorithm that, given an instance (I, k) of a parameterized problem P , computes in polynomial time an equivalent instance (I ′ , k ′ ) of P (the kernel ) such that |I ′ | + k ′ ≤ f (k) for some computable function f .We say that f measures the size of the kernel, and if f (k) ∈ k O (1) , we say that P admits a polynomial kernel.Often, a kernel is achieved by applying polynomial-time executable data reduction rules.We call a data reduction rule R correct if the new instance (I ′ , k ′ ) that results from applying R to (I, k) is equivalent to (I, k).An instance is called reduced with respect to some data reduction rule if further application of this rule has no effect on the instance.

Kernelization for Matching on General Graphs
In this section, we investigate the possibility of efficient and effective preprocessing for Matching.As a warm-up, we first present in Section 2.1 a simple, linear-size kernel for Matching with respect to the parameter "feedback edge set".Exploiting the data reduction rules and ideas used for this kernel, we then present in Section 2.2 the main result of this section: an exponential-size kernel for the smaller parameter "feedback vertex number".

Warm-up: Parameter feedback edge number
We provide a linear-time computable linear-size kernel for Matching parameterized by the feedback edge number, that is, the size of a minimum feedback edge set.Observe that a minimum feedback edge set can be computed in linear time via a simple depth-first search or breadth-first search.The kernel is based on the next two simple data reduction rules due to Karp and Sipser [16].They deal with vertices of degree at most two.
then delete v and its neighbor and decrease the solution size s by one (v is matched with its neighbor).
Reduction Rule 2.2.Let v be a vertex of degree two and let u, w be its neighbors.Then remove v, merge u and w, and decrease the solution size s by one.
The correctness was stated by Karp and Sipser [16].For completeness, we give a proof.Lemma 2.1.Reduction Rules 2.1 and 2.2 are correct.
Proof.If v has degree zero, then clearly v cannot be in any matching and we can remove v.
If v has degree one, then let u be its single neighbor.Let M be a maximum matching of size at least s for G. Then v is matched in M since otherwise adding the edge {u, v} would increase the size of the matching.Thus, a maximum matching in Conversely, a maximum matching of size s − 1 in G ′ can easily be extended by the edge {u, v} to a maximum matching of size s in G.
If v has degree two, then let u and w be its two neighbors.Let M a maximum matching of size at least s.If v is not matched in M , then u and w are matched since otherwise adding the edge {u, v} resp.{v, w} would increase the size of the matching.Thus, deleting v and merging u and w decreases the size of M by one (M looses either the edge incident to v or one of the edges incident to u and w).Hence, the resulting graph G ′ has a maximum matching of size at least s− 1. Conversely, let M ′ be a matching of size at least s − 1 for G ′ .If the merged vertex vw is free, then M := M ′ ∪ {{u, v}} is a matching of size s in G. Otherwise, vw is matched to some vertex y.Then matching y in G with either v or w (at least one of the two vertices is a neighbor of y) and matching u with the other vertex yields a matching of size s for G.
Although Reduction Rules 2.1 and 2.2 are correct, it is not clear whether Reduction Rule 2.2 can be exhaustively applied in linear time.However, for our purpose it suffices to consider the following restricted version which we can exhaustively apply in linear time.
Reduction Rule 2.3.Let v be a vertex of degree two and u, w be its neighbors with u and w having degree at most two.Then remove v, merge u and w, and decrease s by one.
Lemma 2.2.Reduction Rules 2.1 and 2.3 can be exhaustively applied in O(n + m) time.
Proof.We give an algorithm which exhaustively applies Reduction Rules 2.1 and 2.3 in linear time.First, using bucket sort, sort the vertices by degree and keep three lists containing all degree-zero/one/two vertices.Then one applies Reduction Rules 2.1 and 2.3 in a straightforward way.When a neighbor of a vertex is deleted, then check if the vertex has now degree zero, one, or two.If yes, then add the vertex to the corresponding list.
We next show that this algorithm runs in linear time.First, observe that the deletion of each each degree-zero vertex can be done in constant time as no further vertices are affected.Second, consider a degree-one vertex v with a neighbor u and observe that deleting u and v can be done O(deg(v)) time since one needs to update the degrees of all neighbors of v. Furthermore, decreasing s by one can be done in constant time for each deleted degree-one vertex.Finally, consider a degree-two vertex v with two neighbors u and w, each of degree at most two.Deleting v takes constant time.To merge u and w iterate over all neighbors of u and add them to the neighborhood of w.If a neighbor u ′ of u is already a neighbor of w, then decrease the degree of u ′ by one.Then, relabel w to be the new contracted vertex uw.
Overall, the worst-case running time to apply Reduction Rules 2.1 and 2.3 exhaustively can be upper-bounded by O(n Theorem 2.3.Matching admits a linear-time computable linear-size kernel with respect to the parameter "feedback edge number" k. Proof.Apply Reduction Rules 2.1 and 2.3 exhaustively in linear time (see Lemma 2.2).We claim that the reduced graph G = (V, E) has less than 12k vertices and 13k edges.Denote with X ⊆ E a feedback edge set for G, |X| ≤ k.Furthermore, denote with V 1 G−X , V 2 G−X , and V ≥3 G−X the vertices that have degree one, two, and more than two in the G−X.Thus, |V 1 G−X | ≤ 2k as each leaf in G−X has to be incident to an edge in X. Next, since G−X is a forest (or tree), we have Finally, each degree-two vertex in G needs at least one neighbor of degree at least three since G is reduced with respect to Reduction Rule 2.3.Thus, the vertices in V 2 G−X are either incident to an edge in X or adjacent to one of the at most |V ≥3 G−X | + 2k vertices in G that have degree at least three.Since the sum over all degrees of vertices in

Parameter feedback vertex number
We next provide for Matching a kernel of size 2 O(k) computable in O(kn) time where k is the "feedback vertex number".Using a known linear-time factor 4-approximation algorithm [1], we can approximate feedback vertex set and use it in our kernelization algorithm.Roughly speaking, our kernelization algorithm extends the linear-time computable kernel with respect to the parameter "feedback edge set".Thus, Reduction Rules 2.1 and 2.3 play an important role in the kernelization.Compared to the other kernels presented in this paper, the kernel presented here comes at the price of higher running time O(kn) and bigger kernel size (exponential size).It remains open whether Matching parameterized by the "feedback vertex number" admits a linear-time computable kernel (possibly of exponential size), and whether it admits a polynomial kernel computable in O(kn) time.
Subsequently, we describe our kernelization algorithm which keeps in the kernel all vertices in the given feedback vertex set X and shrinks the size of G − X.Before doing so, we need some further notation.In this section, we assume that each tree is rooted at some arbitrary (but fixed) vertex such that we can refer to the parent and children of a vertex.A leaf in G − X is called a bottommost leaf either if it has no siblings or if all its siblings are also leaves.(Here, bottommost refers to the subtree with the root being the parent of the considered leaf.)The outline of the algorithm is as follows (we assume throughout that k < log n since otherwise the input instance is already a kernel of size O(2 k )): 1. Reduce G wrt. Reduction Rules 2.1 and 2.3.

Compute a maximum matching M
3. Modify M G−X in linear time such that only the leaves of G − X are free(Section 2.2.1).
4. Bound the number of free leaves in G − X by k 2 (Section 2.2.2). 5. Bound the number of bottommost leaves in G − X by O(k 2 2 k )(Section 2.2.3).
6. Bound the degree of each vertex in X by O(k 2 2 k ).Then, use Reduction Rules 2.1 and 2.3 to provide the kernel of size 2 O(k) (Section 2.2.4).
Whenever we reduce the graph at some step, we also show that the reduction is correct.That is, the given instance is a yes-instance if and only if the reduced one is a yes-instance.The correctness of our kernelization algorithm then follows by the correctness of each step.We discuss in the following some details of each step.

Steps 1 to 3
By Lemma 2.2 we can perform Step 1 in linear time.By Lemma 2.1 this step is correct.A maximum matching in Step 2 can be computed by repeatedly matching a free leaf to its neighbor and by removing both vertices from the graph (thus effectively applying Reduction Rule 2.1 to G − X).By Lemma 2.2, this can be done in linear time.
Step 3 can be done in O(n) time by traversing each tree in M G−X in a BFS manner starting from the root: If a visited inner vertex v is free, then observe that all children are matched since M G−X is maximum.Pick an arbitrary child u of v and match it with v.The vertex w that was previously matched to u is now free and since it is a child of u, it will be visited in the future.Observe that Steps 2 and 3 do not change the graph but only the auxiliary matching M G−X , and thus these steps are correct.

Step 4.
Recall that our goal is to upper-bound the number edges between vertices of X and V \X, since we can then use a simple analysis as for the parameter "feedback edge set".Furthermore, recall that by Observation 1.2 the size of any maximum matching in G is at most k plus the size of M G−X .Now, the crucial observation is that if a vertex x ∈ X has at least k neighbors in V \ X that are free wrt.M G−X , then there exists a maximum matching where x is matched to one of these k vertices since at most k − 1 can be "blocked" by other matching edges.This means we can delete all other edges incident to x. Formalizing this idea, we obtain the following reduction rule.
Reduction Rule 2.4.Let G = (V, E) be a graph, let X ⊆ V be a subset of size k,and let M G−X be a maximum matching for G − X.If there is a vertex x ∈ X with at least k free neighbors V x = {v 1 , . . ., v k } ⊆ V \ X, then delete all edges from x to vertices in V \ V x .
Lemma 2.5.Reduction Rule 2.4 is correct and can be exhaustively applied in O(n + m) time.
Proof.We first discuss the correctness and then the running time.Denote by s the size of a maximum matching in the input graph G = (V, E) and by s ′ the size of a maximum matching in the new graph G ′ = (V ′ , E ′ ), where some edges incident to x are deleted.We need to show that s = s ′ .Since any matching in G ′ is also a matching in G, we easily obtain s ≥ s ′ .It remains to show s ≤ s ′ .To this end, let M G := M max G (M G−X ) be a maximum matching for G with the maximum overlap with M G−X (see ??).If x is free wrt.M G or if x matched to a vertex v that is also in G ′ a neighbor of x, then M G is also a matching in G ′ (M G ⊆ E ′ ) and thus we have in this case s ≤ s ′ .Hence, consider the remaining case where x is matched to some vertex v such that {v, x} / ∈ E ′ , that is, the edge {v, x} was deleted by Reduction Rule 2.4.Hence, x has k neighbors v 1 , . . ., v k in V \ X such that each of these neighbors is free wrt.M G−X and none of the edges {v i , x}, i ∈ [k], was deleted.Observe that by the choice of M G , the graph G(M G−X , M G ) (the graph over vertex set V and the edges that are either in M G−X or in M G , see ??) contains exactly s− |M G−X | paths (we do not consider isolated vertices as paths).Each of these paths is an augmenting path for M G−X .By Observation 1.2, we have s − |M G−X | ≤ k.Observe that {v, x} is an edge in one of these augmenting paths; denote this path with P .Thus, there are at most k − 1 paths G(M G−X , M G ) that do not contain x.Also, each of these paths contains exactly two vertices that are free wrt.M G−X : the endpoints of the path.This means that no vertex in X is an inner vertex on such a path.Furthermore, since M G−X is a maximum matching, it follows that for each path at most one of these two endpoints is in V \ X.Hence, at most k − 1 vertices of v 1 , . . ., v k are contained in the k − 1 paths of G(M G−X , M G ) except P .Therefore, one of these vertices, say v i , is free wrt.M G and can be matched with x.Thus, by reversing the augmentation along P and adding the edge {v i , x} we obtain another matching M ′ G of size s.Observe that M ′ G is a matching for G and for G ′ and thus we have s ≤ s ′ .This completes the proof of correctness.Now we come to the running time.We exhaustively apply the data reduction rule as follows.First, initialize for each vertex x ∈ X a counter with zero.Second, iterate over all free vertices in G − X in an arbitrary order.For each free vertex v ∈ V \ X iterate over its neighbors in X.For each neighbor x ∈ X do the following: if the counter is less than k, then increase the counter by one and mark the edge {v, x} (initially all edges are unmarked).Third, iterate over all vertices in X.If the counter of the currently considered vertex x is k, then delete all unmarked edges incident to x.This completes the algorithm.Clearly, it only deletes edges incident to a vertex x ∈ X only if x has k free neighbors in V \ X and the edges to these k neighbors are kept.The running time is O(n + m): When iterating over all free vertices in V \ X we consider each edge at most once.Furthermore, when iterating over the vertices in X, we again consider each edge at most once.
To finish Step 4, we exhaustively apply Reduction Rule 2.4 in linear time.Afterwards, there are at most k 2 free (wrt.to M G−X ) leaves in G − X that have at least one neighbor in X since each of the k vertices in X is adjacent to at most k free leaves.Thus, applying Reduction Rule 2.1 we can remove the remaining free leaves that have no neighbor in X.However, since for each degree-one vertex also its neighbor is removed, we might create new free leaves and need to again apply Reduction Rule 2.4 and update the matching (see Step 3).This process of alternating application of Reduction Rules 2.1 and 2.4 stops after at most k rounds since the neighborhood of each vertex in X can be changed by Reduction Rule 2.4 at most once.This shows the running time O(k(n + m)).We next show how to improve this to O(n + m) and arrive at the final lemma of this subsection.

Algorithm 1: Reduce(G, M G−X ).
Input: A matching instance (G = (V, E), s) and a feedback vertex set X ⊆ V for G with |X| = k.Output: An equivalent matching instance (G ′ , s ′ ) such that X is also a feedback vertex set for G ′ and a maximum matching M G ′ −X for G ′ − X such that only at most k 2 leaves in G ′ − X are free.
1 Reduce G wrt. Reduction Rules 2.1 and 2.3 2 Compute a maximum matching MG−X as described in Step 3 3 foreach x ∈ X do c(x) ← 0 // c(x) will store the number of free neighbors for x 4 foreach e ∈ E do marked(e) ← False 5 L ← stack containing all free leaves in G − X 6 while L is not empty do  Lemma 2.6.Given a matching instance (G, s) and a feedback vertex set X, Algorithm 1 computes in linear time an instance (G ′ , s ′ ) with feedback vertex set X and a maximum matching • There is a matching of size s in G if and only if there is a matching of size s ′ in G ′ .
• Each vertex that is free wrt.
• There are at most k 2 free leaves in G ′ − X.
Proof.In the following, we explain Algorithm 1 which reduces the graph with respect to Reduction Rules 2.1 and 2.4 and updates the matching M G−X as described in Step 3. The algorithm performs in (Lines 1 and 2) Steps 1 to 3. As described in the previous section, this can be done in linear time.Next, Reduction Rule 2.4 is applied in Lines 8 to 17 using the approach described in the proof of Lemma 2.5: For each vertex in x a counter c(x) is maintained.When iterating over the free leaves in G − X, these counters will be updated.If a counter c(x) reaches k, then the algorithm knows that x has k fixed free neighbors and according to Reduction Rule 2.4 the edges to all other vertices can be deleted (see Line 10).Observe that once the counter c(x) reaches k, the vertex x will never be considered again by the algorithm since its only remaining neighbors are free leaves in G − X that already have been popped from stack L. The only difference from the description in the proof of Lemma 2.5 is that the algorithm reacts if the degree of some vertex v in G − X is decreased to one (see Lines 15 to 17).If v is matched, then simply remove v and its matched neighbor from G and M G−X .Otherwise, add v to the list L of unmatched degree-one vertices and defer dealing with v to a latter stage of the algorithm.
Observe that the matching M G−X still satisfies the property that each free vertex in G − X is a leaf since only matched vertex pairs were deleted so far.When deleting unmatched degree-one vertices and their respective neighbor, the maximum matching M G−X needs to be updated to satisfy this property.The algorithm does this from Lines 18 to 27: Let u be an entry in L such that u has degree one in Line 18, that is, u is a free leaf in G − X and has no neighbors in X.Then, following Reduction Rule 2.1, delete u and its neighbor v and decrease the solution size s by one (see Lines 20 and 21).Let w denote the previously matched neighbor of v. Since v was removed, w is now free.If w is a leaf in G − X, then we can simply add it to L and in this way deal with it later.If w is not a leaf, then we need to update M G−X since only leaves are allowed to be free.To this end, take an arbitrary alternating path P from w to a leaf u ′ of the subtree with root w and augment along P (see Lines 25 and 26).This can be done as follows: Pick an arbitrary child w 1 of w.Let w 2 be the matched neighbor of w 1 .Since w is the parent of w 1 , it follows that w 2 is a child of w 1 .Now, remove {w 1 , w 2 } from M G−X and add {w 1 , w}.If w 2 is a leaf, then the alternating path P is found with u ′ = w 2 and augmented.Otherwise, repeat the above procedure with w 2 taking the role of w.This completes the algorithm.Its correctness follows from the fact that it only deletes edges and vertices according to Reduction Rules 2.1 and 2.4.
It remains to show the running time of O(n + m).To this end, we prove that the algorithm considers each edge in E only two times.First, consider the edges incident to a vertex x ∈ X.These edges will be inspected at most twice by the algorithm: Once, when it is marked (see Line 9).The second time is when it is deleted.This bounds the running time in the first part (Lines 8 to 17).Now consider the remaining edges within G − X.To this end, observe that the algorithm performs two actions on the edges: deleting the edges (Line 20) and finding and augmenting along an alternating path (Lines 25 and 26).Clearly, after deleting an edge it will no longer be considered, so it remains to show that edge is part of at most one alternating path used in Lines 25 and 26.Assume toward a contradiction that the algorithm augments along an edge twice or more.From all the edges that are augmented twice or more let e ∈ E be one that is closest to the root of the tree e is contained in, that is, there is no edge closer to a root.Let w 1 and u ′ 1 be the endpoints of the first augmenting path P 1 containing e and w 2 and u ′ 2 the endpoints of the second augmenting path P 2 containing e. Observe that for each augmenting path chosen in Line 25 it holds that one endpoint is a leaf and the other endpoint is an ancestor of this leaf.Assume without loss of generality that u ′ 1 and u ′ 2 are the leaves and w 1 and w 2 are their respective ancestors.Let u 1 and v 1 (u 2 and v 2 ) be the vertices deleted in Line 20 which in turn made w 1 (w 2 ) free.Observe that e does not contain any of these four vertices u 1 , v 1 , u 2 , v 2 since before augmenting P 1 (P 2 ) the vertices u 1 and v 1 (u 2 and v 2 ) are deleted.Since e is contained in both paths, either w 1 is an ancestor of w 2 or vice versa: the case w 1 = w 2 cannot happen since for the second augmenting path the endpoint w 2 = w 1 would not be matched to v 2 ; a contradiction (see Line 19).
We next consider the case that w 1 is an ancestor of w 2 (the other case will be handled subsequently).Denote with w ′ 2 the neighbor of w 2 on P ′ .Observe that e = {w 2 , w ′ 2 } since e is chosen as being closest to the root.We next distinguish the two cases whether or not e is initially matched.If e is initially free, then e is matched after augmenting along P 1 .Then, by choice of P 2 , e is not changed until the augmentation along P 2 .This, however, is a contradiction since augmenting along P 2 only happens after the matched edge {w 2 , v 2 } is deleted.Since w ′ 2 = v 2 and e is matched all the time until u 2 and v 2 are deleted, this means that w 2 would be matched to two vertices.Thus, consider the case that e is initially matched.Then, after augmenting along P 1 , e is free and w 2 is matched to its parent p w2 .As a consequence, v 2 is not matched to w 2 , neither before nor after the augmentation of P 1 .Since the algorithm augments along P 2 only after it deleted u 2 and v 2 where v 2 is matched to w 2 , it follows that the edge {w 2 , v 2 } is augmented before the algorithm augments along P 2 .Denote with P 3 the augmenting path containing the edge {w 2 , v 2 }.Since w 2 is apparently not a free leaf, it follows that P 3 needs to contain the matched neighbor of w 2 , which is p w2 .This means that the edge {w 2 , p w2 } is augmented at least twice (through P 1 and P 3 ).However, {w 2 , p w2 } is closer to the root than e = {w 2 , w ′ 2 }, a contradiction to the choice of e.This completes the case that w 1 is an ancestor of w 2 .
We now consider the remaining case where w 2 is an ancestor of w 1 .In this case we have e = {w 1 , w ′ 1 } where w ′ 1 is the neighbor of w 1 on P 1 .Observe that w ′ 1 is a child of w 1 .Furthermore, observe that after the augmentation along P 1 the leaf u ′ 1 is free and can be reached by an alternating path from w 1 .Hence, before and after the augmentation along P 1 it holds that w 1 can reach exactly one free leaf via an alternating path (u 1 and u ′ 1 ).Observe that this is true even if the algorithm removes u ′ 1 since then a new free leaf will be created.Thus, before deleting u 2 and v 2 (right before the augmentation along P 2 ), there is an augmenting path in G − X from u 2 to w 1 and to the free leaf reachable from w 1 .This is a contradiction to the fact that the matching M G−X is maximum.
We conclude that each edge in E will be augmented at most once.Thus, the algorithm considers each edge at most twice (when augmenting it and when deleting it).Hence, the algorithm runs in linear time.
Summarizing, in Step 4 we apply Algorithm 1 in order to obtain an instance with at most k 2 free vertices in G − X that are all leaves.By Lemma 2.6 this can be done in linear time.Furthermore, Lemma 2.6 also shows that the step is correct.

Step 5
In this step we reduce the graph in O(kn) time so that at most k 2 (2 k + 1) bottommost leaves will remain in the forest G − X.We will restrict ourselves to consider leaves that are matched with their parent vertex in M G−X and that do not have a sibling.We call these bottommost leaves interesting.Any sibling of a bottommost leaf is by definition also a leaf.Thus, at most one of these leaves (the bottommost leaf or its siblings) is matched with respect to M G−X and all other leaves are free.Recall that in the previous step we upper-bounded the number of free leaves with respect to M G−X by k 2 .Hence there are at most k 2 bottommost leaves that are not interesting.
Our general strategy for this step is to extend the idea behind Reduction Rule 2.4: We want to keep for each pair of vertices x, y ∈ X at most k different internally vertex-disjoint augmenting paths from x to y. (For ease of notation we keep k paths although keeping k/2 is sufficient.)In this step, we only consider augmenting paths of the form x, u, v, y where v is a bottommost leaf and u is v's parent in G − X. Assume that the parent u of v is adjacent to some vertex x ∈ X. Observe that in this case any augmenting path starting with the two vertices x and u has to continue to v and end in a neighbor of v. Thus, the edge {x, u} can be only used in augmenting paths of length three.Furthermore, all these length-three augmenting paths are clearly internally vertex-disjoint.If we do not need the edge {x, u} because we kept k augmenting paths from x already, then we can delete {x, u}.Furthermore, if we deleted the last edge from u to X (or u had no neighbors in X in the beginning), then u is a degree-two vertex in G and can be removed by applying Reduction Rule 2.2.As the child v of u is a leaf in G − X, it follows that v has at most k+1 neighbors in G.We show below (Lemma 2.7) that the application of Reduction Rule 2.2 to remove u takes O(k) time.As we remove at most n vertices, at most O(kn) time is spent on Reduction Rule 2.2 in this step.
We now show that after a simple preprocessing one application of Reduction Rule 2.2 in the algorithm above can indeed be performed in O(k) time.
Lemma 2.7.Let u be a leaf in the tree G − X, v be its parent, and let w be the parent of v.If v has degree two in G, then applying Reduction Rule 2.2 to v (deleting v, contracting u and v, and setting s := s − 1) can be done in O(k) time plus O(kn) time for an initial preprocessing.
Input: A matching instance (G = (V, E), s), a feedback vertex set X ⊆ V of size k for G with k < log n, and a maximum matching MG−X for G − X with at most k 2 free vertices in G − X that are all leaves.Output: An equivalent matching instance (G ′ , s ′ ) such that X is also a feedback vertex set for G ′ and G − X is a tree with at most k 2 (2 k + 1) bottommost leaves, and a maximum matching M G ′ −X for G ′ − X with at most k 2 free vertices in G ′ − X that are all leaves.
List containing all parents of interesting bottommost leaves 6 while P is not empty do Proof.The preprocessing is to simply create a partial adjacency matrix for G with the vertices in X in one dimension and V in the other dimension.This adjacency matrix has size O(kn) and can clearly be computed in O(kn) time.Now apply Reduction Rule 2.2 to v. Deleting v takes constant time.To merge u and w iterate over all neighbors of u.If a neighbor u ′ of u is already a neighbor of w, then decrease the degree of u ′ by one, otherwise add u ′ to the neighborhood of w.Then, relabel w to be the new merged vertex uw.
Since u is a leaf in G − X and its only neighbor in G − X, namely v, is deleted, it follows that all remaining neighbors of u are in X.Thus, using the above adjacency matrix, one can check in constant time whether u ′ is a neighbor of w.Hence, the above algorithm runs in The above ideas are used in Algorithm 2 which we use for this step (Step 5).The algorithm is explained in the proof of the following lemma stating the correctness and the running time of Algorithm 2.
Lemma 2.8.Let (G = (V, E), s) be a matching instance, let X ⊆ V be a feedback vertex set, and let M G−X be a maximum matching for G − X with at most k 2 free vertices in G − X that are all leaves.Then, Algorithm 2 computes in O(kn) time an instance (G ′ , s ′ ) with feedback vertex set X and a maximum matching M G ′ −X in G ′ − X such that the following holds.
• There is a matching of size s in G if and only if there is a matching of size s ′ in G ′ .
• There are at most k 2 free vertices in G ′ − X and they are all leaves.
Proof.We start with describing the basic idea of the algorithm.To this end, let {u, v} ∈ E be an edge such that v is an interesting bottommost leaf, that is, without siblings and matched to its parent u by M G−X .Counting for each pair x ∈ N (u) ∩ X and y ∈ N (v) ∩ X one augmenting path gives in a simple worst-case analysis O(k 2 ) time per edge, which is too slow for our purposes.Instead, we count for each pair consisting of a vertex x ∈ N (u) ∩ X and a set Y = N (v) ∩ X one augmenting path.In this way, we know that for each y ∈ Y there is one augmenting path from x to y without iterating through all y ∈ Y .This comes at the price of considering up to k2 k such pairs.However, we will show that we can do the computations in O(k) time per considered edge in G − X.The main reason for this improved running time is a simple preprocessing that allows for a bottommost vertex v to determine N (v) ∩ X in constant time.
The preprocessing is as follows (see Lines 1 to 3): First, fix an arbitrary bijection f between the set of all subsets of X to the numbers {1, 2, . . ., 2 k }.This can be done for example by representing a set Y ⊆ X = {x 1 , . . ., x k } by a length-k binary string (a number) where the i th position is 1 if and only if x i ∈ Y .Given a set Y ⊆ X such a number can be computed in O(k) time in a straightforward way.Thus, Lines 1 to 3 can be performed in O(kn) time.Furthermore, since we assume that k < log n (otherwise the input instance is already an exponential kernel), we have that f (Y ) < n for each Y ⊆ X.Thus, reading and comparing these numbers can be done in constant time.Furthermore, in Line 3 the algorithm precomputes for each vertex the number corresponding to its neighborhood in X.
After the preprocessing, the algorithm uses a table Tab where it counts an augmenting path from a vertex x ∈ X to a set Y ⊆ X whenever a bottommost leaf v has exactly Y as neighborhood in X and the parent of v is adjacent to x (see Lines 4 to 18).To do this in O(kn) time, the algorithm proceeds as follows: First, it computes in Line 5 the set P which contains all parents of interesting bottommost leaves.Clearly, this can be done in linear time.Next, the algorithm processes the vertices in P .Observe that further vertices might be added to P (see Line 18) during this processing.Let u be the currently processed vertex of P , let v be its child vertex, and let Y be the neighborhood of v in X.For each neighbor x ∈ N (u) ∩ X, the algorithm checks whether there are already k augmenting paths between x and Y with a table lookup in Tab (see Line 10).If not, then the table entry is incremented by one (see Line 11) since u and v provide another augmenting path.If yes, then the edge {x, u} is deleted in Line 13 (we show below that this does not change the maximum matching size).If u has degree two after processing all neighbors of u in X, then by applying Reduction Rule 2.2, we can remove u and contract its two neighbors v and w.It follows from Lemma 2.7 that this application of Reduction Rule 2.2 can be done in O(k) time.Hence, Algorithm 2 runs in O(kn) time.
Recall that all vertices in G−X that are free wrt.M G−X are leaves.Thus, the changes to M G−X by applying Reduction Rule 2.2 in Line 15 are as follows: First, the edge {u, v} is removed and second the edge {w, q} is replaced by {vw, q} for some q ∈ V .Hence, the matching M G−X after running Algorithm 2 has still at most k 2 free vertices and all of them are leaves.
It remains to prove that (a) the deletion of the edge {x, u} in Line 13 results in an equivalent instance and (b) that the resulting instance has at most O(k2 k ) bottommost leaves.First, we show (a).To this end, assume towards a contradiction that the new graph G ′ := G − {x, u} has a smaller maximum matching than G (clearly, G ′ cannot have a larger maximum matching).Thus, any maximum matching M G for G has to contain the edge {x, u}.This implies that the child v of u in G − X is matched in M G with one of its neighbors (except u): If v is free wrt.M G , then deleting {x, u} from M G and adding {v, u} yields another maximum matching not containing {x, u}, a contradiction.Recall that N (v) = {u} ∪ Y where Y ⊆ X since v is a leaf in G − X.Thus, each maximum matching M G for G contains for some y ∈ Y the edge {v, y}.Observe that Algorithm 2 deletes {x, u} only if there are at least k other interesting bottommost leaves v 1 , . . ., v k in G − X such that their respective parent is adjacent to x and N (v i ) ∩ X = Y (see Lines 9 to 13).Since |Y | ≤ k, it follows by the pigeon hole principle that at least one of these vertices, say v i , is not matched to any vertex in Y .Thus, since v i is an interesting bottommost leaf, it is matched to its only remaining neighbor: its parent u i in G − X.This implies that there is another maximum matching a contradiction to the assumption that all maximum matchings for G have to contain {x, u}.
We next show (b) that the resulting instance has at most k 2 (2 k + 1) bottommost leaves.To this end, recall that there are at most k 2 bottommost leaves that are not interesting (see discussion at the beginning of this subsection).Hence, it remains to upper-bound the number of interesting bottommost leaves.Observe that each parent u of an interesting bottommost leaf has to be adjacent to a vertex in X since otherwise u would have been deleted in Line 15.Furthermore, after running Algorithm 2, each vertex x ∈ X is adjacent to at most k2 k parents of interesting bottommost leaves (see Lines 10 to 13).Thus, the number of interesting bottommost leaves is at most k 2 2 k .Therefore the number of bottommost leaves is upper-bounded by k 2 (2 k + 1).

Step 6
In this subsection, we provide the final step of our kernelization algorithm.Recall that in the previous steps we have upper-bounded the number of bottommost leaves in G − X by O(k 2 2 k ), we computed a maximum matching M G−X for G − X such that at most k 2 vertices are free wrt.M G−X and all free vertices are leaves in G − X.Using this, we next show how to reduce G to a graph of size O(k 3 2 k ).To this end we need some further notation.A leaf in G − X that is not bottommost is called a pendant.We define T to be the pendant-free tree (forest) of G − X, that is, the tree (forest) obtained from G − X by removing all pendants.The next observation shows that G − X is not much larger than T .This allows us to restrict ourselves in the following on giving an upper bound on the size of T .Observation 2.9.Let G − X be as described above with vertex set V \ X and let T be the pendant-free tree (forest) of G − X with vertex set Proof.Observe that V \ X is the union of all pendants in G − X and V T .Thus, it suffices to show that G − X contains at most |V T | + k 2 pendants.To this end, recall that we have a maximum matching for G − X with at most k 2 free leaves.Thus, there are at most k 2 leaves in G − X that have a sibling which is also a leaf since from two leaves with the same parent at most one can be matched.Hence, all but at most k 2 pendants in G − X have pairwise different parent vertices.Since all these parent vertices are in V T , it follows that the number of pendants in We use the following observation to provide an upper bound on the number of leaves of T .Observation 2.10.Let F be a forest, let F ′ be the pendant-free forest of F , and let B be the set of all bottommost leaves in F .Then, the set of leaves in F ′ is exactly B.
Proof.First observe that each bottommost leaf of F is a leaf of F ′ since we only remove vertices to obtain F ′ from F .Thus, it remains to show that each leaf v in F ′ is a bottommost leaf in F .
We distinguish two cases of whether or not v is a leaf in F : First, assume that v is not a leaf in F .Thus, all of it child vertices have been removed.Since we only remove pendants to obtain F ′ from F and since each pendant is a leaf, it follows that v is in F the parent of one or more leaves u 1 , . . ., u ℓ .Thus, by definition, all these leaves u 1 , . . ., u ℓ are bottommost leaves, a contradiction to the fact that they were deleted when creating F ′ .
Second, assume that v is a leaf in F .If v is a bottommost leaf, then we are done.Thus, assume that v is not a bottommost leaf and therefore a pendant.However, since we remove all pendants to obtain F ′ from F , it follows that v is not contained in F ′ , a contradiction.From Observation 2.10 it follows that the set B of bottommost leaves in G − X is exactly the set of leaves in T .In the previous step we reduced the graph such that |B| ≤ k 2 (2 k + 1).Thus, T has at most k 2 (2 k + 1) vertices of degree one and, since T is a tree (a forest), T also has at most k 2 (2 k + 1) vertices of degree at least three.Let V 2 T be the vertices of degree two in T and Figure 1: The situation in the proof of Lemma 2.11.The augmenting path from u to v intersects the two augmenting paths P wx and P wy from w to x and y, respectively.Bold edges indicate edges in the matching, dashed edges indicate odd-length alternating paths starting with the first and last edge not being in the matching.The gray paths in the background highlight the different augmenting paths: the initial paths from u to v, w to x, and x to y as well as the new paths from u to x and w to v as postulated by Lemma 2.11.

let V =2
T be the remaining vertices in T .From the above it follows that |V =2 T | ≤ 2k 2 (2 k + 1).Hence, it remains to bound the size of V 2 T .To this end, we will upper-bound the degree of each vertex in X by O(k 2 2 k ) and then use Reduction Rules 2.1 and 2.3.We will check for each edge {x, v} ∈ E with x ∈ X and V \ X whether we "need" it.This check will use the idea from the previous subsection where each vertex in X needs to reach each subset Y ∈ X at most k times via an augmenting path.Similarly as in the previous section, we want to keep "enough" of these augmenting paths.However, this time the augmenting paths might be long, while different augmenting paths might overlap.To still use the basic approach, we use the following lemma stating that we can still somehow replace augmenting paths.Lemma 2.11.Let M G−X be a maximum matching in the forest G−X.Let P uv be an augmenting path for M G−X in G from u to v. Let P wx , P wy , and P wz be three internally vertex-disjoint augmenting paths from w to x, y, and z, respectively, such that P uv intersects all of them.Then, there exist two vertex-disjoint augmenting paths with endpoints u, v, w, and one of the three vertices x, y, and z.
Proof.Label the vertices in P uv alternating as odd or even with respect to P uv so that no two consecutive vertices have the same label, u is odd, and v is even.Analogously, label the vertices in P wx , P wy , and P wz as odd and even with respect to P wx , P wy , and P wz respectively so that w is always odd.Since all these paths are augmenting, it follows that each edge from an even vertex to its succeeding odd vertex is in the matching M G−X and each edge from an odd vertex to its succeeding even vertex is not in the matching.Observe that P uv intersects each of the other paths at least at two consecutive vertices, since every second edge must be an edge in M G−X .Since G − X is a forest and all vertices in X are free with respect to M G−X , it follows that the intersection of two augmenting paths is connected and thus a path.Since P uv intersects the three augmenting paths from w, it follows that at least two of these paths, say P wx and P wy , have a "fitting parity", that is, in the intersections of P uv with P wx and with P wy the even vertices with respect to P uv are either even or odd with respect to both P wx and P wy .
Assume without loss of generality that in the intersections of the paths the vertices have the same label with respect to the three paths (if the labels differ, then revert the ordering of the vertices in P uv , that is, exchange the names of u and v and change all labels on P uv to its opposite).Denote with v 1 s and v 1 t the first and the last vertex in the intersection of P uv and P wx .Analogously, denote with v 2 s and v 2 t the first and the last vertex in the intersection of P uv and P wy .Assume without loss of generality that P uv intersects first with P wx and then with P wx .Observe that v 1 s and v 2 s are even vertices and v 1 t and v 2 t are odd vertices since the intersections have to start and end with edges in M G−X (see Fig. 1 for an illustration).For an arbitrary path P and for two arbitrary vertices p 1 , p 2 of P , denote by p 1 − P − p 2 the subpath of P from p 1 to p 2 .Observe that u − P uv − v 1 t − P wx − x and w − P wy − v 2 t − P uv − v are two vertex-disjoint augmenting Algorithm 3: Algorithm for computing Step 6 of our kernel wrt. the parameter "feedback vertex number".
Input: A matching instance (G = (V, E), s), a feedback vertex set X ⊆ V of size k for G with k < log n and at most k 2 (2 k + 1) bottommost leaves in G − X, and a maximum matching MG−X for G − X with at most k 2 free vertices in G − X that are all leaves.Output: An equivalent matching instance (G ′ , s ′ ) such that G ′ contains at most O(k 3 2 k ) vertices and edges. 1 Fix an arbitrary bijection f : 2 X → {1, . . ., // The number fX (v) < n can be read in constant time.Algorithm description.We now provide the algorithm for Step 6 (see Algorithm 3 for a pseudocode).The algorithm uses the same preprocessing (see Lines 1 to 3) as Algorithm 2. Thus, the algorithm can determine whether two vertices have the same neighborhood in X in constant time.As in Algorithm 2, Algorithm 3 uses a table Tab which has an entry for each vertex x ∈ X and each set Y ⊆ X.The table is filled in such a way that the algorithm detected for each y ∈ Y at least Tab[x, Y ] internally vertex-disjoint augmenting paths from x to y.
The main part of the algorithm is the boolean function 'Keep-Edge' in Lines 13 to 22 which makes the decision on whether or not to delete an edge {x, v} for v ∈ V \ X and x ∈ X.The function works as follows for edge {x, v}: Starting at v the graph will be explored along possible augmenting paths until a "reason" for keeping the edge {x, v} is found or further exploration is possible.
If the vertex v is free wrt.M G−X , then {x, v} is an augmenting path and we keep {x, v} (see Line 14).Observe that in Step 4 we upper-bounded the number of free vertices by k 2 and all these vertices are leaves.Thus, we keep a bounded number of edges incident to x because the corresponding augmenting paths can end at a free leaf.We provide the exact bound below when discussing the size of the graph returned by Algorithm 3. In Line 14, the algorithm stops exploring the graph and keeps the edge {x, v} if v has degree at least three in T .The reason is to keep the graph exploration simple by following only paths in T .This ensures that the running time for exploring the graph from x does not exceed O(n).Since the number of vertices in T with degree at least three is bounded (see discussion after Observation 2.10), it follows that only a bounded number of such edges {x, v} are kept.
If v is not free wrt.M G−X , then it is matched with some vertex w.If w is adjacent to some leaf u in G − X that is free wrt.M G−X , then the path x, v, w, u is an augmenting path.Thus, the algorithm keeps in this case the edge {x, v}, see Line 16.Again, since the number of free leaves is bounded, only a bounded number of edges incident to x will be kept.If w has degree at least three in T , then the algorithm stops the graph exploration here and keeps the edge {x, v}, see Line 16.Again, this is to keep the running time at O(kn) overall.
Let Y ⊆ X denote the neighborhood of w in X.Thus the partial augmenting path x, v, w can be extended to each vertex in Y .Thus, if the algorithm did not yet find 6k 2 paths from x to vertices whose neighborhood in X is also Y , then the table entry Tab[x, f X (w)] (where f X (w) encodes the set Y = N (w) ∩ X) is increased by one and the edge {x, v} will be kept (see Lines 18 and 19).(Here we need 6k 2 paths since these paths might be long and intersect with many other augmenting paths, see proof of Lemma 2.15 for the details of why 6k 2 is enough.)If the algorithm already found 6k 2 "augmenting paths" from x to Y , then the neighborhood of w in X is irrelevant for x and the algorithm continues.
In Line 20, all above discussed cases to keep the edge {x, v} do not apply and the algorithm extends the partial augmenting part x, v, w by considering the neighbors of w except v. Since the algorithm dealt with possible extensions to vertices in X in Lines 17 to 19 and with extensions to free vertices in G − X in Line 14, it follows that the next vertex on this path has to be a vertex u that is matched wrt.M G−X .Furthermore, since we want to extend a partial augmenting path from x, we require that u is not adjacent to x as otherwise x, u would be another, shorter partial augmenting path from x to u and we do not need the currently stored partial augmenting path.
Statements on Algorithm 3.For each edge {x, z} with x ∈ X and z ∈ V \ X we denote by P (x, z) the induced subgraph of G − X on the vertices that are explored in the function Keep-Edge when called in Line 9 with x and z.More precisely, we initialize P (x, z) := ∅.Whenever the algorithm reaches Line 14, we add v to P (x, z).Furthermore, whenever the algorithm reaches Line 17, we add w to P (x, z).
We next show that P (x, z) is a path or a path with one additional pendant.
Lemma 2.12.Let x ∈ X and z ∈ V \ X be two vertices such that {x, z} ∈ E.Then, P (x, z) is either a path or a tree with exactly one vertex z ′ having more than two neighbors in P (x, z).Furthermore, z ′ has degree exactly three and z is a neighbor of z ′ .
Proof.We first show that all vertices in P (x, z) except z and its neighbor z ′ have degree at most two in P (x, z).Observe that having more vertices than z and z ′ in P (x, z) requires Algorithm 3 to reach Line 20.
Let w be the currently last vertex when Algorithm 3 continues the graph exploration in Line 20.Observe that the algorithm therefore dealt with the case that w has degree at least three in T in Line 16.Thus, w is either a pendant leaf in G − X or w / ∈ V ≥3 T (that is, w has degree at most two in T ).In the first case, there is no candidate to continue and the graph exploration stops.In the second case, w has degree at most two in T .
We next show that any candidate u for continuing the graph exploration in Line 21 is not a leaf in G − X. Assume toward a contradiction, that u is a leaf in G − X.Since the parent w of u is matched with some vertex v = u (this is how w is chosen, see Line 15), it follows that u is not matched.This implies that the function 'Keep-Edge' would have returned true in Line 16 and would not have reached Line 20, a contradiction.Thus, the graph exploration follows only vertices in T .Furthermore, the above argumentation implies that w is not adjacent to a leaf unless this leaf is its predecessor v in the graph exploration.
We now have two cases: Either w is not adjacent to a leaf in G−X or v = z is a leaf and w = z ′ is its matched neighbor.In the first case, w has at most one neighbor u = v since w / ∈ V ≥3 T .Hence, w has degree two in P (x, z).In the second case, w = z ′ has at most two neighbors u = v and u ′ = v.Thus, z ′ has degree at most three.
We set for x ∈ X to be the union of all induced subgraphs wrt.x.Lemma 2.13.There exists a partition of P x into P x = P A x ∪ P B x such that all graphs within P A x and within P B x are pairwise disjoint.
Proof.Since G − X is a tree (or forest), G − X is also bipartite.Let A and B be its two color classes (so A ∪ B = V \ X).We define the two parts P A x and P B x as follows: A subgraph P ∈ P x is in P A x if the neighbor v of x in P is contained in A, otherwise P is in P B x .We show that all subgraphs in P A x and P B x are pairwise vertex-disjoint.To this end, assume toward a contradiction that two graphs P, Q ∈ P A x share some vertex.(The case P, Q ∈ P B x is completely analogous.)Let p 1 and q 1 be the first vertex in P and Q respectively, that is, p 1 and q 1 are adjacent to x in G. Observe that p 1 = q 1 .Let u = x be the first vertex that is in P and in Q.By Lemma 2.12, P and Q are paths or trees with at most one vertex of degree more than two and this vertex has degree three and is the neighbor of p 1 or q 1 , respectively.This implies together with q 1 , p 1 ∈ A that either u = p 1 or u = q 1 .Assume without loss of generality that p 1 .Since p 1 ∈ A and q 1 ∈ A and u is a vertex in Q, it follows that Algorithm 3 followed u in the graph exploration from q 1 in Line 21.However, this is a contradiction since the algorithm checks in Line 20 whether the new vertex u in the path is not adjacent to x.Thus, all subgraphs in P A x and P B x are pairwise vertex-disjoint.
We next show that if Tab[x, f (Y )] = 6k 2 for some x ∈ X and Y ∈ X (recall that f maps Y to a number, see Line 1), then there exist at least 3k internally vertex-disjoint augmenting paths from x to Y .Lemma 2.14.If in Line 17 of Algorithm 3 it holds for x ∈ X and Y ⊆ X that Tab[x, f (Y )] = 6k 2 , then there exist in G wrt. M G−X at least 3k alternating paths from x to vertices v 1 , . . ., v 3k 2 such that all these paths are pairwise vertex-disjoint (except x) and Proof.Note that each time Tab[x, f (Y )] is increased by one (see Line 18), the algorithm found a vertex w such that there is an alternating path P from x to w and N (w) ∩ X = Y .Furthermore, since the function Keep-Edge returns true in this case, the edge from x to its neighbor on P is not deleted in Line 10.Thus, there exist at least 6k 2 alternating paths from x to vertices whose neighborhood in X is exactly Y .By Lemma 2.13, it follows that at least half of these 6k 2 paths are vertex-disjoint.
The next lemma shows that Algorithm 3 is correct and runs in O(kn) time.
Lemma 2.15.Let (G = (V, E), s) be a matching instance, let X ⊆ V be a feedback vertex set of size k with k < log n and at most k 2 (2 k + 1) bottommost leaves in G − X, and let M G−X be a maximum matching for G − X with at most k 2 free vertices in G − X that are all leaves.Then, Algorithm 3 computes in O(kn) time an equivalent instance Proof.We split the proof into three claims, one for the correctness of the algorithm, one for the returned kernel size, and one for the running time.
Claim 2.16.The input instance (G, s) is a yes-instance if and only if the instance (G ′ , s ′ ) produced by Algorithm 3 is a yes-instance.
Proof.Observe that the algorithm changes the input graph only in two lines: Lines 10 and 11.By Lemma 2.1, applying Reduction Rules 2.1 and 2.3 yields an equivalent instance.Thus, it remains to show that deleting the edges in Line 10 is correct, that is, it does not change the size of a maximum matching.To this end, observe that deleting edges does not increase the size of a maximum matching.Thus, we need to show that the size of the maximum matching does not decrease.Assume toward a contradiction that it does.
Let {x, v} be the edge whose deletion decreased the maximum matching size.Redefine G to be the graph before the deletion of {x, v} and G ′ to be the graph after the deletion of {x, v}.Recall that Algorithm 3 gets as additional input a maximum matching M G−X for G − X.Let M G := M max G (M G−X ) be a maximum matching for G with the largest possible overlap with M and let and x is free wrt.M G−X it follows that there is a path P in G M with one endpoint being x.
Recall that since P is a path in G M it follows that P is an augmenting path for M G−X .Since all vertices in X are free wrt.M G−X , it follows that all vertices in P except the endpoints are in V \ X.Let z be the second endpoint of this path P .We call a vertex on P an even (odd) vertex if it has an even (odd) distance to x on P .(So x is an even vertex and v and z are odd vertices).Observe that v is the only odd vertex in P adjacent to x since otherwise there would be another augmenting path from x to z which only uses vertices from P implying the existence of another maximum matching that does not use {x, v}, a contradiction.Let u be the neighbor of z in P .
Since no odd vertex on P except v is adjacent to x, it follows that the graph exploration in the function Keep-Edge starting from x and v in Line 9 either reached u or returned true before.If z ∈ V \ X, then in both cases, the function Keep-Edge would have returned true in Line 9 and Algorithm 3 would not have deleted {x, v}, a contradiction.Thus, assume that z ∈ X.Therefore, the function Keep-Edge considered the vertex u in Line 17 but did not keep the edge {x, v}.Thus, when considering u, it holds that Tab[x, f X (u)] = 6k 2 , where f X (u) encodes Y := N (u) ∩ X and z ∈ Y .
By Lemma 2.14, it follows that there are 3k 2 pairwise vertex-disjoint (except x) alternating paths from x to vertices u 1 , . . ., u k with N (u i ) ∩ X = Y .Thus, there are 3k 2 internally vertexdisjoint paths Q from x to y in G.If one of the paths Q ∈ Q does not intersect any path in G M , then reverting the augmentation along P and augmenting along Q would results in another maximum matching not containing {x, v}, a contradiction.Thus, assume that each path in Q intersects at least one path in G M .
For each two paths Q 1 , Q 2 ∈ Q that are intersected by the same path P ′ in G M it holds that each further path P ′′ in G M can intersect at most one of Q 1 and Q 2 : Assume toward a contradiction that P ′′ does.Since no path in G M except P contains x and z it follows that all intersections between the paths are within G − X.Since P ′ and P ′′ are vertex-disjoint and Q 1 and Q 2 are internally vertex-disjoint, it follows that there is a cycle in G − X, a contradiction to the fact that X is a feedback vertex set.
Since 3k 2 > 3k + k 2 , it follows from the pigeon hole principle that there is a path P ′ ∈ G M that intersects at least three paths Q 1 , Q 2 , Q 3 ∈ Q such that no further path in G M intersects them.We can now apply Lemma 2.11 and obtain two vertex-disjoint augmenting paths Q and Q ′ .Thus, reverting the augmentation along P and P ′′ and augment along Q and Q ′′ yields another maximum matching for G which does not contain {x, v}, a contradiction.
Claim 2.17.The graph G ′ returned by Algorithm 3 has at most O(k 3 2 k ) vertices and edges.
Proof.We first show that each vertex x ∈ X has degree at most O(k 2 2 k ) in G ′ .To this end, we need to count the number of neighbors v ∈ N (x) \ X where the function Keep-Edge returns true in Line 9. By Lemma 2.12, the function Keep-Edge explores the graph along one or two paths (essentially growing from one starting point into two directions).Recall that P x denotes the subgraphs induced by the graph exploration of Keep-Edge for the neighbors of x.By Lemma 2.13 there is a partition of P x into P A x and P B x such that within each part the subgraphs are pairwise vertex-disjoint.We consider the two parts independently.We start with bounding the number of graphs in P A x where the function 'Keep-Edge' returned true (the analysis is completely analog for P B x ).Since all explored subgraphs are disjoint and all free vertices in G − X wrt.M G−X are leaves, it follows that Algorithm 3 returned at most k 2 times true in Line 16 due to w being adjacent to a free leaf in G − X.Also, the algorithm returns at most k 2 times true in Line 14 due to v being free.Furthmore, the algorithm returns at most 6k 2 • 2 k times true in Line 19.Finally, we show that the algorithm returns at most k 2 • (2 k − 1) times true in Lines 14 and 16, respectively.It follows from the discussion below Observation 2.10 that T , the pendent-free tree of G − X, has at most k 2 (2 k + 1) leaves (denoted by V 1 T ) and k 2 (2 k + 1) vertices of degree at least three (denoted by V ≥3 T ).Let V T be the vertices of T .Since T is a tree (or forest), it has more vertices than edges and hence Thus, Algorithm 3 returns at most 2 times true in Line 16 due to w being a vertex in V ≥3 T .Also, Algorithm 3 returns at most T .Summarizing, considering the graph explorations in P A x , Algorithm 3 returned at most times true in the function Keep-Edge.Analogously, considering the graph explorations in P A x , Algorithm 3 also returned at most O(k 2 2 k ) times true.Hence, each vertex x ∈ X has degree at most We now show that the exhaustive application of Reduction Rules 2.1 and 2.3 indeed results in a kernel of the claimed size.To this end, denote with , and V ≥3 G ′ −X the vertices that have degree one, two, and at least three in Finally, each degree-two vertex in G ′ needs at least one neighbor of degree at least three since G ′ is reduced with respect to Reduction Rule 2.3.Thus, each vertex in V 2 G ′ −X is either incident to a vertex in X or adjacent to one of the at most O(k 2 2 k ) vertices in G ′ − X that have degree at least three.
Proof.First, observe that Lines 1 to 6 can be done in O(kn) time: The preprocessing and table initialization can be done in O(kn) time as discussed in Section 2.2.3.Furthermore, T and V ≥3 T can clearly be computed in O(n + m) ≤ O(kn) time.Second, by Lemma 2.2, applying Reduction Rules 2.1 and 2.3 can be done in O(n + m) time.Thus, it remains to show that each iteration of the foreach-loop in Line 7 can be done in O(n) time.
By Lemma 2.13, the explored graphs P x from x can be partitioned into two parts such that within each part all subgraphs are vertex-disjoint.Thus, each vertex in G − X is visited only twice during the execution of the function Keep-Edge.Furthermore, observe that in Lines 17 and 18 the table can be accessed in constant time.Thus, the function Keep-Edge only checks once whether a vertex in V \ X has a neighbor in X, namely in Line 20.This single check can be done in constant time.Since the rest of the computation is done on G − X which has less than |V \ X| edges, it follows that each iteration of the foreach-loop in Line 7 can indeed be done in O(n) time.
This completes the proof of Lemma 2.15.
Our kernelization algorithm for the parameter "feedback vertex number" essentially calls Steps 1 to 6. Proof.First, using the linear-time factor-four approximation of Bar-Yehuda et al. [1], we compute an approximate feedback vertex set X with |X| ≤ 4k.Then, we apply Steps 1 to 6. Applying the first three steps is rather straightforward, see Section 2.2.1.For the remaining three steps, we use Algorithms 1 to 3. By Lemmas 2.6, 2.8 and 2.15, this can be done in O(kn) time and results in a kernel of size O((4k) 3

Kernelization for Matching on Bipartite Graphs
In this section, we investigate the possibility of efficient and effective preprocessing for Bipartite Matching.In particular, we show a linear-time computable polynomial-size kernel with respect to the parameter "distance k to chain graphs".In the first part of this section, we provide the definition of chain graphs and describe how to compute the parameter.In the second part, we discuss the kernelization algorithm.
Definition and computation of the parameter.We first define chain graphs which are a subclass of bipartite graphs with special monotonicity properties.

Definition 1 ([5]
).Let G = (A, B, E) be a bipartite graph.Then G is a chain graph if each of its two color classes A, B admits a linear order w.r.t.neighborhood inclusion, that is, A = {a 1 , . . ., a α } and B = {b 1 , . . ., b β } where N (a i ) ⊆ N (a j ) and N (b i ) ⊆ N (b j ) whenever i < j.
Observe that if the graph G contains twins, then there is more than one linear order w.r.t.neighborhood inclusion.To avoid ambiguities, we fix for the vertices of the color class A (resp.B) in a chain graph G = (A, B, E) one linear order ≺ A (resp.≺ B ) such that, for two vertices u, v ∈ A In the remainder of the section we consider a bipartite representation of a given chain graph G = (A, B, E) where the vertices of A (resp.B) are ordered according to ≺ A (resp.≺ B ) from left to right (resp.from right to left), as illustrated in Figure 2.For simplicity of notation we use in the following ≺ to denote the orderings ≺ A and ≺ B whenever the color class is clear from the context.
We next show, that we can approximate the parameter and the corresponding vertex subset in linear time.To this end, we use the following characterization of chain graphs.

Lemma 3.1 ([5]
).A bipartite graph is a chain graph if and only if it does not contain an induced 2K 2 .Lemma 3.2.There is a linear-time factor-4 approximation for the problem of deleting a minimum number of vertices in a bipartite graph in order to obtain a chain graph.
Proof.Let G = (A, B, E) be a bipartite graph.We compute a set S ⊆ A ∪ B such that G − S is a chain graph and S is at most four times larger than a minimum size of such a set.The algorithm iteratively tries to find a 2K 2 and deletes the four corresponding vertices until no further 2K 2 is Algorithm 4: An algorithm that computes a maximum matching M in the chain graph G such that all edges in M are parallel (see Fig. 2 for a visualization.)Since the degree of each vertex is at most max{α, β}, this can be done in linear time with e. g.Bucket Sort.At any stage the algorithm deletes all vertices of degree zero and all vertices which are adjacent to all vertices in the other partition.The deleted vertices are not added to S since these vertices can not participate in a 2K 2 .Next, the algorithm recursively processes the vertices in A in a nondecreasing order of their degrees.Let a ∈ A be a minimum-degree vertex and let b ∈ B be a neighbor of a. Since b is not adjacent to all vertices in A (otherwise b would be deleted), there is a vertex a ′ ∈ A that is not adjacent to b.Since deg(a) ≤ deg(a ′ ) it follows that a ′ has a neighbor b ′ that is not adjacent to a. Hence, the four vertices a, a ′ , b, b ′ induce only two edges: {a, b} and {a ′ , b ′ } and thus form a 2K 2 .Thus, the algorithm adds the four vertices to S, deletes them from the graph, and continues with a vertex in A that has minimum degree.
As to the running time, we now show that, after the initial sorting, the algorithm considers each edge only twice: Selecting a and b as described above can be done in O(1) time.To select a ′ , the algorithm simply iterates over all vertices in A until it finds a vertex that is not adjacent to b.In this way at most deg(b) + 1 vertices are considered.Similarly, by iterating over the neighbors of a ′ , one finds b ′ .Hence, the edges incident to a, a ′ , b, and b ′ are used once to find the vertices and a second time when these vertices are deleted.Thus, using appropriate data structures, the algorithm runs in O(n + m) time.
Kernelization.In the rest of this section, we provide a linear-time computable kernel for Bipartite Matching with respect to the parameter vertex deletion distance k to chain graphs.The intuitive description of the kernelization is as follows.First we upper bound by O(k) the number of neighbors of each vertex in the deletion set.Then we mark O(k 2 ) special vertices and we use the monotonicity properties of chain graphs to upper bound the number of vertices that lie between any two consecutive marked edges, thus bounding the total size of the reduced graph to O(k 3 ) vertices.
Let G = (A, B, E) be the bipartite input graph, where V = A ∪ B, and let X ⊆ V be a vertex subset such that G − X is a chain graph.By Lemma 3.2, we can compute an approximate X in linear time.The kernelization algorithm is as follows: First, compute a specific maximum matching M G−X ⊆ E in G − X with Algorithm 4 where all edges in M G−X are "parallel" and all matched vertices are consecutive in the ordering ≺ A and ≺ B , see also Fig. 2. Since in convex graphs matching is linear-time solvable [19] and convex graphs are a super class of chain graphs, this can be done in O(n + m) time.We use M G−X in our kernelization algorithm to obtain some local information about possible augmenting paths.For example, each augmenting path has at least one endpoint in X. Forming this into a data reduction rule, with s denoting the size of a maximum matching, yields the following.Since the input instance is reduced with respect to Reduction Rule 3.1, it follows that s − k ≤ |M G−X | < s.Denote by M G ′ −X := M G−X ∩ E ′ the matching obtained from M G−X by deleting all edges not in the reduced graph G ′ .Recall that s is reduced by the number of matched edges that are removed.We next show in Claims 3.7 and 3.8 that the input instance (G = (V, E), s) is a yes-instance if and only if the produced instance (G ′ = (V ′ , E ′ ), s ′ ) is a yes-instance.Before we present these two claims, observe that there is a perfect matching between the vertices in A ′ D and B ′ D , and thus

Reduction
Note that G M is a graph that only contains odd-length paths.We will show that there are as many vertex-disjoint augmenting paths for M G ′ −X in G ′ as there are paths in G M .This will show that G ′ contains a matching of size To this end, observe that all paths that do not use vertices in We next show that for any two vertices v i j , v i ℓ of P M i with j < ℓ < p i − 1 and both being in A \ X, it follows that v Thus, assume that j > 1 and ℓ > 1 (thus j ≥ 3 and j > 1).Assume toward a contradiction that v i ℓ ≺ v i j .Since ℓ < p i − 1, we have v i ℓ+1 ∈ B \ X and since G − X is a chain graph, it follows that {v i j , v i ℓ+1 } ∈ E, a contradiction to Observation 1.1.Thus, v i j ≺ v i ℓ .We next show that the path P M i contains at least one vertex v i j left of a 1 and at least one vertex v i ℓ right of b 2 .Recall that M G−X was computed by Algorithm 4 and, thus, the free vertices are the smallest wrt. the ordering ≺ (see also Fig. 2).Thus, if one endpoint of P M i is in (A∪B)\X, then this vertex is either v i 1 and left of a 1 or it is v i p1 and right of b 2 .Thus, assume that the endpoints of P M i are in X.We showed in the previous paragraph that v Since we assumed that some vertices of P M i to be in V \ V ′ , it follows that for at least one vertex v i 2j+1 it holds that a 1 ≺ v i 2j+1 ≺ a 2 .Furthermore since by assumption no vertex between a 1 and a 2 or between b 1 and b note that exactly the edges {b r i , a r i } and {b ℓ i , a ℓ i } are in M G−X .Thus, each path in P M can be replaced by an augmenting path for M G ′ −X in G ′ and all these augmenting paths are vertex-disjoint.Thus, there are as many augmenting paths for M G ′ −x in G ′ as there are paths in G M and therefore (G ′ , s ′ ) is a yes-instance.
Clearly, the vertices a r i1 , . . ., a r it , b r j1 , . . ., b r jt are free with respect to M G .
We show that there are t pairwise vertex-disjoint augmenting paths from {a r i1 , . . ., a r it } to {b ℓ j1 , . . ., b ℓ jt }; note, however, that these paths are not necessarily from a r ir to b ℓ jr , where r ∈ [t].To this end, recall that by definition of #lmv neighbors to the left of its matched neighbor.This allows us to iteratively find augmenting paths as follows: To create the q th augmenting path P q start with some vertex b ℓ jq .Denote by v the last vertex added to P q (in the beginning we have v = b ℓ jq ).If v ∈ A, then add to P q the neighbor matched to v. If v ∈ B, then do the following: if v is adjacent to a vertex a ∈ {a r i1 , . . ., a r it }, then add a to P q , otherwise add the leftmost neighbor of v to P q .Repeat this process until P q contains a vertex from {a r i1 , . . ., a r it }.After we found P q remove all vertices of P q from G. If q < t, then continue with P q+1 .Observe that any two vertices of P q that are in A have at least #lmv(b 1 , b 2 , M G−X ) − 1 other vertices of A between them (in the ordering of the vertices of A, see Figure 2).Thus, after a finite number of steps, P q will reach a vertex in {a r i1 , . . ., a r it }.Furthermore, it follows that after removing the vertices of P q it holds that #lmv(b 1 , b 2 , M G−X ) is decreased by exactly one: P q contains for each Proof.The running time is clear.It remains to show the correctness.Let (G, s) be the input instance reduced with respect to Reduction Rule 3.1 and let (G ′ , s) be the instance produced by Reduction Rule 3.4.We show that deleting the vertices in A free \ (K ∪ A k free ) yields an equivalent instance.It then follows from symmetry that deleting the vertices in B free \ (K ∪ B k free ) yields also an equivalent instance.
We first show that if (G, s) is a yes-instance, then also the produced instance (G ′ , s) is a yesinstance.Let (G, s) be a yes-instance and M G be a maximum matching for G. Clearly, |M G | ≥ s.Observe that for each removed vertex a ∈ A free \(K ∪A k free ) it holds that every vertex a ′ ∈ A k free is to the right of a, that is, a ≺ a ′ and thus N G−X (a) ⊆ N G−X (a ′ ).Since (G, s) is reduced with respect to Reduction Rule 3.1, it follows that |M G−X | ≥ |M G |−k.Thus, there exist at most k augmenting paths for M G−X in G.If none of these augmenting paths ends in a vertex a ∈ A free \ (K ∪ A k free ), then all augmenting paths exist also in G ′ and thus (G ′ , s) is a yes-instance.If one of these augmenting paths, say P , ends in a, then at least one vertex a ′ ∈ A k free is not endpoint of any of these augmenting paths.Since a / ∈ K it follows from Lemma 3.3 that the neighbor b of a on P is indeed in B \X. Since N G−X (a) ⊆ N G−X (a ′ ), it follows that {a ′ , b} ∈ E and thus we can replace a by a ′ in the augmenting path.By exhaustively applying the above exchange argument, it follows that we can assume that none of the augmenting paths uses a vertex in A free \ (K ∪ A k free ).Thus, all augmenting paths are also contained in G ′ and hence the resulting instance (G ′ , s) is still a yes-instance.
Finally observe that if (G ′ , s) is a yes-instance, then also (G, s) is a yes-instance, since G ′ is a subgraph of G. Thus any matching of size s in G ′ is also a matching in G. Hence (G, s) is a yes-instance.Theorem 3.10.Matching on bipartite graphs admits a cubic-vertex kernel with respect to the vertex deletion distance to chain graphs.The kernel can be computed in linear time.
Proof.Let (G, s) be the input instance with G = (V, E), the two partitions V = A ∪ B, and X ⊆ V such that G − X is a chain graph.If X is not given explicitly, then use the linear-time factor-four approximation provided in Lemma 3.2 to compute X.The kernelization is as follows: First, compute M G−X in linear time with Algorithm 4. Next compute the set K.Then, apply Reduction Rules 3.1, 3.3 and 3.4.By Lemmas 3.6 and 3.9, this can be done in linear time.Let b K ℓ the leftmost vertex in K ∩ B and a K r rightmost vertex in A ∩ K. Let a K ℓ and b K r be their matched neighbors.Since |K| ≤ k 2 and we reduced the instance with respect to Reduction Rule 3.3, it follows that the number of vertices between a K ℓ and a K r as well as the number of vertices between b K ℓ and b K r is at most 2k 3 , respectively.Furthermore, there are at most 2k free vertices left in V \ X since we reduced the instance with respect to Reduction Rule 3.4.It remains to uper-bound the number of matched vertices left of b K ℓ and right of a K r .Observe that all vertices left of b K ℓ are matched with respect to M G−X .If there are more than 2k vertices to the left of b K ℓ , then do the following: Add four vertices a ℓ , b ℓ , x a ℓ , x b ℓ to V .The idea is that {a ℓ , b ℓ } should be an edge in M G−X such that a ℓ ∈ A and b ℓ ∈ B are in K and there is no vertex left of b ℓ .This means we add these vertices to simulate the situation where the leftmost vertex in B \ X is also in K. To ensure that a ℓ and b ℓ are in K and that they are not matched with some vertices in G, we add x a ℓ and x b ℓ to X and make x a ℓ respectively x b ℓ to their sole neighbors.In this way, we ensure that there is maximum matching in the new graph that is exactly two edges larger than the maximum matching in the old graph.In this new graph we can then apply Reduction Rule 3.3 to reduce the number of vertices between b ℓ and b K ℓ .Formally, we add the following edges.Add {a ℓ , x a ℓ }, {b ℓ , x b ℓ } to E. Add all edges between b ℓ and the vertices in B \ X.Let a be the rightmost vertex in A k free .Then, add edges between a ℓ and N G−X (a).Set b ′ ≺ b ℓ for each b ′ ∈ B \ X, set a ≺ a ℓ for each vertex a ∈ A free , and set a ℓ ≺ a ′ for each matched vertex in A \ X.Furthermore, add {a ℓ , b ℓ } to M G−X and add a ℓ and b ℓ to K. Finally, increase s by two.Next, apply Reduction Rule 3.3 in linear time, then remove a ℓ , b ℓ , x a ℓ , x b ℓ and reduce s by two.After this procedure, it follows that there are at most 2k vertices left of b K ℓ .If there are more than 2k vertices right of the rightmost vertex a K r in A∩K, then use the same procedure as above.Thus, the total number of vertices in the remaining graph is at most |X| + 2k + 4k 3 = O(k 3 ).Furthermore, observe that adding and removing the four vertices as well as applying Reduction Rule 3.3 can be done in linear time.Thus, the overall running time of the kernelization is O(n + m).
Applying the O(n 2.5 )-time algorithm for Bipartite Matching [15] on the kernel yields:

Conclusion
We focussed on kernelization results for Matching.There remain numerous challenges for future research as discussed in the end of this concluding section.First, however, let us discuss the closely connected issue of FPTP algorithms for Matching.There is a generic augmenting pathbased approach to provide FPTP algorithms for Matching: To begin with, note that one can find an augmenting path in linear time [2,11,17].Now the solving algorithm for Matching parameterized by some vertex deletion distance k works as follows: 1. Use a constant-factor linear-time (approximation) algorithm to compute a vertex set X such that G − X is a "trivial" graph (where Matching is linear-time solvable).We conclude with listing some questions and tasks for future research.Can the size or the running time of the kernel with respect to feedback vertex set (see Section 2) be improved?Is there a linear time computable kernel for Matching parameterized by the treewidth t (assuming that t is given)?This would complement the recent randomized O(t 4 n log n) time algorithm [9].Can one extend the kernel of Section 3 from Bipartite Matching to Matching parameterized by the distance to chain graphs?These are only three very concrete questions.There are numerous more, including further parameterizations or any form of kernel lower bound results.Finally, will Matching become the "drosophila" of FPTP studies akin to Vertex Cover for classical FPT studies was?We hope we gave some reasons for believing that.

20 delete u and v from G 21 MG 25 P
−X ← MG−X \ {{v, w}}, s ← s − 1 // update MG−X and s 22 if w is now a leaf in G − X then 23 add w to L // w is free, so add w to the list of vertices to check 24 else ← arbitrary alternating path from w to a leaf u ′ in the subtree rooted in w 26 augment MG−X along P // ensure that the only free vertices are leaves 27 push u ′ on L // u ′ is free, add u ′ to the list of vertices to check 28 return (G, s) and MG−X .

T 1 19 return true 20 foreach
or w is adjacent to free leaf in G − X then return true 17 if w has at least one neighbor in X and Tab[x, fX (w)] < 6k 2 then 18 Tab[x, fX (w)] ← Tab[x, fX (w)] + neighbor u = v of w that is matched wrt.MG−X and fulfills {u, x} / ∈ E do 21 if Keep-Edge(u, x) = true then return true 22 return false paths.

Theorem 2 . 19 .
Matching parameterized by the feedback vertex number k admits a kernel of size 2 O(k) .It can be computed in O(kn) time.

Figure 2 :
Figure 2: A chain graph.Note that the ordering of the vertices in A is going from left to right while the ordering of the vertices in B is going from right to left.The reason for these two orderings being drawn in different directions is that a maximum matching can be drawn as parallel edges, see e. g. the bold edges.In fact, Algorithm 4 computes such matchings with the matched edges being parallel to each other.Applying the O(m √ n)-time algorithm for Matching [17] on the kernel yields: Corollary 2.20.Matching can be solved in O(kn + 2 O(k) ) time, where k is the feedback vertex number.

P M i is to the right of b 1 ,
it follows that a P M i has at least i neighbors right of b 1 .Since the right buffer of b 1 contains the #lmv(b 1 , b 2 , M G−X ) ≥ t (see Lemma 3.5) vertices to the right of b 1 , we have {a P M i , b r i } ∈ E. By symmetry, we have {b P

Lemma 3 . 9 .
vertex b ∈ B at most one vertex among the #lmv(b 1 , b 2 , M G−X ) neighbors of b that are directly to the left of its matched neighbor in M G−X .Thus, in each iteration we have #lmv(b 1 , b 2 , M G−X ) > 0. It follows that the above procedure constructs t vertex-disjoint augmenting paths from {a r i1 , . . ., a r it } to {b ℓ j1 , . . ., b ℓ jt }.Hence, G contains a matching of size s and thus (G, s) is a yes-instance.The correctness of the data reduction rule follows from the previous two claims.It remains to prove the running time.To this end, observe that the matching M G−X is given.Computing all degrees of G can be done in O(n + m) time.Also #lmv(v, M G−X ) can be computed in linear time: For each vertex b ∈ B one has to check for each neighbor of b whether it is to the left of b's matched neighbor and to adjust #lmv(b, M G−X ) accordingly.Furthermore, computing #lmv(b 1 , b 2 , M G−X ) and removing the vertices in A ′ D and B ′ D can be done in O( b∈B ′ deg(b) + a∈A ′ deg(a)) time.Thus, Reduction Rule 3.3 can be exhaustively applied in O(n + m) time.We next upper-bound the number of free vertices with respect to M G−X .LetA free := {a ∈ A | a is free with respect to M G−X } and A k free := {a ∈ A free | |{a ′ ∈ A free | a a ′ }| ≤ k},that is, A k free contains the k rightmost free vertices in A \ X. Observe that all vertices in A k free are left of M G−X .Analogously, denote by B k free the set containing the k leftmost free vertices in B \ X. Reduction Rule 3.4.Let (G, s) be an instance reduced with respect to Reduction Rule 3.1.Then delete all vertices in A free \ (K ∪ A k free ) ∪ B free \ (K ∪ B k free ) .Reduction Rule 3.4 is correct an can be applied in O(n + m) time.

Corollary 3 . 11 .
Matching can be solved in O(k 7.5 + n + m) time, where k is the vertex deletion distance to chain graphs.

2 . 3 .
Compute in linear time an initial maximum matching M in G − X. Start with M as a matching in G and increase the size at most |X| = k times to obtain in O(k • (n + m)) time a maximum matching for G.From this we can directly derive that Matching can be solved in O(k(n + m)) time, where k is one of the following parameters: feedback vertex number, feedback edge number, vertex cover number.Bipartite Matching can be solved in O(k(n + m)) time, where k is the vertex deletion distance to chain graphs.Using our kernelization results, the multiplicative dependence of the running time on parameter k can now be made an additive one.For instance, in this way the running time for Bipartite Matching parameterized by vertex deletion distance to chain graphs "improves" from O(k(n + m)) to O(k 7.5 + n + m).
Matching can be solved in O(n + m + k1.5) time, where k is the feedback vertex number.
Check whether Reduction Rule 2.4 is applicable for x 9 c(x) ← c(x) + 1, marked({u, x}) ← True // fix u as free neighbor of x 10 if c(x) = k then // x has enough free neighbors: apply Reduction Rule 2.4 11 foreach y ∈ NG(x) ∩ X do delete {x, y} 12 foreach v ∈ NG(x) \ X do 13 if marked({x, v}) = False then 14 delete {x, v} // Next deal with the case that v becomes a degree-one vertex Denote by P M the set of all paths in G M using vertices in V \ V ′ and set t := |P M |.Consider now an arbitrary i ∈ [t], and let P M starting and ending with non-matched edges and all these paths are pairwise vertex-disjoint.We show that also in G ′ there are pairwise vertex-disjoint alternating paths from a P M i to b P M i .Assume without loss of generality that a P M It follows from the previous paragraph that a P M i exists.Analogously to a P M i , for each i ∈ [t] denote by b P M i the first vertex on the pathP M i that is not left of b 2 , that is, b P M i is the vertex on P M i such that for each vertex b ′ ∈ B that is in P M i it holds that b 2 ≺ b ′ or b ′ b P M i .This means that in G M there is for each i ∈ [t] an alternating path