Member-only story
The Friend Suggestion That Explains Graphs Theory Better Than books
Graphs, Trees and DAGs for Total Beginners
In 2016, a reporter told the story of a psychiatrist who opened Facebook and found her own patients in her “People You May Know” box. Then it got stranger, because Facebook began suggesting the patients to each other. They had never met. They’d only sat in the same waiting room on different days, and the likeliest link was one phone number saved in all their contacts.
So nobody at Facebook read a medical file. A phone book was enough.
Every patient had one contact in common, the psychiatrist, and to a computer a shared contact is all it takes to make two strangers look connected. By the end of this article you’ll know the exact calculation behind that, and it’s a single small multiplication.
The thing doing the work is called a graph. Your phone is full of them, so let’s open a few apps and look inside.










