Skip to main content
3 of 10
added 1 character in body; edited title
Gizmo
  • 73
  • 7

How to identify certain sets of edges in a directed graph?

I have a hard time explaining my problem, therefore, I've drawn an example directed graph, as you can see below. The edges are annotated with colours. What algorithm could achieve such an annotation?

My approach right now would first find all possible paths through the graph. Then, following every path, I would count how often each edge was visited. The number of visitations would then indicate the different sets of edges. But this would already stop working for a symmetric graph.

I feel like I'm missing the obvious solution. Could anyone please help?

Example Graph

Gizmo
  • 73
  • 7