Sample graph coloring problems

©1996 Andrew W. Appel

Want to investigate graph-coloring algorithms without writing a compiler to generate the data? This file contains 27,922 actual register-interference graphs generated by Standard ML of New Jersey version 1.09, compiling itself.

The format is

Graph 374:
K=21
32 --> 6 7 8 0 1 2 
33 --> 6 7 8 0 1 
34 --> 7 8 0 6 35 36 37 38 39 
35 --> 34 8 0 7 36 37 38 39 1 
36 --> 34 35 0 8 37 38 39 1 6 
37 --> 34 35 36 0 38 39 1 6 7 
38 --> 34 35 36 37 
39 --> 35 36 37 34 1 6 7 8 
3<->32 2<->33 1<->34 6<->35 7<->36 8<->37 0<->38 34<->1 35<->6 36<->7 37<->8 39<->0 
The notation K=21 at the beginning of each graph indicates the number of registers (colors) that the compiler has available for coloring this graph. We assume there are K precolored nodes, numbered 0 through K-1, that all interfere with each other. But the clique of precolored nodes is not explicitly listed in the file.

The interference edges are listed with a single-headed arrow. In the example, node 32 interferes with nodes 6, 7, 8, 0, 1, and 2.

Furthermore, "move" edges are shown. The last line indicates that there is a move between nodes 3 and 32, a move between 2 and 33, and so on. If possible, nodes 3 and 32 should be colored with the same color.

Background information

Based on the number of registers available on the machine, the compiler (or human tuner of the compiler) chooses several parameters: