So we know the node S and we know the node G, we've got a bunch of links leading out of S, and we've a bunch of links leading to G. And armed with that information we want to find the shortest path. So one way is exhaustive enumeration of the entire graph starting from S, and following links from. And the other way is exhaustive enumeration of the entire graph starting at G, and following links to. And both of those will work, but require enumeration of the entire graph, ad we want to be a little clever. So what do we do? What we do is push out little bubbles from S and G, one link away, two links away, and so on. And we keep a list of nodes for S and G in the bubbles. And eventually a node in the S bubble turns out to be a node in the G bubble, or vice versa, and you've found a path, and the shortest path for most graphs. And then, knowing a bit about the graph topology, we can refine things a bit to speed up the normal case search. But get the two bubbles system working first, and then come back, and we'll discuss how to refine.