Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I prove the "Six Degrees of Separation" concept programmatically?

I have a database of 20 million users and connections between those people. How can I prove the concept of "Six degrees of separation" concept in the most efficient way in programming?

link to the article about Six degrees of separation

like image 720
Roman Kagan Avatar asked Jun 12 '09 20:06

Roman Kagan


Video Answer


1 Answers

You just want to measure the diameter of the graph. This is exactly the metric to find out the seperation between the most-distantly-connected nodes in a graph.

Lots of algorithms on Google, Boost graph too.

like image 179
SPWorley Avatar answered Sep 20 '22 18:09

SPWorley