Shortest Paths and Minimum Spanning Trees Project

This project contains a Java program with a graphical user interface (GUI) that uses Dijkstras A (star) heuristic shortest path algorithm, Prims minimum spanning tree algorithm, and Prims shortest path algorithm.
This program implements the A (star) heuristic variation of Dijkstras shortest path algorithm, Prims minimum spanning tree, and Prims shortest path algorithms. Adjacency matrices are used to represent the input graphs, and each algorithm uses a custom priority queue class.
- JFreeChart v1.0.19
- Used by the GUI.
- Clone or download the repository from GitHub.
-
Execute the JAR File:
ShortPathT3.jar -
Run from command line
- Windows:
java -cp ".\bin\;.\bin\lib\jcommon-1.0.23.jar;.\bin\lib\jfreechart-1.0.19.jar" ShortPathT3 grid_data.txt adj_data.txt- Unix
java -cp "bin/:bin/lib/jcommon-1.0.23.jar:bin/lib/jfreechart-1.0.19.jar" ShortPathT3 grid_data.txt adj_data.txt
Run Shortest Path Algorithms
- Dijkstra
- Select the Dijkstra option.
- Enter a starting Node and target Node into the input field. Ex. A,J or N1,N36
- Click Run Alg
- Prim's
- Select the Prim SP option.
- Enter a starting Node and target Node into the input field. Ex. A,J or N1,N36
- Click Run Alg
Run Minimum Spanning Tree (MST) Algorithm
- Prim's
- Select the Prim MST option.
- Enter a starting Node. Ex. A or N1
- Click Run Alg
Generate Random Grid
- Enter the number of Nodes you would like to generate.
- Click Random Grid
- 1.0
- Initial Release



