Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sandeepvashishtha/graph-coloring
This Java Swing GUI application visualizes the graph coloring problem using a greedy algorithm. Users can dynamically create and color graphs by adding vertices and edges, exploring chromatic harmony by finding the minimum colors needed so that no two adjacent vertices share the same color.
https://github.com/sandeepvashishtha/graph-coloring
graph-algorithms greedy-algorithms java swing-gui
Last synced: about 2 months ago
JSON representation
This Java Swing GUI application visualizes the graph coloring problem using a greedy algorithm. Users can dynamically create and color graphs by adding vertices and edges, exploring chromatic harmony by finding the minimum colors needed so that no two adjacent vertices share the same color.
- Host: GitHub
- URL: https://github.com/sandeepvashishtha/graph-coloring
- Owner: SandeepVashishtha
- License: mit
- Created: 2024-10-22T19:15:07.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-10-28T19:07:19.000Z (about 2 months ago)
- Last Synced: 2024-10-28T20:18:43.359Z (about 2 months ago)
- Topics: graph-algorithms, greedy-algorithms, java, swing-gui
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Interactive Graph Coloring GUI
==============================This project is a Java Swing-based GUI application that visualizes the graph coloring problem using a greedy algorithm. It allows users to dynamically create and color graphs by adding vertices and edges, making it easier to understand and demonstrate chromatic harmony by finding the minimum number of colors required so that no two adjacent vertices share the same color.
Features
--------- **Interactive Graph Creation**: Add vertices and edges by clicking on the canvas.
- **Vertex Movement**: Drag vertices to rearrange the graph layout.
- **Greedy Coloring Algorithm**: Automatically colors the graph with minimal colors using a greedy approach.
- **Visual Learning**: Suitable for learning and demonstrating graph coloring concepts.How to Use
----------1. **Set Vertices**: When prompted, enter the number of vertices for the graph.
2. **Add Edges**: Click on two vertices consecutively to add an edge between them.
3. **Drag Vertices**: Move vertices around the canvas by dragging them to adjust positions.
4. **Color the Graph**: Click the "Color Graph" button to apply the greedy coloring algorithm.
5. **Exit**: Close the application to reset or exit.Technologies Used
------------------ **Java**
- **Swing GUI**
- **Graph Theory Concepts**Getting Started
---------------1. Clone the repository:
`git clone https://github.com/SandeepVashishtha/Graph-Coloring.git`2. Navigate to the project directory and compile the code:
`javac InteractiveGraphColoringGUI.java`3. Run the application:
`java InteractiveGraphColoringGUI`Example Use Case
----------------This project can be used in educational environments for teaching graph theory, specifically the concept of graph coloring and chromatic numbers. It's suitable for students, educators, and anyone interested in visualizing and experimenting with graph theory algorithms.
License
-------This project is licensed under the MIT License - see the LICENSE file for details.