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

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
(m, w) become engaged
else
(m', w) remain engaged
}
}

Setup

Boy List Of Preferred Girl:

Girl List Of Preferred Boy:

Verbose Results

Results

Let’s change up the Boy list a little bit to show some conflict where the boys prefer the same girls and see the result.

Boy List Of Preferred Girl:

Girl List Of Preferred Boy:

Verbose Results

Results

Conclusion of Stable Marriage / Matching

The 3 First Date Questions That will Predict your Romantic Compatibility for the long term

1. Do you like horror/scary movies?
2. Have you ever traveled to another country alone?
3. Would you like to ditch it all and go live on a sailboat?

Other fun first date questions that have underlying meanings.

If you want to know if the person you are on a date with will have sex with you on the first date ask:

Do you like the taste of beer?

If the answer is yes, it is likely they will have sex with you on the first date.

If you want to know if the person you are on a date with has the same political views ask:

Do you prefer the people in your life to be simple or complex?

If the person chooses simple then they are most likely conservative, and if they chose complex they are most likely liberal.

If you want to know if the person you are on a date with has the same religious beliefs ask:

Do spelling and grammar mistakes annoy you?

If your date answers ‘No’ , meaning that grammar mistakes do not annoy your date then there is a good chance that your date is at least moderately religious.

The Secretary Problem: An algorithm for deciding who to marry

The Algorithm
Step 1: Estimate how many people you could date in your life, n.

Step 2: Calculate the first 37% of people to date .37 x n

Step 3: Date and reject the first .37 x n people; the best of them will set your benchmark.

Step 4: Continue dating people and settle down with the first person to exceed the benchmark set by the initial .37 x n dates.

The Relationship Equation

“The left-hand side of the equation is simply how positive or negative the wife will be in the next thing that she says. Her reaction will depend on her mood in general (w), her mood when she’s with her husband (rwWt), and, crucially, the influence that her husbands actions will have on her (IHM). The Ht in parentheses at the end of the equation is mathematical shorthand for saying that this influence depends on what the husband has just done.

The equations for the husband follow the same pattern: h, rHHt, and IHM are his mood when he’s on his own, his mood when he’s with his wife, and the influence his wife has on his next reaction, respectively.” — Hannah Fry

This equation shows some surprising information, it shows that couples who have a greater tolerance for negativity e.i. couples that let things go, or compromised, had less success then the couples with a low negativity threshold, which were the couples that had the most success in the long term. These are the couples that speak up if something bothers them, and don’t let the small issues build up to become big issues, but rather address them and keep repairing the smallest issues and drama in their relationship.

Hannah Fry ← Author of the The Mathematics of Love
John Gottman ← psychologist who studies why marriages succeed or fail
James Murray ← Mathematician who created the relationship formula

Summary

Let us summarize everything in this article.
1. Always take the risk and ask a potential mate out first. This way you get the person you want instead of waiting for someone to ask you and settling.

2. Once on a date with the potential mate ask the following questions to determine your compatibility. If all the answers match then you are most likely very compatible.

a. Do you like horror/scary movies?
b. Have you ever traveled to another country alone?
c. Would you like to ditch it all and go live on a sailboat?
d. Do you like the taste of beer?
e. Do you prefer the people in your life to be simple or complex?
f. Do spelling and grammar mistakes annoy you?

3. After dating ‘n * .37’ potential mates choose to marry the next person that is better than the best person from the initial 37% or ‘n * .37’, where n is the max number of people you can or want to date within your lifetime.

4. Once in a relationship, speak up if something bothers you, and don’t let the small issues build up to become big issues, but rather address them and keep repairing the smallest issues and drama in your relationship.

Resources:

Books

Algorithms To Live By

The Mathematics of Love

Check out the following for content / videos on Algorithm Analysis and Programming:

compsci112358:
https://www.youtube.com/channel/UCbmb5IoBtHZTpYZCDBOC1CA

Website:
http://everythingcomputerscience.com/

Video Tutorials on Recurrence Relation:
https://www.udemy.com/recurrence-relation-made-easy/

Video Tutorial on Algorithm Analysis:
https://www.udemy.com/algorithm-analysis/

Twitter:
https://twitter.com/CsEverything

YouTube Channel:

Computer Science Website:

Udemy Videos on Recurrence Relation:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store