• No results found

Finding a rank-maximal stable matching using exponential weights

N . In Chapter 6, we revisit maximum flows using the Ford-Fulkerson Algorithm [17], which also terminates when no augmenting path can be found.

4.3

Finding a rank-maximal stable matching using ex-

ponential weights

In this section we will describe how Irving et al.’s [32] maximum weight stable matching algorithm works and how it can be used to find a rank-maximal stable matching using expo- nential weights.

4.3.1

Exponential weight network

Irving et al.’s [32] method for finding a maximum weight stable matching involves finding a maximum weight closed subset of the rotation poset. In order to find a maximum weight closed subset of the rotation poset, a network is built and a maximum flow is found over this network.

The rotation digraph is converted to a network Rn(I) as follows. First we add two extra

vertices; a source vertex s and a sink vertex t. An edge of capacity ∞ replaces each orig- inal edge in the digraph. Since we are finding a rank-maximal stable matching, capacities on other edges of Rn(I) are calculated by converting each profile of a rotation to a single

exponential weight. We decide on a weight function of (2n + 1)n−ifor each person assigned to their ith choice. From this point onwards we refer to the use of this weight function as the high-weightscenario, and denote it as w.

Definition 4.3.1. Given a profile p = hp1, p2, ..., pai such that |p1| + |p2| + ... + |pa| ≤ 2n

and1 ≤ a ≤ n, define the high-weight function w as,

w(p) = p1(2n + 1)n−1+ p2(2n + 1)n−2+ ... + pa(2n + 1)n−a.

Lemma 4.3.3 shows that when the above function w is used, a matching of maximum weight will be a rank-maximal matching.

Proposition 4.3.2. Let p = hp1, p2, ..., pni and p0 = hp01, p02, ..., p0ni be profiles such that

|p1| + |p2| + ... + |pn| ≤ 2n and |p01| + |p02| + ... + |p0n| ≤ 2n. Let wi(p) = pi(2n + 1)n−i

denote theith term of w(p) and let wi+(p) = Pn

j=ipj(2n + 1)

n−j denote the sum ofw(p0)

terms for allj such that i ≤ j ≤ n. If pi > p0i, thenwi(p) > w+i (p0). Additionally, if i is the

Proof. Assume pi > p0i. Then pi must be at least 1 larger than p0i since each profile element

is an integer by definition. A value of 1 for pi will contribute (2n + 1)n−ito wi(p) and so it

follows that wi(p) ≥ wi(p0) + (2n + 1)n−i.

Since (2n + 1)n−k decreases as k increases and |p01| + |p0

2| + ... + |p0n| ≤ 2n, the maximum

weight contribution that p0i+1, p0i+2, ..., p0ncan make to wi+(p0) is when p0i+1= 2n. Through the following series of inequalities,

wi+(p0) ≤ wi(p0) + 2n(2n + 1)n−(i+1) ≤ wi(p) − (2n + 1)n−i+ 2n 2n + 1(2n + 1) n−i ≤ wi(p) +  2n 2n + 1− 1  (2n + 1)n−i < wi(p) (4.1)

it follows that wi(p) > w+i (p0) as required. If i is the first point at which p and p0 differ then

it follows that w(p) > w(p0).

Lemma 4.3.3. Let I be an instance ofSMIand letM be a stable matching in I. If w(p(M )) is maximum amongst all stable matchings ofI, where p(M ) is the profile of M , then M is a rank-maximal stable matching.

Proof. Suppose w(p(M )) is maximum amongst all stable matchings of I. Now, assume for contradiction that M is not rank-maximal. Then, there exists some stable matching M0 in I such that M0 lexicographically larger than M . Let i be the first point at which p(M ) = hp1, p2, ..., pni and p(M0) = hp10, p02, ..., p0ni differ. Since M0 is lexicographically larger than

M we know that p0i > pi and by Proposition 4.3.2 it follows that w(p(M0)) > w(p(M )).

But this contradicts the fact that w(p(M )) is maximum over all stable matchings of I. There- fore our assumption that M is not rank-maximal is false, as required.

We now continue describing Irving et al.’s technique for finding a maximum weight closed subset of the rotation poset. The rotations are divided into positive and negative vertices as follows. A rotation ρ is positive if w(p(ρ)) > 0 and negative if w(p(ρ)) < 0. A directed edge is added from the source to each negative vertex and is given a capacity equal to |w(p(ρ))|. A directed edge is also added between each positive vertex and t with capacity w(p(ρ)). Recall the example SMI instance I0 in Figure 2.1 of Section 2.2.2 with associated rotation poset

and rotation digraph shown in Figure 2.3. The high-weight network of instance I0is denoted

Rn(I0) and is shown in Figure 4.1. In this figure, each edge e has a pair of associated integers

4.3. Finding a rank-maximal stable matching using exponential weights 68 ρ0 ρ1 ρ2 ρ3 ρ4 s ∞ t ∞ ∞ ∞ ∞ 0/ 1336336 795036688/ 819168496 362063824 / 362063824 795036688 / 795036688 362063824 / 408840208

Figure 4.1: The high-weight network Rn(I0).

4.3.2

Maximum weight closed subset of R

p

(I)

We wish to find a minimum cut in Rn(I) as this will allow us to calculate the maximum

weight closed subset of Rp(I). For future reference, we denote by Rres(I, f ) the residual

graph of Rn(I). As described in Section 4.2 we need only find a maximum flow through

Rn(I) in order to find a minimum cut in Rn(I). Irving et al. [32] used the Sleator-Tarjan

algorithm [71] to find a maximum flow. This algorithm completes when no augmenting path exists in Rn(I) with respect to the final flow.

In Figure 4.1 we show the high-weight network Rn(I0) with a maximum flow. There is one

minimum cut, cT = {(s, ρ0), (ρ4, t)}. Note that cT is a cut since removing these edges leaves

no path from s to t. By Theorem 4.2.1, it is also a minimum cut since the capacity of cT

(1157100512) is equal to the value of a maximum flow. For this cut cT we list every rotation

ρ such that (ρ, t) is an edge in Rn(I) and (ρ, t) /∈ cT. Then a maximum weight closed subset

of the rotation poset is given by this set of rotations and their predecessors. cT has associated

closed subset of {ρ0, ρ1, ρ2} which is precisely a maximum weight closed subset of Rp(I0).

The man-optimal stable matching of I0 is

M = {(m1, w5), (m2, w3), (m3, w8), (m4, w6), (m5, w7), (m6, w1), (m7, w2), (m8, w4)}.

By eliminating rotations {ρ0, ρ1, ρ2} from the man-optimal stable matching, we find the

rank-maximal stable matching

M0 = {(m1, w3), (m2, w6), (m3, w1), (m4, w8), (m5, w7), (m6, w5), (m7, w2), (m8, w4)}.

The following Theorem summarises the work in this section.

Theorem 4.3.4 ([32]). Let I be an instance ofSMI. A rank-maximal stable matchingM of I can be found inO(nm2log n) time using weights that are exponential in n.

to use a new approach, involving polynomially-bounded weight vectors, to find a maximum weight closed subset of rotations. This is the focus of the rest of this chapter.

4.4

Finding a rank-maximal stable matching using