香港中文大学:《Topics in Theoretical Computer Science》课程教学资源(PPT课件讲稿)Lecture 7 Stable matching.Gale-Shapley algorithm

CMSC5706oComtr Science Week 7:Stable Matching Instructor:Shengyu Zhang 1
Instructor: Shengyu Zhang 1

Bipartite graph (Undirected)Bipartite graph: G=(V,E)for which V can be partitioned into two parts oV=MUW with M∩W=④, And all edges e =(m,w) have m∈and w∈W. M W 2
Bipartite graph ◼ (Undirected) Bipartite graph: ◼ 𝐺 = (𝑉, 𝐸) for which 𝑉 can be partitioned into two parts ❑ 𝑉 = 𝑀 ∪ 𝑊 with 𝑀 ∩ 𝑊 = ∅, ◼ And all edges 𝑒 = 𝑚, 𝑤 have 𝑚 ∈ 𝑀 and 𝑤 ∈ 𝑊. 𝑀 𝑊 2

Matching,maximum matching Matching:a collection of vertex- disjoint edges 0 a subset E'E s.t.no two edges e,e'∈E'are incident. E':size of matching. Maximum matching:a matching with the maximum size. M W This lecture:matching in a bipartite graph 3
Matching, maximum matching ◼ Matching: a collection of vertexdisjoint edges ❑ a subset 𝐸′ ⊆ 𝐸 s.t. no two edges 𝑒, 𝑒 ′ ∈ 𝐸 ′ are incident. ◼ |𝐸′|: size of matching. ◼ Maximum matching: a matching with the maximum size. ◼ This lecture: matching in a bipartite graph 𝑀 𝑊 3

Perfect matching There may be some vertices not incident to any edge. Perfect matching:a matching with no such isolated vertex. ▣needs at least:|M=lW M W We'll assume M=W in the rest of the lecture. 4
Perfect matching ◼ There may be some vertices not incident to any edge. ◼ Perfect matching: a matching with no such isolated vertex. ❑ needs at least: |𝑀| = |𝑊| ◼ We’ll assume |𝑀| = |𝑊| in the rest of the lecture. 𝑀 𝑊 4

Men's Preference Suppose a man sees these women. He has a preference among them. What's your preference list? Different men may have different lists. 5
Men’s Preference ◼ Suppose a man sees these women. ◼ He has a preference among them. ❑ What’s your preference list? ◼ Different men may have different lists. 5

Women's preference Women also have their preference lists. Assume no tie. The general case can be handled similarly. 6
Women’s preference ◼ Women also have their preference lists. ◼ Assume no tie. ❑ The general case can be handled similarly. 6

Setting n men.n women Each man has a preference list of all women Each woman has a preference list of all men We want to match them. W1>W2>W3>W4 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 m4>m1>m3>m2 7
Setting ◼ 𝑛 men, 𝑛 women ◼ Each man has a preference list of all women ◼ Each woman has a preference list of all men ◼ We want to match them. 𝑚3 > 𝑚1 > 𝑚2 > 𝑚4 𝑚3 > 𝑚4 > 𝑚1 > 𝑚2 𝑚1 > 𝑚4 > 𝑚2 > 𝑚3 𝑚4 > 𝑚1 > 𝑚3 > 𝑚2 𝑤1 > 𝑤2 > 𝑤3 > 𝑤4 𝑚1 𝑤1 𝑤1 > 𝑤2 > 𝑤3 > 𝑤4 𝑤2 > 𝑤1 > 𝑤3 > 𝑤4 𝑤3 > 𝑤2 > 𝑤4 > 𝑤1 𝑚2 𝑚3 𝑚4 𝑤2 𝑤3 𝑤4 7

Setting Consider this matching. And this pair (m1,W1). 口 m is matched to w2,but he likes wi more. wi is matched to mz,but she likes wi more. What if m and wi meet one day? W1>W2>W3>W4 m 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 m4>m1>m3>m2 8
Setting ◼ Consider this matching. ◼ And this pair 𝑚1,𝑤1 . ❑ 𝑚1 is matched to 𝑤2, but he likes 𝑤1 more. ❑ 𝑤1 is matched to 𝑚2, but she likes 𝑤1 more. ◼ What if 𝑚1 and 𝑤1 meet one day? 𝑚3 > 𝑚1 > 𝑚2 > 𝑚4 𝑚3 > 𝑚4 > 𝑚1 > 𝑚2 𝑚1 > 𝑚4 > 𝑚2 > 𝑚3 𝑚4 > 𝑚1 > 𝑚3 > 𝑚2 𝑤1 > 𝑤2 > 𝑤3 > 𝑤4 𝑚1 𝑤1 𝑤1 > 𝑤2 > 𝑤3 > 𝑤4 𝑤2 > 𝑤1 > 𝑤3 > 𝑤4 𝑤3 > 𝑤2 > 𝑤4 > 𝑤1 𝑚2 𝑚3 𝑚4 𝑤2 𝑤3 𝑤4 8

A stability property Suppose there are two couples with these preferences. W1>W2 mi m1>m2 W1>W2 m2 W2 m1>m2 The marriage is unstable,because m and wi like each other more than their currently assigned ones! 9
A stability property ◼ Suppose there are two couples with these preferences. ◼ The marriage is unstable, because 𝑚1 and 𝑤1 like each other more than their currently assigned ones! 𝑚1 𝑤2 𝑤1 𝑚2 𝑤1 > 𝑤2 𝑤1 > 𝑤2 𝑚1 > 𝑚2 𝑚1 > 𝑚2 9

Stability Such a pair is called a blocking pair. W1>W2 m W1 m1>m2 W1>W2 m2 W2 m1>m2 Question:Can we have a matching without any blocking pair? Such a matching is then called a stable matching. 10
Stability ◼ Such a pair is called a blocking pair. ◼ Question: Can we have a matching without any blocking pair? ❑ Such a matching is then called a stable matching. 𝑚1 𝑤2 𝑤1 𝑚2 𝑤1 > 𝑤2 𝑤1 > 𝑤2 𝑚1 > 𝑚2 𝑚1 > 𝑚2 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- Minimal Cover-Automata for Finite Languages.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 12 Introduction to Computational Photography.ppt
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 10 An Introduction to Bioinformatics and its application in Protein-DNA/Protein Interactions Research and Drug Discovery.pptx
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 11 Design of Microfluidics-Based Biochips.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 07-2 Research and Applications of Virtual Medicine Part II Virtual Reality Based Surgical Simulations.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 07-1 Research and Applications of Virtual Medicine Part I Introduction to Medical Visualization.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 06 3D computer vision techniques.ppt
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 05 Fault-Tolerant Computing.ppt
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 04 CRYPTOGRAPHY.pptx
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 03 Controlling Salinity in a Potable Water Supply System Using a Constraint Programming Approach.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 02 Game theory in computer science.pptx
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 01 A Secure Overlay Cloud Storage System with Access Control and Assured Deletion.pdf
- 香港中文大学:《CMSC5719 Seminar》课程教学资源(讲义)Lecture 08 An introduction to expander graphs(EXPANDER GRAPHS AND THEIR APPLICATIONS).pdf
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 12 A glimpse of computational complexity.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 11 Information theoretical argument.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 10 Circuit Complexity 2.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 9 Circuit Complexity.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 7 Decision Tree Complexity and Fourier analysis.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 6 Formula complexity II.docx
- 香港中文大学:《Theory of Computational Complexity》课程教学资源(讲义)Lecture 5 Formula complexity I.docx
- 《农业信息技术概论》课程教学资源(教学大纲).pdf
- 《仿真与虚拟农业》课程教学资源(实验指导).pdf
- 天津农学院:《微机原理与汇编语言程序设计》课程教学资源(实验指导书).pdf
- 《3S技术导论》课程教学资源(实验指导).pdf
- 《3S技术导论》课程教学资源(讲义).pdf
- 《仿真与虚拟农业》课程教学资源(教学大纲).pdf
- 软件设计师考试同步辅导(第4版)第2章 程序设计语言基础.pdf
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第1章 导引与基本数据结构论(任课老师:郭娟、方欢).ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第2章 递归算法设计与分析.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第3章 分治法——“分”而治之.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第4章 贪心方法.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第5章 动态规划.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第6章 代码最优化.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第6章 基本检索与周游方法.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)动态规划求解(背包问题).ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第7章 回溯法.ppt
- 安徽理工大学:《算法设计与分析 Algorithm Design and Analysis》课程教学资源(PPT课件讲稿)第8章 计算机算法基础(分支限界法).ppt
- Wireless Communication - Project Report 3 Project 12 – Wireless Mesh Network.pdf
- 山东大学:《医用计算机基础》课程电子教案(PPT课件)第一章 计算机的基本知识.ppt
- 山东大学:《医用计算机基础》课程电子教案(PPT课件)第四章 文字处理软件(Word).ppt