Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antnatb/disjoint-sets
Project for Algorithms and Data Structures Laboratory @ Unifi - Python functions and LaTeX relation to analyze and compare different disjoint sets implementations.
https://github.com/antnatb/disjoint-sets
connected-components disjoint-sets latex-document
Last synced: 3 months ago
JSON representation
Project for Algorithms and Data Structures Laboratory @ Unifi - Python functions and LaTeX relation to analyze and compare different disjoint sets implementations.
- Host: GitHub
- URL: https://github.com/antnatb/disjoint-sets
- Owner: antnatb
- Created: 2024-05-06T14:23:15.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-05-21T07:42:53.000Z (8 months ago)
- Last Synced: 2024-09-29T04:42:35.528Z (3 months ago)
- Topics: connected-components, disjoint-sets, latex-document
- Language: TeX
- Homepage:
- Size: 984 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Disjoint-Sets Implementation Comparison
This repository contains the code and report for comparing two different methods for implementing data structures for disjoint sets:
- Implementation based on linked lists
- Implementation based on rooted trees## Introduction
In this project, I compare the efficiency of the above implementations by testing disjoint sets based algorithms for finding connected components in non-oriented graphs with different sizes and densities.
## Contents
- [Code](#code)
- [Report](#report)
- [Test Cases and Results](#test-cases-and-results)
- [Conclusion](#conclusion)## Code
The code is organized into the following modules:
- `linked_list_disjoint_set.py`: Handles the linked list representation of disjoint sets.
- `disjoint_set_forest.py`: Handles the rooted trees representation of disjoint sets.
- `graph.py`: Manages the graph data structure and provides methods for generating graphs.
- `test.py`: Provides methods for testing the efficiency of different implementations of the connected-components algorithm.
- `main.py`: The main executable program where tests are run.## Report
The report provides a theoretical analysis of the problem, documentation of the code, details of the tests conducted, and analysis of the results. The report is available in the root directory as `report.pdf`.
## Test Cases and Results
I conducted a total of six tests, three of which compared all implementations and the other three compared only linked lists with weighted union to rooted trees. Each test case evaluated the efficiency of the implementations on graphs with varying sizes and densities. Detailed test cases and results can be found in the report.
## Conclusion
The conclusion section of the report summarizes the findings of the project and provides insights into the efficiency of different disjoint-set implementations in solving the problem of finding connected components in non-oriented graphs.