From the marriage problem to sailor assignment and Google AdWords problems G. Hernandez UofM / UNAL Colombia MATCHING PROBLEMS OLD AND NEW: Based on: “The.

Slides:



Advertisements
Similar presentations
The Mathematics Of 1950s Dating: Who wins the battle of the sexes? Great Theoretical Ideas In Computer Science Steven Rudich CS Spring 2003 Lecture.
Advertisements

Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Naveen Garg, CSE, IIT Delhi
Mechanism Design without Money Lecture 1 Avinatan Hassidim.
Transportation Problem (TP) and Assignment Problem (AP)
Lecture 2: Greedy Algorithms II Shang-Hua Teng Optimization Problems A problem that may have many feasible solutions. Each solution has a value In maximization.
What I Really Wanted To Know About Combinatorial Auctions Arne Andersson Trade Extensions Uppsala University.
Ad Auctions: An Algorithmic Perspective Amin Saberi Stanford University Joint work with A. Mehta, U.Vazirani, and V. Vazirani.
Search Advertising These slides are modified from those by Anand Rajaram & Jeff UllmanAnand Rajaram & Jeff Ullman.
Mining of Massive Datasets Jure Leskovec, Anand Rajaraman, Jeff Ullman Stanford University Note to other teachers and users of these.
Preference Elicitation Partial-revelation VCG mechanism for Combinatorial Auctions and Eliciting Non-price Preferences in Combinatorial Auctions.
Sponsored Search Presenter: Lory Al Moakar. Outline Motivation Problem Definition VCG solution GSP(Generalized Second Price) GSP vs. VCG Is GSP incentive.
Allocation problems - The Hungarian Algorithm The Hungarian algorithm Step 1Reduce the array by both row and column subtractions Step 2Cover the zero elements.
1 Discrete Structures & Algorithms Graphs and Trees: IV EECE 320.
Sponsored Search Auctions 1. 2 Traffic estimator.
The Hungarian algorithm for non-square arrays
CS 345 Data Mining Online algorithms Search advertising.
Assignment Problem Step by Step illustration automatically generated by a C# application:)
CS 345 Data Mining Online algorithms Search advertising.
Online Matching for Internet Auctions DIMACS REU Presentation 20 June 2006 Slide 1 Online Matching for Internet Auctions Ben Sowell Advisor: S. Muthukrishnan.
A Truthful Mechanism for Offline Ad Slot Scheduling Jon Feldman S. Muthukrishnan Eddie Nikolova Martin P á l.
CPS 173 Mechanism design Vincent Conitzer
Multi-Unit Auctions with Budget Limits Shahar Dobzinski, Ron Lavi, and Noam Nisan.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani New Market Models and Algorithms.
An Emerging Technique: Automatic Generation of PowerPoint Presentations Sen Zhang and Hanfu Mi SUNY at Oneonta Merlot 2007.
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani Polynomial Time Algorithms For Market Equilibria.
1 Online algorithms Typically when we solve problems and design algorithms we assume that we know all the data a priori. However in many practical situations.
The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? The Mathematics Of Dating and Marriage: Who wins the battle of the sexes? (adapted.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Adapted from a presentation by Stephen Rudich.
결혼문제로 본 조합론.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Presentation by Shuchi Chawla with some modifications.
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani Polynomial Time Algorithms For Market Equilibria.
Stable Matchings a.k.a. the Stable Marriage Problem
Great Theoretical Ideas in Computer Science.
Lecture 23: Stable Marriage ( Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton) Shang-Hua Teng.
Stable Matching Lecture 7: Oct 3. Matching A B C DE Boys Girls Today’s goal: to “match” the boys and the girls in a “good” way.
Stable Marriages (Lecture modified from Carnegie Mellon University course Great Theoretical Ideas in Computer Science)
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Steffen Staab 1WeST Web Science & Technologies University of Koblenz ▪ Landau, Germany Network Theory and Dynamic Systems Auctions.
Great Theoretical Ideas in Computer Science for Some.
Matching Lecture 19: Nov 23.
Frequency Capping in Online Advertising Moran Feldman Technion Joint work with: Niv Buchbinder,The Open University of Israel Arpita Ghosh,Yahoo! Research.
CS425: Algorithms for Web Scale Data Most of the slides are from the Mining of Massive Datasets book. These slides have been modified for CS425. The original.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? CS Lecture 2.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
Algorithmic Mechanism Design Shuchi Chawla 11/7/2001.
Market Design and Analysis Lecture 1 Lecturer: Ning Chen ( 陈宁 )
18.1 CompSci 102 Today’s topics 1950s TV Dating1950s TV Dating.
From marriage problem to t sailor assignment and AdWords
QUANTITATIVE METHODS FOR MANAGERS ASSIGNMENT MODEL.
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
18.1 CompSci 102 Today’s topics Impaired wanderingImpaired wandering Instant InsanityInstant Insanity 1950s TV Dating1950s TV Dating Final Exam reviewFinal.
Example Program Development
Dating Advice from Mathematics
The Hungarian algorithm for non-square arrays
Stable Matching.
Computational Advertising
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
Comp/Math 553: Algorithmic Game Theory Lecture 09
AdWords and Generalized On-line Matching
Maximum Flow - Best algorithms
Ad Auctions: An Algorithmic Perspective
Cloud Computing Group 7.
The Mathematics Of 1950’s Dating: Who wins The Battle of The Sexes?
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes?
Online algorithms Search advertising
The Hungarian algorithm for non-square arrays
Piyush Kumar (Lecture 3: Stable Marriage)
Computational Advertising and
Presentation transcript:

From the marriage problem to sailor assignment and Google AdWords problems G. Hernandez UofM / UNAL Colombia MATCHING PROBLEMS OLD AND NEW: Based on: “The Mathematics Of 1950’s Dating: Who wins The Battle of The Sexes?”` from Great Theoretical Ideas in Computer Science “New Market Models and Algorithms'‘ talk form V. Vazirani

Outline 1. Matching, Assignment and Correspondence Problems 2. The Stable Marriage Problem Gale-Shapley Algorithm 3. Linear Assignment Problem Kuhn-Munkres Algorithm 4. The Sailor Assignment Problem KM extension EMOAs, HMOAs 5. The Google AdWords Problem

1. Matching's, assignments and correspondence problems

Question: How do we pair, match, assign, make them correspond off in an optimal way ? There are n (agents, boys, sailors, bets, …) and n (tasks, girls, jobs, adwords, …) We may have restrictions on the agents can perform the particular tasks We may have preference lists or a cost of assigning an agent to a task, or both

The Traditional Marriage Problem 2. The Stable Marriage Problem Taken from

Question: How do we pair them off? Dating Scenario There are n boys and n girls Each girl has her own ranked preference list of all the boys Each boy has his own ranked preference list of the girls The lists have no ties

3,5,2,1,4 1 5,2,1,4,3 2 4,3,5,1,2 3 1,2,3,4,5 4 2,3,4,1, ,2,5,1,4 2 1,2,5,3,4 3 4,3,2,1,5 4 1,3,4,2,5 5 1,2,4,5,3

More Than One Notion of What Constitutes A “Good” Pairing Maximizing total satisfaction Hong Kong and to an extent the USA Maximizing the minimum satisfaction Western Europe Minimizing maximum difference in mate ranks Sweden Maximizing people who get their first choice Barbie and Ken Land

Rogue Couples - Instability Suppose we pair off all the boys and girls Now suppose that some boy and some girl prefer each other to the people to whom they are paired They will be called a rogue couple

Why be with them when we can be with each other?

What use is fairness, if it is not stable? Any list of criteria for a good pairing for “marriage” must include stability. If the pairing can be challenged in an open market it is doomed if it contains a rogue couple.

A pairing of boys and girls is called stable if it contains no rogue couples Stable Pairings

A pairing of boys and girls is called stable if it contains no rogue couples Stable Pairings 3,2,1 1 2,1,3 2 3,1, ,2,1 2 1,2,3 3 3,2,1

The Traditional Marriage Algorithm Worshipping Males Female String

The Traditional Marriage Algorithm For each day that some boy gets a “No” do: Morning Each girl stands on her balcony Each boy proposes to the best girl whom he has not yet crossed off Afternoon (for girls with at least one suitor) To today’s best: “Maybe, return tomorrow” To any others: “No, I will never marry you” Evening Any rejected boy crosses the girl off his list If no boys get a “No”, each girl marries boy to whom she just said “maybe” Gale-Shapley

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1 X

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1 X

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1 X X

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1 X X

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1 X X

The Traditional Marriage Algorithm 3,2,1 1 2,1,3 2 3,1, ,2,3 3 3,2,1

The TMA always terminates in at most n 2 days. TMA always produces a male- optimal, female-pessimal pairing. A boy’s optimal girl is the highest ranked girl for whom there is some stable pairing in which the boy gets her A “master list” of all n of the boys lists starts with a total of n x n = n 2 girls on it Each day that at least one boy gets a “No”, so at least one girl gets crossed off the master list Therefore, the number of days is bounded by the original size of the master list

TMA Related problems ! Weighted matching Stable roommates hospitals/residents problem hospitals/residents problem with couples

Current real applications of TMA! National Resident Matching Program The National Resident Matching Program (NRMP) is a private, not-for-profit corporation established in 1952 to provide a uniform date of appointment to positions in graduate medical education (GME) in the United States.

3. The Linear Assignment Problem Agents Tasks Complete Bipartite Graph n n r 0,0 r n,n n! assignments r 1,1 r 1,2 r 1,3 … r 1,n r 2,1 r 2,2 r 2,3 … r 2,n : r n,1 r n,2 r n,3 … r n,n

LAP Kuhn-Munkres Algorithm The Kuhn- Munkers (Hungarian) algorithm is used to find an optimum (maximum or minimum weight) matching in a complete bipartite graph in time O(n 3 ) Step 1: For each row of the matrix, find the smallest element and subtract it from every element in its row.

LAP Kuhn-Munkres Algorithm Step 2: Find a zero (Z) in the resulting matrix. If there is no starred zero in its row or column, star Z. Repeat for each element in the matrix. Step 3: Cover each column containing a starred zero. If n columns are covered, the starred zeros describe a complete set of unique assignments. In this case STOP.

LAP Kuhn-Munkres Algorithm Step 2: Find a zero (Z) in the resulting matrix. If there is no starred zero in its row or column, star Z. Repeat for each element in the matrix. Step 3: Cover each column containing a starred zero. If n columns are covered, the starred zeros describe a complete set of unique assignments. In this case STOP.

LAP Kuhn-Munkres Algorithm Step 4: Find a uncovered zero and prime it. If there is no starred zero in the row containing this primed zero, Go to Step 5. Otherwise, cover this row and uncover the column containing the starred zero. Continue in this manner until there are no uncovered zeros left. Save the smallest uncovered value and Go to Step 6. Step 5: Construct a series of alternating primed and starred zeros as follows. Let Z 0 represent the uncovered primed zero found in Step 4. Let Z 1 denote the starred zero in the column of Z 0 (if any). Let Z 2 denote the primed zero in the row of Z 1 (there will always be one). Continue until the series terminates at a primed zero that has no starred zero in its column. Unstar each starred zero of the series, star each primed zero of the series, erase all primes and uncover every line in the matrix. Return to Step 3. Step 6: Add the value found in Step 4 to every element of each covered row, and subtract it from every element of each uncovered column. Return to Step 4 without altering any stars, primes, or covered lines.

LAP Kuhn-Munkres Algorithm Step: 4 Step: 6 Step: 4 Step: 5Step: 3Final Solution

XML DB Jobs database Sailors 120,000/year 1,000-10,000 to be assigned every two weeks Commanders Detailers The Sailor Assignment Problem Four objectives TS PCS SR CR

MK algorithm applied to SAP 1.SAP is multi-objective whereas LAP is single-objective. Solution: use of weight vectors 2.In case of SAP, we do not have a complete bipartite graph (many infinite values for big instances with). Solution: sparse matrix represent. 3.Sometimes we do not have a complete matching (conflicts), in those case MK does not work. Solution: The use of dummy jobs. Problems SailorsJobs dummy

Weight vectors n 1 r 1,1 2 r 1,2 k r 1,k … ….…. ….…. ….…. FTS 1, 1 FPCS 1,1 FSR 1,1 FCR 1,1 Job IDSailor-Job Information Reduced rating Sailor Array (List) Sparse Matrix representation r 0,0 r 0,1  …  r 1,0 r 1,1  …  : r n,0 r n, 1  …  r 0,0 r 0,1  …  r d0  …  r 1,0 r 1,1  …   r d1 …  : r n,0 r n, 1  …    … r dn After adding dummy jobs in the matrix Dummy jobs

EMOAs = NSGAII, SPEA2

RESULTS KM(287) NSGAII NGSA(300)-KM (5)

4. The AdWords Problem Paid for each “impression” Web QUERY Pais when someone clicks on Google Yahoo! MSN

New algorithmic and game-theoretic questions Monika Henzinger, 2004: Find on-line algorithm to maximize Google’s revenue. Queries are coming on-line. Instantaneously decide which bidder gets it.

APP The Adwords Problem

The Adwords Problem: N advertisers;  Daily Budgets B 1, B 2, …, B N  Each advertiser provides bids for keywords he is interested in. Search Engine

The Adwords Problem: N advertisers;  Daily Budgets B 1, B 2, …, B N  Each advertiser provides bids for keywords he is interested in. Search Engine queries (online)

The Adwords Problem: N advertisers;  Daily Budgets B 1, B 2, …, B N  Each advertiser provides bids for keywords he is interested in. Search Engine Select one Ad Advertiser pays his bid queries (online)

The Adwords Problem: N advertisers;  Daily Budgets B 1, B 2, …, B N  Each advertiser provides bids for keywords he is interested in. Search Engine Select one Ad Advertiser pays his bid queries (online) Maximize total revenue Online competitive analysis - compare with best offline allocation

The Adwords Problem: N advertisers;  Daily Budgets B 1, B 2, …, B N  Each advertiser provides bids for keywords he is interested in. Search Engine Select one Ad Advertiser pays his bid queries (online) Maximize total revenue Example – Assign to highest bidder: only ½ the offline revenue

Example: $1$0.99 $1 $0 Book CD Bidder1Bidder 2 B 1 = B 2 = $100 Queries: 100 Books then 100 CDs Bidder 1 Bidder 2 Algorithm Greedy LOST Revenue 100$

Example: $1$0.99 $1 $0 Book CD Bidder1Bidder 2 B 1 = B 2 = $100 Queries: 100 Books then 100 CDs Bidder 1 Bidder 2 Optimal Allocation Revenue 199$

Generalizes online bipartite matching Each daily budget is $1, and each bid is $0/1.

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching advertisers (boys) queries (girls)

Online bipartite matching Karp, Vazirani & Vazirani, 1990: Online optimal (1-1/e =0.63)n matching.  2n nodes bipartite graph  Perfect matching (n pairs).  Any deterministic online algorithm has expected value <=  RANDOM (adversary) 1/2n

RANDOM Algorithm Online bipartite matching

advertisers (boys) queries (girls) :::: :::: n/2

Online bipartite matching advertisers (boys) queries (girls) :::: :::: n/2

Online bipartite matching advertisers (boys) queries (girls) :::: :::: n/2 Any deterministic online algorithm has expected value on this instance <= (1-1/e)n

Online bipartite matching Karp, Vazirani & Vazirani, 1990:  RANKING: Rank by random permutation the boys vertices at the beging As each girl arrives, match her to the eligible boy, if any, of highest rank. Expected number of pairs n (1-1/e) + o(n) Optimal.

Online bipartite matching Kalyanasundaram & Pruhs, 2000: On-line deterministic algorithm: 1-1/e factor algorithm for b-matching: Daily budgets $b, bids $0/1, b>>1  Awards the query to the interested advertiser who has the highest unspent budget.

Adwords Problem Mehta, Saberi, Vazirani & Vazirani, 2005: 1-1/e algorithm, assuming budgets>>bids. bids = 0, 1 or 2.  Natural extension of KP00 that assigns the query to the highest bidder, in case of ties: the largest remaining budget. strictly smaller and Bounded Away from 1-1/e.

Adwords Problem Mehta, Saberi, Vazirani & Vazirani, 2007: 1-1/e algorithm, assuming budgets>>bids. A bidder pays only if the user clicks on his ad. Advertisers have different daily budgets. Instead of charging a bidder his actual bid, the search engine company charges him the next highest bid. Multiple ads can appear with the results of a query. Advertisers enter at different times. Optimal!

New Algorithmic Technique Idea: Use both bid and fraction of left-over budget

New Algorithmic Technique Idea: Use both bid and fraction of left-over budget Correct tradeoff given by tradeoff-revealing family of LP’s

New Algorithmic Technique ψ(x) = 1 – e -x The optimal tradeoff function is:

Algorithm Allocate the next query to the bidder i maximizing the product of his bid and ψ(T(i)), where T(i) is the fraction of the bidder´s budget which has been spent so far, i.e., T(i) = m i / b i, where b i is the total budget of bidder i, m i is the amount of money spent by bidder i when the query arrives. The algorithm assumes that the daily budget of advertisers is large compared to their bids.

Randomized Technique The randomized algorithm CHOSES a random permutation of ADVERTISERS in advance, and rank the ads in order of Where d is the bid and n is the total number of advertisers and rank is the advertiser’s rank in the permutation d*ψ(rank / n)

Algorithm Google, then, will maximize its profits if it allocates queries to the advertiser with the highest value of d*ψ(f), where d is the bid and f is rank of the fraction of the budget that has not yet been spent.

Research directions The current algorithm assumes that Google has no advance information about each day´s sequence of queries when, in fact, it does. Theoretic Angle: A ranking algorithm should minimize manipulation of the market by encouraging advertisers to reveal their true valuations for a given keyword and their true daily budgets.

What is needed today? An inherently algorithmic theory of market equilibrium New models that capture new markets

Beginnings of such a theory, within Algorithmic Game Theory Started with combinatorial algorithms for traditional market models New market models emerging

Open issues Strongly poly algs for approximating  nonlinear convex programs  equilibria Insights into congestion control protocols?

Open issues Borgs et al, gave some evidence that it is impossible to design a truthful mechanism in the presence of budget constraints. [BCI + 05]

References D. Gale and L. S. Shapley: College Admissions and the Stability of Marriage, American Mathematical Monthly 69, 9-14, 1962.American Mathematical Monthly R.M. Karp, U.V. Vazirani, and V.V. Vazirani. An optimal algorithm for online bipartite matching. In proceedings of the 22nd Annual ACM Symposium on Theory of Computing, Mehta, A. Saberi, A. Vazirani, U. Vazirani, V. AdWords and Generalized On-line Matching. Journal of the ACM C. Borgs, J. Chayes, N. Inmmorlica, M. Mahdian, and A. Saberi. Multi-unit auctions with budget-constrained bidders. In ACM conference on electronic commerce B. Kalyanasundaram and K.R. Pruhs. An optimal deterministic algorithm for online b -matching. Theoretical Computer Science, 233(1{2):319{-25, Computer Scientists Optimize Innovative Ad Auction, SIAM News, Volume 38, Number 3, April 2005.