## The NP-Completeness of Edge-Colouring

### Ian Holyer

^{y}

### SIAM J. COMPUT, Vol. 10, No. 4, November 1981 (pp. 718-720) c

### 1981 Society for Industrial and Applied Mathematics 0097-5397/81/1004-0007 $01.00/0

Abstract. We show that it is NP-complete to determine the chromatic index of an arbitrary graph. The problem remains NP-complete even for cubic graphs.

Key words. computational complexity, NP-complete problems, chromatic index, edge-coloring

### 1. Introduction.

The chromatic index of a graph is the number of colors required to color the edges of the graph in such a way that no two adjacent edges have the same color.By Vizing's theorem [1], the chromatic index is either ^{d} or^{d}+ 1, where ^{d} is the maximum
vertex degree.

We prove the conjecture (Garey and Johnson [2, p268]) that it is NP-complete to determine the chromatic index of an arbitrary graph. In fact, we prove the stronger result that it is NP-complete to determine whether the chromatic index of a cubic graph is 3 or 4. Thus this problem probably has no polynomial time algorithm.

The terminology and results of NP-completeness are given in [2]. It is clear that the
chromatic index problem is in the class NP. To prove that the problem is NP-complete, we
exhibit a polynomial reduction from the known NP-complete problem 3SAT which is dened
as follows. A set of clauses ^{C} = ^{fC}^{1}^{;}^{C}^{2}^{;}^{:}^{:}^{:}^{;}^{C}^{r}^{g} in variables ^{u}^{1}^{;}^{u}^{2}^{;}^{:}^{:}^{:}^{;}^{u}^{s} is given, each
clause ^{C}^{i} consisting of three literals ^{l}^{i;1}^{;}^{l}^{i;2}^{;}^{l}^{i;3}, where a literal ^{l}^{i;j} is either a variable ^{u}^{k} or
its negation ^{u}^{k}. The problem is to determine whether^{C} is satisable, that is, whether there
is a truth assignment to the variables which simultaneously satises all the clauses in ^{C}. A
clause is satisifed if one or more of its literals has value \true".

### 2. The parity condition.

We will use the following lemma given in Isaacs [3].LemmaLet ^{G} be a cubic, 3-edge-colored graph and^{V}^{0} ^{}^{V}(^{G}) a set of vertices of^{G}. Let

E 0

E(^{G}) be the set of edges of ^{G} which connect ^{V}^{0} to the remainder of the graph. If the
number of edges of color ^{i} in ^{E}^{0} is ^{k}^{i} (^{i}= 1^{;}2^{;}3), then

k

1

k

2

k

3 (mod 2)

Proof. If^{E}^{12}is the set of edges of^{G}which are colored with color 1 or 2, then^{E}^{12}consists
of a collection of cycles. Thus ^{E}^{12} meets ^{E}^{0} in an even number of edges, and so ^{k}^{1}+^{k}^{2} ^{}0
(mod 2) which gives ^{k}^{1} ^{}^{k}^{2} (mod 2). Similarly^{k}^{2}^{}^{k}^{3} (mod 2). ^{2}

### 3. The components used in the construction.

Given an instance^{C}of the problem 3SAT, we will show how to construct a cubic graph

^{G}which is 3-edge-colorable if and only if

C is satisable. The graph^{G} will be put together from pieces or \components" which carry
out specic tasks. Information will be carried between components by pairs of edges. In a
3-edge-coloring of^{G}, such a pair of edges is said to represent the value ^{T} (\true") if the edges
have the same color, and to represent^{F} (\false") if the edges have distinct colors.

Received by the editors January 31, 1980, and in nal form January 7, 1981

yUniversity Computer Laboratory, University of Cambridge, Cambridge, England. This work was supported by the British Science Research Council

1

a

b

c

d e

Figure 1: The inverting component and its symbolic representation

The inverting component is shown with its symbol in Fig. 1. It was used by Loupekine
(see [4]) to construct a large family of cubic graphs with chromatic index 4. Using the parity
condition above, it may be checked that if this component is 3-edge-colored, one of the pairs
of connecting edges marked ^{a;}^{b} or ^{c;}^{d} must have equal colors and the remaining 3 edges
must have distinct colors. There is no further restriction on the possible colors of the ve
connecting edges. Regarding the pair of edges^{a;}^{b}as the input and the pair^{c;}^{d}as the output,
the component changes a representation of ^{T} to one of ^{F} and vice versa.

Figure 2: The variable-setting component made from 8 inverting components and having 4 output pairs of edges. More generally, it is made from 2n inverting components and has n output pairs.

The truth or falsity of each variable^{u}^{i} will be represented by a variable-setting component
such as that shown in Fig. 2. The component shown has 4 pairs of output edges, but in general
the component representing ^{u}^{i} should have as many output pairs as there are appearances
of ^{u}^{i} or ^{u}^{i} among the clauses of ^{C}. It may be checked that in any 3-edge-coloring of a
variable-setting component, all the output pairs must represent the same value.

The truth of each clause^{c}^{j} will be tested by a satisfaction-testing component as shown in
Fig. 3. This component can be 3-edge-colored if and only if the three input pairs of edges do
not all represent ^{F}. The remaining connecting edges will be discussed later.

2

Figure 3: The satisfaction testing component.

### 4. The main theorem.

We are now in a position to prove the following theorem.Theorem. It is NP-complete to determine whether the chromatic index of a cubic graph is 3 or 4.

Proof. The problem is clearly in the class NP. We exhibit a polynomial reduction from the
problem 3SAT. Consider an instance ^{C} of 3SAT and construct from it a graph^{G} as follows.

For each variable ^{u}^{i} take a variable-setting component ^{U}^{i} with one output pair of edges
associated with each appearance of ^{u}^{i} or^{u}^{i} among the clauses of^{C}. Take also a satisfaction-
testing component ^{C}^{j} for each clause ^{c}^{j}. Suppose literal ^{l}^{j;k} in clause ^{c}^{j} is the variable ^{u}^{i}.
Then identify the ^{k}th input pair of ^{C}^{j} with the associated output pair of ^{U}^{i}. If, on the
other hand, ^{l}^{j;k} is ^{u}^{i}, then insert an inverting component between the ^{k}th input pair of ^{C}^{j}
and the associated output pair of ^{U}^{i}. The resulting graph ^{H} still has some connecting edges
unaccounted for. The cubic graph ^{G} is formed from two copies of ^{H} by identifying the
remaining connected edges in corresponding pairs.

The graph^{G}has a 3-edge-coloring if and only if the collection ^{C} of clauses is satisable,
as can be veried using the properties of the components developed above. Moreover, the
graph ^{G} can be produced from^{C} using a polynomial time algorithm, so we have the result.

2

### 5. Comments.

The above theorem may give some insight into the diculty in classifying graphs according to their chromatic index. At any rate, it probably excludes the possibility of a polynomially checkable criterion, and it indicates that the restriction to cubic graphs is no easier.### Acknowledgements.

I would like to thank M. Garey and D. Johnson for suggesting a simplication in the proof.REFERENCES

[1] S. Fiorini and R,J. Wilson,Edge-colourings of Graphs, Pitman, London, 1977.

[2] M.R. Garey and D.S. Johnson, Computers and Intractability, W.H. Freeman, San Francisco, 1979.

[3] R. Isaacs, Innite families of non-trivial trivalent graphs which are not Tait colorable, Amer. Math. Monthly, 82 (1975), pp. 221-239.

[4] ||{, Loupekine's snarks: A bifamily of non-Tait-colorable graphs, unpublished.

3