algorithm - Small World Theory implementation - like in XING -
Some people probably know what XING is: This is an online network community, such as Linked Ink. You can add new contacts, manage them, search for contacts, etc.
The entire application is done in Ruby and is inspired to some extent by small world theory, at least it is said.
There is a special feature that I can not really imagine how it is done. If you search for a person who is not in your contact list, and you click on Z's profile, then you have Z displayed all possible connections from the person. Example:
- you -> person b -> person c -> person e -> person z
- You -> Person M -> Person N -> Person I -> Person Z
- You -> Person M -> Person -> Person J -> Person Z
etc.
Especially if you have lots of contacts, then it is possible to have connection too much. And the app is fast!
So, my question is: How has such a facility implemented? What kind of system / database is behind it? I've only experienced the standard RDMBS in mySQL and MSSQL servers, and I can actually imagine doing something like a above mentioned in a standard database system.
Are there any algorithms that can help in calculating potential relationships? Currently I'm reading an interesting book on algorithms like calculating the similarity of two things etc. So "the implementation of that small world theory" would be very interesting to me.
Thanks in advance for any indication. / P>
This is probably a combination of pre-caching of people you click on, any different minimum spanning Tree algorithm For example, you can see the Cruscale algorithm (), your description does not quite behave, but useful for weighted trees, where you have some idea of the connection power between two people.
For more general information,:
More generally, read chapter 13 (on graph) in "Data Structure and Algorithm of Java" in Goodricke and Tomasia.
Comments
Post a Comment