Interesting. I'm done with the (graph-theoretical) shortest path algorithm. And by the way, guess what, it's an instance of a breadth-first fold (no shit). That function almost twisted my brain out of my head, though. Fuckin' thing. But judging by how convoluted it started, it turned out pretty nice. 14 siginficant lines of code. OK?
Annotating each node in the graph with its shortest path to a given root node is done in three significant lines of code. Oh, and by the way, of course I ended up using (basically) the same data structure as FGL. Well, at least now I know.
As I was saying... Interesting. My distance to raph is four for both Apprentice and Journeyer level. So the maxflow algorithm is next...
Oh, and thanks Akira, for certifying me. :)