Clique and Coloring Problems Graph Format
Clique and Coloring Problems Graph Format
Clique and Coloring Problems Graph Format
Graph Format
Last revision: May 08, 1993
1 Introduction
One purpose of the DIMACS Challenge is to ease the eort required to test
and compare algorithms and heuristics by providing a common testbed of
instances and analysis tools. To facilitate this eort, a standard format must
be chosen for the problems addressed. This document outlines a format for
graphs that is suitable for those looking at graph coloring and nding cliques
in graphs. This format is a
exible format suitable for many types of graph
and network problems. This format was also the format chosen for the First
Computational Challenge on network
ows and matchings.
This document describes three problems: unweighted clique, weighted
clique, and graph coloring. A separate format is used for satisability.
Participants are welcome to develop translation programs to convert instances to and from more convenient, or more compact, representations; the
Unix awk facility is recommended as especially suitable for this task.
All les contain ASCII characters. Input and output les contain several
types of lines, described below. A line is terminated with an end-of-line
character. Fields in each line are separated by at least one blank space.
Each line begins with a one-character designator to identify the line type.
2.1
Input Files
Problem line. There is one problem line per input le. The problem
line must appear before any node or arc descriptor lines. For network
instances, the problem line has the following format.
p FORMAT NODES EDGES
The lower-case character p signies that this is the problem line. The
FORMAT eld is for consistency with the previous Challenge, and should
contain the word \edge". The NODES eld contains an integer value
specifying n, the number of nodes in the graph. The EDGES eld contains an integer value specifying m, the number of edges in the graph.
2
is the dimension descriptor. DIM is an integer giving the number of dimensions of the space, while METRIC is a string representing the metric for the space. METRIC is a string that
can take a number of forms. Lp (i.e. L1, L2, L122, and so on)
denotes the `p norm where the distance between
two nodes emP
d
bedded at (x1; x2; : : :; xd) and (y1; y2; : : : yd) is ( i=1 jxi yijp)1=p.
The string LINF is used to denote the `1 norm. L2S denotes
the squared euclidean norm (which can be less susceptible to
computer{dierences in round{o and accuracy issues).
v
X1
X2
X3
. .. XD
The lower-case character x signies that this is a parameter descriptor line. The PARAM eld is a string that gives the name
of the parameter, while the VALUE eld is a numeric value that
gives the corresponding value. The following PARAM values have
been dened:
PARAM
Description
MINLENGTH (Geometric Graphs) Edge included only if
length greater than or equal to VALUE
MAXLENGTH (Geometric Graphs) Edge included only if
length less than or equal to VALUE
Note that this information is in addition to the required edge
descriptors.
4
2.2
Output Files
Solution Line
s TYPE SOLUTION
Bound Line
b BOUND
Clique Line
v V
The lower-case character v signies that this is a clique vertex line. The
V eld gives the node number for the node in the clique. There will be
one clique line for each node in the clique.
Label Line
l V N