News for hackers. Stuff that matters.
Re:The Most Important Algorithms by Retric on Tuesday July 06, 2010 @03:41PM (#1492116)
It's a nice theory but there is a second class which basically consists of two shades of White, Grey, Black, and Red.

Let's say you’re building a system to quickly find the degree of separation between two people on a network. For simplicity assume each node connects to 4 random other nodes. If you start from one end and do a breadth first search you would need to try ~(4^N) nodes to find the link. However, if you start from both ends and do a breadth first search you can try ~2 * (4^(N/2)) nodes to find that same connection.

There are no comments on this comment yet.