2
$\begingroup$

Is there a shortest path algorithim that calculates the shortest route passing all available roads, ending where you started? This differs from the Travelling salesman problem as you need to pass through all roads between the cities, not just the cities. The traditional shortest path algorithims do not work because they only calculate the shortest distance between 2 points, and don't guarantee passing through all of the roads. Here is a vague map of my problem. Vague Map

For a solution to be valid, it must pass through every road in between the points labeled.

$\endgroup$
2
$\begingroup$

Construct the line graph of $G$, then solve the Travelling Salesman Problem on the resulting line graph. This yields the optimal solution to your problem, assuming you want to visit every edge in your graph exactly once.

See also the route inspection problem (also known as the Chinese postman problem).

$\endgroup$
0
$\begingroup$

The optimal solution would be to travel every edge of the graph exactly once. If all the vertices of the graph have even degree then the Euler path is the answer.

Otherwise if you allow to traverse each road twice then you can get a 2- approximation factor algorithm.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.