You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, a shortest path algorithm finds a path between a source node and target node
12
+
## What is a Shortest Path Algorithm?
13
+
Optimally, a shortest path algorithm finds a path between a source node and target node
14
14
such that the total weight of the path is minimized. In other words, let's designate major
15
15
United States cities as nodes. Perhaps the start node is _Boston_ and the target node is
16
16
_Dallas_. Let's pretend there isn't a direct path from Boston to Dallas, and we must travel
@@ -21,6 +21,9 @@ finish is minimized.
21
21
One such path may be:
22
22
_Boston_ --> NYC --> Philadelphia --> Washington DC --> Nashville --> _Dallas_
23
23
24
+
## What is a Minimum Spanning Tree? (MST)
25
+
A MST algorithm finds a tree of paths that connect all nodes such that the total weight of the tree is minimized. For example, pretend that we have a 50 cities and there are a total of 200 individual direct _edges_ between arbitrary pairs of cities. A MST algorithm will find a tree of _edges_ that connects every city such that the combined weights of all _edges_ in the tree is minimized. Another way to think of the produced tree, is that it's a path to visit every city such that the total distance traveled is minimized.
26
+
24
27
## Technologies
25
28
Application was built with:
26
29
-[Java SE 15.0.1](https://docs.oracle.com/en/java/javase/15)
@@ -35,7 +38,7 @@ All other dependencies are packaged into the .JAR executable, which can be found
35
38
The application can be launched by executing _Algorithm_Visualizer.jar_.
36
39
37
40
## Features
38
-
- Randomly generate different sized connected directed or undirected graphs
41
+
- Randomly generate different sized connected directed graphs
39
42
- Animate shortest path algorithms
40
43
- Breadth-First Search
41
44
- Depth-First Search
@@ -46,16 +49,25 @@ The application can be launched by executing _Algorithm_Visualizer.jar_.
46
49
- Start/Stop/Pause algorithm animations
47
50
- Change speed of animations _(slow/fast/instant)_
48
51
49
-
## Screenshots
52
+
## Demo
53
+
54
+
> Slow Bread-First Search on a medium graph.
55
+
> <imgsrc="./github/gifs/bfs.gif"width=800>
56
+
57
+
> Slow Depth-First Search on a small graph. It's an extremely inaccurate implementation.
58
+
> <imgsrc="./github/gifs/dfs.gif"width=800>
59
+
60
+
> Fast Dijkstra's algorithm on a large graph.
61
+
> <imgsrc="./github/gifs/dijkstra1.gif"width=800>
50
62
51
-
>User has selected to randomly generate a _small_ graph and has choosen a source node and target node
52
-
><imgsrc="./github/screenshots/1.PNG"width=800>
63
+
>Instant Dijkstra's algorithm on a large graph.
64
+
><imgsrc="./github/gifs/dijkstra2.gif"width=800>
53
65
54
-
>A _Breadth-First Search_ has started at the selected source node
55
-
><imgsrc="./github/screenshots/2.PNG"width=800>
66
+
>Fast Kruskal's algorithm on a large graph.
67
+
><imgsrc="./github/gifs/kruskal.gif"width=800>
56
68
57
-
>The _BFS_ has found the target node and drawn the shortest path
58
-
><imgsrc="./github/screenshots/3.PNG"width=800>
69
+
>Fast Prim's algorithm on a large graph.
70
+
><imgsrc="./github/gifs/prim1.gif"width=800>
59
71
60
-
>Finished _Dijkstra's_ algorithm, run on a different graph
0 commit comments