Almost All k-Colorable Graphs are Easy to Color

Abstract We describe a simple and efficient heuristic algorithm for the graph coloring problem and show that for all k ≥ 1, it finds an optimal coloring for almost all k -colorable graphs. We also show that an algorithm proposed by Brelaz and justified on experimental grounds optimally colors almost all k -colorable graphs. Efficient implementations of both algorithms are given. The first one runs in O ( n + m log k ) time where n is the number of vertices and m the number of edges. The new implementation of Brelaz's algorithm runs in O ( m log n ) time. We observe that the popular greedy heuristic works poorly on k -colorable graphs.