This can be cast as a shortest path problem. Implementations on huge graphs (several million nodes), i.e. larger than the one defined by a dictionary, are very efficient and usually take advantage of both the source and destination rather than just performing breadth first search from the source. I can think of Andrew Goldberg's work, see e.g.