Matching and Market Design: Introduction, Bipartite Matching N ICOLE I MMORLICA, M ICROSOFT R...
-
Upload
diane-harrison -
Category
Documents
-
view
225 -
download
0
Transcript of Matching and Market Design: Introduction, Bipartite Matching N ICOLE I MMORLICA, M ICROSOFT R...
Matching and Market Design:Introduction, Bipartite Matching
NICOLE IMMORLICA, MICROSOFT RESEARCH NE
Background. Computer science, economics, applied research.
NICOLE IMMORLICA, MSR NE RESEARCHER
Ph.D. 2005 (in computer science). Thesis: Computing with Strategic Agents.
Postdocs 2005-2008. Studied applications of:theory to advertising markets at MSR, combinatorics to economics at CWI.
Professor 2008-2012 (of computer science). Taught courses and advised students in CS-econ.
Researcher 2012-present. Study CS-econ issues from the very theoretical to the very applied.
Research. What are realistic utopias for selfish societies?
NICOLE IMMORLICA, MSR NE RESEARCHER
Mechanism Design: Can we systematically allocate scare resources to people who need it the most?Or sell the resources and generate high revenue? sim
plicity
Social Networks: What behavioral patterns can besupported by various structures? What information can be learned? How does behavior impact structure?diversi
ty
Market Design: What outcomes will be observedin matching markets, and how can we facilitatethe matching process in practical settings? partial
information
COURSE LOGISTICS
Course. CS 286r: Topics at the Interface of Computer Science and Economics – Matching and Market Design.
Website. www.Immorlica.com/marketDesign/Harvard
Lectures. Fridays, 9am-noon, MD 221.Includes a 20 minute coffee break halfway through, and you’re all invited to join me for lunch afterwards.
Teachers. Nicole Immorlica, Ran Shorrer, Brendan Lucier, Scott Kominers, and more!
Workload. Readings/participation (around 20 pages/week), 2 problem sets (around 6 hrs each), course project (3 stages).
Outline
1. Introduction: markets in practice and theory, discussion of market design
2. Bipartite Matching: elementary definitions, max cardinality & max weight matchings
Part 1:Introduction.
Markets are a medium of exchange.
Markets
agents objects
Markets
firms
workers
agents objects
Labor MarketsSchool Choice
students
high schools
Sponsored Search
advertisers
ad slots
Kidney Exchange
patients
kidneys
Traditional markets: shopping malls, eBay, ad auctions, FCC spectrum auctions
Examples
School choice: allocation of students to schools via centralized city-run program
Labor markets: NRMP, cadet-branch matching
Kidney exchange: matching of kidney donors to compatible recipients
Al Roth
Market Design
Market design involves a responsibility for detail, a need to deal with all of a market’s complications, not just its principle features. Designers therefore cannot work only with the simple conceptual models used for theoretical insights into the general working of markets. Instead, market design calls for an engineering approach.
– from The Economist as an Engineer, by Al Roth
Market Design
…this paper makes the case that experimental and computational economics are natural complements to game theory in the work of design. The paper also argues that some of the challenges facing both markets involve dealing with related kinds of complementarities, and that this suggests an agenda for future theoretical research.
– from The Economist as an Engineer, by Al Roth
Market Design
Develop simple theory,…to deal with complexity in practice.
Market Design
Computer Science&
Economics
On Spherical Cows …
Computer Science: computability
NP: set of problems whose solutions can be checked efficiently.
P: set of problems that can be solved efficiently (i.e., in polynomial time).
P versus NP
Computer Science: computability3 6 8
1 2
9
4
3 2 7
8 5
9
4 5
8 9
Computer Science: computability7 5 1 9 3 2 6 4 8
3 8 4 1 5 6 9 7 2
9 2 6 4 7 8 1 3 5
6 9 7 2 4 1 5 8 3
5 3 2 6 8 7 4 1 9
1 4 8 3 9 5 7 2 6
8 1 3 5 6 4 2 9 7
4 6 9 7 2 3 8 5 1
2 7 5 8 1 9 3 6 4
Computer Science: computability
Traveling Salesman: find smallest route that visits each capitol.
Computer Science: computabilityStudent social network:
Study groups of size two? Size three?
Economics: rationality
Many systems are composed of many independent self-interested agents
These agents are • rational, i.e. they act in their own self-interest• and reason strategically, i.e. they take into
account the actions of others
Let’s play a game
Experiment: The median game.
1. Guess an integer in [1, …, 100].2. Write your number on a piece of paper.
P R I Z E : The people whose numbers are closest to 2/3 of the median win.
The Median Game
Jose Julian Bruce Marcos Nicole
25 45 0 50 69
Calculating the winner:1. Sort the numbers: 0, 25, 45, 50, 692. Pick the middle one (the median): 453. Compute 2/3 of the median: 30
winner!
Are you a winner?
Questions
Given computability & rationality assumptions:• How will selfish agents behave?• What properties emerge as a result of selfish
behavior?• Is it possible to formulate the rules of the
system to encourage socially-optimal behavior?
Develop simple theory,…to deal with complexity in practice.
Market Design
Thickness: need to attract a sufficient proportion of potential market participants to come together ready to transact with one another.
Market Design Complexities
– from What have we learned from market design?, by Al Roth
Congestion: must provide enough time or fast enough transactions so that market participants can consider enough alternatives to arrive at satisfactory ones.
Market Design Complexities
– from What have we learned from market design?, by Al Roth
Simplicity: must make it easy to participate in market as opposed to transacting outside of the marketplace or engaging in strategic behavior that reduces overall welfare.
Market Design Complexities
– from What have we learned from market design?, by Al Roth
Others:• Asset to be traded• Nature of contracts• Medium of exchange• Measure of performance• Need for design• Market culture• Fairness and repugnance
Market Design Complexities
– from 1/22/14 post on The Leisure of the Theory Class, by Ricky Vohra
Example: traditional markets
FCC spectrum auctions, eBay, ad auctions etc.: sellers offer goods and services, buyers purchase via posted prices or auctions
Practice:
Example: traditional markets
Strategic behavior, complex agent preferences, price discovery, packages and deals
Issues:
Example: traditional markets
Existence of market-clearing prices, approximately optimal simple mechanisms, techniques to aid price discovery
Theory:
Example: school choice
Boston, New York City, etc:students submit preferences about different schools; matched based on “priorities” (e.g., test scores, geography, sibling matches)
Practice:
Example: school choice
NYC too slow to clear; Boston strategically complicated, result in unstable matches, many complaints in school boards
Issues:
Example: school choice
theorists proposed alternate mechanisms including the Gale-Shapley algorithm for stable marriage, schools adopt these
Theory:
Example: entry-level labor markets
National Residency Matching Program (NRMP): physicians look for residency programs at hospitals in the United States
Practice:
Example: entry-level labor markets
1950 1990
decentralized, unraveling,
exploding offers inefficiencies
centralized clearinghouse, 95% voluntary participation
dropping participation sparks redesign to
accommodate couples, system still in use
Issues:
Example: entry-level labor markets
NRMP central clearinghouse algorithm corresponds to Gale-Shapley algorithm
Theory:
Example: kidney exchange
In 2005:• 75,000 patients waiting for transplants• 16,370 transplants performed (9,800 from
deceased donors, 6,570 from living donors)• 4,200 patients died while waiting
Practice:
Example: kidney exchange
Source and allocation of kidneys:• cadaver kidneys: centralized matching
mechanism based on priority queue• living donors: patient must identify donor,
needs to be compatible• other: angel donors, black market sales
Issues:
Example: kidney exchange
living donor exchanges:
Theory:
patient 1 donor 1
patient 2 donor 2
Example: kidney exchange
living donor exchanges:adopted mechanism uses top-trading cycles, theory of maximum matching, results in improved welfare (many more transplants)
Theory:
Part 2:Bipartite Matching.
MatchingBoys Girls
Questions. 1) What’s the most # of agents we can accommodate?2) How can we find this allocation?
Matching
Boys Girls
left vertices right vertices
edges
Bipartite Graph:
Matching
left vertices
right vertices
edges
Bipartite Graph:
10
Matching
matching = a set of edges that share no vertices.
Matching
How to find a maximum matching?Idea: add edges until we can’t anymore.
maximal
Matching
How to find a maximum matching?Idea: add edges until we can’t anymore.Not maximum, but close!
maximal maximum
Matching
Defn. A soln. S to a maximization problem is an α-approximation if its value is at least an α fraction of the optimal value.Thm. Maximal matching (½)-approximates maximum matching.
maximal maximum
Matching
How to find a maximum matching?Idea: add edges until we can’t anymore, allowing people to push each other out.
Matching
augmenting path = path between exposed vertices
Theorem. Matching is maximum iff no augmenting paths.
Matching
matching = a set of edges that share no vertices.vertex cover = a set of vertices such that each edge is incident to at least one vertex in the set.
Matching
Theorem. Maximum matching equals minimum vertex cover.
Matching
Theorem. Maximum matching equals minimum vertex cover (bipartite graphs).
Proof. Matching = M, cover = C.1. |M| ≤ |C|.
Matching
Theorem. Maximum matching equals minimum vertex cover (bipartite graphs).
Proof. Matching = M, cover = C.2. |max M| ≥ |min C| (constructive).
Matching
Theorem. Maximum matching equals minimum vertex cover (bipartite graphs).
Proof. Matching = M, cover = C.2. |max M| ≥ |min C| (constructive).
augmenting path = path between exposed vertices
Matching
Theorem. Maximum matching equals minimum vertex cover (bipartite graphs).
Proof. Matching = M, cover = C.2. |max M| ≥ |min C| (constructive).
Key. vertices reachable from left-side exposed vertices.proposed vertex cover.
Matching
Theorem. Maximum matching equals minimum vertex cover.Question. When can we match everyone?
Perfect Matching
Defn. A matching is perfect if every vertex is matched.Question. When can we match everyone?
Hall’s Marriage Theorem
Thm. A perfect matching exists if and only if every set of girlslikes at least as large a set of boys.
Defn. A matching is perfect if every vertex is matched.
Boys Girls
Hall’s Marriage Theorem
Condition. Every set of girls likes at least as large a set of boys.
Boys Girls
Girls not in Cover
Prf. |Cover| = |Boys in Cover| + |Girls in Cover|≥ |Girls not in Cover| + |Girls in Cover|= |Girls|
and Girls is a cover, so |min Cover| ≤ |Girls|.
Boys in Cover
Matching in Random Graphs
Agents Items
Theorem. If each agent likes at least 2log n items, then with good probability there is a way to assign everyone an item they like.
Matching in Random Graphs
Theorem. If each agent likes at least 2ln(n) items, then with good probability there is a way to assign everyone an item they like.
Intuition. Deferred randomness.1) Pr[ unique choice in market of size k ] = (1 – 1/k)k-1 ≥ 1/32) Constant fraction of market clears in each step.3) Entire market clears in about log n steps.
Matching in Random Graphs
Theorem. If each agent likes k < ½ ln(n) items, then with good probability someone is unassigned.
Intuition. Some item is liked by nobody.
E[ # unliked items] = n Pr[ item is unliked ]∙= n (1 – 1/n)∙ nk
= n e∙ -k
> n n∙ -½ > 1
for k < ½ ln(n).
Weighted Matching
Questions. 1) What’s the most value we can create?2) How can we find this allocation?
Agents Items$4
$8
$6
Weighted MatchingAgents Items
$4
$8
$6
Agents Items
WLOG, assume complete bipartite graph.Look for max-weight matching .
2
Primal-Dual ApproachL R
23
1
3
2
1
21
“dual” variable y maps vertices to numbers such that for every edge e = (u,v), w(e) ≤ y(u) + y(v) (y non-negative).
3
3
3
3
0
0
0
0
“budgets” y(.) “prices” y(.)
“value” or“weight” w(.)
Primal-Dual ApproachL R
1
3
21
w(e) ≤ y(u) + y(v) implies ∑e in M w(e) ≤ ∑e in LUR y(v)
3
3
3
3
0
0
0
0
“budgets” y(.) “prices” y(.)
“weight” w(.)
2
1
2
32
2
Primal-Dual ApproachL R
23
1
3
2
1
21
Feasible Dual: for every M, y(.), ∑e in M w(e) ≤ ∑e in LUR y(v)
3
3
3
3
0
0
0
0
“budgets” y(.) “prices” y(.)
“weight” w(.)
Certificate of Optimality: find M, y(.) s.t. this holds with equality
Hungarian Algorithm
Algorithm maintains invariants1) Feasibility of dual: w(e) ≤ y(u) + y(v) 2) Tightness: if e=(u,v) is in M, then w(e) = y(u) + y(v)
Algorithm:Initialize y(v) = max weight for v in L; y(v) for v in R = 0; M = {.}.Repeat: 1) Augment matching: if there’s an augmenting path in
subgraph of tight edges, use it to augment matching M.2) Dual adjustment: if M is not perfect, adjust dual variable y(.)
to make more edges tight.Until M is maximum or duals reach zero.
Augmentation Step
L R
3
2
Find augmenting paths in subgraph of tight edges.
4
5
3
1
2
0
4
3
56
5
matching edge
new matching edges
Dual Adjustment StepL R
3
2
Update dual variables to make more tight edges:1) Orient matching edges right-to-left, tight edges left-to-right.2) Find set Z of vertices reachable from exposed vertices of L.3) Decrease dual of v in L ∩ Z; increase dual of v in R ∩ Z until
an edge goes tight.
4
5
3
1
2
0
4
3matching edges
tight edges
56
53
Dual Adjustment Step
matching edgestight edges
L R
1
11
1
2
3
2
1
0
0
0
23
32
22
Dual Adjustment Step
matching edgestight edges
L R
1
11
1
2
3
2
1
0
0
0
23
32
22
0
1
2
2
1
Dual Adjustment Step
matching edgestight edges
L R
1
11
0
1
2
2
2
1
0
0
23
32
2
2
CorrectnessAlgorithm maintains invariants1) Tight: w(e) = y(u) + y(v), for e in M
matching edges can’t cross in or out of red set.
2) Dual feasibility: w(e) ≤ y(u) + y(v) edges that cross from inside red set to outside it cannot be tight.
L R
-Δ +Δ
matching edgestight edges
reachable from exposed vertices
OptimalityUncovered vertices all have zero dualsat end of algorithm:1) Once a vertex is covered, it
remains so throughout algorithm.2) So uncovered left-vertices have
duals that decrease at same rate and reach zero simultaneously
3) And uncovered right-vertices have zero duals initially, never change.
Thus, by tightness invariant, weight of matching equals dual value and so it must be optimal.
L R
-Δ +Δ
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
11
2
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
11
2
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
11
2
0 2
11
2
Example
matching edgestight edges
L R
1
1
2
3
3
2
22
1
3
3
3
3
0
0
0
0
2
2
11
2
0 2
11
2
Example
matching edgestight edges
L R
1
1
2
3
3
2
22
1
0
0
0
0
1 2
1
3
2
1
3
3
3
3
2
2
1
2
0
1
2
-1
0
1
1
Example
matching edgestight edges
L R
1
1
2
3
3
2
22
1
3
3
3
3
2
2
1
2
0
1
2
-1
0
1
1
0
0
0
0
1 2
1
3
2
1
Example
matching edgestight edges
L R
1
1
3
3
3
3
0
0
0
0
2
3
3
2
22
1
2
2
11
2
0 2
11
2
-1 3
20
11
1