bacon-number

Calculating “Kevin Bacon” Numbers

浪子不回头ぞ 提交于 2019-12-13 11:40:09
问题 I've been playing around with some things and thought up the idea of trying to figure out Kevin Bacon numbers. I have data for a site that for this purpose we can consider a social network. Let's pretend that it's Facebook (for simplification of discussion). I have people and I have a list of their friends, so I have the connections between them. How can I calculate the distance from one person to another (basically, a Kevin Bacon number)? My best idea is a Bidirectional search, with a depth

Calculating “Kevin Bacon” Numbers

∥☆過路亽.° 提交于 2019-12-03 11:31:31
I've been playing around with some things and thought up the idea of trying to figure out Kevin Bacon numbers. I have data for a site that for this purpose we can consider a social network. Let's pretend that it's Facebook (for simplification of discussion). I have people and I have a list of their friends, so I have the connections between them. How can I calculate the distance from one person to another (basically, a Kevin Bacon number)? My best idea is a Bidirectional search , with a depth limit (to limit computational complexity and avoid the problem of people who simply can't be connected