PowerPoint 演示文稿

Market Design and Analysis
Lecture 1
Lecturer: Ning Chen (陈宁)
Email: [email protected]
Class Information

Focuses
 economic
models and solution concepts
 computational aspects
 incentive analysis
2
References




Roth, Sotomayor,
Two-Sided Matching: A Study in Game-Theoretical
Modeling and Analysis,
Cambridge Press, 1990.
Nisan, Roughgarden, Tardos, Vazirani,
Algorithmic Game Theory,
Cambridge Press, 2007.
Internet (Google, Wikipedia, etc.)
Fuhito Kojima
(http://sites.google.com/site/fuhitokojimaeconomics/)
3
Let’s start !
4
Motivating Example – School Admission

Students have preferences over different
schools and departments


Schools and departments also have preferences
over students


every student goes to one school/department
school/department seats are limited
How to decide the admission process globally?
5
Motivating Example – American HospitalIntern Market




Medical students work as interns at hospitals.
In the US more than 20,000 medical students and
4,000 hospitals are matched through a
clearinghouse, called NRMP
(National Resident Matching Program).
Doctors and hospitals submit preference rankings to
the clearinghouse, who uses a specified rule to
decide who works where.
What is a good way to match students and
hospitals?
6
Motivating Example – Kidney Exchange

Medical transplant matches kidney donors and
patients
 A successful transplant must have compatible blood
test – there are four blood types: O, A, B, AB




O patients can receive kidneys from O donors
A patients can receive kidneys from O or A donors
B patients can receive kidneys from O or B donors
AB patients can receive kidneys from all donors

Kidney exchange: match two (or more) incompatible
donor-patient pairs and swap donors.
 How to find efficient exchanges?
7
NTU Class Registration System



Students submit a preference for UE and PE
courses (up to five).
Courses have implicit priorities over students
according to, e.g., year of study.
How to assign students to courses so that most
students are ‘happy’?
8
Matching Markets

Input: Two heterogeneous sets of agents form a twosided market
 Output: Set up matches between agents of different
sides

Other examples




dormitory allocation
marriage
job market
advertising market (TV, newspaper, Internet)
9
Internet Advertising
keywords
sponsored links
10
Matching Markets Design

Mathematical models
 Economic solution concepts



computational issues
mathematical properties
economic properties
11
Graph

Definition 1.1. A graph G = (V, E) consists of



V: a non-empty set of vertices (or nodes)
E: a set of pairs of distinct elements of V called edges.
Two vertices u and v are called adjacent (or
neighbors) if (u,v) ∈E.
v1

v2
Example


V = {v1, v2, v3, v4, v5}
E = {(v1,v2), (v1,v3), (v1,v5),
(v2,v4), (v3,v5)}
v5
v3
v4
Bipartite Graph

A graph G = (V, E) is called bipartite if its vertex set
V can be partitioned into two disjoint sets V1 and V2
such that every edge in the graph connects a vertex
in V1 and a vertex in V2. That is, there are no edges
in V1 and V2.
V1
V2
Matching


Given a bipartite graph G = (V1,V2; E), a matching of
G is a subset of edges E’ such that for any e, e’∈E’,
they do not have the same endpoints.
The number of edges in E’, i.e. |E’|, is called the size
of the matching E’.
Matching

Example.
V1
V2
Maximum and Perfect Matching


A matching E’ of a bipartite graph G is called maximum
if it has the largest size of all matchings of G.
In a given a bipartite graph G = (V1,V2; E), if |V1|=|V2|=n
and the maximum matching E’ of G has size n, then E’
is called a perfect matching.
V1
V2
Let’s start (again) !
17
Gale-Shapley Marriage Model

There are a set of men M and set of women W,
where |M| = |W| = n.


Each man m has a strict preference over women in W
(denoted by >m).
Each woman w has a strict preference over men in M
(denoted by >w).
w1 > w2
m1
w1
m1 > m2
w1 > w2
m2
w2
m1 > m2
18
Gale-Shapley Marriage Model

Preferences are required to be



complete: any two alternatives can be compared
strict: strict preference over any two alternatives
transitive: if w1 >m w2 and w2 >m w3, then w1 >m w3
19
A Marriage Problem

Question: How to match men and women in M and
W such that everyone is “happy” with the solution?
w1 > w2
m1
w1
m1 > m2
w1 > w2
m2
w2
m1 > m2
20
Blocking Pair

A matching of an instance (M,W) is a set of disjoint
edges, denoted by f: MW, i.e., f(m) is the woman
matched to m∈M.
 Given a matching f, we say a man-women pair (m,w) is a
blocking pair if w >m f(m) and m >w f(w).
m
f(m)
f(w)
w
21
Blocking Pair

A matching of an instance (M,W) is a set of disjoint
edges, denoted by f: MW, i.e., f(m) is the vertex
matched to m∈M.
 Given a matching f, we say a man-women pair (m,w) is a
blocking pair if w >m f(m) and m >w f(w).
w1 > w2
m1
w1
m1 > m2
w1 > w2
m2
w2
m1 > m2
(m1,w1) is a blocking pair
22
Stable Matching

A matching f is called stable if there it has no
blocking pair.

Questions:

Does a stable matching always exist?
 If yes, how to find one?
 What mathematical / economic properties it has?
23
Stable Matching

Theorem 1.2. [Gale & Shapley’1962] For any stable
marriage problem, there always is a stable matching.
24
Example
w1 > w2> w3> w4
m1
w1
m3 > m1> m2> m4
w1 > w2> w3> w4
m2
w2
m3 > m4> m1> m2
w2 > w1> w3> w4
m3
w3
m1 > m4> m2> m3
w3 > w2> w4> w1
m4
w4
m4> m1> m3> m2
25
Gale-Shapley (Deferred-Acceptance) Algorithm


Initially all men and women are free
While there is a man m who is free and hasn’t proposed
to every woman





choose such a man m arbitrarily
let w be the highest ranked woman in m’s preference list to
whom m hasn’t proposed yet
m proposes to w
if w is free, then (m,w) become engaged
else, w is currently engaged to m’


if w prefers m’ to m, then m remains free
if w prefers m to m’, then (m,w) become engaged and m’
becomes free
26
Example
\
m1
w1
m1 > m2> m3
\ \
m2
w2
m1 > m3> m2
\ \
m3
w3
m1> m2> m3
w1 > w2> w3
w1 > w2> w3
w1 > w3> w2
27
Analysis of the Algorithm

To prove correctness of an algorithm

analyze convergence of the algorithm (i.e., show that the
algorithm will always terminate)
 analyze correctness of the algorithm (i.e., show that the
algorithm always generates the desired outcome)
28
Analysis of the Algorithm – Observations

For any woman w,

(O1) w remains engaged from the point at which she
receives her first proposal.
 (O2) the sequence of partners to which w is engaged gets
better and better (in terms of her preference list)

For any man m,

(O3) if m is free at some point in the execution of the
algorithm, then there is a woman to whom m hasn’t
proposed yet.
 (O4) the sequence of women to whom m proposes gets
worse and worse (in terms of his preference list).
29
Analysis of the Algorithm



Lemma 1.3. G-S algorithm returns a perfect
matching in finite steps.
Proof. By observations O1 and O3.
Theorem 1.4. G-S algorithm returns a stable
matching.
30
Analysis of the Algorithm

m
w’
m’
w
Proof. Let f be a matching returned by the algorithm.
Assume that (m,w) is a blocking pair, where
(m,w’),(m’,w)∈f. That is, m prefers w to w’ and w
prefers m to m’.
In the algorithm, m last proposal was to w’ (by
definition).
Then if m has proposed to w or not?

if yes, since the sequence of partners of w only increases
(O2), w will be matched to a man better than m
 if not, by the algorithm, m should propose to w before w’ (O4)
A contradiction.
31
G-S Algorithm – Women Propose
\
w1 > w2> w3
m1
w1
m1 > m2> m3
w1 > w2> w3
m2
w2
m1 > m3> m2
w1 > w3> w2
m3
w3
m1> m2> m3
\ \
\ \
32
Which Stable Matching is Better?
w1 > w2 m1
w1
m2 > m1
w2 > w1 m2
w2
m1 > m2
GS algorithm: men propose
GS algorithm: women propose
m1
w1
m1
w1
m2
w2
m2
w2
33
Stable Matching by G-S

For any man m, let best(m) be the best woman
matched to m in all possible stable matchings.

Theorem 1.5. Gale-Shapley algorithm, when men
propose, returns a stable matching, where for any
man m, m is matched to best(m).

Implications:

different orders of free men picked do not matter
 for any men m1 ≠ m2, best(m1) ≠ best(m2)
34
Stable Matching by G-S
m
w
=best(m)
m’

Proof. Assume otherwise that some men m are matched
worse than their best(m). Then m must be rejected by
best(m) in the course of the algorithm.
 Consider the first moment in the algorithm in which some
man, say m, is rejected by
w = best(m). The rejection of m by w because

either m proposed but was turned down (w prefers her
current partner)
 or w broke her engagement to m in favor of a better
proposal.
In either cases, at this moment w is engaged to a man m’
whom she prefers to m, i.e., m’ >w m.
35
Stable Matching by G-S
m
w
=best(m)
m’

In GS algorithm, because m is the first man who is
rejected by best(m), at that moment m’ hasnot been
rejected by best(m’) when he is engaged to w. By O4, this
implies that
w ≥m’ best(m’)
36
Stable Matching by G-S
m
m’




f
w
f
=best(m)
w’
In GS algorithm, because m is the first man who is
rejected by best(m), at that moment m’ hasnot been
rejected by best(m’) when he is engaged to w. By O4, this
implies that
w ≥m’ best(m’)
By definition of best(m), consider the stable matching f
where m is matched to w=best(m). Assume that m’ is
matched to w’ in f. Hence,
best(m’) ≥ m’ w’
Hence, w >m’ w’ (note that w ≠ w’)
Contradiction to the fact that f is stable.
37
Men/Women Optimal Stable Matching

For any two stable matchings f and f’, denote
f(m) >m f’(m) if m prefers his partner in f than f’
 f(m) ≥m f’(m) if either f(m) >m f’(m) or f(m) = f’(m)

f >M f’ if f(m) ≥m f’(m) for all m∈M and f(m) >m f’(m) for at
least one man m.
 f ≥M f’ if f(m) ≥m f’(m) for all m∈M


f(w) >w f’(w), f(w) ≥w f’(w), f >W f’ and f ≥W f’ are defined
similarly.
38
Men/Women Optimal Stable Matching

Definition. A stable matching f is called men-optimal if for
any other stable matching f’, we have f ≥M f’.
A stable matching f is called women-optimal if for any
other stable matching f’, we have f ≥W f’.

For any stable matching f and any man m∈M, we have
best(m) ≥m f(m).

Theorem 2.1. Gale-Shapley algorithm,


when men propose, it returns a men-optimal stable matching;
when women propose, it returns a women-optimal stable matching.
39
Men/Women Optimal Stable Matching

Theorem 2.2. Men (women)-optimal stable matching
is unique.

Proof. Assume f and f’ are two men-optimal stable
matchings, then f ≥M f’ and f’ ≥M f. Hence, for any
man m∈M, we have f(m) ≥m f’(m) and f’(m) ≥m f(m),
i.e., f(m) = f’(m); this implies f = f’.
40
Women-Pessimal Stable Matching


Theorem 2.3. For any two stable matchings f and f’,
f >M f’ if and only if f’ >W f.
Proof. Assume that f >M f’, we will show f’ >W f.
Assume otherwise that there is a woman w∈W such
that f(w) >w f’(w); let m = f(w).
By the assumption, w = f(m) >m f’(m).
Hence, (m,w) is a blocking pair for f’, a contradiction.
f’
f’(w)
w
f
m
=
f(w)
f’
f’(m)
41
Women-Pessimal Stable Matching

Theorem 2.3. For any two stable matchings f and f’,
f >M f’ if and only if f’ >W f.

Corollary 2.4. Men-optimal stable matching is
women-pessimal; women-optimal stable matching is
men-pessimal.
42
Pointing Function (sup)

Given two stable matchings f and f’, define a
mapping g (denoted by f v f’) as follows:

for each man m∈M, assign him more preferred
partner



g(m) = f(m) if f(m) ≥ m f’(m)
g(m) = f’(m) if f’(m) >m f(m)
for each woman w∈W, assign her less preferred
partner


g(w) = f(w) if f(w) ≤w f’(w)
g(w) = f’(w) if f’(w) <w f(w)
43
Pointing Function (sup)

Is it possible that g(m) = g(m’) for two different men?

Is it possible that g(m) = w, but g(w) ≠m?

If g is a matching (i.e., the answers to the above two
questions are NO), can it be unstable?
44
Conway’s Lattice Theorem


Theorem 2.5. If f and f’ are two stable matchings,
then g = f v f’ is a stable matching as well.
Proof. We first show that g is a matching.
Assume g(m) = w, and wlog f(m) = g(m). Hence, w >m f’(m).
If g(w) ≠ m, i.e., g(w) = f’(w), then m >w f’(w).
Thus, (m,w) is a blocking pair for f’, a contradiction.
That is, g(m) = w  g(w) = m.
 Because |M| = |W|, this implies that
f’
f’(w)
w
g(w) = m  g(m) = w.

f
m
f’
f’(m)
45
Conway’s Lattice Theorem


Theorem 2.5. If f and f’ are two stable matchings,
then g = f v f’ is a stable matching as well.
Proof. We next show that g is a stable matching.
Assume (m,w) is a blocking pair for g. Then
w >m g(m) and m >w g(w)
The former implies
w >m f(m) and w >m f’(m)
Therefore, (m,w) blocks f if g(w) = f(w), or f’ if g(w) =
f’(w), a contradiction.
46
Pointing Function (inf)

Given two stable matchings f and f’, define a
mapping h (denoted by f ∧ f’) as follows:

for each man m∈M, assign him less preferred partner



h(m) = f(m) if f(m) ≤m f’(m)
h(m) = f’(m) if f’(m) <m f(m)
for each woman w∈W, assign her more preferred
partner


h(w) = f(w) if f(w) ≥w f’(w)
h(w) = f’(w) if f’(w) >w f(w)
47
Conway’s Lattice Theorem

Theorem 2.5. If f and f’ are two stable matchings,
then g = f v f’ and h = f ∧ f’ both are stable
matchings.

By the definition of g and h


g >M f >M h, g >M f’ >M h
h >W f >W g, h >W f’ >W g
48
Example
w1 > w2> w3> w4
m1
w1
m4 > m3> m2> m1
w2 > w1> w4> w3
m2
w2
m3 > m4> m1> m2
w3 > w4> w1> w2
m3
w3
m2 > m1> m4> m3
w4 > w3> w2> w1
m4
w4
m1 > m2> m3> m4
49
f2 v f3 = f1
f5 v f6 = f4
f8 v f 9 = f 7
f2 ∧ f3 = f 4
f5 ∧ f6 = f 7
f8 ∧ f9 = f10
f1
f3
f2
f4
f6
f5
f7
f9
f8
w1
w2
w3
w4
f1
m1
m2
m3
m4
f2
m2
m1
m3
m4
f3
m1
m2
m4
m3
f4
m2
m1
m4
m3
f5
m3
m1
m4
m2
f6
m2
m4
m1
m3
f7
m3
m4
m1
m2
f8
m4
m3
m1
m2
f9
m3
m4
m2
m1
f10
m4
m3
m2
m1
f10
50
Lattice

Consider a set S which contains n elements with a
partial order “≥”, which satisfies antisymmetry
property: if a ≥ b and a ≤ b, then a = b.

For any a,b∈S,

if a ≥ b, we say “a is greater than or equal to b”

if a ≤ b, we say “a is smaller than or equal to b”
51
Lattice

Upper bound:

An upper bound of any subset X of S is an element a∈S
such that for all b∈X, we have a ≥ b.
 Denote by supX the least upper bound of X if an upper
bound exists. That is a = supX if a is an upper bound of X
and there is no other upper bound a’ of X such that a ≥ a’.

By the antisymmetry property, if supX exists, it’s unique.

Lower bound and greatest lower bound (denoted by infX)
are defined similarly.
52
Lattice

Definition. A lattice is a partially ordered set S, where
any two elements a,b∈S, have a “sup”, denoted by a v b,
and have an “inf”, denoted by a ∧ b. A lattice S is
complete if each of its subset has a “sup” and an “inf” in S.

In particular, if lattice S if complete, then there is a supS
and infS.
53
Lattice

Examples.
54
Distributive Lattice

Definition. A lattice S is distributive if for any a,b,c∈S,
the following two facts hold


a ∧ (b v c) = (a ∧ b) v (a ∧ c)
a v (b ∧ c) = (a v b) ∧ (a v c)

Theorem 2.6. (Conway) The set of all stable matchings
forms a distributive lattice.

Theorem 2.7. (Blair) Every finite distributive lattice equals
the set of stable matchings of some marriage market.
55
Linear Structure of Stable Matchings

For any given market, a matching f can be written by
a matrix A = (amw)|M|x|W| (called configuration
matrix) ,where



amw = 1 if f(m) = w
amw = 0 otherwise
Let


∑j >m w amj denote the sum over all women j∈W that
man m prefers to woman w
∑i >w m aiw denote the sum over all men i∈M that
woman w prefers to man m
56
Linear Structure of Stable Matchings

Theorem 2.9. (Vande Vate) A matching is stable if
and only if its configuration matrix is an integer matrix
satisfying the following set of constraints:
1)
2)
3)
4)
∑j amj = 1 for all m∈M
∑i aiw = 1 for all w∈W
∑j >m w amj + ∑i >w m aiw + amw ≥ 1, for all m∈M and
w∈W
amw ≥ 0, for all m∈M and w∈W
57
Linear Structure of Stable Matchings

Theorem 2.10. (Vande Vate) Let C be the convex
polyhedron of the solutions to the linear constraints
(1)-(4). Then the extreme points of the linear
constraints (1)-(4) corresponds precisely to the stable
matchings.

Implication: the stable matching that maximizes a
linear objective function can be computed by linear
programming.
58