Skip to main content
QUICK REVIEW

[Paper Review] Simulated Annealing Algorithm for Graph Coloring

Alper Köse, Berke Aral Sonmez|arXiv (Cornell University)|Dec 3, 2017
Scheduling and Timetabling SolutionsDecision Sciences2 references4 citations
TL;DR

This paper proposes a simulated annealing algorithm using Markov Chain Monte Carlo (MCMC) to solve the graph coloring problem by minimizing an energy function H that counts improperly colored edges. The method dynamically lowers temperature (β) to escape local minima, achieving proper coloring (H=0) with sufficient colors and iterations, particularly for q=5 and q=7 on Erdos-Renyi graphs with 1000 vertices.

ABSTRACT

The goal of this Random Walks project is to code and experiment the Markov Chain Monte Carlo (MCMC) method for the problem of graph coloring. In this report, we present the plots of cost function \(\mathbf{H}\) by varying the parameters like \(\mathbf{q}\) (Number of colors that can be used in coloring) and \(\mathbf{c}\) (Average node degree). The results are obtained by using simulated annealing scheme, where the temperature (inverse of \(\mathbfβ\)) parameter in the MCMC is lowered progressively.

Motivation & Objective

  • To develop and test a simulated annealing approach for minimizing the cost function H in graph coloring using MCMC.
  • To investigate how the number of available colors (q) and average node degree (c) affect the minimum achievable energy H_min.
  • To evaluate the impact of iteration count and β cooling schedule on convergence to low-energy or proper colorings.
  • To compare performance and efficiency between MATLAB and C++ implementations for large-scale graph coloring.
  • To explore strategies for improving solution quality through multiple independent runs and parallelization.

Proposed method

  • Uses a Metropolis algorithm with acceptance probability exp(−βΔH) to stochastically update vertex colors.
  • Employs a dynamic β schedule: β increases as (0.2 + N/n)/0.2, where N is vertex count and n is iteration count.
  • Initial coloring is uniformly random; at each step, a random vertex is recolored with a different color.
  • Energy function H counts the number of edges with identical-colored vertices: H(x) = Σ_{(v,w)∈E} 1_{x_v = x_w}.
  • Simulated annealing progressively reduces temperature (increasing β) to favor convergence to low-energy states.
  • C++ implementation significantly improves runtime (0.04s vs. 50s in MATLAB) for 10^6 iterations on 1000-vertex graphs.

Experimental results

Research questions

  • RQ1How does the number of available colors (q) influence the minimum achievable energy H_min in graph coloring?
  • RQ2How does increasing the average node degree (c) affect the difficulty of achieving a proper coloring (H=0)?
  • RQ3What is the optimal β cooling schedule that balances convergence speed and solution quality?
  • RQ4Can multiple independent runs improve the likelihood of finding the global minimum H=0?
  • RQ5How does implementation efficiency (MATLAB vs. C++) impact the feasibility of large-scale simulations?

Key findings

  • For Erdos-Renyi graphs with 1000 vertices and c=5, q=5 and q=7 achieved H_min=0 (proper coloring), while q=3 yielded H_min=34.
  • With c=20, only q=7 achieved H_min=5; q=5 gave H_min=302 and q=3 gave H_min=1510, indicating increasing difficulty with fewer colors.
  • H_min increased linearly with c for all q values, but the slope was steeper for smaller q, reflecting reduced color choice diversity.
  • Increasing iterations improved convergence, with H_min decreasing as more time was spent at each β value.
  • The final β value must be large enough to freeze the chain (i.e., limit thermal fluctuations) to ensure convergence.
  • Multiple independent runs significantly improved the chance of finding H=0, and runs were easily parallelizable due to independence.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.