An_efficient_algorithm_for_edge_coloring
An_efficient_algorithm_for_edge_coloring
Parallel Multigraphs
X. Zhou, S. Nakano, H. Suzuki and T. Nishizeki
Abstract
Many combinatorial problems can be efficientlysolved for series-parallelgraphs or
partial k-trees. The edge-coloring problem is one of a few combinatorial problems for
which no efficient algorithms have been obtained for series-parallelmultigraphs. This
paper gives an algorithm which optimally edge-colors a given series-parallelmultigraph
in time O([V[z~), where V is the set of vertices and A the m a x i m u m degree.
1. Introduction
This paper deals with the edge-coloring problem which asks to color, using a minimum
number of colors, all edges of a given graph so that no two adjacent edges are cdlored
with the same color. It is known that many combinatorial problems can be solved very
efficiently, say in linear time, for series-parallel graphs or partial k-trees [TNS, ACPD,
AL, C]. Such a class of problems has been characterized in terms of "forbidden graphs"
or "extended monadic logic of second order" [TNS, ACPD, AL, C]. The edge-coloring
problem does not belong to such a class, and is one of a few well-known problems for
which no efficient algorithms of low complexity order have been obtained for series-
parallel multigraphs. Even a polynomial time algorithm has not been obtained for the
edge-coloring problem of series-parallel multigraphs until quite recently []3]. For series-
parallel simple graphs, which have no multiple edges, the edge-coloring problem can be
solved in time O(IVHE[) where V is the set of vertices and E the set of edges of a graph
[TN]. Systo, referring [TN], conjectured that there would exist a linear algorithm to solve
the edge-coloring problem for series-parallel muitigraphs, which may have multiple edges
[Sys]. Very recently Bodlaender gave a polynomial-time algorithm of high complexity
order to solve the edge-coloring problem for series-parallel (simple) graphs or partial k-
trees. His algorithm runs in time O(IV[Ae4) for series-parallel multigraphs. Note that the
maximum degree z3 is not a constant in general. On the other hand, recently Seymour
[Sey] has proved that x(G) = max{z3, IF(G)] } holds for any series-parallel multigraph
G, where x(G) is the chromatic index of G, i.e., the minimum number of colors required
for an edge-coloring of G,
and E(U) is the set of edges of G whose both ends belong to U. Using the equation above,
one can find the chromatic index x(G) of G in polynomial time, say in time O([V[a).
However his proof does not seem to yield a polynomial-time algorithm to actually find
an edge-coloring of G using x(G) colors. In this paper we give a very efficient algorithm
to solve the edge-coloring problem, that is, decide x(G) and find an edge-coloring of
G using x(G) colors, for any series-parallel multigraph G in time O([VIA ). Thus the
complexity is much improved. Our algorithm is not based on Seymour's result above,
but uses general techniques employed by Bodlaender for partial k-trees as well as new
idea specific to series-parallel graphs (i.e. partial 2-trees).
2. Definitions
In this section we give some basic definitions. We denote by G = (V, E) a graph with
vertex set V and edge set E. The set of vertices and the set of edges of G are often
denoted by V(G) and E(G), respectively. A (two-terminal) series-parallelmultigraph is
defined recursively as follows:
1. A graph G of a single edge is a series-parallel multigraph. The ends u and w of
the edge are called the terminals of G and denoted by u(G) and w(G).
2. Let G1 be a series-parallel multigraph with terminals u(G1) and w(G1), and
let G~ be a series-parallel multigraph with terminals u(G2) and w(G2).
(a) A graph G obtained from G1 and G2 by identifying vertex w(G1) with vertex
u(G2) is a series-parallel multigraph whose terminals are u(G)(=u(Gm)) and
w(G)(--w(G2)). Such a connection is called a series connection, and G is
denoted by G -- GI 9G2.
(b) A graph G obtained from G1 and G2 by identifying u(G~) with u(G2)
and w(G1) with w(G2) is a series-parallel multigraph whose terminals are
u(G)(=u(G1)=u(G2)) and w(G)(-w(G1)=w(G2)). Such a connection is
called a parallel connection, and G is denoted by G = G1 II G2.
The terminals u(G) and w(G) of G are often denoted simply by u and w. We denote
by d(v) the degree of vertex v E V. The maximum degree of G is denoted by A. Let
d(G) = d(u) + d(w) and #t(G) = min{d(u), d(w)}. The set of edges joining vertices vl
and v2 is denoted by g(vl, v2). An edge-coloring~oof G is an assignment of colors to the
edges in G such that no two adjacent edges have the same color. The number of colors
used by an edge-coloring ~ois denoted by # ~ , the color assigned to edge e E E is denoted
by ~o(e), and for a set A C_ g of edges, ~0(A) denotes the set of colors assigned to the
edges in A. If a color e E ~o(g) is not used for any edges incident with vertex v, then we
say that c is missing at v. The set of colors missing at v is denoted by M(v). Define S(~o)
to be the set of edges whose colors appear at the terminal u and do not appear at w.
Define similarly T(~) by interchanging u and w. Define R(~o) to be the set of edges whose
colors appear at both u and w. Define Q(~o) to be the set of edges whose colors appear
neither at u nor at w. The numbers of colors used by S(~o), T(~o), R(~) and Q(~o) are
denoted by s(~), t(~), r(~) and q(~), respectively. The sets of colors ~(S(~)), ~(T(~)),
~(R(~)) and ~(Q(~)) are denoted simply by ~(S), ~(T), ~(R) and ~(Q), respectively.
Then the following equations hold:
= + + +
= +
d(w) = +
518
3. S i m p l e a l g o r i t h m
In this section, we present a simple but not efficient algorithm to solve the edge-
coloring problem for series-parallel multigraphs. Our idea is to compute recursively
x(G, i) for all integers i, 0 < i < A. However, this is not easy because x(G, i) cannot eas-
ily be expressed in terms of x(G1, it) and x(G2, i2) when G = Gt [I G2 or G = Gt 9 G2.
We need to introduce intermediate functions Xp(G, i, it, ia) and xs(G, i, it, i2), defined
below, so that the set of all functions is closed under the connections 11and 9
For an edge-coloring ~ of a series-parallel multigraph G such that G = Gx II Gg, let
~t be an edge-coloring of Gt such that ~t(e) = ~(e) for e E E(Gt) and let ~2 be an
edge-coloring of G2 such that ~2(e) = ~(e) for e E E(G2). We call ~ the extcntion of
two colorings ~t and ~z. Let ~ he an edge-coloring of G such that r(~)=i, r ( ~ l ) = Q and
r(~a)=ia for nonnegative integers i, it and is. Define Xp(G,i, it, i2) to be the minimum
number of colors used by such an edge-coloring ~ of G if there exists such an edge-coloring
~; otherwise, define Xp(G, i, i1, i2) = oo. Define similarly xs(G, i, it, is) for the case when
G=GI 9 G2. Then clearly
The following six lemmas hold for nonnegative integers i, it and is.
Proof. Clearly Xp(G, i, it, i2) > max{x(Gt, it), x(G2' i2), d(G) - i}, and if i < ix +
is or il + i2 + ap < i then Xp(G,i,Q,i2) = 00. Therefore it suffices to prove that
Xp(G, i, it, is) <_ max{x(G1, il), x(G2, is), d(G) - i} for every integer i, it + is < i <
il + is + ap.
Let ~ be an edge-coloring of G1 such that #rl = X(Gl,il) and r(~) = il, and let r
be an edge-coloring of G2 such that # r = x(G2, is) and r(r = i2./,From 7/and r we
actually construct a coloring ~o of G such that r(~,) = i, r(~Ol) = il, r(~,2) = is and #~0 =
max{x(G1, it), x(G2, i2), d(G) - i}. One may assume w.l.o.g, that x(G1, il) >_ x(G2, is)
and ~(E(Gt)) fl r = r Consider an edge-coloring ~0 of G which is an extention
of the two colorings 7/and r that is,
519
= j't/(e) ifeEE(al);
~(e)
[r i f e E E(G2).
Then r(~ol) = il and r(~o~) = iz, but r(~o) = il + i2 and #to = X(Gl,it) + x(G2, is).
Therefore we shall alter the coloring ~o. Let a and ~ be any nonnegative integers such
that
i = a + / ~ + it + i s ,
and 0 < a < min{d(u(G1)) - il, d(w(G2)) - i2~,
0 ~ ~ ~. min{d(u(G2)) - i2,d(w(G1)) hi.
We rename a + j3 colors of the coloring r replace any a colors in r with a colors
in y(S), and replace any j3 colors in r with f~ colors in 0(T). Then the coloring to
obtained from 7/and this altered r satisfies r(to ) = i.
Thus we shall alter ~ so that # ~ = max{x(Gt, il), x(G2, is), d(G) - i}. There are
two cases.
Casel: X(Gl,il) > _ d ( G ) - i .
In this case we alter r so that r C ~(E(G1)), and hence #to = x(G1, il).
Clearly the following four equations holds:
d(G1) = 2it + sol ) + t(~l),
d(G2) = 2i~ + s(r + t(r
d(G) = d(G1).+ d(G?),
and x(G1, il) = il + s(~) + t(Ti) + q(o).
/,From these four equations and x(Gt, it) > d(G) - i and i = it + is + a + ~, we have
q(y) > i2 + (s(r - f~) + (t(r - a).
Therefore we can rename some more colors of r as follows: replace all the i2 colors in
r the remaining s(r - fl colors in r and the remaining t(r - a colors in r
with colors in ~?(Q). We finally replace all the colors in r with colors in Gt not used
yet. This can be done since x(G1, it) >_ x(G2, i2). Then the coloring to obtained from
and this altered r satisfies #~o = x(Gt, it), r(~o) = i, r(~ol) = it and r(~o2) = is.
Case 2: x(G1, it) < d(a) - i.
In this case we niter 0 and r so that rI and r and hence ~, use only the d(G) - i
colors in o(S) U 0(T) U 0(R) U r Ur Ur as follows. Since d(G) - i > x(G1, it),
q(0) < i2 + (s(r - / 9 ) + (t(r - a). Therefore we can replace all the colors in 0(Q)
with any q(0) colors among the i2 colors in r plus the remaining s(r - ~ colors in
r plus the remaining t(r - a colors in r Since d(G) - i > x(G2,i2), q(r <
il + (t(r/) - / ~ ) + (s(0) - a). Therefore we can replace all the colors in r with any
q(r colors among the it colors in 0(R) plus the remaining s0/) - a colors in ri(S) plus
the remaining t(r/) - / ~ colors in 0(T). Then the coloring ~o obtained from these altered
~/and r satisfies #~o = d(G) - i, r(~) = i, r ( ~ o l ) ---- it and r(toz) = i~. Q.g.:D.
Similarly, we have the following lemma for the case when G = G1 9 G2.
L e m m a 3.2 Let G = GI*G2 and v = w(Gt) = u(G2). Let it and i2 be two nonnegative
integers and )~ = max{x(Gt , it), x(G2, is), d(v)}. Then
~"max{x,(G, O, ia, is) - i, ~, x.(G, c~,, il, i2) - ~, + i} if 0 < i < as;
xs(G, i, il, is) t oo otherwise,
Proof. We first prove x,(G, i, il, i2) < x,(G, i + 1, i,, is) + 1. Let ~ be a coloring of
G such that # ~ = x,(G, i + 1, it, is), r(~) = i + 1, r(~ol) = it and r(~o2) = i2. Every
color in ~o(R) belongs to ~1(S) N ~os(T), ~Ol(R) N ~os(T), or ~ol(S) N ~s(R). Therefore
~(R) N (~ol(S) U ~s(T)) r ~b and hence there exists an edge e 6 R(~o) N (S(~1) U T(~s))
adjacent to u(G) or w(G). Recoloring e with a new color, we obtain a coloring ~o' of G
such that #~o' = #~o + 1, r(~') = i, r(~o~) = it and r(~o~) = iz. Thus x,(G, i, ix, is) <
x,(G, i + 1, ix, is) + 1.
We next prove X, (G, i + 1, ix, is) < xs(G, i, it, i2)+ 1. Consider a coloring ~ of G such
that # r = x.(G, i, ix, is), r(~) = i, r(~l) = it and r(~2) = i2. There are two cases.
Case i: S(~) NS(vh) r @ or T(~) N T(V~2)r 4.
We may assume w.l.o.g, that S(~) NS(~1) # r Then there exists an edge (u, vx) 6
S(~o) N S(r adjacent to u(V). Since x , ( G , i + 1,ix,i~) # oo, d(w) = r ( ~ ) + t(~) _>
i + 1 > r(~o) and hence t(~o) > 1. Let c be an arbitrary color in r Recolor with color
d the edge (u, Vl) and all the edges colored with c in G2. Then the resulting coloring ~'
satisfies r(~o') = i + 1, r(~0~) = Q, r ( ~ ) = i2 and # ~ ' = # ~ o + 1.
C a s e 2: S(~) N S(~I) = r and T(~) N T(~os) = ~b.
We first prove ~I(S) N ~s(T) # r Since S(~) n S ( ~ , ) = r S ( ~ , ) C_ R(~). Similarly
T(~2) C_ R(~). Therefore S(~x) U T(~s) C_ R(~). Let p be an arbitrary coloring of G
such that r(p) = i + 1, r(tq) = ix and r(ps) = is. Then clearly p(R) C_ pI(S) IA#s(T).
Therefore
i + 1 < 8(m) + t( s)
= (d(u) - it) + (d(w) - i2)
= S( l) + tC 2)
= I ,x(s) u sCT)l + I I(S) n ,sCT)l
< i + [~I(S) f'l ~s(T)l ,
and hence ~x(S) N ~os(T) # 4.
Since ~x(S) U ~s(T) # 4, there are two edges el = (u, z) 6 S(~I) and es = (w, y) 6
T(~s) colored with the same color. Since i < d(u) and S(~o) N S(~I) = r there must
exist an edge e3 = (u, z') 6 R(~Ol) - R(~). Similarly there exists an edge e4 = (w, y~) 6
R ( ~ ) - R(~o). Let c/, 1 < j S 4, be the color of ej. Note that Cl = c2. Clearly the
following 7/and r are colorings of Gx and G2, respectively:
c4 if ~x(e) = c3,
~/(e) = ei if ~i(e) = e4,
co if ~x(e) = cx,
~ol(e) otherwise,
and
e0 if ~2(e) = c4,
r c4 ife=e2,
~o2(e) otherwise,
521
Proof. Let 7 = max{x(G~, il), x(G~, is), d(v), d(G), d(G1) - ix + is, d(G2) - is + ix }.
Then obviously x,(G, 0, il, is) _> 7- Therefore we shall prove xs(G, O, il, is) <_ 7.
Let r / b e a coloring of G1 such that #t/ = x(G~,il) and r(t/) = ix, and let ~b be
a coloring of G2 such that #~b = x(G2,i:) and r(~b) = is. Assume that ~(E(G1)) N
~b(E(Gz)) = ~. Consider the extention ~o of the two colorings 7/and ~b. Then r(9) = 0,
r(91) = il and r(~o2) = i2, but # 9 = X(G1, il) + x(G~, i9.). Therefore we shall alter 9 so
that # 9 = 7. There are four cases.
C a s e 1 : 7 = x(G1, il) or 7 = X(G2, is).
One may assume w.l.o.g, that 7 = x(Gl, ix). We rename all the colors of ~ with those
of t/. Obviously
X(G1, il) = s(r/) + t(o ) + q(rl) + il, (3.1)
x(G2, is) = + + + is, (3.2)
d(~) : t(r}) + {1 + s(~b) + i2, (3.3)
d(G) = s(o ) + il + t(~b) + i2, (3.4)
d(G1) - ix + i2 = s(r]) + t(o ) + il + is, (3.5)
and d(G2) - i2 + il = s(~b) + t(~b) + il + is. (3.6)
/,From these equations and x(G1, il) > max{d(v), a(G), d(GI) - il + i2, a(G2) - is + il},
we have
q(q) > max{s(~b) - s(0) + i2,t(~b) - t(~) + is, (s(~b) - s(~)) + (t(~b) - t(o)) + i2, i2}
= is + max{s(~b) - s(rl), 0} + max{t(r - t(ff), 0}.
Therefore we can replace the ix colors in ~b(R), any max{s(~b) - s(r/), 0} colors in ~b(S)
and any max{t(~b) - t07), 0} colors in ~b(T) all with colors O(Q). We further replace the
remaining colors in ~b(S) with colors in r/(S), and the remaining colors in ~b(T) with colors
in r/(T). Finally we replace all q(~b) colors in ~b(Q) with the remaining colors in ~/not
used yet. This can be done since #~7 >__#~b. Then the extention 9 of r/and this altered
~b is a coloring of G and satisfies # 9 = x(GI, ia), r(9) = 0, r(91) -- il and r(~,2) = is.
Case 2: 7 = d(v).
/,From (3.1) - (3.3), (3.5), (3.6) and d(v) > ma~{x(G1, il), x(G2, i2), d(Gx) - il +
is, d(G2) - is + it }, we have the following four inequalities:
s(~b) - s(o) + i2 >_ q(~),
t(o ) - t(~b) + il > q(~b),
and _>
522
t(o) >__t(r
Therefore we alter 0 and r so that 0 and r and hence their extention ~, use only the
d(v) colors in y/(T) U T/(R) U r Ur as follows:
(1) replace all s01 ) colors in t/(S) with colors in r
(2) replace all t(r colors in r with colors in T/(T);
(3) replace all q(r/) colors in T/(Q) with any q0/) colors among the colors in r
plus the remining s(r - sit/) colors in r
and
(4) finally replace all q(r colors in r with any q(r colors among the colors in
t/JR) plus the remaining t(~}) - t(r colors in 1}(T).
Then the extention ~a of these altered 7} and r satisfies #to = d(v), r(~) = 0, rico1) = il
and r(~2) = i2.
Case 3: 7 = d(G).
/,From (3.1), (3.2), (3.4) - (3.6) and diG ) >_ max{x(Gl,il), x(G2, i2), d(G1) - il +
i2, d(G2) - i2 + il}, we have the following four inequalities:
t(r - t0/) + i2 >
s(r/) - s(r + it > q(r
t(r >__
and s(~/) > ,(r
Therefore we alter ~ and r so that 7/and r and hence ~0, use only the d(G) colors in
~/(S) U 7/(R) U r Ur as follows:
(1) replace all s(~b) colors in r with colors in ~/(S);
(2) replace all t(0) colors in o(T) with colors in r
(3) replace all q(~/) colors in T/(Q) with any q0/) colors among the colors in r
plus the retaining t(r - t(o) colors in r
and
(4) finallyreplace all qir colors in r with any qir colors among the colors in
0iR) plus the remaining s(~})- sic ) colors in ~/(S).
Then the extention ~ of these altered ~/and r satisfies # ~ = d(G), r(~) = O, r(~ol) = il
and r(~2) = i2.
Case 4 : 7 = d(G1) - il + i2 or 7 = diG2) - i2 + il.
One may assume w.l.o.g, that 7 = d(G1) - il + i2./,From (3.1) - i3.5) and d(G1) -
il + i2 > max{x(G~, il), x(G2, i2), d(v), diG)}, we have the following four inequalities:
>__s(r
t(o) >__t(r
i2 > q0/),
and ($(17) - 8(r + (t(17) - t ( r + il _~ q(r
Therefore we alter ~/and r so that ~/and r and hence ~, use only the d(G1) - il + i2
colors in 0(S) U ~/(T) U t/(R) U r as follows:
(1) replace all s(r colors in r with colors in T/(S);
(2) replace all t(r colors in r with colors in ~/(T);
(3) replace all q(r/) colors in ~/(Q) with colors in r
and
523
(4) finally replace all q(~b) colors in ~b(Q) with any q(~b) colors among the colors in
~/(R) plus the remaining t(z/) - t(~b) colors in ~/(T) plus the retaining s07 ) - s(~b)
colors in ~}(S).
T h e n the extention ~ of these altered ~} and tb satisfies #to = d ( G i ) - ix + i2, r ( ~ ) -- 0,
r(~01) = il and r(to~) = i2. Q.~.~D.
Proof. Let 7 = max{d(v), x(Gx, ix), X(G2, i2), 6t(G) + d(v) - il - i2}. We first prove
x , ( G , as, il, i2) > 7. Clearly, xs(G, a,, ix, i2) > m~{d(v), X(Gx, ix), x(G2, i2)}. Therefore
we shall prove x , ( G , as, ix, i2) > 6t(G) + d(v) - ix - i2. If dft(G) < ix + i2 then the
inequality trivially holds. Therefore one m a y assume t h a t 6t (G) > ix +i2. T h e n as = 6t (G)
since d(G) - ix - i2 >_ 26t(G) - ix - i9. > 6t(G). Let to be any coloring of G such t h a t
r ( ~ ) = dft(G), r(~ox) = ix and r(~2) = i2. T h e n there are at least d(v) - ix - i2 edges
which are incident to v and whose colors are different from those in R(~o). T h e r e f o r e
xs(G, (~,, it, i2) > 6t(G) + d(v) - ix - i2.
We next prove xs(G, as, ix, i2) < 7. Let ~/be a coloring of Gx such t h a t #~} = x(G1, ix)
and r(r}) = ix, and let ~b be a coloring of G2 such t h a t #~b = x(G2, i2) and r(!b) = i2. One
m a y assume t h a t ~}(E(GI))A~b(E(G2)) = ~. Consider the extention ~o of the two colorings
11 and ~b. T h e n r(~ox) = ix and r(to2) = i2, but r(to) = 0 and #~o = x(G1, i x ) + x(G2, i2).
Therefore we shall alter ~0 so t h a t r(to) = as and #to = 7. T h e r e are three cases.
Casel: 6t(G)>it+i~.
In this case as = 6t(G) and 6t(G) + d(v) - ix - i2 > d(v). F u r t h e r m o r e s(~7) =
d(u) - ix > 6t(G) - ix > i2 and t(~b) = d(w) - i2 > i1. T h e r e are two subeases.
Casel.l: 7 = 6 t ( G ) + d ( v ) - i l - i 2 .
One m a y assume w.l.o.g, t h a t d(u) < d(w). T h e n as = 6t(G) = d(u) and ix +
s(0) - i9. _< t ( r /,From 7 -> x ( G x , i i ) , 7 >- x(G2,i2), d(v) = ix + i2 + t(~) + s ( r
and d(u) = s(r}) + ix, we have q(z}) < s(~b) and q(~b) + t(~b) - il - (s(r}) - i2) _< t(~}).
Therefore we can alter ,7 and ~b so t h a t z / a n d ~b, and hence their extention to, use only
the d(u) + d(v) - ix - i2 colors in ~/(S) U T}(R) U T/(T) O ~b(S), as follows:
(1) replace all i~ colors in zb(R) with colors in r}(S);
(2) replace any ix + s(0) - i2 colors in ~b(T) with the ix colors in r}(R) plus the
remaining s(r/) - iz colors in ~}(S);
(3) replace all q(r/) colors in ~/(Q) with colors in ~b(S);
and
(4) finally replace all q(r colors in r and the remaining t ( r - ix - (s(r}) - i2)
colors in r with any q(r + t ( r - il - (s(r/) - i2) colors in T}(T).
T h e n the extention ~ of these altered r} and r satisfies #to = d(u) + d(v) - ix - i2 = 7,
= d ( , ) = a . , r( x) = ix a n d = i2.
C a s e 1 . 2 : 7 = m a x ( x ( G 1 , ix), x(G2, i2)}.
One m a y assume w.l.o.g, t h a t x(Gx, il) > x(G2, i2). z F r o m d(u) >_ dft(G), d(w) >
6t(G), x(G1, il) > ~t(G) + d(v) - il - i2 and x(Gx, il) _> x(G2, i2), we have the following
inequalities:
~t(G) - ix - i2 < min{s(~) - i2,t(~b) - ix},
s(~b) < q(7/) + max{0, d(u) - d(w)},
524
and
d(w) - d(u) + q(r
-- {(t(r - i1) -(s(~/) - i~)} + q(r _< t(q) + q(y) - s(r if d(u) <_ d(w),
q(r < t ( . ) + {(s(q) - i2) - (t(r - it)} + q(.) - s(r otherwise.
(4) finally replace all q(r colors in r with the remaining t(~/) + q(r/) - s(r -
(i2 - s(T/)) + il - t(r colors in t/not used yet.
Then the extention 9 of~7 and this altered r satisfies # 9 - # t / - 7, r(9) -" S(~l)d-t(r --
a,, r(91) = il and r(9s) = is.
C a s e 3: d(u) <_Q + is <_d(w) or d(w) <_il + i2 <_d(u).
One may assume w.l.o.g, that d(u) <_ i~ + is <_d(w). In this case we have s(t/) _< i~,
t(~b) _> Q, 6t(G) = d(u), a, = d(u) and S t ( G ) + d ( v ) - i x - is <_ d(v). Since 3, =
max{d(v), X(G1, ix), x(Gs, is)}, there are three subcases.
Case 3.1: T = d(v).
/,From d(v) > x(G1, il) and d(v) > x(G2, is) we have q(T/) _< s(r + i~ - s(T/) and
t(r - il + q(r _< t(T/). Therefore we can alter ~/and r so that ~ and r and hence their
extention 9, use only the d(v) colors in ~/(T) U ~/(R) U r U ~b(R), as follows:
(1) repalee all s(~/) colors in ~?(S) with colors in r
(2) repalce any il colors in r with the il colors in ~/(R);
(3) repalee all q(~/) colors in ~/(Q) with any q07) colors among the s(r colors in
r and the remaining i2 - sO7) colors in r
and
(4) finally replace the remaining t(r - il colors in r and all q(r colors in r
with colors in ~/(T).
Then the extention 9 of these altered ~/and r satisfies # 9 = d(v) = 7, r(9) = d(u) = or.,
r(91) = ix and r(92 ) = i2.
C a s e 3.2: 7 = x(Gl,il).
/,From X(G1, il) > x(G2, i2) and x(G1, il) >_d(v) we have q(r + t(r - il < t(r/) +
q(rl) s(r - (i2 - s(rl)) a n d i2 - s(0) + s(r < q(~). Therefore we can alter r so that
-
r C_ T/(E(G1)), as follows:
(1) repalce any sO?) colors in r with colors in T/(S);
(2) repalce any il colors in r with the ix colors in ~/(R);
(3) repalce the remaining i2 - s(7/) colors in r and the s(r colors in r with
any i2 - s(T/) + s(r colors in t/(Q);
and
(4) finally replace all q(r colors in r and the remaining t(r - il colors in r
with the remaining t(T/) + q(T/) - s(r - (i2 - sO7)) colors in ~ not used yet.
Then the extention 9 of 7/and this altered r satisfies # 9 = # 7 = 7, r(9) = d(u) = a,,
r(91) = il and r(92 ) = i2.
C a s e 3.3: 7 = x(G2,i2).
/,From x(G2, i2) > x(GI,il) and x(G2, i2) >_ d(v) we have q(r/) _< s ( r q(r
t(r - il - tO1) + i2 - s(T/) and t(~/) _< q(r + t(r - il. Therefore we can alter r/so that
rI(E(GI) ) C r as follows:
(1) repalce all s(T/) colors in r/(S) with colors in r
(2) repalce all i1 colors in r/(R) with colors in r
(3) repalce all t(~/) colors in r/(T) with any t(T/) colors among the q(r colors in r
plus the remaining t(r - il colors in r
and
(4) finally replace all q(~/) colors in ~/(Q) with the remaining s(r + q(r + t(r -
il - tO1) + i2 - s(~) colors in r not used yet.
Then the extention 9 of this altered T/and r satisfies # 9 = # r = 7, r(9) = d(u) = a.,
r(91) = il and r(9s) = is. Q.s
526
The proof of Lemma 3.6 is omitted due to the lack of space. Now we prove Lemma
3.2.
The lemmas above imply that Xp(G, i, il, i2) and x,(G, i, il, i2) for fixed integers i, il
and i2 can be computed in constant time if x(G1, il) and x(G2, i~.) are known. Therefore
we obtain the following straightforward algorithm.
1 P r o c e d u r e Color(G);
2 begin
a if G has exactly two I"
vertices
4 t h e n x(G, i) := i if i = IE[
C~ otherwise
5 e l s e if G = Gx II G2
s then begin
7 Color(G1); { Compute all x(G1, il) }
s Color(G2); { Compute all x(G2, is) }
9 compute all xp(G, i, il, is) by using Lemma 3.1;
lo for each i, 0 < i < A, x(G, i) := mi.n{xp(G, i, ix, is)}
$1~S2
11 end
12 else b e g i n { G = G1 9 G2 }
13 Color(G1); { Compute all x(Gx, il) }
14 Color(G2); { Compute all x(G2, i2) }
x5 compute all xs(G, i, il, is) by using Lemma 3.2;
16 for each i, 0 < i < A, x(G, i) := min{xs(G, i, il, i2)}
11112
17 end
is end;
Lines 9, 10, 15 and 16 in the algorithm above can be done in time O(A3), and there
occurs at most [V] recursive calls during the execution of Color(G). Therefore the total
running time of the algorithm is O(IVIA3). In the following section we will prove that
the function x(G, i) is "convex" with respect to variable i, and using the fact, we give an
efficient method to compute x(G, i) in lines 9, 10, 15 and 16.
4. E f f i c i e n t a l g o r i t h m
In this section we give an algorithm which solves the edge-coloring problem for series-
parallel multigraphs in time O(IVIA ). We first show that x(G, i) is a convex function
with respect to variable i: for any integers i, h and j such that h < i < j, x(G, i) <
max{x(G , h), x(G, j)}. Then, by using the convexity, we improve the time complexity of
the algorithm above by showing that at lines 9, 10, 15 and 16, x(G, i) for all i can be
computed in time O(A). The proofs of the following two lemmas are omitted due to the
lack of space.
We show that x(G, i) can be computed for all i total in time O(A) for the case when
G = G1 II G2. The other case when G = G1 * G2 is omitted due to the lack of space. Let
528
Therefore one can compute x(G, imin) in time O(A). We compute all the other x(G, i),
i =/rain + 1,/rain + 2, ..., A, in this order. Lemma 4.1 implies that, for every i >/ram,
x ( G , i - 1 ) - 1,
x(G,i) = x ( G , i - 1),
x ( G , i - 1 ) + I, or
OO.
We give a method to determine, for fixed integers i and j, whether x(G, i) < j or not.
Clearly, using the method three times, one can compute x(G, i) for a fixed i if x(G, i - 1 )
has been known. Lemma 3.1 implies that x(G, i) < j if and only if there exist integers
ix and i2 such that
x(Gt, il) _< j, (4.1)
X(G2,i2) _< j, (4.2)
d(G) - i < j, (4.3)
it + i2 < i, (4.4)
i <__d(u), (4.5)
i < d(w), (4.6)
i < d(G1) - il + i2, and (4.7)
i <_d(G2) - i2 + il. (4.8)
~From Lemma 4.2, we have known that x(G, i) is convex. Therefore inequalities (4.1)
and (4.2) can be transformed into the following inequalities:
al < il __<bl and (4.9)
a2 _< i2 _< b2, (4.10)
where
al -- min(itl x(G1, il) ~ j},
bt = max{hi x(G1, il) _< j},
a2 = min{i2l x(G2, i2) < j} and
b2 = max{i2[ x(G2, i2) < j}.
Furthermore, inequalities (4.3)-(4.8) can be rewritten as follows:
a<i</~, (4.11)
it+i2<i, and (4.12)
7 < it - i 2 < 6, (4.13)
529
where a,/~, 7 and 6 are constants determined by fixed i and j. Clearly, one can determine
in constant time whether there are integers i1 and i2 satisfying all of (4.9), (4.10), (4.12)
and (4.13). Thus, for fixed i and j, one can determine whether x(G, i) ~_ j in constant
time ifal, bl, a2 and b2 have been known. For allj, 0 _~ j ~ 3A-- 1,one can easily compute
al, bl,as and b2 above in time O(A). (Note that, for every multigraph G, the chromatic
index of G is less than 2A, and hence x(G, i) < 3 A for every i unless x(G, i) = oo.)
Thus, we can compute x(G, i) for all i in time 0(.4) for the case when G - G1 II G2.
We have showed that the procedure Color can be implemented so that it runs in
time O(IV[A). Although Color finds the chromatic index of a series-parallel multigraph
G, it can be modified so that it actually colors G. Thus we conclude the paper by the
following theorem.
Theorem The edge-coloring problem can be solved in time O(]VIA ) and space
O(IVl/t) for a series-parallelmultigraph G = (V, E).
References