Back to news

Mathematics can contribute to a happier love life.

Everyone knows the story: "John loved Teresa who loved Raymond who loved Mary who loved Joachim who loved Lily who loved no one. John went to the United States, Teresa went to a convent, Raymond died in an accident, Mary became an aunt, Joachim committed suicide, and Lily married J. Pinto Fernandes, who hadn't even been part of the story."
Could mathematics have helped Carlos Drummond de Andrade's characters have happier endings?
The problem of marriage can be formulated as follows, in the classic version (I will mention another one shortly).
We have two groups of people: "men" and "women." Each man has a list of women he would accept to marry, ordered by his preference. Similarly, each woman has a list of acceptable men, listed in order of her preference.
How can men and women be paired in a way that best meets these preferences? Is there ever a stable ("divorce-proof") pairing that prevents any couple (made up of a man and a woman) from being separated, even though they would prefer to stay together rather than with their spouses?
Well, the answer is yes! Moreover, a stable pairing can be obtained using the following method.
Initially, each woman asks her preferred man, the first on her list, to date her. Each man rejects women outside his list of acceptable women; if he has received requests from acceptable women, he temporarily accepts the one with the best position on the list and rejects the others.
This concludes the first round, with some men and women temporarily committed, and others still single.
Next, each woman who remains single asks her preferred man out from among those eligible who haven't rejected her. If there are no more men who meet these conditions, she remains single until the end.
Again, each man rejects the advances of the undesirable women and, if he has received one or more invitations from the acceptable ones, he joins the one in the best position, rejecting the others. He may even dismiss the girlfriend he accepted earlier, if necessary, and exchange her for another who is making the request and whom he prefers.
This procedure is repeated until no woman is rejected. At that point, all women are either engaged or have been rejected by their suitable men. In the first case, the engagement becomes definitive and the marriage is celebrated. In the second, she remains single. Men without proposals also remain single.
This method was proposed in 1962 by David Gale (1921-2008), an American mathematician, and Lloyd Shapley (1923-2016), a British mathematician and economist.
In a study published in the journal "American Mathematical Monthly," they mathematically proved that this method always produces a stable pairing in a finite number of steps.
Furthermore, the result is the optimal pairing for women, meaning that among all the stable options, it's the one that best meets their preferences.
Of course, we can switch the roles of men and women, and in that case, we'll obtain the optimal stable pairing for men. But what's best for women is worst for men and vice versa: the sex that takes the initiative to make the request always wins.
To read the full text, visit the newspaper's website:

http://www1.folha.uol.com.br/colunas/marceloviana/2017/10/1926653-a-matematica-pode-contribuir-para-uma-vida-amorosa-mais-feliz.shtml

Folha allows each reader access to ten articles per month even without a subscription.