Stable matching problem

Pairing where no unchosen pair prefers each other over their choice

In mathematics, economics, and computer science, the stable matching problem is the problem of finding a stable matching between two equally sized sets of elements given an ordering of preferences for each element. A matching is a bijection from the elements of one set to the elements of the other set. A matching is not stable if: In other words, a matching is stable when there does not exist any pair (A, B) where both prefer each other to their current partner under the matching.

From Wikipedia, under CC BY-SA. More on occurri.