Implementation of Dijkstra and The Traveller Salesman Problem
The following repository contains the implementation of Dijkstra algorithm and the traveller Salesman Problem. Although this is not the most challenging project I have done, it stands out for two reasons.
First, I was more aware than usual of the many practical uses of the different algorithms I was implementing, namely the shortest path algorithm. The most obvious example was finding directions on a map (ideally, a map should show you the shortest path between two points).
Secondly, I really liked the visual aspect of the implementation that showed the shortest path between two cities (and highlighting
it with a color). It was new and different from the other programs I had written before that mainly consisted on printing output. It expanded my imagination a little bit and encouraged me to think about new ways of representing output. This feature actually made the output of the traveller salesman program cleared as the brute force and the nearest neighbor solutions had different colors.
There are five files: Dijkstra.java that implements Dijkstra algorithm Vertex.java that implements a Vertex class used in both programs Edge.java that implements an Edge class used in both programs Graph.java that implements the Traveller Salesman problem; both brute force and nearest neighbor Display.java: The code was given as part of the assignment by the instructor