Writing Prim's algorithm to find the shortest path for a given set of a graph's edges and vertices.
Table of Contents
In a weighted, undirected graph the shortest path problem is the problem of finding the shortest path connecting one vertex (the start vertex) to another vertex (the destination vertex).
To solve this problem, I will use a setup similar to the Breadth First Search (BFS) algorithm. Every vertex in the graph will contain both a d value and a predecessor pointer. By following the chain of predecessor pointers backwards from a destination to the source, we will be able to construct the shortest path from the source to the destination.
The objective of this program is to implement Prim's algorithm in order to use the vertices of a certain graph and find the shortest path.
To get a local copy up and running follow these simple steps.
Things you need to use the software.
- MacOS
- Xcode
Clone this repo.
git clone https://github.com/vmthanh-bi/Prim-s-Algorithm.git
See the open issues for a list of proposed features (and known issues).
Tony Vu - @vmthanh.bi - vmthanh.bi@gmail.com
Project Link: https://github.com/vmthanh-bi/Prim-s-Algorithm