Eulerian path

http://en.wikipedia.org/wiki/Eulerian_path

Don't worry ... no homework to school. I would just like to make a program that finds an eulerian path through a labeled graph so that in each vertex of the graph will the count be > 0.

My suggestion for finding an eulerian path on a nonlabeled graph is DFS(depht-first search) with complexity issue O(N+M), where N is a number of vertexes and M is a number of edges of the graph.

But I'm not quite sure how to do it with a labeled graph ... I would suggest again DFS, but when returning back instead of printing out the path just storing the edges how they go and counting the labels. Don't have a better idea.

Thanks for help.
Last edited on
Topic archived. No new replies allowed.