580 likes | 758 Views
Market Design and Analysis Lecture 1. Lecturer: Ning Chen ( 陈宁 ) Email: ningc@ntu.edu.sg. Class Information. Focuses economic models and solution concepts computational aspects incentive analysis. 2. References.
E N D
Market Design and Analysis Lecture 1 Lecturer: Ning Chen (陈宁) Email: ningc@ntu.edu.sg
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
Motivating Example – School Admission Students have preferences over different schools and departments every student goes to one school/department Schools and departments also have preferences over students school/department seats are limited How to decide the admission process globally? 5
Motivating Example – American Hospital-Intern 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 two-sided 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 sponsored links keywords 10
Matching Markets Design Mathematical models Economic solution concepts computational issues mathematical properties economic properties 11
Graph Definition 1.1. A graphG = (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. Example V = {v1, v2, v3, v4, v5} E = {(v1,v2), (v1,v3), (v1,v5), (v2,v4), (v3,v5)} v1 v2 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 V1and V2 such that every edge in the graph connects a vertex in V1and a vertex in V2. That is, there are no edges in V1 and V2. V2 V1
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
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). m1 w1 m1 > m2 w1 > w2 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: MW, 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: MW, 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 mproposes 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 \ w1 > w2> w3 m1 w1 m1 > m2> m3 \ \ w1 > w2> w3 m2 w2 m1 > m3> m2 \ \ m3 w3 m1> m2> m3 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 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. m w’ m’ w 31
G-S Algorithm – Women Propose \ w1 > w2> w3 m1 w1 m1 > m2> m3 \ \ w1 > w2> w3 m2 w2 m1 > m3> m2 \ \ m3 w1 > w3> w2 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 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. m w =best(m) m’ 35
Stable Matching by G-S 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’) m w =best(m) m’ 36
Stable Matching by G-S 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. f m w =best(m) f m’ w’ 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 f’(m) m f(w) = f’ 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 g(w) = m g(m) = w. f’ f’(w) w f f’(m) m f’ 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. Thenw >m g(m) and m >w g(w) The former impliesw >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 f2∧ f3 = f4 f5 v f6 = f4 f5∧ f6 = f7 f8 v f9 = f7 f8∧ f9 = f10 w2 w1 w3 w4 f1 m1 m2 m3 m4 f1 f2 m2 m1 m3 m4 f3 f2 f3 m1 m2 m4 m3 f4 m2 m1 m4 m3 f4 f5 m3 m1 m4 m2 f6 f5 f6 m2 m4 m1 m3 f7 m3 m4 m1 m2 f7 f8 m4 m3 m1 m2 f9 f8 f9 m3 m4 m2 m1 f10 m4 m3 m2 m1 f10 50