CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 1.

Slides:



Advertisements
Similar presentations
ZeusBerthaAmyDianeErikaClare YanceyAmyClareDianeBerthaErika XavierBerthaClareErikaDianeAmy WyattDianeAmyBerthaClareErika VictorBerthaDianeAmyErikaClare.
Advertisements

Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 2.
1 Overview of Graph Theory Addendum “The Stable Marriage Problem” Instructor: Carlos Pomalaza-Ráez Fall 2003 University of Oulu, Finland.
Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision  Preferences for a.
Telling a computer how to behave (via pseudocode -- a workaround for Computing’s Tower of Babel.) COS 116, Spring 2010 Adam Finkelstein.
Data Structures & Algorithms Richard Newman Clip Art Sources s s s s
ZeusBerthaAmyDianeErikaClare YanceyAmyClareDianeBerthaErika XavierBerthaClareErikaDianeAmy WyattDianeAmyBerthaClareErika VictorBerthaDianeAmyErikaClare.
CSE 421 Algorithms Richard Anderson Lecture 2. Announcements Office Hours –Richard Anderson, CSE 582 Monday, 10:00 – 11:00 Friday, 11:00 – 12:00 –Yiannis.
Lecture 4 CSE 331 Sep 9, Blog posts for lectures Starts from today See Sep 8 post on the blog.
Princeton University COS 423 Theory of Algorithms Spring 2002 Kevin Wayne COS 423: Theory of Algorithms Princeton University Spring, 2001 Kevin Wayne.
Telling a computer how to behave (via pseudocode -- a workaround for Computing’s Tower of Babel.) COS 116, Spring 2012 Adam Finkelstein.
Creating new worlds inside the computer COS 116: 2/10/2011 Sanjeev Arora.
CSC 430 Lecture1: Introduction and Python Primer.
The Stable Marriage Problem
1 Chapter 1 Introduction: Some Representative Problems Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 Stable Matching Problem Goal. Given n men and n women, find a "suitable" matching. n Participants rate members of opposite sex. n Each man lists women.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013.
Algorithm Design by Éva Tardos and Jon Kleinberg Slides by Kevin Wayne Copyright © 2004 Addison Wesley COS 423: Theory of Algorithms Kevin Wayne Princeton.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 4.
2.1 Computational Tractability. 2 Computational Tractability Charles Babbage (1864) As soon as an Analytic Engine exists, it will necessarily guide the.
Complexity & Analysis of Data Structures & Algorithms Piyush Kumar (Lecture 2: Algorithmic Analysis) Welcome to COP4531 Based on slides from J. Edmonds,
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 33.
Advanced Algorithms Piyush Kumar (Lecture 1: Introduction) Welcome to COT5405.
Lecture 2 CSE 331. Day 1 Survey On UBlearns Day 1 Survey (talking points) Security MS PhD for research Building PC’s for 442 It’s ok to play games –
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 17.
1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
1 Chapter 1 Introduction: Some Representative Problems Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 1.
CSCI 256 Data Structures and Algorithm Analysis Lecture 3 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
CSE 421 Algorithms Richard Anderson (for Anna Karlin) Winter 2006 Lecture 2.
The Stable Marriage Problem
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
CSCI 256 Data Structures and Algorithm Analysis lecture 1 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Fair Shares.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 32.
CSCI 256 Data Structures and Algorithm Analysis Lecture 2 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Market Design and Analysis Lecture 2 Lecturer: Ning Chen ( 陈宁 )
COMP9007: Algorithms Stable Matching. What's in an algorithm? Algorithms can have huge impact For example – A report to the White House from 2010 includes.
Victor proposes to Bertha.
Matching Boys Girls A B C D E
Stable Matching.
Chapter 1 Introduction: Some Representative Problems
Stable Marriage Problem
Chapter 10 Iterative Improvement
CSE 421: Introduction to Algorithms
11/15/2018.
Lecture 5 CSE 331 Sep 10, 2010.
11/18/2018.
Lecture 6 CSE 331 Sep 11, 2017.
Richard Anderson (for Anna Karlin) Winter 2006 Lecture 1
Chapter 2 Basics of Algorithm Analysis
S. Raskhodnikova; based on slides by K. Wayne
Richard Anderson Autumn 2006 Lecture 1
CSE 421: Introduction to Algorithms
1.1 A First Problem: Stable Matching
Discrete Math for CS CMPSC 360 LECTURE 9 Last time: Strong induction
Richard Anderson Autumn 2015 Lecture 1
Chapter 1 Introduction: Some Representative Problems
2/27/2019.
Richard Anderson Autumn 2006 Lecture 1
Chapter 2 Basics of Algorithm Analysis
Lecture 6 CSE 331 Sep 12, 2016.
4/21/2019.
Lecture 7 CSE 331 Sep 10, 2014.
Richard Anderson Winter 2019 Lecture 1
Piyush Kumar (Lecture 3: Stable Marriage)
Lecture 7 CSE 331 Sep 11, 2013.
5/29/2019.
Richard Anderson Autumn 2016 Lecture 1
Presentation transcript:

CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 1

Course Overview Class webpage:

Algorithm –[webster.com] A procedure for solving a mathematical problem (as of finding the greatest common divisor) in a finite number of steps that frequently involves repetition of an operation –[Knuth, TAOCP] An algorithm is a finite, definite, effective procedure, with some input and some output Algorithms Great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious. But once unlocked, they cast a brilliant new light on some aspect of computing. - Francis Sullivan

Theory of Algorithms "As soon as an Analytic Engine exists, it will necessarily guide the future course of the science. Whenever any result is sought by its aid, the question will arise - By what course of calculation can these results be arrived at by the machine in the shortest time? - Charles Babbage

Theory of Algorithms Claim: All of Computer Science is the study of algorithms What is expertise? How do experts differ from novices?

Algorithmic Paradigms Design and analysis of computer algorithms –Greed –Divide-and-conquer –Dynamic programming –Network flow –Intractability –Coping with intractability

What is a Problem? Instance Solution Constraints on solution Measure of value

A First Problem: Stable Matching Setting: –Assign TAs to Instructors –Avoid having TAs and Instructors wanting changes E.g., Prof A. would rather have student X than her current TA, and student X would rather work for Prof A. than his current instructor

Stable Matching Problem Goal: Given n men and n women, find a "suitable" matching –Each man lists women in order of preference from best to worst –Each woman lists men in order of preference from best to worst ZeusAmy Clare Bertha Yancey Bertha Clare Amy XavierAmy Clare Bertha 1 st 2 nd 3 rd Men’s Preference Profile favoriteleast favorite ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1 st 2 nd 3 rd Women’s Preference Profile favoriteleast favorite

Stable Matching Problem Perfect matching: everyone is matched monogamously –Each man gets exactly one woman –Each woman gets exactly one man Stability: no incentive for some pair of participants to undermine assignment by joint action –In matching M, an unmatched pair m-w is unstable if man m and woman w prefer each other to current partners

Stable Matching Problem Stable matching: perfect matching with no unstable pairs Stable matching problem: Given the preference lists of n men and n women, find a stable matching if one exists

Stable Matching Problem Q: Is assignment X-C, Y-B, Z-A stable? ZeusAmyClareBertha YanceyBerthaClareAmy XavierAmyClareBertha 1 st 2 nd 3 rd Men’s Preference Profile ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1 st 2 nd 3 rd Women’s Preference Profile favoriteleast favoritefavorite least favorite

Stable Matching Problem Q: Is assignment X-C, Y-B, Z-A stable? A: No. Bertha and Xavier will hook up ZeusAmyClareBertha YanceyBerthaClareAmy XavierAmyClareBertha 1 st 2 nd 3 rd Men’s Preference Profile ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1 st 2 nd 3 rd Women’s Preference Profile favoriteleast favoritefavorite least favorite

Stable Matching Problem Q: Is assignment X-A, Y-B, Z-C stable? A: Yes ZeusAmyClareBertha YanceyBerthaClareAmy XavierAmyClareBertha ClareXavierZeusYancey BerthaXavierZeusYancey AmyYanceyZeusXavier 1 st 2 nd 3 rd 1 st 2 nd 3 rd favoriteleast favoritefavorite least favorite Men’s Preference ProfileWomen’s Preference Profile

Example m 1 : w 1 w 2 m 2 : w 2 w 1 w 1 : m 1 m 2 w 2 : m 2 m 1 m1m1 m2m2 w2w2 w1w1

Example m 1 : w 1 w 2 m 2 : w 1 w 2 w 1 : m 1 m 2 w 2 : m 1 m 2 m1m1 m2m2 w2w2 w1w1

Example m 1 : w 1 w 2 w 3 m 2 : w 1 w 3 w 2 m 3 : w 1 w 2 w 3 w 1 : m 2 m 3 m 1 w 2 : m 3 m 1 m 2 w 3 : m 3 m 1 m 2 m1m1 m2m2 w2w2 w1w1 m3m3 w3w3