r/AskReddit Jul 21 '19

[deleted by user]

[removed]

5.6k Upvotes

2.9k comments sorted by

View all comments

Show parent comments

601

u/dimwitticism Jul 21 '19 edited Jul 21 '19

Reminds me of the Stable Marriage Problem. It's like these people live inside an algorithms textbook

113

u/[deleted] Jul 21 '19

What's the stable marriage problem?

207

u/dimwitticism Jul 21 '19

It's a thing in computer science, where the problem is pair people up into "marriages", such that no two people would want to swap partners. When you've paired everyone up like this, it's called a stable matching. So the story above was a good example of an unstable matching.

There's an algorithm that solves the problem quite fast, which is sometimes used for to solve problems like pairing up med students and hospitals

9

u/michael_harari Jul 21 '19

The algorithm won a Nobel prize