Adding directed graph reduction.