Is there an algorithm to "simplify" a dependency graph?

graph-algorithm, simplify

Solution

You are looking for transitive reduction.

For a discussion of algorithms, see Transitive Closure and Reduction.

Problem

My problem is very simple but I don't really know its name and therefore, it's hard to find a solution by myself : How to simplify a dependency graph like (where `->` means depends): A -> B -> C & A -> C to ``` A -> B -> C ```

Original source