Lecture 1
Logistics & Stable Matching
CSE 421 Autumn 2025
1
Course Logistics
2
Instructor
Andrea Coladangelo (you can call me Andrea)
Research focus: Quantum information
Office: CSE2 212
Office Hours: Mondays 3pm
3
Course staff
4
Day 1 checklist
5
How to succeed in this class
6
Designing algorithms is almost like an art: you cannot learn this skill by just listening to lectures or reading a textbook. You have to spend time trying.
Coursework
7
Late submissions
8
Exams and grading scheme
9
Textbook
10
Goals & structure
11
The two main goals:
High-level course structure:
Properties of an algorithm
What should we be optimizing for?
12
Today
13
Stable Matching
14
The matching problem
15
The matching problem
16
The matching problem, more formally
17
The matching problem, more formally
18
Questions
19
Does a stable matching always exist?
Can we find a stable matching efficiently?
We’ll explore these two questions in the rest of this lecture, and the next.
Turns out the answer is yes.
Turns out the answer is yes.
Key idea: “propose and reject”
Gale-Shapley algorithm (1962)
Gale-Shapley algorithm (1962)
Questions:
1. Does the algorithm terminate (if so, what’s the running time?)
2. Does it find a stable matching?
Gale-Shapley: example walkthrough
Gale-Shapley: analysis
(This is where we prove that the algorithm has the desired properties)
Questions:
1. Does the algorithm terminate (if so, what’s the running time?)
2. Does it find a stable matching?
We’ll start with Question 1. We’ll answer/analyze Question 2 in the next lecture.
Gale-Shapley: proof of termination
At that point, by Claim 1, all other residents are matched. So this last proposal will be accepted, and everyone will be matched.
Gale-Shapley: proof of termination
How does one come up with this proof?
There isn’t a recipe.. but one thing that helps:
Gale-Shapley: wrapping up runtime
Gale-Shapley: wrapping up runtime
Measuring efficiency: The RAM model
Note: we will assume we are working in the RAM model:
The history of the propose and reject algorithm
Gale and Shapley 1962
30
Shapley winning the 2012 Economics Nobel Prize (with Roth)