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

前端 未结 4 1089
-上瘾入骨i
-上瘾入骨i 2021-01-31 23:22

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 w

4条回答
  •  野的像风
    2021-01-31 23:47

    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.

提交回复
热议问题