3 ms·
It would be quite neat to be able to do that. Ancestry.com is another site that should offer something like that... enter your family tree and then pick some r
by ratsbane 19y ago
It would be quite neat to be able to do that. Ancestry.com is another site that should offer something like that... enter your family tree and then pick some random person who also has a family tree on file and show how you're related. They can't even do that within your own family tree (e.g. pick a person in your family tree and tell you "Augustus is your fourth cousin three times removed" or "Myrtle is your great-grandmother."
It is an example of the traveling salesman problem but there are ways of optimizing that... think about chess, or how google maps and the other map programs give you a route to a destination. If they had to check every single intersection it would be NP-complete. Instead they use the distance between two points as a weighting factor and try to find major arteries near both points.
I think you could do the same thing with Facebook et al - first look for common groups between people and then look for people who have pairs of common groups which would help to connect the people.
But you would have to have a reasonably complete set of Facebook data to work on. I wonder if they'd mind if you crawled their entire network and then did it again every few days, just to keep things current?
- eru 19y agoFindind the shortest path between two nodes in a graph has nothing to do with the Traveling Salesman problem. You could use e.g. linear optimization to solve it. The Problem here lies in P.
- ratsbane 19y agoYou're exactly right - [argh] it's not at all the traveling salesman problem. Thanks for the correction. In any case, the thesis of my post was that it's a totally solvable problem and that you could use other factors to reduce the number of nodes - like looking for shared group or network memberships. I think this is the relavant bit? http://en.wikipedia.org/wiki/Dijkstra's_algorithm http://en.wikipedia.org/wiki/Dijkstra's_algorithm Except that the Facebook thing wouldn't be a weighted graph - unless you wanted to consider length of time people have been marked as friends, or count "worked together" more or less than some other form of association.
- eru 19y agoOr you just set the weights to one. You could even use an A*-Algorithm that uses geography as a hint.