This project implements several fundamental graph algorithms, organized into three categories:
- Shortest Path:
Find the shortest path between two nodes in a graph usingBreadth-First Search (BFS)
. - Minimum Spanning Tree:
Compute the minimal spanning tree of a graph usingKruskal's
andPrim's
algorithms. - Eulerian Path:
Determine a Eulerian path in a graph usingFleury's Algorithm
andHierholzer's Algorithm
.
Additionally, this project allows for graph generation through two methods:
- File-based input: Load graphs from a file.
- Random graph generation: Generate graphs of various sizes for testing and illustration purposes.
Graphs can be visualized for better understanding and analysis using the built-in display functionality.
This project relies on the following libraries:
- algs4.jar - A collection of algorithms from Princeton's Algorithms, Part I course.
- GraphStream (version 2.0) - For graph visualization, utilizing core, algorithm, and UI components.
- JUnit 4.13.1 - For unit testing and ensuring code reliability.
To set up the project:
- Download the required libraries:
- algs4.jar: Download Link
- GraphStream 2.0: GraphStream Website
- JUnit 4.13.1: Available via Maven Central.
- Add the libraries to your project’s classpath.
- You should now be ready to run the algorithms and generate or load graphs for visualization and analysis.
- You can either load a graph from a file or generate a random graph of your choice.
- Use the provided graph visualization tools to display and analyze the structure of the graph.
This project is licensed under the MIT License.