-
Notifications
You must be signed in to change notification settings - Fork 3
Description
We want to add a feature that calculates and displays each user's Kevin Bacon score, which is the user's average degrees of distance from all other members of the Gathering.
So if a Gathering had 100 people, and Alice had made 8 direct connections (1st degree connections), and those 8 people had connected with 50 more unique members (2nd degree connections), and those 50 people had connected with each of the remaining 42 members (3rd degree connections), Alice's Kevin Bacon score would be as follows:
((1 * 8) + (2 * 50) + (3 * 42)) / 100 = 2.34 average degrees of separation
If she connected with two more people, who had an additional 9 unique second degree connections, her score would be:
((1 * 10) + (2 * 59) + (3 * 31)) / 100 = 2.21 average degrees of separation
How can we calculate these scores efficiently using the Gathering data?