The Mathematics of Love

randerson112358
9 min readOct 1, 2017

A mathematical approach to finding a companion, what math and data can teach us about relationships.

Finding a companion for love, can be difficult, but luckily there are methods and algorithms that you can use to optimize your chances of success. In this article I will mention a few of the algorithms you can use and questions you can ask to improve your chances of a long term successful relationship. These algorithms and questions come from mathematics, statistics and data sets that have been collected from successful relationships. Let us get started to optimizing your chances of finding that special someone.

Gale-Shapley Stable Marriage /Matching Algorithm

What this love algorithm is suggesting is that whoever does the asking (and is willing to face rejection until receiving the best available option) is better off. Meanwhile, the person who waits for advances settles for their last option. Let’s take a look at this algorithm in action below.

function stableMatching {
Initialize all m ∈ M and w ∈ W to free
whilefree man m who still has a woman w to propose to {
w = first woman on m's list to whom m has not yet proposed
if w is free
(m, w) become engaged
else some pair (m', w) already exists
if w prefers m to m'
m' becomes free

--

--