Tuesday, October 23, 2012

A Very Real Life Application of the Stable Marriage Problem

I recently stumbled upon a mathematical problem known as the Stable Marriage Problem (SMP).  Per Wikipedia, the problem is commonly stated as:

Given N men and N women, where each person has ranked all members of the opposite sex with a unique number between 1 and n in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than their current partners. If there are no such people, all the marriages are "stable".

The SMP has real-life applications to any problem requiring stable pairing of two sets of equal size. In fact, this problem is always solvable using the Gale-Shapley algorithm.

There is a rather big catch however.  While the marriages are always stable, they may not be ideal from the vantage point of an individual.  To illustrate this, imagine three men A,B,C and three women X,Y,Z. Here are their ranked preferences for members of the other group:


There are three possible stable matchings:

1. The men get their first choice and the women their third (AY, BZ, CX)
2. All participants get their second choice (AX, BY, CZ)
3. The women get their first choice and the men their third (AZ, BX, CY)

According to Gale-Shapley, scenario 1 will materialize. This is because the algorithm dictates that the men (initiators) can choose from the entire set of women, while the women (reviewers) choose between a limited subset of initiators at any one time. 

This mathematical problem actually offers an explanation to a common phenomenon in the world of dating. Have you ever seen a breathtaking beauty hooking up with a mediocre Joe? You turn green with envy while cursing her judgement.  Well, the reason can be found above. Females still largely play the role of reviewers in today's dating scene. As a result, they can only choose from men who dare approach them in the first place. In other words, if Brad Pitt did not initiate the relationship with Angelina Jolie (let's play along - suppose he did), chances are they will not be together. The moral? Your chances of successfully dating a pretty girl is higher than you think, even when you are not a Pitt-look-alike. Of course, looking like Pitt helps but taking the leap by initiating the dating routine is the more crucial key. So why wait any longer? Ask the girl of your dreams out now!