Does this graph reduction operation already exist?

Viewed 94

I have an application that uses a directed acyclic graph (DAG) to represent events ordered by time. My goal is to create or find an algorithm to simplify the graph by removing certain edges with specific properties. I'll try to define what I mean:

In the example below, a is the first node and f is the last. In the first picture, there are four unique paths to use to go from a to f. If we isolate the paths between b and e, we have two alternative paths. The path that is a single edge, namely the edge between b and e is the type of path that I want to remove, leaving the graph in the second picture as a result.

Therefore, all the edges I want to remove are defined as: single edges between two nodes that have at least one other path with >1 edges.

I realize this might be a very specific kind of graph operation, but hoping this algorithm already exists out there, my question to Stack Overflow is: Is this a known graph operation, or should I get my hiney to the algorithm drawing board?

DAG before

DAG after

1 Answers

Like Matt Timmermans said in the comment: that operation is called a transitive reduction.

Thanks Matt!

Related