Showing posts with label Uva - Euler Circuits & Shortest Path. Show all posts
Showing posts with label Uva - Euler Circuits & Shortest Path. Show all posts

Uva 117 - The Postal Worker Rings Once

Oct 1, 2015

Problem: 117 - The Postal Worker Rings Once


Explain:
Look,
There are no node which has odd degree. So This graph has an Euler Circuit or cycle.

So the Result will be 3+3+5 = 11






There are two nodes with odd degree. So the graph has not an Euler circuit. so find the shortest path between d node to s node and this cost is add with all Euler Path. Min_Cost (d,s) = 19
and sum = 95

Total Cost = 95+19 = 114