Eliminating cyclic flows from a graph
Posted
by
Jon Harrop
on Stack Overflow
See other posts from Stack Overflow
or by Jon Harrop
Published on 2011-03-20T17:13:56Z
Indexed on
2011/03/20
19:19 UTC
Read the original article
Hit count: 241
I have a directed graph with flow volumes along edges and I would like to simplify it by removing all cyclic flows. This can be done by finding the minimum of the flow volumes along each edge in any given cycle and reducing the flows of every edge in the cycle by that minimum volume, deleting edges with zero flow. When all cyclic flows have been removed the graph will be acyclic.
For example, if I have a graph with vertices A, B and C with flows of 1 from A?B, 2 from B?C and 3 from C?A then I can rewrite this with no flow from A?B, 1 from B?C and 2 from C?A. The number of edges in the graph has reduced from 3 to 2 and the resulting graph is acyclic.
Which algorithm(s), if any, solve this problem?
© Stack Overflow or respective owner