What’s the problem? Something like stable marriage problem … but without sex.

Slides:



Advertisements
Similar presentations
1 Almost stable matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University Péter Biró Department of Computer.
Advertisements

Modelling and Solving the Stable Marriage problem using Constraint Programming David Manlove and Gregg OMalley University Of Glasgow Department of Computing.
Stable Matching Problems with Constant Length Preference Lists Rob Irving, David Manlove, Gregg OMalley University Of Glasgow Department of Computing Science.
1 Student-Project Allocation with Preferences over Projects David Manlove Gregg OMalley University of Glasgow Department of Computing Science Supported.
1 Almost stable matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of Computer.
An empirical study of the stable marriage problem with ties and incomplete lists (SMTI) Ian Gent & Patrick Prosser.
Blah blah blah. Zoes shark Thanks to the conference artist Phoebe.
Maximal Independent Sets of a Hypergraph IJCAI01.
The Stable Marriage Problem and Constraint Programming.
LAW February A 5/3 approximation algorithm for a hard case of stable marriage Rob Irving Computing Science Department University of Glasgow (joint.
Algorithms Algorithm: what is it ?. Algorithms Algorithm: what is it ? Some representative problems : - Interval Scheduling.
That old man.
A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth.
Practicum 2: - Asymptotics - List and Tree Structures Fundamental Data Structures and Algorithms Klaus Sutner Feb. 5, 2004.
Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision  Preferences for a.
CSC 213 – Large Scale Programming. Today’s Goals  Review discussion of merge sort and quick sort  How do they work & why divide-and-conquer?  Are they.
But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!
Specialised N-ary Constraint for the Stable Marriage Problem By Chris Unsworth and Patrick Prosser.
Joint work with Rob Irving
Digression: Symbolic Regression Suppose you are a criminologist, and you have some data about recidivism. Suppose you are a criminologist, and you have.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Lecture 4 CSE 331 Sep 9, Blog posts for lectures Starts from today See Sep 8 post on the blog.
Tirgul 8 Universal Hashing Remarks on Programming Exercise 1 Solution to question 2 in theoretical homework 2.
130 September 2003 Tractability by Approximating Constraint Languages Martin Green and David Cohen CP 2003 Ninth International Conference on Principles.
This material in not in your text (except as exercises) Sequence Comparisons –Problems in molecular biology involve finding the minimum number of edit.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
The Stable Marriage Problem
L3 #1 The Hospitals / Residents Problem and Some Extensions David Manlove University of Glasgow Department of Computing Science Supported by EPSRC grant.
Specialised (user defined) constraints in JChoco 2 examples: max and subtour elimination.
Pelvic floor Specialised Constraints for Stable Matching Problems Contact details: 17 Lilybank Gardens Glasgow G12 8QQ The Problem.
1 Relations and Functions Chapter 5 1 to many 1 to 1 many to many.
Today  Table/List operations  Parallel Arrays  Efficiency and Big ‘O’  Searching.
Species Trees & Constraint Programming: recent progress and new challenges By Patrick Prosser Presented by Chris Unsworth at CP06.
 Pearson Education, Inc. All rights reserved Searching and Sorting.
Lecture 4 CSE 331 Sep 6, TA change Swapnoneel will leave us for 531 Jiun-Jie Wang will join us.
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Stable Marriage Problem Introductory talk Yosuke KIKUCHI Dept Comp. and Info. Eng. Tsuyama College of Tech OKAYAMA, JAPAN.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Week 2 - Wednesday.  What did we talk about last time?  Running time  Big Oh notation.
1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Specialised Binary Constraint for the Stable Marriage Problem with Ties and incomplete preference lists By Chris Unsworth and Patrick Prosser.
All Pair Shortest Path IOI/ACM ICPC Training June 2004.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth.
Algorithms for Student-Project Allocation
+ Selection Sort Method Joon Hee Lee August 12, 2012.
Design & Co-design of Embedded Systems Final Project: “The Match Maker” Second Phase Oral Presentation Safa S. Mahmoodian.
Bipartite Matching. Unweighted Bipartite Matching.
The Stable Marriage Problem
Reflections of ADS “There has never been a better time to teach Computer Science” Patrick Prosser 2011.
My Digital Portfolio Catherine Peterson McGee 2A “Photography takes an instant out of time, altering life by holding it still.” –Dorthea Lange.
Arc consistency AC5, AC2001, MAC. AC5 A generic arc-consistency algorithm and its specializations AIJ 57 (2-3) October 1992 P. Van Hentenryck, Y. Deville,
1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of.
Kindergarten Sight Words. Yes I can! Come here Look at me.
CSCI 256 Data Structures and Algorithm Analysis Lecture 2 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Project 1 : Phase 1 22C:021 CS II Data Structures.
16 Searching and Sorting.
Lower bound for the Stable Marriage Problem
Stable Marriage Problem
MIS 215 Module 1 – Unordered Lists
Data Structures and Algorithms
“Almost stable” matchings in the Roommates problem
Discrete Math for CS CMPSC 360 LECTURE 9 Last time: Strong induction
Blah blah blah.
Constraint satisfaction problems
A Grand Tour of Stable Matching Problems
Lecture 5 CSE 331 Sep 9, 2011.
15th Scandinavian Workshop on Algorithm Theory
The Selection Problem.
Constraint satisfaction problems
Presentation transcript:

What’s the problem? Something like stable marriage problem … but without sex.

What’s the problem?Stable Marriage Problem (SM) Ant: Bea, Ann, Cat Bob: Bea, Cat, Ann Cal: Ann, Bea, Cat Ann: Bob, Ant, Cal Bea: Cal, Ant, Bob Cat: Cal, Bob, Ant -Men rank women, -Women rank men -Match men to women in a matching M such that there is no incentive for a (m,w) pair not in M to divorce and elope - i.e. it is stable, there are no blocking pairs Order n squared

What’s the problem?Stable Marriage Problem (SM) Ant: Bea, Ann, Cat Bob: Bea, Cat, Ann Cal: Ann, Bea, Cat Ann: Bob, Ant, Cal Bea: Cal, Ant, Bob Cat: Cal, Bob, Ant -Men rank women, -Women rank men -Match men to women in a matching M such that there is no incentive for a (m,w) pair not in M to divorce and elope - i.e. it is stable, there are no blocking pairs Order n squared

What’s the problem?Stable Marriage Problem (SM) Ant: Bea, Ann, Cat Bob: Bea, Cat, Ann Cal: Ann, Bea, Cat Ann: Bob, Ant, Cal Bea: Cal, Ant, Bob Cat: Cal, Bob, Ant -Men rank women, -Women rank men -Match men to women in a matching M such that there is no incentive for a (m,w) pair not in M to divorce and elope - i.e. it is stable, there are no blocking pairs Order n squared

What’s the problem?Stable Marriage Problem (SM) Ant: Bea, Ann, Cat Bob: Bea, Cat, Ann Cal: Ann, Bea, Cat Ann: Bob, Ant, Cal Bea: Cal, Ant, Bob Cat: Cal, Bob, Ant -Men rank women, -Women rank men -Match men to women in a matching M such that there is no incentive for a (m,w) pair not in M to divorce and elope - i.e. it is stable, there are no blocking pairs Order n squared

What’s the problem?Stable Roommates (SR)

What’s the problem?Stable Roommates (SR) Order n squared (Knuth thought not)

What’s the problem?Stable Roommates (SR) Order n squared (Rob thought so)

What’s the problem?Stable Roommates (SR) The green book

What’s the problem?Stable Roommates (SR) Taken from “The green book” 10 agents, each ranks 9 others, gender-free (n=10, n should be even)

What’s the problem?Stable Roommates (SR) Taken from “The green book” 7 stable matchings

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal) 1985 Code

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal) 1985 Code

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal)

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal)

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal)

What’s the problem?Stable Roommates (SR) The Algorithm (Pascal)

Stephan & Ciaran spotted something!

A simple constraint model Stable Roommates (SR)

A simple constraint modelStable Roommates (SR) Preference list for agent i

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice

A simple constraint modelStable Roommates (SR) Preference list for agent i

A simple constraint modelStable Roommates (SR) Preference list for agent i The 5 th preference of agent 3 is agent 1

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice NOTE: a rank value that is low is a preferred choice (large numbers are bad)

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice agent 5 is agent 3’s 1st choice

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice constrained integer variable agent i with a domain of ranks

A simple constraint modelStable Roommates (SR) Preference list for agent i agent j is agent i’s kth choice agent 7 gets 6 th choice and that is agent 10

A simple constraint modelStable Roommates (SR) Given two agents, i and j, if agent i is matched to an agent he prefers less than agent j then agent j must match up with an agent he prefers to agent i

A simple constraint modelStable Roommates (SR) Given two agents, i and j, if agent i is matched to an agent he prefers less than agent j then agent j must match up with an agent he prefers to agent i

A simple constraint modelStable Roommates (SR) Given two agents, i and j, if agent i is matched to an agent he prefers less than agent j then agent j must match up with an agent he prefers to agent i (1) agent variables, actually we allow incomplete lists!

A simple constraint modelStable Roommates (SR) Given two agents, i and j, if agent i is matched to an agent he prefers less than agent j then agent j must match up with an agent he prefers to agent i (1)agent variables, actually we allow incomplete lists! (2)If agent i is matched to agent he prefers less than agent j then agent j must match with someone better than agent i

A simple constraint modelStable Roommates (SR) Given two agents, i and j, if agent i is matched to an agent he prefers less than agent j then agent j must match up with an agent he prefers to agent i (1)agent variables, actually we allow incomplete lists! (2)If agent i is matched to agent he prefers less than agent j then agent j must match with someone better than agent i (3) If agent i is matched to agent j then agent j is matched to agent i

3: : (2) Given two agents, 1 and 3, if agent 1 is matched to an agent he prefers less than agent 3 then agent 3 must match with an agent he prefers to agent 1

3: : (3) Given two agents, 1 and 3, if agent 1 is matched to agent 3 then agent 3 is matched to agent 1

choco

Read in the problem

choco Build the model

choco Find and print first matching

Neat

Can model SMI as SRI Ant: Bea, Ann, Cat Bob: Bea, Cat, Ann Cal: Ann, Bea, Cat Ann: Bob, Ant, Cal Bea: Cal, Ant, Bob Cat: Cal, Bob, Ant men women women+6 SMSRI

Yes, but what’s new here?

1.Model appeared twice in workshops 2.Applied to SM but not SR! (two sets of variables, more complicated) 3.One model for SM, SMI, SR & SRI 4.Simple & elegant

Yes, but what’s new here? But this is hard to believe … it is slower than Rob’s 1985 results! 1.Model appeared twice in workshops 2.Applied to SM but not SR! (two sets of variables, more complicated) 3.One model for SM, SMI, SR & SRI 4.Simple & elegant

Yes, but what’s new here? But this is hard to believe … it is slower than Rob’s 1985 results! 1.Model appeared twice in workshops 2.Applied to SM but not SR! (two sets of variables, more complicated) 3.One model for SM, SMI, SR & SRI 4.Simple & elegant

Cubic to achieve phase-1 table Not so neat 

A specialised constraint When an agent’s domain is filtered AC revises all constraints that involve that variable.

A specialised constraint When an agent’s domain is filtered AC revises all constraints that involve that variable. In this case that is n constraints

A specialised constraint When an agent’s domain is filtered AC revises all constraints that involve that variable. In this case that is n constraints We can do better than this, reducing complexity of model by O(n)

A specialised constraint I implemented a specialised binary SR constraint and an n-ary SR constraint This deals with incomplete lists This is presented in the paper You can also download and run this

A specialised constraint Here’s the code. Not much to it

A specialised constraint Constructor

A specialised constraint awakening

A specialised constraint lower bound changes

A specialised constraint upper bound changes

A specialised constraint removal of a value

A specialised constraint instantiate

Empirical study When I was younger, my mother did things to annoy me

Empirical study SR: simple constraint model, enumerated domains SRB: simple constraint model, bound domains SRN: specialised n-ary constraint, enumerated domains

10 < n < 100: read, build, find all stable matchings

100 < n < 1000: read, build, find all stable matchings

This is new (so says Rob and David) n, average run time, nodes (maximum), proportion with matchings, maximum number of matchings

So?

Well, think on this …

What’s still to do? Prove that the model finds a stable matching in quadratic time …

This was all my own work …

… well, with some help from David Manlove Rob Irving, Jeremy Singer Ian Gent Chris Unsworth Stephan Mertens Ciaran McCreesh Paul Cockshott Joe Sventek Augustine Kwanashie Andrea