I have implemented an algorithm to find an Euler cycle for a given starting vertex in an undirected graph (using DFS and removing visited edges), but it always returns only one path. How do I modify the algorithm to search for all possible Euler cycles for a vertex?
Here is relevant code:
typedef int Graph[200][200]; // adjacency matrix
int v, e; // vertex count, edge count
......
void DFS(Graph &G, int x) {
int i;
Push(x);
for (i = 0; i < v; i++)
if (G[i][x] > 0) {
G[i][x] = 0;
G[x][i] = 0;
DFS(G, i);
break;
}
}