Added code for graph coloring (not yet tested).