# 🌳 MSTree-Bench: Minimum Spanning Tree Benchmarking Toolkit
Welcome to MSTree-Bench! This repository offers a comprehensive toolkit for benchmarking and comparing Kruskal's and Prim's algorithms for finding minimum spanning trees (MST) across various graph configurations. With integrated visualization tools and performance analysis reports, MSTree-Bench enables users to explore the efficiency and effectiveness of these two fundamental algorithms.
---
## 📖 Table of Contents
- [Features](#features)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Algorithms](#algorithms)
- [Visualization](#visualization)
- [Performance Analysis](#performance-analysis)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)
---
## 🚀 Features
- **Algorithm Comparison**: Directly compare the performance of Kruskal's and Prim's algorithms.
- **Benchmarking**: Evaluate algorithms using various graph configurations.
- **Visualization Tools**: Visualize the graph structures and the MSTs generated by both algorithms.
- **Performance Reports**: Analyze the time complexity and memory usage of each algorithm.
---
## 🛠️ Getting Started
To begin using MSTree-Bench, follow these steps:
1. **Clone the Repository**:
```bash
git clone https://github.com/RyannSQ14/MSTree-Bench.git
cd MSTree-Bench
-
Install Required Packages: Use pip to install the necessary Python packages.
pip install -r requirements.txt
-
Download the Latest Release: Visit the Releases page to download the latest version. Execute the downloaded file to get started.
To use MSTree-Bench, run the main script. You can specify various parameters to customize the graph configurations and algorithm choices.
python main.py --algorithm <kruskal|prim> --graph <type> --nodes <number>
python main.py --algorithm kruskal --graph random --nodes 100
This command benchmarks Kruskal's algorithm on a random graph with 100 nodes.
Kruskal's algorithm finds a minimum spanning tree for a connected weighted graph. It operates by sorting the edges and adding them one by one, avoiding cycles.
Prim's algorithm builds a minimum spanning tree by starting with a single vertex and adding the shortest edge from the tree to a new vertex until all vertices are included.
MSTree-Bench includes built-in visualization tools to help you understand how each algorithm processes the graph. Visualize:
- Graph Structures
- Edges Added to the MST
- Final Minimum Spanning Tree
Run the visualization tool with the following command:
python visualize.py --algorithm <kruskal|prim> --graph <type>
MSTree-Bench generates performance analysis reports detailing:
- Execution Time
- Memory Usage
- Comparison Charts
Reports are saved as CSV files for easy access and review.
Contributions are welcome! If you have suggestions for improvements or new features, please fork the repository and submit a pull request.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature'
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
For any inquiries, please contact:
- Name: Your Name
- Email: your.email@example.com
- GitHub: Your GitHub Profile
This repository covers the following topics:
- algorithm-comparison
- algorithm-visualization
- benchmarking
- data-structures
- graph-algorithms
- kruskal-algorithm
- minimum-spanning-tree
- performance-analysis
- prim-algorithm
- python
Thank you for your interest in MSTree-Bench! Happy benchmarking!