In this assignment you will code two different ways of solving the traveling salesman problem. First you read in a file of 100 cities that will be posted in a masterhit file for the course. Each line of the file will contain two integers, separated by a blank, that represent the position of a city. This list of cities represents 100 problems where problem n is to find a route through all the cities from 1 to n.
For the exhaustive search I recommend using depth first search or simply writing a program to compute all permutations. Breadth first search algorithms will likely use too much memory although a use of A* may work. You can find Java programs for permutations on the web. If you use such a program, you should credit the original authors. In any case you will need to modify the algorithm to suit this problem.
The iterative improvement algorithms differ by the heuristics they use. One algorithm uses the "move" heuristic while the other algorithm uses the "uncross" heuristic. The "move" heuristic moves a city into a new position in the tour if it improves the tour length. The "uncross" reverses a subpath of the tour if that operation improves the tour length.
Extra Credit: No extra credit is allowed on late homework. Provide a graphical user interface that allows you to see the tours. This is non-trivial. The graphical interface should display the route, the cost of the route, allow the user to choose the search method, and show some of the improved paths (under user control).