Hi All,
I need to implement "Friend of a Friend" problem with minimal costs using either MySQL or PHP/MySQL. I wonder if there is an implementation that would just allow to solve this problem with minimal costs
The description is as below:-
I want to build a "social network" extension and try to find the best way to implement a Friend of a Friend connection path. (Facebook has something like that I think)
e.g. We both have the same friend, but don't know each other. The algorithm should give me a path from me, over our same friend to you. (Me - Friend - You)
But it should also find connections, that have a bigger distance, e.g. (Me - Friend1 - Friend2 - Friend3 - You) but not exceeding this situation - (Me - Friend1 - Friend2 - Friend3 - Friend4 - You)
I stored user relations in database as I (user_id|friend_id = me|friend and friend|me)
Any help would be really grateful
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).