DM63 - Heuristics for Combinatorial Optimization
Weekly Notes
Lecture 5, Fall 2007

Lecture September 19

We discussed how to use tools from exploratory data analysis of statistics to visualize experimental results. We used the data collected from the Task 1 of the Implementation Contest. In the comparison there were three extra participants (ROS: Random Ordered Sequence greedy coloring, DSATUR, The degree of saturation and RLF, Recursive Large First). RLF and DSATUR clearly outperformed the other algorithms / implementations in solution quality.

General aspects of designing, setting up and analyzing experiments were discussed. The $\mathsf{R}$ free software environment for statistical computing and graphics was recommended for performing the kind of analysis shown at the lecture. This kind of analysis are expected in the exam project.

The complexity class PLS: Polynomial Local Search were introduced. Problems in PLS have the following properties: (1) local optimality can be verified in polynomial time and (2) improving steps can be computed in polynomial time. Finally the search landscape were introduced and some metaheuristics for escaping local optima were discussed.

Bibliographical Notes

Implementation Contest - Task 2

The second Task of the Implementation Contest asks to submit the implementation of a metaheuristic for construction heuristics that provides good approximation of the chromatic number within a given time limit.

A new set of instances has been made available at the Implementation Contest Section

The time limit for each single run is 90 seconds for C/C++ users and 120 seconds for Java users. Times refer to the machine woglinde.imada.sdu.dk of the terminal room.

The metaheuristics should use the construction heuristics developed in the previous task and, as a minimal requirement, should enhance their performance in terms of solution quality. The methods implemented might, in case, use a subsidiary local search but restricted to a first improvement or a best improvement procedure.

The heuristics will be evaluated on the three instances made available and similar instances. They will be allowed the same time limit and the comparison will be done on the basis of solution quality only. If a participant designs more than one algorithm he/she must choose the one deemed the best and submit only one.

The same submission details and input out formats as in Task 1 apply. Make sure your program receives a flag -t SECONDS as an input for the time limit.

The deadline is at 12.00 of Thursday 4th October.

Implementing Local Search within the Framework

An updated version of the framework is available at the Implementation Contest Section ready for the implementation of the local search.

In a bottom-up order (see Figure 1), the class Move has been added. It represents the synthetic information about the changes to apply to a solution as determined by the neighborhood operator. The delta in evaluation function entailed by a Move is returned by a function of the SolutionManager (Delta).

When a Move is chosen to be performed the function MakeMove of the Explorer class implements the changes and calls updateDeltaDataOneEx of the SolutionManager to update all the auxiliary data structures of the Solution representation. The class OneExExplorer is derived from the Explorer and contains the methods for the examination of the neighborhood (RandomMove, NextMove, BestMove). These methods are called by the function Run (or Test_Run) of the Runner. This function implements the local search and ends when arriving in a local optimum, or when the time limit is elapsed or when a given number of iterations is exceeded (in case idle iterations if only non-improving iterations are considered). A Solver Metaheuristic_Descend implements the high level strategy for the approach complete-infeasible solution representation. An alternative solver (and procedures in the other classes) should be implemented for the partial-feasible representation.


The code is currently not functioning because the implementation of some procedures has been removed and it is left to the student. These functions are OneExExplorer::Delta, OneExExplorer::BestMove.

In the new version two additional data structures have been added to the Solution class: conflicts_set and adj_x_color. These are useful to implement the fast delta evaluation scheme as explained at the lecture. Their initialization as well as their update has been however removed and their implementation is left to the student (updateColoringData and updateDeltaDataOneEx).


The framework is supposed to run with command:

gcp -i instance -solver 2 -init 1 -neigh 1 -t 1

Figure 1: The abstraction levels of the framework
Image abstraction_levels

$\mathsf{DSATUR}$ and $\mathsf{RLF}$ heuristics for GCP

The fastest methods to generate a feasible coloring are construction heuristics. Most of these heuristics for the GCP belong to the class of sequential heuristics that start from a set of empty color classes $\{C_1,\ldots,C_k\}$, where $k = \vert V\vert$, and then iteratively add vertices to color classes until a complete coloring is reached. Each iteration of the heuristic consists of two steps: first, the next vertex to be colored is chosen, and next this vertex is assigned to a color class. The order in which the vertices are colored corresponds to a permutation $\pi$ of the vertex indices that can be determined either statically before assigning the colors, or dynamically by taking into account the partial coloring for the choice of the next vertex. The choice of the color class at each construction step is typically based on the greedy heuristic that adds at iteration $i$ the vertex $\pi(i)$ to the color class with the lowest possible index such that the partial coloring obtained after coloring vertex $\pi(i)$ remains feasible, therefore trying to minimize the number of non-empty color classes.

Clearly, the result of the greedy heuristic depends on the permutation $\pi$. The simplest way to derive $\pi$ in a static way is by using the random order sequential heuristic ($\mathsf{ROS}$), which simply generates a random permutation. Several other ways for generating $\pi$ statically exist, like largest degree first, smallest degree last, etc. However, static sequential methods are typically dominated by dynamic ones [3]. Probably the most widely spread dynamic heuristic is the $\mathsf{DSATUR}$ heuristic that is derived from the exact DSATUR algorithm of Brélaz [1]. In $\mathsf{DSATUR}$, the vertices are first arranged in decreasing order of their degrees and a vertex of maximal degree is inserted into $C_1$. Then, at each construction step the next vertex to be inserted is chosen according to the saturation degree, that is, the number of differently colored adjacent vertices. The vertex with the maximal saturation degree is chosen and inserted according to the greedy heuristic. Ties are broken preferring vertices with the maximal number of adjacent, still uncolored vertices; if further ties remain, they are broken randomly. Other dynamic heuristics for determining $\pi$ were studied in [2].

A different strategy for generating colorings is to iteratively extract independent sets from the graph. The most famous such heuristic is the recursive largest first ($\mathsf{RLF}$) heuristic proposed by Leighton [4]. $\mathsf{RLF}$ iteratively constructs a color class $C_i$ by first assigning to it a vertex $v$ with maximal degree from the set $V'$ of still uncolored vertices; initially it is $V' = V$. Next, all the vertices in $V'$ that are adjacent to $v$ are removed from $V'$ and inserted into a set $U$, which is initially empty; $U$ is the set of vertices that cannot be added to color class $C_i$ anymore. Then, while $V'$ is not empty, the vertex $v' \in V'$ that has the largest number of edges $[v',u]$, with $u \in U$, is chosen; $v'$ is added to $C_i$, removed from $V'$, and all vertices in $V'$ adjacent to $v'$ are moved into $U$. Ties are broken, if possible, choosing the vertex that has minimal degree in $V'$, otherwise randomly. These steps are iterated until $V'$ is empty and the same steps are repeated with the residual graph consisting of the vertices in $U$.

Note that the construction heuristics described above can also be used if a fixed number $k < \vert V\vert$ of color classes is available. In that case, the usual steps of the construction algorithms are followed as long as the number of used color classes remains below $k$. Then, if a vertex cannot be colored legally, it is added to a color class randomly or according to some other heuristic that tries to minimize the number of arising conflicts. The result of these so modified construction heuristics is typically an infeasible $k$-coloring, which can serve as an initial solution for improvement methods.

Bibliography

1
D. Brélaz.
New methods to color the vertices of a graph.
Communications of the ACM, 22(4):251-256, 1979.

2
D. de Werra.
Heuristics for graph coloring.
Computing Supplement, 7:191-208, 1990.

3
A. Johri and D.W. Matula.
Probabilistic bounds and heuristic algorihms for coloring large random graphs.
Technical Report 82-CSE-6, Southern Methodist University, Dallas, Texas, USA, 1982.

4
F. T. Leighton.
A graph coloring algorithm for large scheduling problems.
Journal of Research of the National Bureau of Standards, 84(6):489-506, 1979.


Marco Chiarandini 2007-09-20