Skip to content

Commit 2976b92

Browse files
committed
added gifs
1 parent b88724b commit 2976b92

File tree

8 files changed

+26
-14
lines changed

8 files changed

+26
-14
lines changed

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Shortest Path Algorithm Visualizer
1+
# Shortest Path & MST Algorithm Visualizer
22
<img src=https://img.shields.io/github/v/release/ryanalbertson/Algorithm_Visualizer>
33
<img src=https://img.shields.io/github/downloads/ryanalbertson/Algorithm_Visualizer/total>
44

@@ -7,10 +7,10 @@
77
* [Technologies](#technologies)
88
* [Setup](#setup)
99
* [Features](#features)
10-
* [Screenshots](#screenshots)
10+
* [Demo](#demo)
1111

12-
## What is a shortest path algorithm?
13-
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
1414
such that the total weight of the path is minimized. In other words, let's designate major
1515
United States cities as nodes. Perhaps the start node is _Boston_ and the target node is
1616
_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.
2121
One such path may be:
2222
_Boston_ --> NYC --> Philadelphia --> Washington DC --> Nashville --> _Dallas_
2323

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+
2427
## Technologies
2528
Application was built with:
2629
- [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
3538
The application can be launched by executing _Algorithm_Visualizer.jar_.
3639

3740
## Features
38-
- Randomly generate different sized connected directed or undirected graphs
41+
- Randomly generate different sized connected directed graphs
3942
- Animate shortest path algorithms
4043
- Breadth-First Search
4144
- Depth-First Search
@@ -46,16 +49,25 @@ The application can be launched by executing _Algorithm_Visualizer.jar_.
4649
- Start/Stop/Pause algorithm animations
4750
- Change speed of animations _(slow/fast/instant)_
4851

49-
## Screenshots
52+
## Demo
53+
54+
> Slow Bread-First Search on a medium graph.
55+
> <img src="./github/gifs/bfs.gif" width=800>
56+
57+
> Slow Depth-First Search on a small graph. It's an extremely inaccurate implementation.
58+
> <img src="./github/gifs/dfs.gif" width=800>
59+
60+
> Fast Dijkstra's algorithm on a large graph.
61+
> <img src="./github/gifs/dijkstra1.gif" width=800>
5062
51-
>User has selected to randomly generate a _small_ graph and has choosen a source node and target node
52-
><img src="./github/screenshots/1.PNG" width=800>
63+
> Instant Dijkstra's algorithm on a large graph.
64+
> <img src="./github/gifs/dijkstra2.gif" width=800>
5365
54-
>A _Breadth-First Search_ has started at the selected source node
55-
><img src="./github/screenshots/2.PNG" width=800>
66+
> Fast Kruskal's algorithm on a large graph.
67+
> <img src="./github/gifs/kruskal.gif" width=800>
5668
57-
>The _BFS_ has found the target node and drawn the shortest path
58-
><img src="./github/screenshots/3.PNG" width=800>
69+
> Fast Prim's algorithm on a large graph.
70+
> <img src="./github/gifs/prim1.gif" width=800>
5971
60-
>Finished _Dijkstra's_ algorithm, run on a different graph
61-
><img src="./github/screenshots/4.PNG" width=800>
72+
> Instant Prim's algorithm on a large graph.
73+
> <img src="./github/gifs/prim2.gif" width=800>

github/gifs/bfs.gif

303 KB
Loading

github/gifs/dfs.gif

220 KB
Loading

github/gifs/dijkstra1.gif

1.2 MB
Loading

github/gifs/dijkstra2.gif

812 KB
Loading

github/gifs/kruskal.gif

887 KB
Loading

github/gifs/prim1.gif

892 KB
Loading

github/gifs/prim2.gif

809 KB
Loading

0 commit comments

Comments
 (0)