VertexDegreeComparator<V, E> c = new VertexDegreeComparator<V, E>(graph);
/* Precolor vertex v with maximum degree with first color. */
V v = Collections.max(vertices, c);
IVecInt literals = new VecInt(1);
literals.push(vertices.indexOf(v) * colors + 1);
solver.addClause(literals);
literals.clear();
/* Precolor neighbor of v with maximum degree with second color. */
Collection<V> neighbors = graph.getNeighbors(v);