igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Chinese Postman Problem with igraph?


From: Tamas Nepusz
Subject: Re: [igraph] Chinese Postman Problem with igraph?
Date: Tue, 8 Jan 2019 12:04:41 +0100

> 6: Modify the graph by adding all the edges that  have been found in step 5.
> SD: igraph_add_vertices()
igraph_add_edges(), most likely

> 8: Print Euler Circuit of the modified graph. This Euler Circuit is Chinese 
> Postman Tour.
> SD: I cannot find any functions that, given a starting vertex, calculate a 
> circuit, a tour, or a closed path. Recommendations?
There is no such function, but if there is an Euler circuit in the
graph, all you need to do is to start from anywhere, and keep on
following any unvisited edge going outwards from the current vertex,
marking the edge as "visited" while doing so. If you get stuck
somewhere, then you have found the Euler circuit of the connected
component containing the start vertex. (If there are multiple
connected components, proceed with the next one).

T.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]