Class BacktrackColoring

All Implemented Interfaces:
ColoringAlgorithm

public class BacktrackColoring extends BacktrackColoringBase
Attempts at finding the optimum coloring of a graph using a systematic exploration of the search space. The backtracking is implemented in a non-recursive manner, using multiple threads.

First, a maximal clique is computed that offers a lower bound q of the chromatic number. The colors of the vertices in the maximal clique are fixed before the backtracking algorithm starts. Secondly, an initial coloring is computed using a simple heuristic. This gives an upper bound kof the chromatic number. Next, the algorithm will attemtp to color the graph using a number of colors ranging from k-1 to q, determining the optimal coloring.

A time limit may be imposed. If the algorithm stops due to the time limit, it will return the best coloring found until then.

Author:
Cristian Frăsinaru
  • Constructor Details

    • BacktrackColoring

      public BacktrackColoring(Graph graph)
    • BacktrackColoring

      public BacktrackColoring(Graph graph, long timeLimit)
    • BacktrackColoring

      public BacktrackColoring(Graph graph, Coloring initialColoring)
    • BacktrackColoring

      public BacktrackColoring(Graph graph, Coloring initialColoring, long timeLimit)
  • Method Details