The project aims to utilize concurrency and parallelism to speed up Dijkstra's Shortest Path Algorithm. It includes four variations of Dijkstra's algorithm, each representing a step improvement in performance:
- Unidirectional/Standard Dijkstra
- Bidirectional Dijkstra
- Parallel Dijkstra
- Parallel Bidirectional Dijkstra
- Unidirectional/Standard Dijkstra: The classic Dijkstra algorithm that finds the shortest path from a single source node to all other nodes in the graph.
- Bidirectional Dijkstra: An optimized version that simultaneously searches from the source and target nodes, meeting in the middle to reduce the search space.
- Parallel Dijkstra: A parallel implementation of the standard Dijkstra algorithm, utilizing multiple threads to speed up the search process.
- Parallel Bidirectional Dijkstra: Combines bidirectional search with parallelism to further enhance performance.
There are two sources of tests in the project: in-file tests and main.rs
tests.
To run the in-file tests, use the following command:
cargo test --release -- --nocapture
To run the main.rs
, use the following command:
cargo test --release -- --nocapture
Note
To learn about Dijkstra at the very beginning of this experiment, we coded Dijkstra and Bidirectional Dijkstra in Python, see pythohh.py
.