Directed graph routing