0% found this document useful (0 votes)
39 views3 pages

Course Introduction: All of Computer Science Is The Study of Algorithms

- This document provides an introduction and overview for a course on algorithms. - It outlines the instructor, teaching assistant, textbook, and expectations for homework, exams, and reading assignments. - As an introductory problem, it presents the stable matching problem and provides an example of an algorithm to solve this problem. - The stable matching problem involves assigning partners from two groups while avoiding situations where both members would prefer different partners. The algorithm described aims to find a stable matching through iterative proposals and acceptances.

Uploaded by

raja.ayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

Course Introduction: All of Computer Science Is The Study of Algorithms

- This document provides an introduction and overview for a course on algorithms. - It outlines the instructor, teaching assistant, textbook, and expectations for homework, exams, and reading assignments. - As an introductory problem, it presents the stable matching problem and provides an example of an algorithm to solve this problem. - The stable matching problem involves assigning partners from two groups while avoiding situations where both members would prefer different partners. The algorithm described aims to find a stable matching through iterative proposals and acceptances.

Uploaded by

raja.ayaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Course Introduction

• Instructor
CSE 421 – Richard Anderson,
[email protected]
Algorithms • Teaching Assistant
– Yiannis Giotas, [email protected]
Richard Anderson
Lecture 1

All of Computer Science is the


Mechanics
Study of Algorithms
• It’s on the web
• Weekly homework
• Midterm
• Final exam

• Subscribe to the mailing list

Text book How to study algorithms


• Algorithm Design • Zoology
• Jon Kleinberg, Eva Tardos • Mine is faster than yours is
• Algorithmic ideas
• Read Chapters 1 & 2 – Where algorithms apply
– What makes an algorithm work
– Algorithmic thinking

1
Introductory Problem:
Formal notions
Stable Matching
• Setting: • Perfect matching
– Assign TAs to Instructors • Ranked preference lists
– Avoid having TAs and Instructors wanting • Stability
changes
• E.g., Prof A. would rather have student X than her
m1 w1
current TA, and student X would rather work for
Prof A. than his current instructor.
m2 w2

Examples Examples
• m1: w1 w2 • m1: w1 w2 • m1: w1 w2
• m2: w2 w1 • m2: w1 w2 • m2: w2 w1
• w1: m1 m2 • w1: m1 m2 • w1: m2 m1
• w2: m2 m1 • w2: m1 m2 • w2: m1 m2

Intuitive Idea for an Algorithm Algorithm


• m proposes to w Initially all m in M and w in W are free
While there is a free m
– If w is unmatched, w accepts
w highest on m’s list that m has not proposed to
– If w is matched to m2 if w is free, then match (m, w)
• If w prefers m to m2, w accepts else
• If w prefers m2 to m, w rejects suppose (m2, w) is matched
if w prefers m to m2
unmatch (m2, w)
• Unmatched m proposes to highest w on its match (m, w)
preference list

2
Claim: The algorithms stops in at
Does this work?
most n2 steps
• Does it terminate? • Why?
• Is the result a stable matching?

• Begin by identifying invariants and


measures of progress
– m’s proposals get worse
– Once w is matched, w stays matched
– w’s partners get better

The algorithm terminates with a


The resulting matching is stable
perfect matching
• Why? • Suppose m1 w1
– m1 prefers w2 to w1
– w2 prefers m1 to m2 m2 w2

• How could this happen?

You might also like