Stabilizing Weighted Graphs

An edge-weighted graph $G=(V,E)$ is called stable if the value of a maximum-weight matching equals the value of a maximum-weight fractional matching. Stable graphs play an important role in some interesting game theory problems, such as network bargaining games and cooperative matching games, because they characterize instances which admit stable outcomes. Motivated by this, in the last few years many researchers have investigated the algorithmic problem of turning a given graph into a stable one, via edge- and vertex-removal operations. However, all the algorithmic results developed in the literature so far only hold for unweighted instances, i.e., assuming unit weights on the edges of $G$. We give the first polynomial-time algorithm to find a minimum cardinality subset of vertices whose removal from $G$ yields a stable graph, for any weighted graph $G$. The algorithm is combinatorial and exploits new structural properties of basic fractional matchings, which may be of independent interest. In contrast, we show that the problem of finding a minimum cardinality subset of edges whose removal from a weighted graph $G$ yields a stable graph, does not admit any constant-factor approximation algorithm, unless $P=NP$. In this setting, we develop an $O(\Delta)$-approximation algorithm for the problem, where $\Delta$ is the maximum degree of a node in $G$.


Introduction
Several interesting game theory problems are defined on networks, where the vertices represent players and the edges model the way players can interact with each other. In many such games, the structure of the underlying graph that describes the interactions among players is essential in determining the existence of stable outcomes for the corresponding games, i.e., outcomes where players have no incentive to deviate. Popular examples are cooperative matching games, introduced by Shapley and Shubik [20], and network bargaining games, defined by Kleinberg and Tardos [15], both extensively studied in the game theory community. Instances of such games are described by a graph G = (V, E) with edge weights w ∈ R E ≥0 , where V represents a set of players, and the value of a maximum-weight matching, denoted as ν(G), is the total value that the players could get by interacting with each other.
An important role in such games is played by so-called stable graphs. An edge-weighted graph G = (V, E) is called stable if the value ν(G) of a maximum-weight matching equals the value of a maximum-weight fractional matching, denoted as ν f (G). Formally, ν f (G) is given by the optimal value of the standard linear programming relaxation of the matching problem, defined as ν f (G) := max w ⊤ x : x(δ(v)) ≤ 1 ∀v ∈ V, x ≥ 0 (P) dealing with edge-weighted graphs (see Appendix I), and in fact, the development of algorithmic results for weighted graphs requires substantial new ideas.
Our results and techniques. Our main results are as follows.
Vertex-stabilizers. We give the first polynomial-time algorithm to find a minimum-cardinality vertex-stabilizer S, in any weighted graph G. Our algorithm also ensures that ν(G \ S) ≥ 2 3 ν(G), i.e., the value of a maximum-weight matching is preserved up to a factor of 2 3 , and we show that this factor is tight in general. Specifically, as previously mentioned, a minimum-cardinality vertexstabilizer for a weighted graph might decrease the value of a maximum-weight matching in the resulting graph. From a network bargaining perspective, this means we are decreasing the total value that the players are able to get, which is of course undesirable. However, we can show this is inevitable, since deciding whether there exists any vertex-stabilizer S that preserves the value of a maximum-weight matching (i.e., such that ν(G \ S) = ν(G)) is an NP-hard problem. Furthermore, we give an example of a graph G where any vertex-stabilizer S decreases the value of a maximumweight matching by a factor of essentially 2 3 , i.e., ν(G \ S) ≤ 2 3 + ε ν(G) (for an arbitrary small ε > 0). This shows that the bounds of our algorithm are essentially best possible: the algorithm finds a vertex-stabilizer S whose cardinality is the smallest possible, and preserves the value of a maximum-weight matching up to a factor of 2 3 , that is the tightest factor that holds for all instances. The algorithm exploits new structural properties of basic fractional matchings which may be of independent interest. Its analysis relies on a suitable lower bound on the cardinality of a minimum vertex-stabilizer, which generalizes the lower bound used in the unweighted setting, and is based on the structure of optimal basic solutions of (P). In particular, it was shown in [1] that a lower bound on the cardinality of a vertex-stabilizer for unweighted graphs is given by the minimum number of odd cycles in the support of an optimal basic solution to (P). We show that this lower bound holds also for weighted graphs, though the proof is much more involved and requires different ideas. As a byproduct of our results, we develop a combinatorial algorithm for computing an optimal basic solution to (P) with the smallest number of odd cycles in its support, for weighted graphs.
Edge-stabilizers. When dealing with edge-removal operations, the problem becomes harder, already in the unweighted setting. It is shown in [7] that finding a minimum edge-stabilizer is as hard as vertex cover, and whether the problem admits a constant factor approximation algorithm is an interesting open question. We here show that the answer to this question is negative for weighted graphs, since we prove that the minimum edge-stabilizer problem for a weighted graph G does not admit any constant-factor approximation algorithm, unless P = N P . From an approximation point of view, we show that the algorithm we developed for the vertex-stabilizer problem translates into a O(∆)-approximation algorithm for the edge-stabilizer problem, where ∆ is the maximum degree of a node in G.
Once again, the analysis relies on proving a lower bound on the cardinality of a minimum edgestabilizer. It was shown in [7] that a lower-bound on the cardinality on a minimum edge-stabilizer for unweighted graphs is again given by the minimum number of odd cycles in the support of an optimal basic solution to (P) (called γ(G)). Interestingly, we show that, differently from the vertexstabilizer setting, here this lower bound does not generalize, and γ(G) is not a lower bound on the cardinality of an edge-stabilizer for arbitrary weighted graphs. However, we are able to show that ⌈γ(G)/2⌉ is a lower bound on the cardinality of a minimum edge-stabilizer, and this is enough for our approximation purposes.
Additional results. Lastly, we also generalize a result given in [1] on finding a minimum vertexstabilizer which avoids a fixed maximum matching M , on unweighted graphs. We prove that if M is a maximum-weight matching of a weighted graph G, then finding a minimum vertex-stabilizer that is element-disjoint from M is a polynomial-time solvable problem. Otherwise, if M is not a maximum-weight matching, the problem is at least as hard as vertex cover. We supplement this result with a 2-approximation algorithm for this case, that is best possible assuming UGC.
Related work. Biró et al. [5] were the first to consider the edge-stabilizer problem in weighted graphs, and they showed NP-hardness for this case. Stabilizing a graph via different operations on the input graph (other than removing edges/vertices) has also been studied. In particular, Ito et al. [12] have given polynomial-time algorithms to stabilize an unweighted graph by adding edges and by adding vertices. Chandrasekaran et al. [8] have recently studied the problem of stabilizing unweighted graphs by fractionally increasing edge weights. Ahmadian et al. [1] have also studied the vertex-stabilizer problem on unweighted graphs, but in the more-general setting where there are (non-uniform) costs for removing vertices, and gave approximation algorithms for this case.
Biró et al. [6] and Könemann et al. [16] studied a variant of the problem where the goal is to compute a minimum-cardinality set of blocking pairs, that are edges whose removal from the graph yield the existence of a fractional vertex cover of size at most ν(G) (but note that the resulting graph might not be stable). Mishra et al. [17] studied the problem of converting a graph into a König-Egerváry graph, via vertex-deletion and edge-deletion operations. A König-Egerváry graph is a graph where the size of a maximum matching equals the size of an (integral) minimum vertex cover. They gave an O(log n log log n)-approximation algorithm for the vertex-removal setting in unweighted graphs, and showed constant-factor hardness of approximation (assuming UGC) for both the minimum vertex-removal and edge-removal problem.
Paper Organization. In Section 2 we give some preliminaries and discuss notation. In Section 3, we give a polynomial-time algorithm to compute an optimal basic solution to (P) with a minimum number of odd cycles in its support. This algorithm will be crucially used in Section 4, where we give our results on vertex-stabilizers. Section 5 reports our results on edge-stabilizers. Finally, Section 6 contains our additional results.

Preliminaries and notation
A key concept that we will use is LP duality. The dual of (P) is given by τ f (G) := min ½ ⊤ y : y u + y v ≥ w uv ∀uv ∈ E, y ≥ 0 .

(D)
As feasible solutions to (P) are called fractional matchings, we call feasible solutions to (D) fractional w-vertex covers. In fact, (D) is the standard LP-relaxation of the problem of finding a minimum w-vertex cover, obtained by adding integrality constraints on (D). We also call basic feasible solutions to (P) as basic fractional matchings. An application of duality theory yields the following For a vector x ∈ R E and any subset F ⊆ E, we denote x −F ∈ R E−F as the subvector obtained by dropping the entries corresponding to F . For any multisubset F ⊆ E, we define x(F ) := e∈F x e . Note that an element may be accounted for multiple times in the sum if it appears more than once in F . We denote supp(x) := {e ∈ E : x e = 0} as the support of x. For any positive integer k, [k] represents the set {1, 2, . . . , k}.
Given an undirected graph G, we denote by n the number of vertices and by m the number of edges. For edge weights w ∈ R m + and a matching M in G, a path is called M -alternating if its edges alternately belong to M and E \ M . We say that an M -alternating path is valid if it starts with an M -exposed vertex or an edge in M , and ends with an M -exposed vertex or an edge in M . A valid M -alternating path P is called M -augmenting if w(P \ M ) > w(P ∩ M ). An M -augmenting walk is defined similarly. Recall that a walk is a path that is non-simple. A cycle is also called M -alternating if its edges alternately belong to M and E \ M . Note that an M -alternating cycle has even length. An M -alternating cycle C is said to be M -augmenting if w(C \ M ) > w(C ∩ M ). Definition 1. An odd cycle C = (e 1 , e 2 , . . . , e 2k+1 ) is called an M -blossom if e i ∈ M for all even i and e i / ∈ M for all odd i. The vertex v := e 1 ∩ e 2k+1 is called the base of the blossom. The blossom is augmenting if v is M -exposed and w(C \ M ) > w(C ∩ M ).
Given an M -augmenting flower C ∪ P , if we replace the vector which places 1 on the edges of M ∩ (C ∪ P ), with the vector that places 1 2 on the edges of C and 1 on the edges of P \ M , then the change in weight is exactly 1 2 times LHS − RHS of the above inequality. So the inequality means that this operation increases the weight.
Note that the structures defined in Definition 2 and 3 might not be simple. For example, in a flower C ∪ P , the path P might intersect the blossom C more than once. Figure 1 illustrates some simple examples of these structures. Notice that a blossom is always simple. The significance of the structures defined above is given by the following theorem: 15]). If a graph is stable, then it does not have an M -augmenting flower or bi-cycle for every maximum-weight matching M . Otherwise, it has an M -augmenting flower or bi-cycle for every maximum-weight matching M .
We will also need the following classical result on the structure of basic fractional matchings: is basic if and only if x e = 0, 1 2 , 1 for all e ∈ E and the edges e having x e = 1 2 induce vertex-disjoint odd cycles in G. Letx be a basic fractional matching in G. We partition the support ofx into two parts. Define C (x) := {C 1 , . . . , C q } as the set of odd cycles such thatx e = 1 2 for all e ∈ E(C i ), and as the set of matched edges inx. For ease of notation, we use V (C (x)) = ∪ C∈C (x) V (C) and E(C (x)) = ∪ C∈C (x) E(C) to denote the vertex set and edge set of C (x) respectively. We define two operations on the entries ofx associated with certain edge sets of G: Definition 4. By complementing on E ′ ⊆ E, we mean replacingx e byx e = 1 −x e for all e ∈ E ′ .
Let X be the set of basic maximum-weight fractional matchings in G. Define Note that G is stable if and only if γ(G) = 0. We will use the following terminology given in [9] for the description of Edmonds' maximum matching algorithm. Given a graph G and a matching M , let T be an M -alternating tree rooted at a vertex r. We denote by A(T ) and B(T ) the sets of nodes in T at odd and even distance respectively from r. We call T frustrated if every edge of G having one end in B(T ) has the other end in A(T ).
Finally, the following theorem gives a sufficient condition for a graph to be Hamiltonian.
Theorem 3 (Ore's Theorem [19]). Let G be a finite and simple graph with n ≥ 3 vertices. If deg(u)+deg(v) ≥ n for every pair of distinct non-adjacent vertices u and v, then G is Hamiltonian.

Maximum fractional matching with minimum support
In this section, we give a polynomial-time algorithm to compute a basic maximum-weight fractional matchingx for a weighted graph G with minimum number of odd cycles in its support, i.e., satisfying |C (x)| = γ(G). This algorithm will be used as a subroutine by our vertex-stabilizer algorithm, which we will develop in Section 4. Our first step is to characterize basic maximum-weight fractional matchings which have more than γ(G) odd cycles. Balas [3] considered this problem on unweighted graphs, and gave the following characterization: ). Letx be a basic maximum fractional matching in an unweighted graph G. If |C (x)| > γ(G), then there exists an M (x)-alternating path which connects two odd cycles C i , C j ∈ C (x). Furthermore, alternate rounding on the odd cycles and complementing on the path produces a basic maximum fractional matchingx such that C (x) ⊂ C (x).
We generalize this to weighted graphs. Before stating the theorem, we need to introduce the concept of connector (see Figure 2 for some examples): Definition 6. Let C be a cycle and S 0 , S 1 , . . . , S k be a partition of V (C) such that k ≥ 2 and |S 0 | ≥ 0 is even. Note that we allow S 0 to be empty. Let M be a perfect matching on the vertex set S 0 . We call the graph C ∪ M a connector. Each S i is called a terminal set for i ≥ 1. An edge e ∈ M is called a chord if e / ∈ E(C).
Hence, we will work on the reduced graph G. Apply Edmonds' maximum matching algorithm on G initialized with the matching M ∩ E, and construct an M -alternating tree starting with the exposed vertex v i . There are two possibilities: either we find an augmenting path from v i to S j for some j = i or a frustrated tree rooted at v i . For the purpose of contradiction, suppose we get a frustrated tree T rooted at Note that we do not have edges connecting two nodes in B(T ), otherwise T is not a frustrating tree.
We claim that each pseudonode in T is incident to at least two unmatched edges in T . Let v be a pseudonode in T , and S(v) be the subset of vertices in G that are contained in v (after expanding pseudonodes). Note that S(v) ⊂ V because there are at least two exposed vertices in G. Let δ G\M (·) denote the cut function on G \ M . Since G \ M is 2-edge-connected, we have δ G\M (S(v)) ≥ 2. These edges are present in T because otherwise we can extend the alternating tree T . It follows that v is incident to at least two unmatched edges in T .
Let uv be a matched edge in T where u ∈ A(T ) and v ∈ B(T ). We claim that deg T (u) ≤ deg T (v). Note that deg T (u) is either 2 or 3. This is because u is not a pseudonode, and deg G (w) = 3 for every M -covered vertex w in G. If v is not a pseudonode, then deg T (v) = 3 as all edges in δ G (v) are accounted for in T . Otherwise, if v is a pseudonode, then by the previous claim v is incident to at least two unmatched edges in T . So deg T (v) ≥ 3. Now, observe that T is a bipartite graph as the node set can be partitioned into A(T ) and B(T ) where |B(T )| = |A(T )| + 1. For every v ∈ A(T ), let M (v) be its matched neighbour in B(T ). The extra node in B(T ) is the root of T , which has degree at least one in T . Summing up the node degrees in A(T ), we obtain which is a contradiction.
Let y be a minimum fractional w-vertex cover in G. We say that an edge uv is tight if y u + y v = w uv . Similarly, we say that a path is tight if all of its edges are tight.
Theorem 5. Letx be a basic maximum-weight fractional matching and y be a minimum fractional w-vertex cover in G. If |C (x)| > γ(G), then there exists (i) a vertex v ∈ V (C i ) for some odd cycle C i ∈ C (x) such that y v = 0; or (ii) a tight M (x)-alternating path P which connects two odd cycles C i , C j ∈ C (x); or (iii) a tight and valid M (x)-alternating path P which connects an odd cycle C i ∈ C (x) and a vertex v / ∈ V (C (x)) such that y v = 0. Furthermore, alternate rounding on the odd cycles and complementing on the path produces a basic maximum-weight fractional matchingx such that C (x) ⊂ C (x).
Proof. We will start by proving the second part of the theorem. For Case (i), letx be the basic fractional matching obtained by alternate rounding on C i at v. Since y v = 0, bothx and y satisfy complementary slackness. Hence,x is optimal to (P) and as the endpoints of P . Letx be the basic fractional matching obtained by alternate rounding on C i , C j at u, v respectively and complementing on P . Note that u and v are exposed after the alternate rounding, and covered after complementing. Sincē x and y satisfy complementary slackness,x is optimal to (P) and ) as the endpoints of P . Letx be the basic fractional matching obtained by alternate rounding on C i at u and complementing on P . Since y v = 0, both x and y satisfy complementary slackness. Thus,x is optimal to (P) and Next, we prove the first part of the theorem. We may assume Since N (x) and N (x * ) are matchings in G, J is made up of vertex-disjoint paths and cycles of G. For each such path or cycle, its edges alternately belong to N (x) or N (x * ). Moreover, its intermediate vertices are disjoint from C (x) and C (x * ). Sincex and x * are maximum-weight fractional matchings in G, every path in J is tight by complementary slackness. If there exists a path in J which connects two odd cycles from C (x), then we are done. If there exists a path in J which connects an odd cycle from C (x) and a vertex v / ∈ V (C (x) ∪ C (x * )), then y v = 0 because v is either exposed by M (x) or M (x * ). Hence, we are also done. So we may assume every path in J belongs to one of the following three categories: (a) Vertex disjoint from C (x) and C (x * ). (b) Starts and ends at the same cycle.
(c) Connects an odd cycle from C (x) and an odd cycle from C (x * ). Note that by the second part of the theorem, there is no path in J which connects two odd cycles from C (x * ) or an odd cycle from C (x * ) and a vertex v / ∈ V (C (x) ∪ C (x * )). We say that two odd

Claim 1.
There exists an odd cycle in C (x * ) which is adjacent to at least two odd cycles in C (x).
Proof. Let H be the subgraph of G induced by supp(x + x * ). Since |C (x)| > |C (x * )|, there exists a component K in H which has more odd cycles from C (x) than C (x * ). We claim that K contains at least one odd cycle from C (x * ). Let C ∈ C (x) be an odd cycle in K. For every v ∈ V (C), since we assumed y v > 0, by complementary slackness it is either M (x * )-covered or belongs to V (C (x * )).
If v ∈ V (C (x * )), then we are done. So we may assume that every vertex in C is M (x * )-covered. Let uv ∈ M (x * ) where u ∈ V (C) and v / ∈ V (C). Observe that uv is the first edge of a path in J, so it either ends at an odd cycle in C (x * ) or C. Since C has an odd number of vertices, by the pigeonhole principle there exists a path in J which connects C and an odd cycle in C (x * ). Thus, we have shown that K contains at least one odd cycle from C (x * ). This implies that K contains at least two odd cycles from C (x). Let C * 1 , . . . , C * k ∈ C (x * ) be the odd cycles adjacent to C. Each C * i is not adjacent to any other odd cycle in C (x * ). Note that by our assumption, C is not adjacent to any other odd cycle in C (x). As K contains at least two odd cycles from C (x), there exists a C * i which is adjacent to an odd cycle in C (x) \ C.
In light of the previous claim, let It is either matched to another vertex in S 0 or is an endpoint of a path in J whose other endpoint is also a vertex in S 0 . Hence, |S 0 | is even. Moreover, S i = ∅ for all i ≥ 1, and the sets S 0 , . . . , S k partition V (C * ). Let P be the set of paths in J that start and end at C * , and consider the subgraph C * ∪ P. We claim that there exists an M (x)-alternating path from S i to S j in C * ∪ P for some j = i. Since every path in P starts and ends with an edge in M (x), we can perform the following reduction: contract every path in P into a single edge in M (x). It is easy to see that an M (x)-alternating path from S i to S j in C * ∪ P corresponds to an M (x)-alternating path from S i to S j in the reduced graph. Observe that the reduced graph along with the matching M (x) forms a connector. By Lemma 1, there exists an M (x)-alternating path P from S i to S j in C * ∪ P for some j = i.
Let v i ∈ S i and v j ∈ S j be the endpoints of P . Let P i and P j be the paths in J connecting Corollary 1. Letx be a basic maximum-weight fractional matching in G. Then, there exists a basic maximum-weight fractional matching x * in G such that |C (x * )| = γ(G) and C (x * ) ⊆ C (x).
Given a basic maximum-weight fractional matchingx in G, we would like to reduce the number of odd cycles in C (x) to γ(G). One way to accomplish this is to search for the structures described in Theorem 5. Fix a minimum fractional w-vertex cover y in G. Let G ′ be the unweighted graph obtained by applying the following operations to G (see Figure 3): (a) Delete all non-tight edges.
Note that none of the edges in M (x) and C (x) were deleted because they are tight. Consider the edge set It is easy to see that M ′ is a matching in G ′ . The significance of the auxiliary graph G ′ is given by the following lemma: Proof. (⇒) Letx be a basic maximum-weight fractional matching where |C (x)| > γ(G) and y be a minimum fractional w-vertex cover in G. Applying Theorem 5 yields three cases. In Case (i), there exists a vertex v ∈ C i for some odd cycle C i ∈ C (x) such that y v = 0. Then, the edge iz is an M ′ -augmenting path in G ′ . In Case (ii), there exists a tight M (x)-alternating path P in G connecting two odd cycles C i , C j ∈ C (x). In G ′ , P is an M ′ -augmenting path whose endpoints are pseudonodes i and j. In Case (iii), there exists a tight and valid M (x)-alternating path P in z Figure 3: The auxiliary graph G ′ and the matching M ′ . Vertices in the ellipse are from the original graph G. Gray vertices represent pseudonodes.
(⇐) Assume M ′ is not a maximum matching in G ′ . Then, there exists an M ′ -augmenting path P in G ′ . If both of its endpoints are pseudonodes i and j, then P is a tight M (x)-alternating path in G which connects C i and C j . So we may assume the endpoints of P are a pseudonode i and z.
Thus, searching for the structures in Theorem 5 is equivalent to searching for an M ′ -augmenting path in G ′ . This immediately gives an algorithm to generate a basic maximum-weight fractional matching with γ(G) odd cycles.
Algorithm 1: Minimize number of odd cycles 1 Compute a basic maximum-weight fractional matchingx in G 2 Compute a minimum fractional w-vertex cover y in G 3 Construct G ′ and M ′ 4 while ∃ an M ′ -exposed pseudonode r in G ′ do 5 Grow an M ′ -alternating tree T rooted at r using Edmonds' algorithm 6 if an M ′ -augmenting r-s path P ′ is found in G ′ then Alternate round on C r , C s and complement on P Alternate round on C r and complement on P After an M ′ -augmenting path P ′ is found, letx denote the new basic maximum-weight fractional matching in G obtained by alternate rounding and complementingx. We can update G ′ as follows. If s is a pseudonode, we unshrink C r and C s in G ′ because C (x) = C (x) \ {C r , C s }. Otherwise, s = z and we only unshrink C r . Then, there are two cases. In the first case, we have vz ∈ E(P ′ ) for some v ∈ V . Observe thatx(δ(v)) = 1 butx(δ(v)) = 0. Hence we replace the edge vz with edges vv ′ , v ′ z. In the second case, we have v ′ z ∈ E(P ′ ) for some v ∈ V . This impliesx(δ(v)) = 0 butx(δ(v)) = 1. So we replace edges vv ′ , v ′ z with the edge vz.
Theorem 6. Algorithm 1 computes a basic maximum-weight fractional matching with γ(G) odd cycles in polynomial time.
Proof. There are at most O(n) vertex-disjoint odd cycles in C (x). At every iteration, we eliminate at least one odd cycle from C (x) or a frustrated tree from G ′ . Hence, there are at most O(n) iterations, and Algorithm 1 terminates in polynomial time. Next, we prove correctness. Suppose we obtain an M ′ -frustrated tree T . Every edge in T has one endpoint in A(T ) and another endpoint in B(T ). Every edge in δ G ′ (T ) has one endpoint in A(T ) and another endpoint outside T . Since the matching in T remains unchanged in every iteration, this property continues to hold throughout the execution of the algorithm. Thus, T is a frustrated tree in every subsequent iteration. This implies that the last matching generated by the algorithm is maximum. By Lemma 2, we have |C (x)| = γ(G).
We remark here that in Algorithm 1, we can avoid solving linear programs to obtainx and y in Steps 1 and 2. They can be computed using a simple duplication technique by Nemhauser and Trotter [18]. Create an auxiliary bipartite graph, and run the Hungarian algorithm to get a maximum-weight matching and a minimum w-vertex cover. Then, they can be easily mapped back into a basic maximum-weight fractional matching and a minimum fractional w-vertex cover of our original graph G. We refer to [18] for details.

Computing vertex-stabilizers
The goal of this section is to prove the following theorem: There exists a polynomial-time algorithm that computes a minimum vertex-stabilizer S for a weighted graph G. Moreover, ν(G \ S) ≥ 2 3 ν(G).
Let us start with discussing a lower bound on the size of a minimum vertex-stabilizer.
Lower bound. We will here prove that γ(G) is a lower bound on the number of vertices to remove in order to stabilize a graph. We need a couple of lemmas.
Lemma 3. Letx be a basic maximum-weight fractional matching and y be a minimum fractional w-vertex cover in G. Let s ∈ V (C) for some odd cycle C ∈ C (x). Ifx is the fractional matching obtained by alternate rounding on C at s, thenx −δ(s) is a basic maximum-weight fractional matching and y −s is a minimum fractional w-vertex cover in G \ s.
Proof. First, notice thatx −δ(s) is a basic fractional matching and y −s is a fractional w-vertex cover in G \ s. We will show that they satisfy complementary slackness. Let uv ∈ E(C) be an edge wherex uv > 0. Since e ∈ E(C), we havex uv > 0 and so y u + y v = w uv . Next, let v = s be a vertex in C where y v > 0. We only need to check the vertices in C becausex e = 0 for every edge e ∈ δ(s) \ E(C). Since v is M (x)-covered, we havex(δ(v)) = 1. Therefore,x −δ(s) and y −s form a primal-dual optimal pair.
The following operation allows us to switch between fractional matchings on a set of edges: Definition 7. Let x and x ′ be fractional matchings in G. By switching on E ′ ⊆ E from x to x ′ , we mean replacing x e by x ′ e for all e ∈ E ′ .
Switching does not necessarily yield a feasible fractional matching. Hence, we will only use it on the components of a specific subgraph of G: Claim 2. Given two basic fractional matchings x and x ′ , let H be the subgraph of G induced by supp(x + x ′ ). For any component K in H, switching on E(K) from x to x ′ yields a basic fractional matching in G.
Proof. Letx denote the vector obtained by switching on E(K) from x to x ′ . We first show thatx is a feasible fractional matching in G. For the purpose of contradiction, suppose there exists a vertex such that x f > 0, which is a contradiction. It is easy to see thatx is basic.
Proof. Let x * be a basic maximum-weight fractional matching in G such that |C (x * )| = γ(G). Let y be a minimum fractional w-vertex cover in G. For the purpose of contradiction, suppose there exists a vertex u ∈ V such that γ(G \ u) < γ(G) − 1. There are two cases: Case 1: u ∈ V (C) for some odd cycle C ∈ C (x * ). Letx be the fractional matching obtained from x * by alternate rounding on C at u. By Lemma 3, we know thatx −δ(u) is a basic maximum-weight fractional matching and y −u is a minimum fractional w-vertex cover in G \ u. We first give a proof sketch for this case. Ifx −δ(u) is not an optimal basic solution yielding γ(G \ u) odd cycles, then one of the structures given by Theorem 5 must exist. This same structure would be a structure corresponding to the basic solution x * , but this yields a contradiction since x * is an optimal basic solution with γ(G) odd cycles.
Notice that C x −δ(u) = C (x) and M x −δ(u) = M (x). Since |C (x)| = |C (x * )|−1 = γ(G)−1 > γ(G\u), Theorem 5 tells us that G\u contains one of the following structures. The first structure is a vertex v ∈ V (C i ) for some odd cycle C i ∈ C (x) such that y v = 0. However, since C i ∈ C (x * ), by Theorem 5 we arrive at the contradiction |C (x * )| > γ(G). The second structure is a tight and valid M (x)-alternating path P which connects two odd cycles C i , C j ∈ C (x), or an odd cycle C i ∈ C (x) and a vertex v / ∈ V (C (x)) such that y v = 0. Note that C i , C j ∈ C (x * ). If V (P ) ∩ V (C) = ∅, then P is also a tight and valid M (x * )-alternating path in G which connects C i and C j , or C i and v. Otherwise, let s = V (C i ) ∩ V (P ) and let t denote the first vertex of C encountered while traversing along P from s. Then, the s-t subpath of P is a tight M (x * )-alternating path which connects C i , C ∈ C (x * ). We again obtain the contradiction |C (x * )| > γ(G) by Theorem 5.
Consider the subgraph J = (V, N (x * )△N (x)). Note that u is covered by N (x * ) and exposed by N (x). Let P be the component in J which contains u. We know that P is a path with u as an endpoint. Let v be the other endpoint of P . There are 3 subcases. We first give an overview of how we arrive at a contradiction in each subcase. We show that one can move from x * to a new solutionx such that: (i)x is a basic maximum-weight fractional matching for a subgraph G ′ obtained by deleting at most 1 vertex from a cycle of C (x * ); and (ii) |C (x)| < γ(G ′ ).
Clearly, both of the above properties cannot hold, so this yields a contradiction.
Subcase 2.1: v ∈ C for some odd cycle C ∈ C (x * ). In this subcase, the path P has even length. Letx be the fractional matching obtained from x * by alternate rounding on C at v. By Lemma 3, x −δ(v) is a basic maximum-weight fractional matching in G\v. Let H be the subgraph of G induced by supp(x +x) (see Figure 4 for an example). Note thatx e +x e = 0 for every edge e / ∈ E(P ) which is incident to a vertex in P . Thus, P is a component in H. Since |C (x)| = γ(G) − 1 > |C (x)|, there exists a component K in H which has more odd cycles from C (x) than C (x). Switching on K fromx −δ(v) tox yields a basic fractional matching in G \ v with less than γ(G) − 1 odd cycles. To yield a contradiction to Case 1, it is left to show that it is maximum-weight. This is because we are deleting a vertex v from an odd cycle of C (x * ), but γ(G \ v) decreases by more than 1. Now, sincex andx −δ(v) are maximum-weight fractional matchings in G \ u and G \ v respectively, we have e∈E(K) w exe = e∈E(K) w exe because u, v / ∈ V (K). Thus, the resulting matching is indeed maximum-weight in G \ v. Subcase 2.2: v ∈ C for some odd cycle C ∈ C (x). In this subcase, the path P has odd length. Letx be the fractional matching obtained fromx by alternate rounding on C at v. By Lemma 3,x −δ(v) is a basic maximum-weight fractional matching in G \ {u, v}. Let H be the subgraph of G induced by supp(x * +x) (see Figure 5 for an example). Note that x * e +x e = 0 for every edge e / ∈ E(P ) incident to a vertex in P . Thus, P is a component in H. Since |C (x)| = |C (x)| − 1 < γ(G) − 2 < |C (x * )|, there exists a component K in H which has more odd cycles from C (x * ) than C (x). Switching on K from x * tox yields a basic fractional matching in G with less than γ(G) odd cycles. To yield a contradiction, it is left to show that it is maximum-weight. Since x * andx −δ(v) are maximum-weight fractional matchings in G and G \ {u, v} respectively, we have . Thus, the resulting basic fractional matching is maximum-weight in G.
. Let H be the subgraph of G induced by supp(x * +x) (see Figure 6 for an example). Note that x * e +x e = 0 for every edge e / ∈ E(P ) which is incident to a vertex in P . Thus, the path P is a component in H. Since |C (x * )| > γ(G) − 1 > |C (x)|, there exists a component K in H which has more odd cycles from C (x * ) than C (x). Switching on K from x * tox yields a basic fractional matching in G with less than γ(G) odd cycles. To yield a contradiction, it is left to show that it is maximum-weight. Since x * andx are maximum-weight fractional matchings in G and G \ u respectively, we have e∈E(K) w e x * e = e∈E(K) w exe because u / ∈ V (K). This implies that the resulting basic fractional matching is indeed maximum-weight in G.
As a corollary to the above lemma, we obtain the claimed lower bound. The algorithm. The algorithm we use to stabilize a graph is very simple: it computes a basic maximum-weight fractional matchingx in G with γ(G) odd cycles (this can be done using Algorithm 1) and a minimum fractional w-vertex cover y in G, and then removes one vertex from every cycle in C (x), namely, the vertex with the least y-value in the cycle. Algorithm 2 formalizes this.
Algorithm 2: Minimum vertex-stabilizer 1 Initialize S ← ∅ 2 Compute a minimum fractional w-vertex cover y in G 3 Compute a basic maximum-weight fractional matchingx in G with γ(G) odd cycles 4 Let C (x) = C 1 , C 2 , . . . , C γ(G) We are now ready to prove the main theorem stated at the beginning of the section, Theorem 7.
Proof of Theorem 7. Let S = v 1 , v 2 , . . . , v γ(G) be the set of vertices returned by the algorithm. Letx be the vector obtained fromx by alternate rounding on C i at v i for all i respectively. By is a basic maximum-weight fractional matching in G \ S. Note that it is also a maximum-weight integral matching in G \ S. Thus, ν(G \ S) = ν f (G \ S) and G \ S is stable. Moreover, S is minimum by Lemma 5. It is left to show that ν(G \ S) ≥ 2 3 ν(G). For every odd cycle C i ∈ C (x), we have because v i has the smallest fractional w-vertex cover in C i . From Lemma 3, we also know that y −S is a minimum fractional w-vertex cover in G \ S. Then, Note that removing any single vertex from each cycle of C (x) yields a minimum-cardinality vertex stabilizer. The reason we chose the vertex with the smallest y v is to preserve the value of the original maximum-weight matching by a factor of 2 3 .

Tightness of the matching bound.
A natural question is whether it is possible to design an algorithm that always returns a vertex-stabilizer S satisfying ν(G \ S) ≥ αν(G), for some α > 2 3 . We report here an example showing that, in general, this is not possible since the bound of 2 3 can be asymptotically tight. Consider the graph G in Figure 7 for some sufficiently small ε > 0. It is unstable because it is an augmenting flower. The maximum-weight matching is given by the bold edges. For any vertex stabilizer S, Another natural question is whether one can at least distinguish if, for a specific instance, there exists a vertex-stabilizer S such that ν(G \ S) = ν(G). Once again, we show that the answer is negative. Specifically, let us call a vertex-stabilizer S weight-preserving if ν(G \ S) = ν(G). We show that finding such a vertex-stabilizer is hard in general. The proof is based on a reduction from the independent set problem, similar to the one given by Biró et al. [5].
Theorem 8. Deciding whether a graph has a weight-preserving vertex-stabilizer is NP-complete.
Proof. The problem is clearly in NP because any yes-instance can be verified using a weightpreserving vertex-stabilizer in polynomial time. To prove NP-hardness, we give a reduction from the independent set problem. Let G = (V, E) and k be an independent set instance, where V = {v 1 , v 2 , . . . , v n }. The independent set problem asks to determine whether G has an independent set of size at least k. We may assume 2 ≤ k ≤ n. We construct the gadget graph G * as follows. First, set the weight on every edge in E to 1. For each v i ∈ V , add a vertex v ′ i and the edge v i v ′ i with weight 1. Denote this set of new vertices as V ′ = {v ′ 1 , v ′ 2 , . . . , v ′ n }. Next, create k pairwise-disjoint copies of the three cycle w e = 2 w e = 1 forms an augmenting path, which is a contradiction.
Proof. For the purpose of contradiction, suppose there exists an i ∈ [k] such that b i v j / ∈ M for all j ∈ [n]. Then, b i is either M -exposed or matched to a i or c i . Since k ≤ n, by the pigeonhole principle there exists an ℓ ∈ [n] such that b j v ℓ / ∈ M for all j ∈ [k]. By Claim 3, v ℓ v ′ ℓ ∈ M . If b i is M -exposed, then (b i , v ℓ , v ′ ℓ ) forms an augmenting path. Otherwise, we may without loss of generality assume a i b i ∈ M . Then, (c i , a i , b i , v ℓ , v ′ ℓ ) forms an augmenting path. We have reached a contradiction.
This gives a total weight of 2k + 4k + n − k = n + 5k.

Claim 6. The set of inessential vertices in
Proof. It is easy to see that the vertices in G and ∪ k i=1 C i are essential because they are covered by every maximum-weight matching in G * . Let v ′ i ∈ V ′ and M be a maximum-weight matching in G * such that For the forward direction, let S be an independent set of G where |S| = k. Without loss of generality, assume S = {v 1 , v 2 , . . . , v k }. Let M be the matching defined by Since w(M ) = n + 5k, by Claim 5 it is a maximum-weight matching in G * . We claim that S ′ := {v ′ 1 , v ′ 2 , . . . , v ′ k } is a weight-preserving vertex-stabilizer of G * . First, note that the matching M survives after removing S ′ from G * . Hence, M is a maximum-weight matching in G * \ S ′ . It is left to show that G * \ S ′ is stable. We define a fractional w-vertex cover y on G * \ S ′ as follows: It is easy to check that for every uv / ∈ E, the condition y u + y v ≥ w uv holds. Let v i v j ∈ E. Since S is an independent set, at most one of v i and v j is in S. This implies that For the converse, let S ′ be a weight-preserving vertex-stabilizer of G. We know that S ′ ⊆ V ′ by Claim 6 because S ′ does not contain essential vertices. Let M be a maximum-weight matching in G * \ S ′ . Since ν(G * \ S ′ ) = ν(G * ), M is also a maximum-weight matching in G * . We claim that forms an augmenting flower. This is a contradiction because G * \ S ′ is stable. On the other hand, if |S ′ | > k, then w(M ) = 6k + n − |S ′ | < n + 5k. This is also a contradiction because ν(G * \ S ′ ) = ν(G * ). It follows that |S ′ | = k.
Without loss of generality, assume forms an augmenting path, which is a a contradiction. It is left to show that S is an independent set. For the purpose of contradiction, suppose there exist forms an augmenting bi-cycle. This implies that G * \ S ′ is unstable, which is a contradiction. Thus, S is an independent set and |S| ≥ k.

Computing edge-stabilizers
In contrast to the vertex-stabilizer problem, finding a minimum edge-stabilizer is computationally difficult. Biró et al. [5] proved that the problem is NP-hard on weighted graphs. We strengthen this result by showing the following hardness of approximation: Theorem 9. There is no constant factor approximation for the minimum edge-stabilizer problem unless P = N P .
Proof. We give a gap-producing reduction from the independent set problem. Let G = (V, E) and k be an independent set instance where V = {v 1 , v 2 , . . . , v n }. The independent set problem asks to determine whether G has an independent set of size at least k. We may assume 2 ≤ k ≤ n. Let ρ ≥ 1 be an integer. We construct the gadget graph G * = (V * , E * ) as follows. For every edge v i v j ∈ E, replace it with ρk paths of length 3, i.e. (v i , u ℓ ij , u ℓ ji , v j ) for ℓ ∈ [ρk]. Assign weight 1 to every edge in the paths. For each v i ∈ V , add a vertex v ′ i and the edge v i v ′ i with weight 1. Next, create k pairwise-disjoint copies of the complete graph on 2ρk + 1 vertices. Denote each of them as H i and assign weight 4 to every edge in H i . In addition, for every H i , label one of the vertices as b i . Finally, add the edge b i v j for every i ∈ [k] and j ∈ [n] with weight 2. (See Figure 9) Claim 7. If G has an independent set of size at least k, then G * has an edge-stabilizer of size at w e = 2 w e = 1 Figure 9: The gadget graph G * .
Proof. Let S be an independent set in G where |S| = k. Without loss of generality, we may assume Note that w(M ) = (m + 4k)ρk + n + k. In order to show that G * \ F is stable, it suffices to exhibit a fractional w-vertex cover of the same weight. Let y ∈ R |V * | + be a vector defined by It is easy to check that y u + y v ≥ w uv for all uv ∈ E * . Hence, y is a fractional w-vertex cover in G * . Since S is an independent set, there are no edges of the form u ℓ ij u ℓ ji where i, j ≤ k. Then, Claim 8. If G does not have an independent set of size at least k, then every edge-stabilizer of G * has size at least (ρ + 1)k.
Proof. We prove the contrapositive. Assume G * has an edge-stabilizer F such that |F | < (ρ + 1)k. Let M be a maximum-weight matching in G * \ F . Let c denote the number of edges removed from the complete graphs, i.e. c := F ∩ ∪ k i=1 E(H i ) . We first show that c < 2ρk − 1. According to Ore's Theorem, we need to remove at least 2ρk − 1 edges from H i in order to make it non-Hamiltonian.
, otherwise H i \ F contains an augmenting blossom because it has an odd number of vertices.
contains an augmenting flower. We have contains an augmenting bi-cycle. Thus, G * \ F is unstable, which is a contradiction. Now, suppose we have an α-approximation to the minimum edge-stabilizer problem for some constant α ≥ 1. Set ρ = ⌈α⌉ and construct the gadget graph G * as shown above. Run this algorithm on G * and let F be the returned edge-stabilizer. Let OPT be size of a minimum edge-stabilizer in G * . If G has an independent set of size at least k, then by Claim 7 we have OPT ≤ k and |F | ≤ α · OPT ≤ ρk. On the other hand, if G does not have an independent set of size at least k, then by Claim 8 we have OPT ≥ (ρ + 1)k > ρk. This implies that |F | > ρk. Therefore, we can use this algorithm to decide the independent set problem in polynomial time.
In this section, we prove that Algorithm 2 is a O(∆)-approximation algorithm for the minimum edge-stabilizer problem. We first need to establish a lower bound on the optimal solution. Next example shows that, differently from the unweighted case, γ(G) is not a lower bound on the size of a minimum edge-stabilizer for weighted graphs. Let G be the graph depicted in Figure 10. It is unstable because it is an augmenting bi-cycle. Even though γ(G) = 2, the edge with weight 0.5 is a minimum edge-stabilizer. However, we can prove the following.
Proof. Let x * be a basic maximum-weight fractional matching in G such that |C (x * )| = γ(G). Let y be a minimum fractional w-vertex cover in G. Pick an edge ab ∈ E. If x * ab = 0, then ν f (G \ ab) = ν f (G) and γ(G \ ab) = γ(G). So we may assume x * ab ∈ 1 2 , 1 . Let G ′ be the graph obtained by replacing the edge ab with edges ab Define the vectorsx andŷ aŝ Note thatx is a basic fractional matching whileŷ is a fractional w-vertex cover in G ′ . Furthermore, they satisfy complementary slackness conditions asŷ u +ŷ v = w uv for all uv ∈ {ab ′ , b ′ a ′ , a ′ b} and x(δ(v)) = 1 for all v ∈ {a, a ′ , b, b ′ }. Hence, they form a primal-dual optimal pair. Since |C (x)| = γ(G), we have γ(G ′ ) ≤ γ(G). We claim that γ(G ′ ) = γ(G). For the purpose of contradiction, suppose γ(G ′ ) < γ(G). By Theorem 5, G ′ contains one of the following: ) and y a = 0 or y b = 0. By Theorem 5, we arrive at the contradiction γ(G) < |C (x * )|.
Structure (ii): a tight M (x)-alternating path P connecting two odd cycles C i , C j ∈ C (x). If P does not have any intermediate vertices from {a, a ′ , b, b ′ }, then it is also a tight M (x * )alternating path in G connecting two odd cycles from C (x * ). Otherwise, ab ′ , b ′ a ′ , a ′ b ∈ E(P ) and C i , C j ∈ C (x * ). Then, (P ∪ ab) \ {ab ′ , b ′ a ′ , a ′ b} is a tight M (x * )-alternating path in G connecting C i and C j . By Theorem 5, we arrive at the contradiction γ(G) < |C (x * )|.
Structure (iii): a tight and valid M (x)-alternating path P connecting an odd cycle C i ∈ C (x) and a vertex v / ∈ V (C (x)) such thatŷ v = 0. If P does not have any intermediate vertices from Hence, P is also a tight and valid M (x * )-alternating path in G connecting an odd cycle from C (x * ) and v. If ab ′ , b ′ a ′ , a ′ b ∈ E(P ), then v / ∈ {a ′ , b ′ } and C i ∈ C (x * ). Thus, (P ∪ ab) \ {ab ′ , b ′ a ′ , a ′ b} is a tight and valid M (x * )-alternating path in G connecting C i and v. If a ′ b ∈ E(P ) but ab ′ , b ′ a ′ / ∈ E(P ), then v = a ′ and y a = 0. So P + ab − a ′ b is a tight and valid M (x * )-alternating path in G connecting C i and a. If ab ′ ∈ E(P ) but b ′ a ′ , a ′ b / ∈ E(P ), then v = b ′ and y b = 0. So P + ab − ab ′ is a tight and valid M (x * )-alternating path in G connecting C i and b. By Theoreom 5, we arrive at the contradiction γ(G) < |C (x * )|.
As a corollary to the above lemma, we obtain the following lower bound. Since Algorithm 2 deletes γ(G) vertices, at most γ(G)∆ edges are deleted, proving the following.

Forcing an outcome
Given a set of deals M , we here look at the problem of removing as few players as possible in order to make M realizable as a stable outcome. This corresponds to finding a minimum vertex-stabilizer S with the additional constraint that M is a maximum-weight matching in G \ S. Note that this implicitly implies S ∩ V (M ) = ∅. A solution to this problem is called an M -vertex-stabilizer. We would like to point out that the following variants of the problem, which are along the lines of Chandrasekaran et al. [8] are polytime solvable: find a weight vector w ′ such that M is a stable outcome for (G, w ′ ) so as to minimize w − w ′ 1 or w − w ′ ∞ (or even the ℓ p norm w − w ′ p ). This is an inverse-optimization problem that can be cast as an LP (or convex program for the ℓ p norm) by exploiting complementary slackness.
Ahmadian et al. [1] previously showed that the M -vertex-stabilizer problem is polynomial-time solvable on unweighted graphs when M is a maximum matching in G. We prove that when M is any arbitrary matching in G, the problem becomes hard: Theorem 11. The M -vertex-stabilizer problem is NP-hard on unweighted graphs. Furthermore, no efficient (2 − ε)-approximation algorithm exists for any ε > 0 assuming UGC.
Proof. We give an approximation-preserving reduction from the vertex cover problem. Let G = (V, E) be a vertex cover instance. For every edge uv ∈ E, replace it with an augmenting path of length three, i.e. (u, u Denote the resulting (unweighted) graph as G ′ = (V ′ , E ′ ). We will show that every vertex cover in G corresponds to an M -vertex-stabilizer in G ′ and vice versa. This implies that the reduction is approximation-preserving and the inapproximability results for the vertex cover problem [11,14] carry over to the problem of finding a minimum M -vertex-stabilizer.
Observe that G ′ does not contain any alternating cycle or blossom. This implies that there is no augmenting cycle, flower or bi-cycle in G ′ . Let S be a vertex cover of G. Then, G ′ \ S has no augmenting path because every augmenting path in G ′ corresponds to an edge in G. Thus, M is a maximum matching in G ′ \ S and hence S is an M -vertex stabilizer. For the converse, suppose S is an M -vertex stabilizer of G ′ . Note that S ⊆ V as every vertex in V ′ \ V is M -covered. Then, G \ S has no edges because every edge in G corresponds to an augmenting path in G ′ . It follows that S is a vertex cover for G. This concludes the proof of inapproximability.
On unweighted graphs, every instance of this problem admits a solution. However, this is not the case for weighted graphs. Consider an M -augmenting bi-cycle. It is unstable by Theorem 1, but does not have an M -vertex-stabilizer because every vertex is M -covered. In general, if the graph contains an M -augmenting path whose endpoints are M -covered, or an M -augmenting cycle, or an M -augmenting flower whose root is M -covered, or an M -augmenting bi-cycle, then it does not have an M -vertex-stabilizer. We would like to point out that recognizing an infeasible instance of the M -vertex-stabilizer problem can be done in polynomial time. In particular, we prove that: Theorem 12. The M -vertex-stabilizer problem admits an efficient 2-approximation algorithm. Furthermore, if M is a maximum-weight matching, then it can be solved in polynomial time.
We first sketch the main ideas. Given a weighted graph G and a matching M , the algorithm searches for the structures which prevent G from being stable or M from being a maximum-weight matching. Among all such structures, the ones that can be tampered with are augmenting paths with at least one M -exposed endpoint and augmenting flowers with an M -exposed root. The algorithm then proceeds to delete these M -exposed vertices. If there exist augmenting paths whose endpoints are both M -exposed, the problem becomes hard because we do not know which endpoint is optimal to remove. In this case, the algorithm removes both endpoints, thus yielding a 2approximation. Note that this last case cannot happen if M is maximum-weight, and this explains why the problem becomes polynomial-time solvable. Kleinberg and Tardos [15] were the first to give a method of locating these structures. It involves solving a certain linear program using the dynamic programming algorithm of Aspvall and Shiloach [2]. We use a slightly different algorithm for finding these structures, which in fact, will allow us to prove a strengthened version of Theorem 12 (Theorem 13). Our algorithm relies on searching for augmenting walks of a certain length, via a slight modification of the dynamic programming algorithm given by Aspvall and Shiloach [2]. Using this as a subroutine, we design an algorithm for the M -vertex-stabilizer problem.

Finding augmenting walks
The first ingredient is an algorithm to find augmenting walks of a certain length. We say that a valid M -alternating uv-walk P of length at most k is optimal if for any other valid M -alternating uv-walk P ′ of length at most k, we have w( . Given a source vertex s and an integer k ∈ Z + , the algorithm searches for optimal valid alternating sv-walks of length at most k for all v ∈ V . The significance of optimality is as follows. Let P be an optimal valid alternating sv-walk returned by the algorithm. If P is augmenting, then we have found an augmenting sv-walk of length at most k. Otherwise, we can conclude that there are no augmenting sv-walks of length at most k by the optimality of P .
The inner workings of our algorithm is similar to the Grapevine algorithm given by Aspvall and Shiloach [2]. In their paper, the Grapevine algorithm is used as a subroutine to solve linear systems of the form Ax ≤ b, where each constraint contains at most 2 variables. They first constructed an auxiliary graph to model the relationship between variables and constraints. The Grapevine algorithm is then run on this auxiliary graph to compute lower and upper bounds of each variable.
We now give an overview of our algorithm. For every vertex v ∈ V , we define two variables y 1 (v) and y 2 (v). In iteration i, if v is M -exposed, we would like y 1 (v) to represent the quantity w(P \ M ) − w(P ∩ M ), where P is an optimal valid alternating sv-walk of length at most i. On the other hand, if v is M -covered, we would like y 2 (v) to represent the quantity w(P \ M ) − w(P ∩ M ), where P is an optimal valid alternating sv-walk of length at most i. We first initialize y 1 (s) = 0 and y 2 (s) = −∞ if s is M -covered, and y 1 (s) = y 2 (s) = 0 if s is M -exposed. For every other vertex v = s, we set y 1 (v) = y 2 (v) = −∞. At every iteration, each vertex v determines whether it could increase its y 1 (v) value by replacing it with y 2 (u) + w uv for some uv ∈ E \ M , and similarly, whether it could increase its y 2 (v) value by replacing it with y 1 (u) − w uv for some uv ∈ M . In a way, this is analogous to the Bellman-Ford algorithm for computing shortest paths. The main difference is that we are maintaining two variables for each vertex, instead of one. This ensures the walk we obtain is M -alternating and valid. Also, notice that we are adding the weights of unmatched edges and subtracting the weights of matched edges. This will give us our desired quantity w(P \ M ) − w(P ∩ M ).

Algorithm 3:
Optimal valid M -alternating sv-walks of length at most k 1 Initialize vectors y 1 , y 2 , z 1 , z 2 ∈ R n 2 if s is M -covered then In the algorithm, we take the maximum of the empty set to be −∞. For the analysis, we will use y i 1 (v) and y i 2 (v) to denote the value of y 1 (v) and y 2 (v) respectively at iteration i for all i < k. Note that y 0 1 (v) and y 0 2 (v) refer to the initial value received by y 1 (v) and y 2 (v) before the main "for" loop. The following lemmas verify our intuition. Proof. We start by proving the contrapositive of the first statement. Let v be an M -covered vertex where y 2 (v) is finite. We proceed by induction on k. We look at two base cases. When k = 1, is our desired walk. When k = 2, if y 2 (v) was updated in iteration 1, then this reduces to the previous case. Otherwise, y 2 (v) = y 0 2 (s) + w su − w uv for some uv ∈ M . Since y 0 2 (s) is finite, s is M -exposed and (s, u, v) is our desired walk. For the inductive hypothesis, assume the statement holds for some k ≥ 2. Consider the case k + 1. Let j be the last iteration in which y 2 (v) was updated, i.e. y 2 (v) = y j−1 1 (u) − w uv for some uv ∈ M . We may assume j > 2, otherwise we are back at the base cases. Since the update of y 2 (v) was triggered by the update of y 1 (u), we know that y 1 (u) was updated at iteration j − 1, i.e. y j−1 1 (u) = y j−2 2 (t) + w tu for some tu ∈ E \ M . Similarly, since the update of y 1 (u) was triggered by the update of y 2 (t), we know that y 2 (t) was updated at iteration j − 2 > 0. This implies that t is M -covered. As y j−2 2 (t) is finite and j − 2 < k, by the inductive hypothesis there exists a valid M -alternating st-walk of length at most j − 2. Appending (t, u, v) to this walk yields a valid M -alternating sv-walk of length at most j ≤ k + 1.
Next, we prove the second statement. Let v be an M -covered vertex where a valid M -alternating sv-walk of length at most k exists. Since the number of such walks is finite, there exists an optimal one. Among all such optimal walks, let P be the shortest one in terms of number of edges. We proceed by induction on k. We look at two base cases. When k = 1, P = (s, v) and y 2 (v) = −w sv = w(P \M )− w(P ∩ M ). When k = 2, if |E(P )| = 1 then this reduces to the previous case. Otherwise, P = (s, u, v) for some uv ∈ M and y 2 (v) = w su − w uv = w(P \ M ) − w(P ∩ M ). For the inductive hypothesis, assume the statement holds for some k ≥ 2. Consider the case k + 1. We may assume P has length exactly k + 1, otherwise by the inductive hypothesis we are done. Denote P = (v 0 , v 1 , . . . , v k+1 ) where v 0 = s and v k+1 = v. Then, P ′ = (v 0 , v 1 , . . . , v k−1 ) is an optimal valid M -alternating sv k−1 -walk of length at most k − 1. Since v k−1 is M -covered, by the inductive hypothesis we have y k−1 . For the purpose of contradiction, suppose otherwise. Then, Since y k 2 (v) is finite, by the first part of the lemma there exists a valid M -alternating sv-walk of length at most k. So by the inductive hypothesis, y k where Q is an optimal valid M -alternating sv-walk of length at most k. Note that w(Q \ M ) − w(Q ∩ M ) = w(P \M )−w(P ∩M ) because P is optimal. However, Q is shorter than P , which is a contradiction. Thus, we obtain y k

Lemma 9.
Let v be an M -exposed vertex. If there is no valid M -alternating sv-walk of length at most k, then y 1 (v) = −∞. Otherwise, there exists an optimal valid M -alternating sv-walk P of length at most k, and y 1 (v) = w(P \ M ) − w(P ∩ M ).
Proof. We start by proving the contrapositive of the first statement. Let v be an M -exposed vertex where y 1 (v) is finite. We proceed by induction on k. We look at two base cases. When k = 0, we have v = s and the empty path (s) is our desired walk. When k = 1, if y 1 (v) was never updated, then v = s and so this reduces to the previous case. Otherwise, y 1 (v) = y 0 2 (s) + w sv . Since y 0 2 (s) is finite, s is M -exposed and (s, v) is our desired walk. For the inductive hypothesis, assume the statement holds for some k ≥ 1. Consider the case k + 1. Let j be the last iteration in which y 1 (v) was updated, i.e. y 1 (v) = y j−1 2 (u) + w uv for some uv ∈ E \ M . We may assume j > 1, otherwise we are back at the base cases. Since the update of y 1 (v) was triggered by the update of y 2 (u), we know that y 2 (u) was updated at iteration j − 1 > 0. This implies that u is M -covered. As y j−1 2 (u) is finite and j − 1 ≤ k, by Lemma 8 there exists a valid M -alternating su-walk of length at most j − 1. Appending (u, v) to this walk yields a valid M -alternating sv-walk of length at most j ≤ k + 1.
Next, we prove the second statement. Let v be an M -exposed vertex where a valid M -alternating sv-walk of length at most k exists. Since the number of such walks is finite, there exists an optimal one. Among all such optimal walks, let P be the shortest one in terms of number of edges. We proceed by induction on k. We look at two base cases. When k = 0, P = (s) and y 1 (v) = 0 = w(P \ M ) − w(P ∩ M ). When k = 1, if |E(P )| = 0 then this reduces to the previous case. Otherwise, P = (s, v) and y 1 (v) = w sv = w(P \M )− w(P ∩ M ). For the inductive hypothesis, assume the statement holds for some k ≥ 1. Consider the case k + 1. We may assume P has length exactly k + 1, otherwise by the inductive hypothesis we are done. Denote P = (v 0 , v 1 , . . . , v k+1 ) where v 0 = s and v k+1 = v. Then, P ′ = (v 0 , v 1 , . . . , v k ) is an optimal valid M -alternating sv k -walk of length at most k. Since v k is M -covered, by Lemma 8 we have y k 2 (v k ) = w(P ′ \ M ) + w(P ′ ∩ M ). We also know y k 2 (v k ) + w v k v ≥ y k 2 (u) + w uv for all uv ∈ E \ M because P is optimal. We claim that . For the purpose of contradiction, suppose otherwise. Then Since y k 1 (v) is finite, by the first part of the lemma there exists a valid M -alternating sv-walk of length at most k. So by the inductive hypothesis, y k 1 (v) = w(Q \ M ) − w(Q ∩ M ) where Q is an optimal valid M -alternating sv-walk of length at most k. Note that w(Q \ M ) − w(Q ∩ M ) = w(P \M )−w(P ∩M ) because P is optimal. However, Q is shorter than P , which is a contradiction. Thus, we obtain y 1 (v) = y k 2 (v k ) + w v k v = w(P \ M ) − w(P ∩ M ).

The algorithm
The reason we look for augmenting walks is because of the following: Lemma 10. An augmenting uv-walk contains an augmenting uv-path, an augmenting cycle, an augmenting flower rooted at u or v, or an augmenting bi-cycle.
Proof. We first prove the following claim: Claim 9. If P is an alternating walk, then it can be decomposed into P = P 1 P 2 . . . P ℓ such that: (i) Every P i is an alternating path, an alternating cycle or a blossom.
(ii) There is no i such that P i and P i+1 are both alternating paths or blossoms.
Proof. Let P = (v 1 , v 2 , . . . , v t ) be an M -alternating walk. We proceed by induction on t. For the base case t = 2, P is an alternating path of length 1 as there are no loops in G. Suppose the lemma is true for t ≤ k for some k ≥ 2. Consider the case t = k + 1. We may assume P is not simple. Let j be the smallest index such that v j = v i for some i < j. Decompose P into P 1 = (v 1 , v 2 , . . . , v i ), P 2 = (v i , v i+1 , . . . , v j ) and P 3 = (v j , v j+1 , . . . , v t ). P 1 is a (possibly empty) alternating path while P 2 is an alternating cycle or a blossom. Since P 3 is an M -alternating walk with fewer edges, by the inductive hypothesis it can be decomposed into P 3 = P ′ 1 P ′ 2 . . . , P ′ ℓ where every P ′ i is an alternating path, an alternating cycle or a blossom. Moreover, there are no consecutive paths or blossoms in this decomposition. Note that P ′ 1 is not a blossom because P 3 starts with an edge in M . Thus, P = P 1 P 2 P ′ 1 P ′ 2 . . . P ′ ℓ is our desired decomposition.
Let P be an M -augmenting uv-walk. Using Claim 9, decompose P into P = P 1 P 2 . . . P k . If P i is an augmenting cycle for some i ∈ [k], then we are done. So we may assume that every alternating cycle in the decomposition is not augmenting. Note that P k is not an alternating cycle, otherwise P is not valid because it ends with an unmatched edge whose endpoints are M -covered. Let P ′ be the alternating uv-walk obtained by dropping all the alternating cycles in the decomposition. It is easy to see that P ′ is still augmenting. Repeat this process until we are left with an augmenting uv-walk P * = P * 1 P * 2 . . . P * ℓ such that every P i is an alternating path or a blossom. If P * 1 is a blossom, then u is M -exposed because the first edge of P * is not in M . Similarly, if P * ℓ is a blossom, then v is M -exposed because the last edge of P * is not in M . In both cases, since P * does not have any M -exposed intermediate vertices, we get u = v and ℓ = 1. This implies that P * is an augmenting blossom with base u, which is trivially an augmenting flower with root u. Thus, we may assume P 1 and P ℓ are alternating paths. If ℓ = 1, then P * is an augmenting uv-path.
We are now ready to present the algorithm for the M -vertex-stabilizer problem: Let S 1 denote the set of M -exposed vertices in G which are roots of augmenting flowers or endpoints of augmenting paths whose other endpoint is M -covered. Note that given a feasible instance, every M -vertex-stabilizer contains S 1 . We prove a stronger statement than Theorem 12: Theorem 13. The M -vertex-stabilizer problem admits an efficient 2-approximation algorithm. Furthermore, if M is a maximum-weight matching in G \ S 1 , then it is polynomial-time solvable.
Proof. Let G be the input graph and M be a matching in G. Let R be the set of M -exposed vertices in G, and let R ′ be any subset of R. If G contains an augmenting path whose endpoints are M -covered or an augmenting cycle, then it is also present in G \ R ′ . Since M is not a maximumweight matching in G \ R ′ , R ′ is not an M -vertex-stabilizer. Similarly, if G contains an augmenting flower whose root is M -covered or an augmenting bi-cycle, then it is also present in G \ R ′ . By Theorem 1, G \ R ′ is not stable. In these two cases, there is no M -vertex-stabilizer. Since S ⊆ R and w(M ) < v f (G \ S), the algorithm will return "INFEASIBLE".
Thus, we may assume G does not contain any of the aforementioned structures. The only structure which can make G unstable is an augmenting flower whose root is M -exposed. In addition, the only structure which can prevent M from being a maximum-weight matching in G is an augmenting path with at least one M -exposed endpoint.