Algorithm 1.
1: ifG is not connected then return “no circuit exists” |
2: Use algorithm of (Gabow, 1983) to solve the corresponding minimum cost bidirected flow (see text). |
3: if there is no solution then return “no circuit exists” |
4: Let G′ be the graph G with f(e) copies of every edge e, in addition to e itself. |
5: Use a standard algorithm to find an Eulerian circuit W of G′. |
6: Relabel W according to Theorem 3. |
7: returnW |