Title
The Maximum-Weight Stable Matching Problem: Duality and
Efficiency
Author(s)
Chen, X; Ding, G; Hu, X; Zang, W
Citation
SIAM Journal on Discrete Mathematics, 2012, v. 26 n. 3, p.
1346–1360
Issued Date
2012
URL
http://hdl.handle.net/10722/164177
Rights
Creative Commons: Attribution 3.0 Hong Kong License
Provided by HKU Scholars HubTHE MAXIMUM-WEIGHT STABLE MATCHING PROBLEM:
DUALITY AND EFFICIENCY∗
XUJIN CHEN†, GUOLI DING‡, XIAODONG HU†, AND WENAN ZANG§
Abstract. Given a preference system (G, ≺) and an integral weight function defined on the edge set ofG (not necessarily bipartite), the maximum-weight stable matching problem is to find a stable matching of (G, ≺) with maximum total weight. In this paper we study this NP -hard problem using linear programming and polyhedral approaches. We show that the Rothblum system for defining the fractional stable matching polytope of (G, ≺) is totally dual integral if and only if this polytope is integral if and only if (G, ≺) has a bipartite representation. We also present a combinatorial polynomial-time algorithm for the maximum-weight stable matching problem and its dual on any preference system with a bipartite representation. Our results generalize Kir´aly and Pap’s theorem on the maximum-weight stable-marriage problem and rely heavily on their work.
Key words. stable matching, linear system, integral polytope, total dual integrality, polynomial-time algorithm
AMS subject classifications. 90C10, 90C27, 90C57 DOI. 10.1137/120864866
1. Introduction. Let G = (V, E) be a graph. For each v ∈ V , let δ(v) be the
set of all edges incident withv and let ≺v be a strict linear order onδ(v). We call ≺v the preference of v and say that v prefers e to f if e ≺v f. Let ≺ be the collection of all these≺v forv ∈ V . We call the pair (G, ≺) a preference system. In particular, (G, ≺) is referred to as a bipartite preference system if G is a bipartite graph. For convenience, we write e v f and say that e dominates f at vertex v if e ≺v f or e = f. An edge e is said to dominate an edge f if they have a common end v such that e vf. Let M be a matching of G. We call M stable if each edge of G is dominated by
some edge inM. The stable matching problem (SMP) is to determine if G contains a stable matching. The origin of this problem can be traced back to 1962 when Gale and Shapley [4] proposed the well-known stable marriage problem (which corresponds to the case whereG is a bipartite graph); since then the SMP and its variants have been subjects of extensive research; see, for instance, the books by Knuth [9], Gusfield and Irving [6], Roth and Sotomayor [10], and the references therein. Gale and Shapley [4] proved that for the stable marriage problem a stable matching always exists. Irving [7] devised the first polynomial-time algorithm for finding a stable matching of (G, ≺), if any, or declaring that no such matching exists, whereG is not necessarily bipartite. ∗Received by the editors February 6, 2012; accepted for publication (in revised form) July 16,
2012; published electronically September 13, 2012. http://www.siam.org/journals/sidma/26-3/86486.html
†Institute of Applied Mathematics, Chinese Academy of Sciences, Beijing 100190, China
([email protected], [email protected]). The first author was supported in part by NSF of China under grant 10771209 and the Chinese Academy of Sciences under grant kjcx-yw-s7. The third au-thor was supported in part by NSF of China under grants 11021101, 10771209, and 10928102 and the Chinese Academy of Sciences under grant kjcx-yw-s7.
‡Mathematics Department, Louisiana State University, Baton Rouge, LA 70803 (ding@math.
lsu.edu). This author was supported in part by NSA grant H98230-10-1-0186 and NSF grant DMS-1001230.
§Department of Mathematics, University of Hong Kong, Hong Kong, China (wzang@maths.
hku.hk). This author was supported in part by the Research Grants Council of Hong Kong, Macau Young Scholars Collaborative Research Fund of the National Science Foundation of China, and Seed Funding for Basic Research of HKU.
1346
With an attempt to improve Irving’s algorithm [7], Tan [14] obtained a necessary and sufficient condition for the existence of a (perfect) stable matching in terms of forbidden structures, the so-called stable partitions with odd parties.
The present paper is devoted to the maximum-weight stable matching problem (MWSMP), which takes a preference system (G, ≺) and an integral weight function w defined on E as input, and aims to find a stable matching of (G, ≺) with maximum total weight as output, whereG = (V, E). As shown by Feder [3], this problem is NP -hard in general, so there is no polynomial-time algorithm for solving it exactly unless NP = P . In this paper we study the MWSMP using linear programming and poly-hedral approaches, which were first applied to stable matchings by Vande Vate [16] and Rothblum [12]. It was discovered by Rothblum [12] that the convex hull of stable matchings of a bipartite preference system can be described by a very simple system of linear inequalities; this polyhedral description was later extended and further de-veloped in different aspects by Roth, Rothblum, and Vande Vate [11], Abeledo and Rothblum [1], Teo and Sethuraman [15], and Kir´aly and Pap [8]. The objective of this paper is to characterize all preference systems for which the above-mentioned Roth-blum system is totally dual integral (TDI) and to present a combinatorial polynomial-time algorithm for the MWSMP and its dual on these preference systems.
We introduce some notation and terminology before proceeding. As usual, letR (resp.,R+) be the set of all (resp., nonnegative) real numbers, and letZ (resp., Z+) be the set of all (resp., nonnegative) integers. A subsetP of Rn is called a polytope if it is the convex hull of finitely many vectors inRn. A pointx in P is called a vertex or an extreme point if there exist no distinct pointsy and z in P and α ∈ (0, 1) such that x = αy + (1 − α)z. It is well known that P is actually the convex hull of its vertices and that there exists a linear systemAx ≤ b such that P = {x : Ax ≤ b}. We call P integral if each of its vertices is an integral vector. By a theorem in mathematical programming, P is integral if and only if the maximum in the linear programming duality equation
(1.1) max{wTx : Ax ≤ b} = min{yTb : yTA = wT, y ≥ 0}
has an integral optimal solution for every integral vectorw for which the optimum is finite. If, instead, the minimum in the equation enjoys this property, then the system Ax ≤ b is called totally dual integral (TDI). The model of TDI systems plays a crucial role in combinatorial optimization and serves as a general framework for establishing various min-max theorems because, as shown by Edmonds and Giles [2], total dual integrality implies primal integrality: if Ax ≤ b is TDI and b is integral, then P is integral.
Let (G, ≺) be a preference system, where G = (V, E). For each e ∈ E, let ϕ(e) denote the set of all edges ofG that dominate e, and let ψ(e) denote the set of all edges ofG that are dominated by e. For each c ∈ REandS ⊆ E, let c(S) =s∈Sc(s). As observed by Abeledo and Rothblum [1], the incidence vectors of stable matchings of (G, ≺) are precisely integral solutions x ∈ ZE of the following inequalities:
x(δ(v)) ≤ 1 ∀ v ∈ V, (1.2) x(ϕ(e)) ≥ 1 ∀ e ∈ E, (1.3) x(e) ≥ 0 ∀ e ∈ E. (1.4)
LetSM(G, ≺) denote the convex hull of incidence vectors of all stable matchings of (G, ≺), and let F SM(G, ≺) denote the set of all vectors x ∈ REsatisfying (1.2)−(1.4).
Clearly,SM(G, ≺) ⊆ F SM(G, ≺). In the literature, SM(G, ≺) and F SM(G, ≺) are called the stable matching polytope and fractional stable matching polytope of (G, ≺), respectively.
For eachx ∈ F SM(G, ≺), set • E+(x) = {e ∈ E : xe> 0},
• Eα(x) = {e ∈ E : xe=α} for any α ∈ R, and
• T (x) = {uv ∈ E : ∃ e, f ∈ E+(x) such that uv ue and uv v f}.
Notice thatT (x) consists of every edge uv of G that dominates some edges in E+(x) at bothu and v. Let GT (x)denote the subgraph ofG induced by all edges in T (x). As we shall see,GT (x)can be used to characterize all vertices x of F SM(G, ≺). A cycle C = v1v2. . . vkv1ofG is said to have a cyclic preference in (G, ≺) if vi−1vivi vivi+1
for all 1≤ i ≤ k or vi+1vivivivi−1 for all 1≤ i ≤ k, where vk+1=v1. Moreover, a vectory is called half-integral if all coordinates of 2y are integral.
Letπ(G, ≺) stand for the system of linear inequalities (1.2)−(1.4). Rothblum [12] proved that the stable matching polytope of a bipartite preference system (G, ≺) is completely determined byπ(G, ≺).
Theorem 1.1 (Rothblum [12]). Let (G, ≺) be a bipartite preference system. Then
SM(G, ≺) = F SM(G, ≺).
For an arbitrary preference system, Abeledo and Rothblum [1] showed that the vertices of its fractional stable matching polytope are always half-integral; they also gave a description of all vertices of this polytope.
Theorem 1.2 (Abeledo–Rothblum [1]). Let (G, ≺) be a preference system and letx be a point in F SM(G, ≺). Then x is a vertex of F SM(G, ≺) if and only if
(i) x is half-integral and
(ii) each component of GT (x) having edges in E1/2(x) contains at least one odd cycle.
In [8], Kir´aly and Pap obtained the following strengthening of Theorem 1.1. Theorem 1.3 (Kir´aly–Pap [8]). Let (G, ≺) be a bipartite preference system. Then π(G, ≺) is TDI.
Let (G, ≺) be a preference system with G = (V, E). Recall that for each v ∈ V , its preference≺vis a strict linear order onδ(v). Let N(v) be the neighborhood of v. With a slight abuse of notation, we also view≺vas a strict linear order onN(v), such that a ≺vb (that is, v prefers a to b) if and only if va ≺vvb. Thus we can naturally associate a preference list with v, which lists its neighbors in the increasing order of ≺v. Note that this list is empty ifN(v) = ∅. The preference table of (G, ≺) consists of
the preference lists of all vertices ofG and is denoted by T (G, ≺) or simply by T (G) when≺ is clear from the context. We use fG(v) or fT(G)(v) (resp., lG(v) or lT(G)(v)) to denote the first (resp., last) vertex onv’s preference list. A pair of vertices {u, v} is said to belong toT (G) if uv ∈ E. By deleting a pair {u, v} from T (G) we mean the op-eration of deletingu from v’s preference list and deleting v from u’s preference list. For each subgraphK of G, let ≺K be the projection of≺ onto K. Clearly, (K, ≺K) is also a preference system. For notational simplicity, we write (K, ≺) for (K, ≺K) hereafter. In [7], Irving devised a two-phase polynomial-time algorithm for finding a stable matching of (G, ≺), if any, or declaring that no such matching exists. It is worthwhile pointing out that Irving’s original algorithm was intended for the so-called stable roommates problem, but it can be extended to the general SMP with only a slight modification (see subsection 4.5.2 of Gusfield and Irving [6]). Now let us present Phase 1 of his algorithm, which is actually a proposal sequence and will play an important role in our proofs.
Phase 1 of Irving’s algorithm (Phase I) description: Initially, the
prefer-ence tableT is set to T (G, ≺), and every vertex is set free. Each successive proposal in this phase is made by some free vertex v with nonempty preference list in T to fT(v), who receives the proposal. As a result of this proposal, v ceases to be free
and becomes semiengaged to fT(v) and fT(v) rejects any vertex who was previously semiengaged to it; the rejected vertex (if any) is reset free. Moreover,T is updated by deleting all pairs{fT(v), u} in T with v ≺fT(v)u. The phase continues as long as some free vertex has a nonempty preference list (and can therefore make a further proposal).
To facilitate better understanding of this phase, we first remark that the semien-gagement, as its name implies, is not symmetric. At the point when v becomes semiengaged to fT(v), this fT(v) may be free or may be semiengaged to someone else; second, there are no “immediate rejections” in the algorithm; such rejections are preempted by the deletion of pairs from the preference table. To be precise, when v becomes semiengaged to fT(v), all pairs {fT(v), v} in that table such that fT(v)
prefersv to v are deleted, so thatv becomes the last entry on fT(v)’s list and fT(v) becomes the first on v’s list. If some other u was previously semiengaged to fT(v), then it can be shown that this semiengagement is broken, the pair{fT(v), u} is among those deleted, andu is set free as a result (see p. 167 of Gusfield and Irving [6]).
The preference table produced by Phase I will be referred to as the phase-1 table. Although some nondeterminism is involved in Phase I, the following statement (Lemma 4.2.1 in Gusfield and Irving [6]) asserts that it is of no consequence.
Lemma 1.4. For any given preference system, all possible executions of Phase I yield the same phase-1 table.
LetH be a spanning subgraph of G. We call (H, ≺) the representation of (G, ≺) if the preference tableT (H, ≺) is precisely the phase-1 table of (G, ≺).
Throughout this paper, letP(G, ≺, w) stand for the LP relaxation of the MWSMP
Maximize wTx
(1.5)
subject to x ∈ F SM(G, ≺)
and letD(G, ≺, w) stand for its dual
Minimize y(V ) − z(E)
subject to y(u) + y(v) − z(ψ(uv)) ≥ w(uv) ∀ uv ∈ E,
(1.6)
y(v) ≥ 0 ∀ v ∈ V,
(1.7)
z(e) ≥ 0 ∀ e ∈ E.
(1.8)
Moreover, we propose to call an integral feasible solution (y, z) of D(G, ≺, w) a stable cover,1 whose cost is defined to bey(V ) − z(E).
GivenC = {C1, C2, . . . , Ck} such that
• each Ci is a vertex of G or an edge of G or a cycle with cyclic preference in (G, ≺),
• each vertex of G is contained in some Ci, and • C1, C2, . . . , Ck are pairwise vertex-disjoint,
we definexC ∈ RE as xC(e) = ⎧ ⎨ ⎩ 1 ife ∈ C,
1/2 if e is contained in some cycle in C,
0 otherwise
(1.9)
1This concept is in some sense very similar tow-stable set defined by Schrijver [13].
for all e ∈ E and call C a semistable partition of (G, ≺) if xC ∈ F SM(G, ≺). The partition is so named because, as stated before, Tan [14] characterized all preference systems with (perfect) stable matchings in terms of forbidden structures, the so-called stable partitions with odd parties. (To be specific, C is called a stable partition of (G, ≺) if for any e ∈ E with xC(e) = 0, at least one end v of e satisfies xC(ϕ(e) ∩ δ(v)) ≥ 1, and a member Ci ofC is called an odd party if Ci has an odd cardinality.) Obviously, every stable partition is a semistable partition, but the converse need not hold. The other motivation for semistable partitions is given as follows: by Theorem 3.4 in Abeledo and Rothblum [1], ifx is a half-integral point in F SM(G, ≺), then the set of edges inE1/2(x) forms vertex-disjoint cycles in G, each having cyclic preferences. Combining this observation with Theorem 1.2(i), we see that every vertex ofF SM(G, ≺) naturally corresponds to a semistable partition of (G, ≺). Therefore, to ensure the integrality ofF SM(G, ≺), we may turn to eliminating certain types of semistable partitions of (G, ≺).
SetE(C) = ∪ki=1E(Ci) and
EC ={uv ∈ E : ∃ e1, e2, f1, f2∈ E(C) such that
e1uuv ue2andf1v uv vf2}.
(1.10)
Let GC be the subgraph of G induced by all edges in EC. Now we are ready to present the main result of this paper, which contains a complete characterization of all preference systems (G, ≺) with TDI π(G, ≺).
Theorem 1.5. Let (G, ≺) be a preference system with G = (V, E), and let (H, ≺) be its representation. Then the following statements are equivalent:
(i) H is a bipartite graph;
(ii) GC is bipartite for every semistable partitionC of (G, ≺); (iii) SM(G, ≺) = F SM(G, ≺); and
(iv) π(G, ≺) is TDI.
Moreover, for any G as described in (i) and any w ∈ ZE, a maximum-weight stable matching and a minimum-cost stable cover of (G, ≺, w) can be found in O(m2logm) time, where m = |E|.
Five remarks may help to put our theorem in proper perspective: First, The-orem 1.5 clearly generalizes the above Kir´aly–Pap theorem. Second, Theorem 1.2 contains a complete characterization of all preference systems (G, ≺) whose fractional stable matching polytope is integral, that is, SM(G, ≺) = F SM(G, ≺). The equiv-alence of (ii) and (iii) in our theorem also serves this purpose, but the bipartition requirement in our structural description is different from the negation of (ii) in The-orem 1.2. Third, from the definition of TDI system and the afThe-orementioned Edmonds– Giles theorem [2], we see that ifπ(G, ≺) is TDI, then both D(G, ≺, w) and P(G, ≺, w) have integral optimal solutions for anyw ∈ ZE. Thereby we get a structural charac-terization of the following min-max relation on stable matchings.
Corollary 1.6. Let (G, ≺) be a preference system with G = (V, E), and let (H, ≺) be its representation. Then the maximum total weight of a stable matching of (G, ≺) is equal to the minimum cost of a stable cover of (G, ≺) for every w ∈ ZE if and only if GC is bipartite for every semistable partitionC of (G, ≺) if and only if H is bipartite.
We point out that this min-max relation closely resembles K˝onig’s min-max the-orem on bipartite matching and the min-max thethe-orem on weighted bipartite edge covers; see Theorems 16.2 and 19.5 in Schrijver [13]. Fourth, in Tan’s characteriza-tion [14] of all preference systems with stable matchings, the forbidden structures are
stable partitions with odd parties, while the obstructions to our min-max relation are semistable partitions with odd cycles. So these two characterizations are essentially in the same spirit. (Since any integral optimal solution to the MWSMP is a solution to the corresponding SMP, and since the MWSMP isNP -hard while the SMP is solv-able in polynomial time, presumably more graphical structures should be excluded in our study than in Tan’s characterization.) Finally, since (H, ≺) can be produced by Phase I in O(m) time, Theorem 1.5 yields a linear-time algorithm for recognizing the scenarios addressed in (ii)−(iv) by testing if H is a bipartite graph.
A linear systemAx ≤ b is called totally dual half-integral (TDI/2) if the minimum in the LP-duality equation (1.1) has a half-integral optimal solution for every integral vector w for which the optimum is finite. It is easy to verify that Ax ≤ b is TDI/2 if and only if Bx ≤ b is TDI, where B = A/2. Thus, from the above Edmonds–Giles theorem [2], we deduce that ifAx ≤ b is TDI/2 and b is integral, then the maximum in (1.1) also has a half-integral optimal solution for every integral vectorw for which the optimum is finite. Recall from Theorem 1.2 that for any preference system, all vertices of the fractional stable matching polytope are half-integral. Clearly, our next theorem strengthens this result.
Theorem 1.7. Let (G, ≺) be a preference system with G = (V, E). Then π (G, ≺) is TDI/2. Moreover, for any w ∈ ZE, a half-integral optimal solution to P(G, ≺, w) and a half-integral optimal solution toD(G, ≺, w) can be found in O(m2logm) time, wherem = |E|.
2. Preliminaries. In our proofs, we shall use the following charming property
enjoyed by stable matchings, which was first exhibited by Abeledo and Rothblum [1] (see Theorem 4.2).
Theorem 2.1 (Abeledo–Rothblum [1]). For any preference system (G, ≺), the vertex set ofG can be partitioned into V0andV1such that for everyx ∈ F SM(G, ≺), there holds x(δ(v)) = i for all v ∈ Vi andi = 0, 1. (So all vertices in V1are matched in every stable matching of (G, ≺) and no vertex in V0 is matched in any stable matching.)
Now let us exhibit some properties enjoyed by the representation of a preference system. As usual, we useV (K) and E(K) to denote the vertex set and edge set of a graphK, respectively.
Lemma 2.2. Let (G, ≺) be a preference system with G = (V, E), let (H, ≺) be its representation, and let V1 be the set of all nonisolated vertices of H. Then the following statements hold:
(i) (G, ≺) and (H, ≺) have the same set of stable matchings. Besides, V1consists of exactly the matched vertices in every stable matching (if any) of (G, ≺) and (H, ≺).
(ii) For any distinctu, v ∈ V , u = fH(v) if and only if v = lH(u).
(iii) An edgeuv ∈ E − E(H) if and only if u ∈ V1 prefers lH(u) to v or v ∈ V1 preferslH(v) to u.
(iv) For each v ∈ V1, if fH(v) = lH(v), then fH(fH(v)) = v.
(v) For each v ∈ V1, let Gv be the graph obtained from G by deleting the edge vlG(v). If H ⊆ Gv, then (H, ≺) is also the representation of (Gv, ≺).
Proof. The first three statements can all be found in Gusfield and Irving [6]: the first half of (i) is exactly the same as Lemma 4.2.3(i), the second half of (i) is contained in Theorem 4.5.2, and statements (ii) and (iii) are the subjects of Lemma 4.2.2.
To justify (iv), observe from Phase I that every vertex u ∈ V1 has to propose to fH(u) at some step and remains semiengaged to fH(u) from that step onwards,
otherwise the pair{u, fH(u)} would get deleted in the algorithm at some other step and henceufH(u) would not be an edge of H, a contradiction. Assume on the contrary that fH(fH(v)) = v while fH(v) = lH(v) for some v ∈ V1. Then right after fH(v) proposed tov, the pair {v, lH(v)} would get deleted in Phase I because by hypothesis fH(v) ≺vlH(v), contradicting the fact that vlH(v) ∈ E(H). So (iv) is established.
To prove (v), note that since vlG(v) is not an edge of H and since v ∈ V1, we havevfH(v) ≺vvlG(v). Thus v has never proposed to lG(v) in Phase I.
Claim. There exists an execution of Phase I in whichlG(v) has never proposed tov.
Assume the contrary: lG(v) has to propose to v in all possible executions of Phase I. Let us consider an execution, denoted by (α), where the step at which lG(v) proposes tov is as late as possible. Observe that after lG(v) proposed to v, nothing was done except for the semiengagement oflG(v) to v. Moreover, no more proposal was possible. (Otherwise, letk be the index such that the kth proposal in (α) is the one made bylG(v) to v, and let (β) be an execution whose first k − 1 proposals are exactly the same as those of (α), while the kth proposal is the (k + 1)st proposal of (α). Then we can see that either lG(v) has never proposed to v in (β) or the step at whichlG(v) proposes to v in (β) is later than that in (α), so we reach a contradiction in either case.) Thus execution (α) terminates right after the proposal made by lG(v) to v. It follows that (α) yields a phase-1 table which contains {v, lG(v)} as a pair, contradicting Lemma 1.4 because vlG(v) is not an edge of H. Thus the claim is justified.
Let (γ) be an execution of Phase I as claimed above. Since v and lG(v) have never proposed to each other in (γ) and since (γ) terminates with T (H, ≺) as the phase-1 table, (γ) naturally corresponds to an execution of Phase I on Gv which terminates withT (H, ≺) as the phase-1 table as well. It follows that (H, ≺) is also the representation of (Gv, ≺). Hence (v) holds.
In view of Lemma 2.2(ii), we introduce the following notation: F (H) = {vfH(v) : v ∈ V1} = {vlH(v) : v ∈ V1}.
(2.1)
Let ˆH be the subgraph of H induced by all edges in F (H). Thus ˆH = (V1, F (H)). Throughout we use to denote the collection of all preference systems (G, ≺) such that GC is bipartite for every semistable partitionC of (G, ≺). (Recall the definition above Theorem 1.5.)
Lemma 2.3. Let G, H, and V1 be as given in Lemma 2.2, let F (H) and ˆH be as defined above, and let V0=V − V1. Then the following statements hold:
(i) ˆH is the disjoint union of some edges and cycles, such that each of these cycles has a cyclic preference in (G, ≺).
(ii) LetD be the set of all edges and cycles as specified in (i). Then each edge in E(H) − F (H) (if any) has both ends on cycles in D.
(iii) Let C be obtained from D by adding all vertices in V0 as elements. Then C is a semistable partition of (G, ≺).
(iv) H\V0=GC, which implies that H is a bipartite graph if (G, ≺) ∈ . Proof. To justify (i), note that by Lemma 2.2(ii), the maximum degree of ˆH is at most two and every cycle in ˆH has a cyclic preference in (G, ≺). If the assertion fails, then ˆH would contain a longest induced path P = v1v2v3. . . vk with k ≥ 3. Lemma 2.2(ii) allows us to assume thatfH(vi) =vi−1andlH(vi) =vi+1fori = 2, 3, . . . , k −1. ThusfH(v2) =v1 = v3=lH(v2). By Lemma 2.2(iv) (withv2in place ofv), we have v2 = fH(fH(v2)) =fH(v1). Since v1fH(v1) is contained inF (H), it is an edge of ˆH.
Hence the degree ofv1 in ˆH is precisely two, contradicting the assumption that P is a longest induced path in ˆH. So (i) holds.
To justify (ii), letuv ∈ E(H) − F (H). From (2.1), we deduce that ufH(u) ≺u uv ≺uulH(u) and vfH(v) ≺vuv ≺v vlH(v). Thus fH(u) = lH(u) and fH(v) = lH(v).
By definition, bothu and v have degree two in ˆH. Hence (ii) follows instantly from (i). To justify (iii), recall (1.9) and (i). Clearly x = xC satisfies (1.2) and (1.4). It remains to show that x satisfies (1.3), that is, x(ϕ(e)) ≥ 1 for any e ∈ E. To this end, let e = uv. For e ∈ F (H), by (2.1) we may assume that v ∈ V1 and u = lH(v). Since vfH(v) v vlH(v) = e, we have x(ϕ(e)) ≥ x(e) = 1 if e ∈ C and
x(ϕ(e)) ≥ x(e) + x(vfH(v)) = 1/2 + 1/2 = 1 otherwise. For e ∈ E(H) − F (H),
it follows from (ii) that x(ϕ(e)) ≥ x(ufH(u)) + x(vfH(v)) = 1/2 + 1/2 = 1. For e ∈ E − E(H), by Lemma 2.2(iii) there exists t ∈ V1∩ {u, v} such that tl
H(t) ≺te,
yieldingx(ϕ(e)) ≥ x(δ(t) ∩ F (H)) = 1. So x satisfies (1.3) as well. By definition, C is a semistable partition of (G, ≺). This proves (iii).
To justify (iv), we appeal to Lemma 2.2(iii): an edgeuv of G is contained in H if and only ifufH(u) uuv uulH(u) and vfH(v) v uv vvlH(v). In view of (i), (iii), and (1.10), we obtainE(H) = EC. So (iv) is established.
Our next lemma implies that Vi for i = 0, 1 involved in Lemma 2.3 is precisely the same as that in Theorem 2.1.
Lemma 2.4. Let G, H, V0, and V1 be as specified in the above two lemmas. Then for everyx ∈ F SM(G, ≺), the following statements hold:
(i) x(δ(v)) = i for every v ∈ Vi andi = 0, 1 and
(ii) x(E − E(H)) = 0, which implies that x|E(H)∈ F SM(H, ≺).
Proof. LetC be the semistable partition of (G, ≺) as specified in Lemma 2.3(iii). Since xC ∈ F SM(G, ≺), from (1.9) we deduce that xC(δ(v)) = i for i = 0, 1 if and only ifv ∈ Vi. Thus (i) follows from Theorem 2.1.
Assume on the contrary that x(uv) > 0 for some x ∈ F SM(G, ≺) and uv ∈ E − E(H); subject to this, we further assume that no pair {r, s} with x(rs) > 0 had been deleted in Phase I before{u, v}. Renaming u and v if necessary, we may suppose{u, v} was deleted from the preference table T because u received a proposal from vertex t. From Phase I we see that ut ≺u uv. In view of the choice of uv, no edge inδ(t) ∩ {e ∈ E : x(e) > 0} had been deleted at the step when t proposed to u. So ut dominates all edges in δ(t) ∩ {e ∈ E : x(e) > 0} in (G, ≺). It follows that x(ϕ(ut)) ≤ x(δ(u)) − x(uv). By (1.2), we have x(δ(u)) ≤ 1, which implies x(ϕ(ut)) ≤ 1 − x(uv) < 1, contradicting (1.3) for x ∈ F SM(G, ≺). Thus (ii) also holds.
We shall establish the main result of this paper by an induction method; the following statement will be used to dictate the induction step.
Lemma 2.5. Let (G, ≺) be a preference system with G = (V, E), and let (H, ≺) be its representation with E − E(H) = ∅. Then G has three distinct vertices r, s, t, such that fG(r) = s ∈ V1,lG(s) = t, and st ∈ E − E(H).
Proof. Set F = {vfG(v) : v ∈ V and N(v) = ∅}. If F ⊆ E(H), then Phase I consists of|F | proposals resulting in no rejections and terminates with F (H) = F . By Lemma 2.2(iii), there exists an edgesu ∈ E−E(H) such that s ∈ V1andslH(s) ≺ssu. Set r = lH(s) and t = lG(s). Then sr ≺s su s st. From the definition of lH(s), we see thatst ∈ E − E(H). By Lemma 2.2(ii), s = fH(r). As F ⊆ E(H), we have s = fG(r). Thus r, s, t are as desired, and hence we may assume that F − E(H) = ∅.
SetJ = {v ∈ V : vfG(v) ∈ F − E(H)}. Let us consider an execution of Phase I in which every free vertexv in J has the priority to propose to fG(v) who is still on v’s
preference list (breaking ties arbitrarily). Then, under the assumptionF −E(H) = ∅, some vertex inJ would certainly be rejected by its most preferred neighbor in G at some step. Suppose the earliest rejection happened when a vertexv ∈ J was rejected by s = fG(v) upon receiving a proposal from some r ∈ V − {v}. Since no vertex in J had been rejected before, no pair which corresponds to an edge in F had been deleted, and hence the proposal made by r was to s = fG(r), which implies that fG(r) = fG(v) and {rs, vs} ⊆ δ(s) ∩ F . Since s rejected v due to the proposal made byr, we obtain sr ≺ssv sslG(s). From the description of Phase I, it can be seen that if a vertex receives a proposal in an execution, then it belongs to V1. Hence s ∈ V1. Sett = lG(s). Clearly r, s, t are as desired.
3. Proofs of theorems. We break the proof of Theorem 1.5 into a series of
lemmas.
Lemma 3.1. Let (G, ≺) be a preference system. If F SM(G, ≺) = SM(G, ≺), then (G, ≺) ∈ .
Proof. Let C be a semistable partition of (G, ≺). We aim to prove that GC is a bipartite graph. Since xC ∈ F SM(G, ≺) (see (1.9)), by hypothesis we further have xC ∈ SM(G, ≺). Therefore there exist stable matchings M(i)of (G, ≺), i = 1, 2, . . . , k,
such thatxC is a convex combination of the incidence vectorsx(i) ofM(i). It follows that ∪ki=1M(i) =E(C). In view of Theorem 2.1, the vertex subsets of G matched by all M(i) are the same, so each M(i) is a perfect matching of K, the subgraph of G induced by all edges inE(C), which in turn implies that all cycles in C are even. From (1.10), it can be seen that
E(K) = E(C) = {vfGC(v) : v ∈ V (K)} = {vlGC(v) : v ∈ V (K)}.
(3.1)
Let W1 be the independent set inK such that M(1) ={vfGC(v) : v ∈ W1} and let W2=V (K) − W1. As xC ∈ F SM(G, ≺), we deduce that 2xC− x(1) is the incidence vector of the stable matching{vfGC(v) : v ∈ W2} of (G, ≺). So we may assume that M(2) ={vf
GC(v) : v ∈ W2} and xC = 12(x(1)+x(2)). If some edgeuv ∈ EC has both
ends in Wi for i = 1 or 2, then by (3.1) the edges in M(3−i) incident withu and v are ulGC(u) and vlGC(v), respectively, neither dominating uv, which contradicts the stability ofM(3−i). Thus each edge in GC has one end inW1 and the other inW2, and hence GC is a bipartite graph, as desired.
Lemma 3.2. Let (G, ≺) be a preference system with a bipartite representation (H, ≺) (that is, H is bipartite). Then π(G, ≺) is TDI.
We present two proofs of this lemma; the first one, discovered by Tam´as Kir´aly, is shorter but does not yield a polynomial-time algorithm for the minimum-cost stable cover problem, while the second is the backbone of the subsequent Algorithm 1.
Kir´aly’s proof is based on the following technical lemma.
Lemma 3.3. Let
(3.2) Ax + B¯x ≤ b, x ≥ 0, ¯x ≥ 0
and
(3.3) Ax ≤ b, x ≥ 0
be two linear systems. Suppose ¯x ≡ 0 for all feasible solutions of (3.2). If (3.3) is TDI, then so is (3.2).
Proof. Let w (resp., ¯w) be an arbitrary integral vector with the same length as x (resp., ¯x). By hypothesis, (3.3) is a TDI system, so the linear program min{yTb :
yTA ≥ wT, y ≥ 0} has an integral optimal solution y∗. Letc be the vector obtained
from ¯w − BTy∗by replacing each negative entry with 0. Thenc ≥ ¯w − BTy∗. As the optimal value of the linear program
max{0Tx + cTx : x and ¯x satisfy (3.2)}¯
is zero, its dual has an optimal solution ¯y satisfying ¯yTA ≥ 0, ¯yTB ≥ cT, ¯y ≥ 0, and ¯
yTb = 0. This zero optimal value and the fact c ≥ 0 allow us to assume that ¯y is
integral. (Otherwise replace ¯y with k¯y for some positive integer k.) Set ¯y∗=y∗+ ¯y. Clearly, ¯y∗ is integral and satisfies
(¯y∗)TA ≥ (y∗)TA ≥ wT, (¯y∗)TB ≥ (y∗)TB + cT ≥ ¯wT, ¯y∗≥ 0, and (¯y∗)Tb = (y∗)Tb.
(3.4)
Since ¯x ≡ 0 for all feasible solutions of (3.2), and y∗ is the optimal solution to the dual of max{wTx : x satisfies (3.3)}, we deduce that
max{wTx + ¯wTx : x and ¯x satisfy (3.2)} = max{w¯ Tx : x satisfies (3.3)} = (y∗)Tb, which together with (3.4) implies that ¯y∗ is an integral optimal solution to the dual of max{wTx + ¯wTx : x and ¯x satisfy (3.2)}, and hence (3.2) is a TDI system.¯
Kir´aly’s proof of Lemma 3.2. Let G = (V, E). Write π(G, ≺) as Ax|E(H) + Bx|E−E(H) ≤ b, x|E(H) ≥ 0, x|E−E(H) ≥ 0, where the columns of A and B are
indexed by edges inE(H) and in E − E(H), respectively, and b|V = 1,b|E=−1. By Lemma 2.4(ii), we have
x|E−E(H)≡ 0 for every feasible solution x ∈ RE to
Ax|E(H)+Bx|E−E(H)≤ b, x|E(H)≥ 0, x|E−E(H)≥ 0.
(3.5)
Let w be an arbitrary vector in ZE(H), let L = V ∪ E(H), and let C be the submatrix ofA formed by rows corresponding to elements in L. With a slight abuse of the notation, put x = x|E(H). Applying Theorem 1.3 to the bipartite preference system (H, ≺), we see that Cx ≤ b|L, x ≥ 0 is a TDI system. So max{wTx : Cx ≤ b|L, x ≥ 0} and its dual have integral optimal solutions x∗ andy∗, respectively. By
Lemma 2.2(i),x∗ satisfiesAx ≤ b, x ≥ 0, which implies
(3.6) max{wTx : Ax ≤ b, x ≥ 0} = max{wTx : Cx ≤ b|L, x ≥ 0}.
Extendingy∗∈ ZL+ toy ∈ Z+V ∪E by adding zero entries, we obtainyTA = (y∗)TC ≥ wT, y ≥ 0, and yTb = (y∗)Tb|
L = max{wTx : Cx ≤ b|L, x ≥ 0}. From (3.6), we
conclude thaty is an integral optimal solution to the dual of max{wTx : Ax ≤ b, x ≥
0}. Hence Ax ≤ b, x ≥ 0 is a TDI system. From (3.5) and Lemma 3.3, we thus
deduce thatπ(G, ≺) is also TDI.
Second proof of Lemma 3.2. LetG = (V, E). To establish the assertion, we need to show the following:
(1)D(G, ≺, w) has an integral optimal solution for all w ∈ ZE.
To this end, we apply induction on |E|. If |E| = 0, then E = ∅ and thus (1) is trivial. So we proceed to the induction step and assume that (1) holds for all preference systems with fewer edges in the corresponding graphs.
IfG = H, then (1) follows instantly from Theorem 1.3. So we assume that G = H and henceE − E(H) = ∅. Let V1 be the set of all nonisolated vertices ofH. Using Lemma 2.5, we obtain the following:
(2)G has three distinct vertices r, s, t, such that fG(r) = s ∈ V1, lG(s) = t, and st ∈ E − E(H).
From (2), it can be seen that
(3)e sst for all e ∈ δ(s) and hence ψ(st) = {st} ∪ {e ∈ δ(t) : st ≺te}.
Let (G, ≺) be the preference system whose preference table is obtained from T (G, ≺) by deleting the pair {s, t} with G = (V, E). Observe thatG =G\st and
E=E − {st}. From (2) and Lemma 2.2(v), we see that
(4) (H, ≺) is also the representation of (G, ≺).
In the remainder of our proof, we use δ(v) to denote the set of all edges of G incident with a vertexv and use ϕ(e) (resp., ψ(e)) to denote the set of all edges of Gdominating (resp., dominated by) an edgee in E. In view of Lemma 2.3(iii) (with
(G, ≺) in place of (G, ≺)), we have F SM(G, ≺) = ∅. (Actually this result was first established for all preference systems by Abeledo and Rothblum [1] using a different method.) Motivated by Lemma 2.4(ii), we propose to show the following:
(5) Let ¯x be a vector in F SM(G, ≺) and let x be obtained from ¯x by adding one more entryx(st) = 0. Then x ∈ F SM(G, ≺).
To justify this, note that
• x(δ(v)) = ¯x(δ(v)) ≤ 1 for all v ∈ V and
• x(ϕ(e)) = ¯x(ϕ(e)) ≥ 1 for all e ∈ E.
For the edgest, by (3) we have e ≺sst for all e ∈ δ(s), which implies that x(ϕ(st)) ≥ ¯
x(δ(s)). Since s ∈ V1, by (4) and Lemma 2.4(i) (with G in place ofG), we obtain
¯
x(δ(s)) = 1. So x(ϕ(st)) ≥ 1. Combining the above observations, we conclude that
x satisfies (1.2)−(1.4) simultaneously, so (5) holds.
By (4) and induction hypothesis on (G, ≺), the linear system π(G, ≺) is totally dual integral. Thus the definition of TDI system guarantees the existence of an integral optimal solution (¯y, ¯z) to D(G, ≺, ¯w), where ¯w = w|E. Let ¯x be an optimal solution
toP(G, ≺, ¯w). It follows from the LP duality theorem that (6) ¯y(V ) − ¯z(E) = ¯wTx.¯
Letx∗be the vector obtained from ¯x by adding one more entry x∗(st) = 0. From (5), we see that
(7)x∗is a feasible solution to P(G, ≺, w).
Set = max{0, w(st) − ¯y(s) − ¯y(t) + ¯z(ψ(st) − {st})}. Let y∗ be the vector obtained from ¯y by replacing ¯y(s) with ¯y(s) + , and let z∗ be the vector obtained from ¯z by replacing ¯z(rs) with ¯z(rs) + and then adding one more entry z∗(st) = 0. By (6), we havey∗(V ) − z∗(E) = ¯y(V ) + − (¯z(E) + ) = ¯wTx. Hence¯
(8)y∗(V ) − z∗(E) = wTx∗. We propose to show that
(9)y∗(u) + y∗(v) − z∗(ψ(uv)) ≥ w(uv) for all uv ∈ E. To justify this, we distinguish among five cases.
Case 1. {u, v} ∩ {r, s, t} = ∅. In this case, y∗(u) + y∗(v) − z∗(ψ(uv)) = ¯y(u) + ¯
y(v) − ¯z(ψ(uv)) ≥ w(uv) because (¯y, ¯z) is a feasible solution to D(G, ≺, ¯w).
Case 2. u = s and v = t. In this case, y∗(s) + y∗(t) − z∗(ψ(st)) = (¯y(s) + ) + ¯
y(t) − z∗(st) − z∗(ψ(st) − {st}) = ¯y(s) + + ¯y(t) − ¯z(ψ(st) − {st}) ≥ w(st) by the
definition of .
Case 3. u = s and v = t. In this case, z∗(ψ(sv)) = ¯z(ψ(sv) − {sr}) + z∗(sr) · |{sr}∩ψ(sv)|+z∗(st) = ¯z(ψ(sv)−{sr})+(¯z(sr)+ )·|{sr}∩ψ(sv)| ≤ ¯z(ψ(sv))+ . So
y∗(s)+y∗(v)−z∗(ψ(sv)) ≥ (¯y(s)+ )+¯y(v)−(¯z(ψ(sv))+ ) = ¯y(s)+¯y(v)−¯z(ψ(sv)) ≥
w(sv).
Case 4. u = s and v = t. In this case, ψ(ut) ⊆ ψ(ut) ∪ {st} and y∗(u) + y∗(t) − z∗(ψ(ut)) ≥ ¯y(u) + ¯y(t) − (¯z(ψ(ut)) + z∗(st)) = ¯y(u) + ¯y(t) − ¯z(ψ(ut)) ≥ w(ut).
Case 5. u = r and v = s. In this case, we have rs ∈ ψ(rv) = ψ(rv) for s = fG(r), which implies that z∗(ψ(rv)) = ¯z(ψ(rv)). So y∗(r) + y∗(v) − z∗(ψ(rv)) =
¯
y(r) + ¯y(v) − ¯z(ψ(rv)) ≥ w(rv).
As these cases have exhausted all possibilities, (9) is established. From (9), it follows that
(10) (y∗, z∗) is an integral feasible solution to D(G, ≺, w).
Combining (7), (8), and (10) and using the LP duality theorem, we can further conclude that (y∗, z∗) is an integral optimal solution to D(G, ≺, w). This proves (1) and hence Lemma 3.2.
As described in Gusfield and Irving [6] and Kir´aly and Pap [8], network flow techniques can be used to solve various stable matching problems and their duals. The following lemma is concerned with their algorithm for finding a maximum-weight stable matching and a minimum-cost stable cover of a bipartite preference system. Since the algorithm is lengthy, we shall neither get into the details nor discuss its correctness. What we are going to do is to outline its major steps and figure out its complexity, which is not given explicitly in [6] or [8].
Lemma 3.4 (see [6, 8]). Let (G, ≺) be a bipartite preference system with G = (V, E). Then for any w ∈ ZE, a maximum-weight stable matching and a minimum-cost stable cover of (G, ≺, w) can be found in O(m2logm) time, where m = |E|.
Proof. To establish this complexity result, let us give a sketch of their algorithm. In the initialization step, we construct the following objects (see [8] for undefined terms):
(i) the set R of all rotations of (G, ≺), such that each ρ ∈ R is expressed in the form ρ = (v1, u1, v2, u2, . . . , vk, uk) for which w∗(ρ) is defined to be k
i=1(−w(viui) +w(uivi+1)) withvk+1=v1;
(ii) the rotation digraph D = (R, A) whose closed subsets (i.e., vertex subsets with no incoming arcs from the outside) correspond to stable matchings of (G, ≺); and
(iii) the so-called man-optimal stable matchingM0 of (G, ≺).
Since both |R| and |A| are linear in m (see [8] and proof of Lemma 3.3.2 in [6]), as discussed in subsection 3.3.1 and section 3.6 of [6], this step can be carried out in O(nm) time, where n = |V |.
Letopt denote the optimal objective value of the problem Maximize (w∗)Tβ
subject to β(ρ) − β(ρ)≥ 0 ∀ (ρ, ρ)∈ A,
1≥ β(ρ) ≥ 0 ∀ ρ ∈ R
(see (i) for the definition ofw∗) and its dual
Minimize γ(R)
subject to γ(ρ) − γ(A+(ρ)) + γ(A−(ρ)) ≥ w∗(ρ) ∀ ρ∈R, γ ∈ RR∪A+ , (3.7)
whereA+(ρ) and A−(ρ) are the sets of arcs in D leaving ρ and entering ρ, respectively. In the main step of the algorithm, our objective is to find a closed subsetS of R with w∗(S) = opt and an integral optimal solution γ∗ to problem (3.7). As elaborated in
the proofs of Theorem 3.6.2 and Lemma 3.6.3 in [6], the desiredS can be obtained from a minimum cut in an auxiliary flow network D (constructed from D by adding
a source and a sink). It is not difficult to see that an integral maximum flow in D also yields the desiredγ∗. So this step can be carried out inO(m2logm) time using the Goldberg–Tarjan algorithm [5, 13].
Given such anS, we can finally obtain a stable matching of (G, ≺, w) with maxi-mum possible weightw(M0) +opt from M0by eliminating all rotations inS in O(nm) time. (See [8] or subsections 3.6.1 and 3.6.2 of [6] for details.) Besides, starting from γ∗, as shown by Kir´aly and Pap [8], it takes O(nm) time to find a minimum-cost
stable cover of (G, ≺, w).
Therefore, a maximum-weight stable matching and a minimum-cost stable cover of (G, ≺, w) can be found in O(m2logm) time.
Now let us present an efficient combinatorial algorithm for finding a maximum-weight stable matching and a minimum-cost stable cover in a more general setting, whereδi(t) is the set of all edges in Gi incident with the vertext.
Algorithm 1for the maximum-weight stable matching problem and its dual.
Input: A preference system (G, ≺) with a bipartite representation (H, ≺) and a
weight functionw ∈ ZE.
Output: A maximum-weight stable matching M and a minimum-cost stable cover
(y, z) of (G, ≺, w).
1. M ← a maximum-weight stable matching of (H, ≺, w|E(H)),
(y, z) ← an integral optimal solution to D(H, ≺, w|E(H)) (see Lemma 3.4), V1← the set of all nonisolated vertices in H, G0← G, i ← 0
2. whileE(Gi)− E(H) = ∅ do
3. Find three distinct verticesri, si, ti∈ V (Gi) such thatfGi(ri) =si∈ V1, lGi(si) =ti, andsiti∈ E(Gi)− E(H)
4. Gi+1← Gi\siti, i ← i + 1 5. end while
6. forj = i − 1 down to 0 do
7. r ← rj, s ← sj, t ← tj, ← max{0, w(st) − y(s) − y(t) + z({e ∈ δj+1(t) : st ≺te})}, y(s) ← y(s) + , z(rs) ← z(rs) + , z(st) ← 0
8. endfor
9. OutputM and (y, z)
Lemma 3.5. Let (G, ≺) be a preference system with a bipartite representation (H, ≺) and with G = (V, E). Then for any w ∈ ZE, Algorithm 1 correctly finds a maximum-weight stable matching and a minimum-cost stable cover of (G, ≺, w) in O(m2logm) time, where m = |E|.
Proof. By Lemma 3.4, the stable matching M specified in line 1 can be found inO(m2logm) time. From Lemma 2.2(i), we conclude that M is a maximum-weight stable matching of (G, ≺, w) as well.
Set k = |E − E(H)|. Then Gk =H and Gj is obtained from Gj+1 by adding the edge sjtj for j = k − 1, k − 2, . . . , 0. Let (yj, zj) be the (y, z) generated in the algorithm corresponding toGjforj = k, k − 1, . . . , 0. By line 1, (yk, zk) is an integral optimal solution to D(Gk, ≺, w). Thus, from the proof of Lemma 3.2 (with Gj in place of G and Gj+1 in place of G), we deduce that (yj, zj) is an integral optimal solution to D(Gj, ≺, w|E(Gj)) forj = k − 1, k − 2, . . . , 0. So the (y, z) output by the algorithm is an integral optimal solution toD(G, ≺, w).
It is easy to see that the complexity of the algorithm is dominated by line 1. Hence the whole algorithm runs inO(m2logm) time.
Now we are ready to establish the main result of this paper.
Proof of Theorem 1.5. From the Edmonds–Giles theorem stated in section 1, we see that (iv)⇒(iii). The implications (iii)⇒(ii), (ii)⇒(i), and (i)⇒(iv) are established by Lemma 3.1, Lemma 2.3(iv), and Lemma 3.2, respectively. So the statements (i)–(iv) are equivalent. The second half of our theorem follows from Lemma 3.5.
By Lemma 3.1, if (G, ≺) /∈ , then F SM(G, ≺)−SM(G, ≺) = ∅. Using Theorem 1.5, we can explicitly find an element of this set.
Corollary 3.6. Let (G, ≺) be a preference system outside , let (H, ≺) be its representation, and let C be the semistable partition as defined in Lemma 2.3(iii). Then (recall (1.9))
xC ∈ F SM(G, ≺) − SM(G, ≺).
Proof. From the proof of Lemma 3.1, we see that if xC ∈ SM(G, ≺), then GC is a bipartite graph and hence so isH by Lemma 2.3(iv). It follows from Theorem 1.5 that (G, ≺) ∈ ; this contradiction establishes the assertion.
We finally arrive to statements concerning general preference systems. Proof of Theorem 1.7. To establish the assertion, let us first show that
(1) for anyw ∈ ZE, the problemD(G, ≺, w) has a half-integral optimal solution (¯y, ¯z), which can be found in O(m2logm) time.
For this purpose, we construct a bipartite preference system (G, ≺) with G = (V, E), and define a weight functionw ∈ ZE as follows:
• Each vertex v ∈ V corresponds to two vertices ¯v, ˆv ∈ V.
• Each edge uv ∈ E corresponds to two edges ¯uˆv, ˆu¯v ∈ Ewith weightw(¯uˆv) =
w(ˆu¯v) = w(uv).
• Each pair of adjacent edges vp, vq ∈ E with vp ≺v vq in (G, ≺) corresponds
to two pairs of adjacent edges ¯v ˆp, ¯vˆq ∈ E and ˆv¯p, ˆv¯q ∈ Ewith ¯v ˆp ≺¯v¯vˆq and ˆ
v¯p ≺
ˆvv¯q in (Gˆ , ≺).
This completes the construction of (G, ≺) and definition of w. We point out that this proof technique was first introduced by Abeledo and Rothblum in their proof of Theorem 3.3 in [1].
Let (y∗, z∗) be an optimal solution to D(G, ≺, w). Set y(¯v) = y(ˆv) = y∗(v) for all v ∈ V , and set z(¯uˆv) = z(ˆu¯v) = z∗(uv) for all uv ∈ E. It is a routine matter to check that (y, z) is a feasible solution toD(G, ≺, w) with objective value y(V)− z(E) = 2(y
∗(V ) − z∗(E)). So
(2) the optimal objective value ofD(G, ≺, w) is at most 2(y∗(V ) − z∗(E)). Since G is a bipartite graph with |E| = 2m, by Theorem 1.3 we can find an integral optimal solution (y∗, z∗) toD(G, ≺, w) in O(m2logm) time. Using (2), we obtain
(3)y∗(V)− z∗(E)≤ 2(y∗(V ) − z∗(E)).
Set ¯y(v) = (y∗(¯v) + y∗(ˆv))/2 for all v ∈ V , and set ¯z(uv) = (z∗(¯uˆv) + z∗(ˆu¯v))/2 for all uv ∈ E. It is easy to see that (¯y, ¯z) is a feasible solution to D(G, ≺, w) with objective value
(4) ¯y(V ) − ¯z(E) = (y∗(V)− z∗(E))/2 ≤ y∗(V ) − z∗(E) by (3).
From the optimality of (y∗, z∗), we deduce that (¯y, ¯z) is also an optimal solution to D(G, ≺, w). Clearly, (¯y, ¯z) is half-integral and can be generated in O(m2logm) time.
Thus (1) holds, which implies thatπ(G, ≺) is totally dual half-integral.
By Lemma 3.4, an integral optimal solutionx∗ to P(G, ≺, w) can be found in O(m2logm) time. Observe that
(5) (w)Tx∗=y∗(V)− z∗(E).
Set ¯x(uv) = (x∗(¯uˆv) + x∗(ˆu¯v))/2 for all uv ∈ E. It is straightforward to verify that ¯x is a feasible solution to P(G, ≺, w) with objective value wTx = (w¯ )Tx∗/2 = ¯
y(V ) − ¯z(E) by (5) and (4). So, from the LP duality theorem, we can conclude that ¯
x is an optimal solution to P(G, ≺, w). Clearly, ¯x is half-integral and can be obtained inO(m2logm) time.
Acknowledgments. We are indebted to Professor Tam´as Kir´aly and one anony-mous referee for their invaluable comments and suggestions which led to substantial improvement on the presentation of our paper. Our special thanks also go to Professor Kir´aly for discovering a quick proof of the implication (i)⇒(iv) in Theorem 1.5 (see Lemma 3.3 and the first proof of Lemma 3.2).
REFERENCES
[1] H. Abeledo and U. Rothblum, Stable matchings and linear inequalities, Discrete Appl. Math., 54 (1994), pp. 1–27.
[2] J. Edmonds and R. Giles, A min-max relation for submodular functions on graphs, Ann. Discrete Math., 1 (1977), pp. 185–204.
[3] T. Feder, A new fixed point approach for stable networks and stable marriages, J. Comput. System Sci., 45 (1992), pp. 233–284.
[4] D. Gale and L. Shapley, College admissions and the stability of marriage, Amer. Math. Monthly, 69 (1962), pp. 9–15.
[5] A. Goldberg and R. Tarjan, A new approach to the maximum-flow problem, J. ACM, 35 (1988), pp. 921–940.
[6] D. Gusfield and R. Irving, The Stable Marriage Problem: Structure and Algorithms, MIT Press, Cambridge, 1989.
[7] R. Irving, An efficient algorithm for the stable roommates problems, J. Algorithms, 6 (1985), pp. 577–595.
[8] T. Kir´aly and J. Pap, Total dual integrality of Rothblum’s description of the stable-marriage polyhedron, Math. Oper. Res., 33 (2008), pp. 283–290.
[9] D. Knuth, Marriages stables et leurs relations avec d’autres probl`emes combinatoires, Les Presses de l’Universit´e de Montreal, Montreal, 1976.
[10] A. Roth and M. Sotomayor, Two-Sided Matching: A Study in Game-Theoretic Modeling and Analysis, Cambridge University Press, Cambridge, UK, 1990.
[11] A. Roth, U. Rothblum, and J. Vande Vate, Stable matching, optimal assignments, and linear programming, Math. Oper. Res., 18 (1993), pp. 808–828.
[12] U. Rothblum, Characterization of stable matchings as extreme points of a polytope, Math. Program., 54 (1992), pp. 57–67.
[13] A. Schrijver, Combinatorial Optimization: Polyhedra and Efficiency, Springer-Verlag, Berlin, 2003.
[14] J. Tan, A necessary and sufficient condition for the existence of a complete stable matching, J. Algorithms, 12 (1991), pp. 154–178.
[15] C. Teo and J. Sethuraman, Geometry of fractional stable matchings and its applications, Math. Oper. Res., 23 (1998), pp. 874–891.
[16] J. Vande Vate, Linear programming brings marital bliss, Oper. Res. Lett., 8 (1989), pp. 147–153.