
stable marriage problem
The stable marriage problem involves matching two equally sized groups—commonly men and women—based on their preferences. Each person ranks all members of the opposite group. The goal is to create pairs where no two individuals would prefer to be with each other over their current partners. A "stable" matching ensures there are no such pairs, preventing conflicts or future rearrangements. The problem is important in areas like matching students to schools or residents to hospitals, and algorithms like Gale-Shapley guarantee a stable, mutually acceptable pairing for all involved.