The Stable Marriage problem:
https://en.wikipedia.org/wiki/Stable_marriage_problem
This BBC documentary ("The Secret Rules of Modern Living Algorithms") had a bit about this: https://youtu.be/T1os88EvPc4?t=19m11s
This BBC documentary ("The Secret Rules of Modern Living Algorithms") had a bit about this: https://youtu.be/T1os88EvPc4?t=19m11s