No description
  • Jupyter Notebook 99.8%
  • Python 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-07-17 18:34:12 +02:00
gifs add rlf algorithm 2025-07-17 18:15:15 +02:00
.gitignore init 2025-06-24 16:42:39 +02:00
animation.ipynb add rlf algorithm 2025-07-17 18:15:15 +02:00
compare.ipynb add rlf algorithm 2025-07-17 18:15:15 +02:00
enviroment.yaml init 2025-06-24 16:42:39 +02:00
functions.py add rlf algorithm 2025-07-17 18:15:15 +02:00
README.md update README.md 2025-07-17 18:34:12 +02:00
visualization.ipynb new graph 2025-07-17 18:17:06 +02:00

Graph Coloring Algorithms

This project implements and compares various graph coloring algorithms using Python and NetworkX. Graph coloring is a fundamental problem in graph theory where the goal is to assign colors to vertices such that no two adjacent vertices share the same color, using the minimum number of colors possible.

Project Structure

Core Implementation

functions.py

Contains the main implementations of graph coloring algorithms:

Jupyter Notebooks

visualization.ipynb

Demonstrates the coloring algorithms with visual output:

  • Creates a random Erdős-Rényi graph with 70 nodes
  • Applies each coloring algorithm and measures execution time
  • Generates colored graph visualizations using matplotlib
  • Compares the number of colors used by each algorithm

animation.ipynb

Creates step-by-step animations of the coloring process:

compare.ipynb

Comprehensive performance comparison of all algorithms:

  • Benchmark Tests:
    • Erdős-Rényi Graphs: Tests on random graphs with varying sizes (50-10,000 nodes) and edge probabilities
    • Barabási-Albert Graphs: Tests on scale-free networks with different parameters
    • Creates comparison tables showing execution time and color efficiency

Usage

  1. Run visualization.ipynb to see basic algorithm comparisons
  2. Run animation.ipynb to generate step-by-step animations
  3. Run compare.ipynb for comprehensive performance analysis