COS 212: Solve the Chinese Postman Problem in Java - IT Assignment Help

Download Solution Order New Solution
Assignment Task:

Task:

After completing this assignment:

Upon successful completion of this assignment you will have implemented your own graph data structure, as well as an algorithm to solve the Chinese Postman problem in Java.

Problem Description For this assignment, you will implement a solution to the Chinese Postman problem, a well-known problem in graph theory, introduced for the first time by Kwan Mei-Ko in 1960.

The idea behind it is as follows: a postman has to go down each street in town to deliver the mail. What is the most efficient route through the town covering each street at least once, and returning the postman back to the post office? If each street is represented by an undirected weighted edge in a graph, and the post office location is the starting vertex in a graph, the problem can be reformulated in graph terminology as follows: find the shortest cycle or circuit starting at the given starting point, such that each edge is visited at least once. The problem is easy when the graph is traversable, i.e. if it can be “traced” without lifting the pen from the paper and without ever retracing the same edge: A B C D 2 1 3 5 In the above graph, if the post office is at vertex A, then the postman can either take the A-B-D-C-A route, or A-C-D-B-A route. In both cases, the postman will travel down each edge (street) exactly once, thus the total cost of the journey will be 1 + 2 + 3 + 5 = 11.

Now consider the following graph: A B C D 2 3 5 If the post office is at vertex A, then the only way to cover all edges and to return back home would be A-B-D-C-D-B-A. In other words, every edge has to be taken twice, with the total cost of the journey 2 + 3 + 5 + 5 + 3 + 2 = 20. 2 What is the main difference between the first and the second graph? It is the presence/absence of the edge connecting A and C. Because there is no connection between A and C in the second graph, both A and C are vertices of odd degree (degree of a vertex is the number of edges incident to the vertex). It can in fact be shown that every vertex in a traversable graph must have an even degree, otherwise the graph is not traversable. Traversable graphs are also referred to as Eulerian graphs (see Section 8.10.1 of the prescribed textbook).

How do you traverse a non-traversable graph? By travelling down some of the edges twice. If you represent each “travelling” action as an edge, you will notice that the resulting graph will indeed contain vertices of even degrees only: A B C D 2 3 5 Now, the degree of A and C is 2, and the degree of B and D is 4. The graph has become traversable by adding a path from A to C in addition to the existing edges. In general, the only way to make sure the postman visits every street and gets back to the post office is to “pair” the odd-degree vertices and find a path between them, thus virtually turning them into even-degree vertices. The number of odd-degree vertices in a connected graph is always even, thus you can always separate them into non-overlapping pairs.

 

This COS 212: IT  Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.