3 The following graph represents a portion of the subway sys
3. The following graph represents a portion of the subway system of a city. The vertices on the graph correspond to subway stations, and the edges correspond to the rails. Your job is to write a program for a cleaning car to efficiently clean this portion of the subway system.
b. Using Euler’s theorem, explain why it is possible to pass through all of the stations by traversing every rail only once.
c. Using Fleury’s algorithm, provide an optimal path to clean all the rails by passing through them only once.
d. Is it possible to find an optimal path described in question 3-b that starts on any station? Explain your answer.
e. Is it possible to find an optimal path described in question 3-b that starts and ends at the same station? Explain why or why not.
4. A network engineer lives in City A, and his job is to inspect his company’s servers in various cities. The graph below shows the cost (in U.S. dollars) of travelling between each city that he has to visit.
Find a Hamiltonian path in the graph.
a. Find a Hamiltonian circuit that will allow the engineer to inspect all of the servers. How much will the cost be for his trips?
b. Is there another Hamiltonian circuit that will allow the engineer to inspect all of the servers other than your answer in question 4-b? If so, calculate the cost.
A D GSolution
Answer 4)
Hamiltonian path in the graph.
 A->D->B->E->C
a)
 Hamiltonian circuit that will allow the engineer to inspect all of the servers:
 B->D->A->C->E->B
the cost be for his trips:
 => 300+100+200+600
 => 1200
b) Another Hamiltonian circuit:
 A->D->C->B->E->A
the cost be for his trips:
 => 100+400+900+600+700
 => 2700

