Change the algorithm to use directed graph.