Table Of ContentMinimum Sum Edge Colorings of Multicycles
Jean Cardinal∗ VladyRavelomanana†‡ MarioValencia-Pabon†§
8
Abstract
0
0
Intheminimumsumedgecoloringproblem,weaimtoassignnaturalnumberstoedgesofagraph,
2
so that adjacent edges receive different numbers, and the sum of the numbers assigned to the edges
n
is minimum. The chromatic edge strength of a graph is the minimum number of colors required in a
a
minimum sum edge coloring of this graph. We study the case of multicycles, defined as cycles with
J
parallel edges, and give a closed-form expression for the chromatic edge strength of a multicycle,
2
2 thereby extending a theorem due to Berge. It is shown that the minimum sum can be achieved with
a number of colors equal to the chromatic index. We also propose simple algorithms for finding a
] minimumsumedgecoloringofamulticycle. Finally,theseresultsaregeneralizedtoa largefamilyof
M
minimumcostcoloringproblems.
D
. Keywords:graphcoloring,minimumsumcoloring,chromaticstrength.
s
c
[
1 Introduction
2
v
8 Duringabanquet, npeoplearesittingaroundacirculartable. Thetableislarge,andeachparticipant can
4 only talk to her/his left and right neighbors. For each pair of neighbors around the table, there is a given
8
number of available discussion topics. If we suppose that each participant can only discuss one topic at a
3
. time, and that each topic takes an unsplittable unit amount of time, then what is the minimum duration of
6
0 the banquet, after which all available topics have been discussed? What is the minimum average elapsed
7 timebeforeatopicisdiscussed?
0
:
v
In this paper, we show that there always exists a scheduling of the conversations such that these two
i
X minima are reached simultaneously. We also propose an algorithm for finding such a scheduling. This
r amountstocoloring edgesofamulticycle withnvertices.
a
We first recall some standard definitions. Let G = (V,E) be a finite undirected (multi)graph without
loops. A vertex coloring of G is a mapping from V to a finite set of colors such that adjacent vertices are
assigned different colors. The chromatic number χ(G) of G is the minimum number of colors that can be
usedinacoloringofG. AnedgecoloringofGisamappingfromEtoafinitesetofcolorssuchthatadjacent
edges are assigned different colors. The minimum number of colors in an edge coloring of G is called the
chromatic index χ′(G). From now on, we assume that colors are positive integers. The vertex chromatic
∗Universite´ LibredeBruxelles(ULB),CP212. SupportedbytheCommunaute´ franc¸aisedeBelgique-ActionsdeRecherche
Concerte´es(ARC).jcardin@ulb.ac.be.
†Laboratoired’Informatiquedel’Universite´deParis-Nord(LIPN),99Av.J.-B.Cle´ment,93430Villetaneuse,France.
‡Vlady.Ravelomanana@lipn.univ-paris13.fr
§valencia@lipn.univ-paris13.fr
1
sum of G is defined as Σ(G) = min f(v) , where the minimum is taken over all colorings f of
v∈V
G. Similarly, the edge chromatic sum(cid:8)oPf G, denoted(cid:9)by Σ′(G), is defined as Σ′(G) = min f(e) ,
e∈E
wheretheminimumistakenoveralledgecolorings. Inbothcases,acoloringyieldingthech(cid:8)roPmaticsum(cid:9)is
calledaminimumsumcoloring.
We also define the minimum number of colors needed in a minimum sum coloring of G. This number
iscalledthestrengths(G)ofthegraphGinthecaseofvertexcolorings, andtheedgestrengths′(G)inthe
caseofedgecolorings. Clearly,s(G) ≥ χ(G)ands′(G) ≥ χ′(G).
Thechromaticsumisausefulnotioninthecontextofparalleljobscheduling. Aconflictgraphbetween
jobsisagraphinwhichtwojobsareadjacentiftheysharearesource,andthereforecannotberuninparallel.
Ifeach jobtakes aunit oftime, thenascheduling that minimizes themakespan isacoloring oftheconflict
graphwithaminimumnumberofcolors. Ontheotherhand, aminimumsumcoloring oftheconflictgraph
corresponds to a scheduling that minimizes the average time before a job is completed. In our example
above, jobs are conversations, resources are the banqueters, and the conflict graph is the line graph of a
multicycle.
Previous results. Chromatic sums have been introduced by Kubicka in 1989 [14]. The computational
complexity of determining the vertex chromatic sum of a simple graph has been studied extensively since
then. ItisNP-hardeven whenrestricted to someclasses ofgraphs for whichfinding thechromatic number
iseasy, suchasbipartite orinterval graphs [2,22]. Anumber ofapproximability results forvarious classes
of graphs were obtained in the last ten years [1, 8, 11, 6]. Similarly, computing the edge chromatic sum is
NP-hard for bipartite graphs [9], even if the graph is also planar and has maximum degree 3 [15]. Hard-
ness results were also given for the vertex and edge strength of a simple graph by Salavatipour [21], and
Marx[16].
Someresultsconcerntherelationsbetweenthechromaticnumberχ(G)andthestrengths(G)ofagraph.
It has been known for long that the vertex strength can be arbitrarily larger than the chromatic number [5].
However,ifGisaproperintervalgraph,thens(G) = χ(G)[19],ands(G) ≤ min{n,2χ(G)−1}ifGisan
interval graph [18]. Hajiabolhassan, Mehrabadi, and Tusserkani [10]proved ananalog ofBrooks’ theorem
forthevertexstrengthofsimplegraphs: s(G) ≤ ∆(G)foreverysimplegraphGthatisneitheranoddcycle
noracompletegraph,where∆(G)isthemaximumdegreeinG.
Concerning the relation between the chromatic index and the edge strength, Mitchem, Morriss, and
Schmeichel [17] proved an inequality similar to Vizing’s theorem : s′(G) ≤ ∆(G) + 1 for every simple
graphG. HararyandPlantholt[23]haveconjectured thats′(G) =χ′(G)foreverysimplegraphG,butthis
waslaterdisproved byMitchemetal.[17],andHajiabolhassan etal.[10].
Ourresults. Weconsider multigraphs, inwhichparalleledgesareallowed. InSections2and3weprove
twomainresults:
1. ifGisabipartite multigraph, thens′(G) = ∆(G),
2. if G is an odd multicycle, that is, a cycle with parallel edges, of order 2k + 1 with m edges, then
s′(G) = max{∆(G),⌈m/k⌉}.
Thesestatementsextendtwoclassical resultsfromKo¨nigandBerge,respectively.
In Section 4, we give an algorithm of complexity O(∆n) for finding a minimum sum coloring of a
multicycleGofordernandmaximumdegree∆. Thisalgorithm iteratively eliminatesedgesthatwillform
2
the color class corresponding to the last color s′(G). For the special case where n is even, we also give a
more efficient O(m)-time algorithm based on the property of optimal colorings that the first color classes
induceauniform multicycle.
Weconclude bygeneralizing ourresultstootherobjective functions.
2 Bipartite Multigraphs
Thefollowingwell-knownresulthasbeenprovedbyKo¨nigin1916.
Theorem 1(Ko¨nig’s theorem [13]). LetG = (V,E)beabipartite multigraph and let∆denotes itsmaxi-
mumdegree. Thenχ′(G) =∆.
Hajiabolhassanet al. [10] mention, without proof, that s′(G) = χ′(G) for every bipartite graph G. We
provethisresultinthegeneralcaseofbipartite multigraphs.
We first introduce some useful notations. Given C the set of colors used in an edge coloring of a
multigraphG,wedenotebyC thesubsetofcolorsofC assignedtoedgesincidenttovertexxofG. Given
x
two colors α and β, we call a path an (α,β)-path if the colors of its edges alternate between α and β. We
alsodenotebyd (x)thedegreeofvertexxinG.
G
Theorem2. LetG= (V,E)beabipartitemultigraphandlet∆denoteitsmaximumdegree. Thens′(G) =
χ′(G) = ∆.
Proof. Weproceedbycontradiction. Itissufficienttoassumethatthereisaminimumsumedgecoloring f
of G using ∆+1 colors. Let C = {1,...,∆+1} be the set of colors used by f. Choose an edge [a,b]0
of color ∆+ 1. Clearly, C ∪ C = {1,...,∆ +1}, otherwise there exists a color α ∈ {1,...,∆} not
a b
used by any edge adjacent to both vertices a and b that can be used to color edge [a,b]0. We would then
obtain a new edge coloring f′ such that f′(e) < f(e), a contradiction to the optimality of f.
e∈E e∈E
Therefore, thereexistcolorsα ∈ Ca\CbPandβ ∈ Cb\CPa suchthatα,β ≤ ∆.
LetP denoteamaximal(α,β)-pathstartingatvertexa. Suchapathcannotendatvertexb,otherwise
αβ
Gcontains anoddcycle,contradicting thefactthatGisbipartite. ThuswecanrecolortheedgesofP by
αβ
swapping colors α and β. After such a swap, α 6∈ C and α 6∈ C , hence we can assign color α ≤ ∆ to
a b
[a,b]0,obtaining anewedgecoloring f′.
Weprovethataftersucharecoloring,
f′(e) < f(e). (1)
eX∈E eX∈E
First,ifPαβ hasevenlength,therecoloringonlychangesthecolorof[a,b]0,hence(1)holds. Otherwise,let
2s+1bethelengthofPαβ,withs ≥0. Initially,thevalueofthesub-sumcorresponding totheedge[a,b]0
and to the 2s+1 edges of P in f is (∆+1)+(s+1)α+sβ . After the recoloring, the sub-sum inf′
αβ
haschangedtoα+(s+1)β+sα. Thevariationisβ−∆−1. Sinceβ−∆−1 < 0,inequality (1)holds,
contradicting theoptimality off.
Therefore, wehaveproved that iff isanedgecoloring for Gsuch that f(e) = Σ′(G), itusesat
e∈E
most∆colors. P
3
3 Multicycles
Multicyclesarecyclesinwhichwecanhaveparalleledgesbetweentwoconsecutivevertices. Inthissection
weconsiderthechromatic edgestrength ofmulticycles.
Thechromatic edge strength s′(G) of agraph Gis bounded from below by both ∆ and ⌈m⌉, where ∆
τ
isthemaximumdegreeinGandτ isthecardinality ofamaximummatchinginG. Inthissection, weshow
thatthelowerboundmax{∆,⌈m⌉}isindeedtightformulticycles. Weassumethatthemultiplicityofeach
τ
edge inthemulticycle isatleast one, sothat thesize τ ofamaximum matching isequal to⌊n/2⌋. Inwhat
follows,weletk = ⌊n/2⌋.
Wefirstgiveaclosed-form expression forthechromatic indexofmulticycles.
Theorem3([3]). LetG = (V,E)beamulticycle onnvertices withmedgesanddegreemaximum∆. Let
k = ⌊n/2⌋denote themaximumcardinality ofamatchinginG. Then
∆, ifniseven,
χ′(G) =
(cid:26) max ∆,⌈m⌉ , ifnisodd.
k
(cid:8) (cid:9)
Inorder todetermine theedge strength ofamulticycle, weneed thefollowing lemmaproved by Berge
in[3].
Lemma 1 (Uncolored edge Lemma [3]). Let G be a multigraph without loops with χ′(G) = r + 1. If
a coloring of G \ [a,b]0 using a set C of r colors cannot be extended to color the edge [a,b]0, then the
followingidentities areverified:
1. |C ∪C | = r,
a b
2. |C ∩C | = d (a)+d (b)−r−2,
a b G G
3. |C \C | = r−d (b)+1,
a b G
4. |C \C | = r−d (a)+1.
b a G
For proving Lemma 1, we can solve the following linear system of 3 equations on 3 variables: (i)
r = |C| = |C ∪C | = |C ∩C |+|C \C |+|C \C |; (ii) |C \C | = d (a)−1−|C ∩C |; and
a b a b a b b a a b G a b
(iii)|C \C | = d (b)−1−|C ∩C |.
b a G a b
Wenowstateourmainresult.
Theorem 4. Let G = (V,E) be a multicycle on n vertices with m edges and maximum degree ∆, and let
k = ⌊n/2⌋denote themaximumcardinality ofamatchinginG. Then
∆, ifniseven,
s′(G) = χ′(G) =
(cid:26) max ∆,⌈m⌉ , ifnisodd.
k
(cid:8) (cid:9)
Proof. Ifniseven,thentheresultfollowsfromTheorem2. Thus,weassumethatn= 2k+1forapositive
integerk. Weproceedbyinduction onm,andletr = max ∆,⌈m⌉ .
k
Assume that m = 2k +1. In this case, G is a simple (cid:8)odd cycle(cid:9). Color the edges in G in such a way
thatkedgesarecoloredwithcolor1,kedgesarecoloredwithcolor2andoneedgeiscoloredwithcolor3.
Since∆ = 2,⌈m⌉ = 3,andthiscoloring hasminimumsum,thetheoremholdsforthiscase.
k
4
Henceweassumethatm > 2k+1and,forthepurpose ofinduction, thattheresultholdsforallmulti-
cyclesonnverticeswithfewerthanmedges. Let[a,b]0 beanedgeinGandletG′ = G\[a,b]0. Byinduc-
tion,thereexistsaminimumsumedgecoloringf′ofG′ usingatmostrcolors,withr = max ∆,⌈m⌉ ≥
k
max ∆′,⌈m−1⌉ ≥ χ′(G′)colors. HenceG′ issuchthats′(G′) = χ′(G′) ≤ r. (cid:8) (cid:9)
k
A(cid:8)ssume, by c(cid:9)ontradiction, that every minimum sum edge coloring f of G uses r + 1 colors. The
restriction of f to edges in G′ must have minimum sum, otherwise contradicting the optimality of f in G.
Hencetheedge[a,b]0 istheonlyedgeinGcoloredbyf withcolorr+1. LetC = {1,...,r}bethesetof
colors used byf for the edges ofG′ and, for each isuch that 1 ≤ i ≤ r, let E denotes the set ofedges of
i
G′ ofcolori. Byinduction, wehave:
Claim1. Thereexistsacolorσ ∈ C suchthat|E |< k.
σ
Theclaimholds,otherwise m−1= r |E | = kr,andr = m−1 < m,acontradiction.
i=1 i k k
P
ByLemma1,|C ∪C | = r. Henceitissufficient toanalyze thecases σ ∈ C \C (orσ ∈ C \C )and
a b b a a b
σ ∈ C ∩C .
a b
3
2 1
4
3 2
1 1
2 2
1
(a)
3 3 3 1
2 4 1 2 1 4 2 1 2 2 3 2
3 2 3 2 3 4 1 3
1 1 1 1 1 1 3 1
2 2 2 2 2 2 2 2
1 1 1 1
(b) (c) (d) (e)
Figure 1: (a) A multicycle G where χ′(G) = 3 and having an edge colored with color 4. In this example,
σ = 3. Figures(a)-(c) illustrate thecaseσ ∈ C ∩C ,whileFigures(d)-(e) illustrate thecaseσ ∈ C \C
a b b a
intheproofofTheorem4.
If σ ∈ C \C , then by Lemma1, there exists acolor α ∈ Ca\C . LetG(α,σ) denote the subgraph
b a b
of G′ induced by the edges of color α and σ. Let G (α,σ) denote the connected component of G(α,σ)
b
containing thevertex b. Clearly, G (α,σ)isasimple(σ,α)-path having baslastvertexandnotcontaining
b
vertexa,otherwisewehaveacontradictiontoClaim1. HencewecanrecolortheedgesofthepathG (α,σ)
b
by swapping colors α and σ in such a way that σ 6∈ Cb. Since σ 6∈ Ca, we assign color σ to [a,b]0, and
obtainanedgecoloring f′′ ofGusingr colors. Figures1(d)-(e)provideanexampleofthiscase.
Wenowwanttoshowthat
f′′(e) < f(e), (2)
eX∈E eX∈E
contradicting s′(G) > r. If the length of the path G (α,σ) is even, then f′′(e) − f(e) =
b e∈E e∈E
σ−r−1 ≤ r−r−1< 0. IfthelengthofthepathGb(α,σ)isodd,say2s+1,Pwiths ≥ 0,thenPthedifference
5
is(σ+(s+1)α+sσ)−(r+1+(s+1)σ+sα) = α−r−1≤ r−r−1< 0. Thus,inequality(2)alwaysholds.
Theothercaseiswhenσ ∈ C ∩C . ThenbyLemma1,thereexistcolorsα∈ C \C andβ ∈ C \C
a b a b b a
with α 6= β 6= σ. By induction, the result holds for G′ = G \ [a,b]0 and G′ has a minimum sum edge
coloring usingatmostr colors. Thus,theedge[a,b]0 inGistheonlyedgecoloredbyf withcolorr+1.
Let us assume that vertices are ordered clockwise and let b be the right vertex of edge [a,b]0. Recolor
edge[a,b]0 withcolorβ andtheedgeofcolorβ incidenttobwithcolorr+1. Thisrecoloring doeschange
neither the value of the sum nor the number of colors. Let [x,y]0 be the edge that is recolored with color
r+1,withxbeingitsleftvertex.
ByLemma1,acolorβ suchthatβ ∈ C \C exists,otherwisethereisacolorθ ≤ rsuchthatθ 6∈ C
y y y x x
and θ 6∈ Cy, and we can recolor [x,y]0 with color θ, contradicting the optimality of f. We can therefore
repeat the above procedure until the edge [x,y]0 is such that σ ∈ Cx \Cy or σ ∈ Cy \Cx. This isalways
possible, becausethecycleisodd,and|E |< k. Assume,withoutlossofgenerality, thatσ ∈ C \C . By
σ y x
relabeling the vertices ofGinsuch awaythat xbecomes aand y becomes b, weare back tothe firstcase.
Figures1(a)-(c)giveanexampleofthiscase.
4 Algorithms
We now present algorithms for minimum sum coloring of multicycles. Our algorithms assume that the
encodingofthemulticyclegivenasinputhassizeΘ(n+m). Thisdoesnotallowforimplicitrepresentations
consisting of, for instance, the number of vertices and the number of parallel edges between each pair of
consecutive vertices. Thisassumption isnatural sinceweexpecttheresulting coloring toberepresented by
anencoding ofsizelinearinthenumberofedges.
The line graph of a multicycle is a proper circular arc graph. Hence the problem of coloring edges of
multicycles is a special case of proper circular arc graph coloring. It is easy to realize that not all proper
circular arcgraphs areline graphs ofmulticycles, though. Propercircular arcgraphs wereshownbyOrlin,
Bonuccelli,andBovet[20]toadmitequitablecolorings,thatis,coloringsinwhichthesizesofanytwocolor
classesdifferbyatmostone,thatonlyuseχcolors. Therefore, acorollary ofourresultsisthatmulticycles
admitbothequitableandminimumsumedgecoloringswiththesame,minimum,numberofcolors,andthat
bothtypesofcolorings canbecomputedefficiently.
Wefirstpresentageneral algorithm, thenfocusonthecasewhereniseven.
4.1 The general case
A natural idea for solving minimum cost coloring problems is to use a greedy algorithm that iteratively
removes maximum independent sets (or maximum matchings in the case of edge coloring) [1, 6]. It can
be shown that this approach fails here. Instead we use an algorithm in which the smallest color class,
corresponding tocolors′,isremovediteratively.
We first consider the case where ⌈m/k⌉ ≥ ∆ and k divides m. Then the number of colors must be
equal to m/k. But since each color class can contain at most k edges, every color class in a minimum
sum coloring must have size exactly k. Such a coloring can be easily found in linear time by a sweeping
algorithm that assigns each color i modχ′ in turn. This is a special case of the algorithm of Orlin et
al.(Lemma2,[20])forcirculararcgraphcoloring. Intheremainder ofthissection, werefertothiscaseas
6
the”easycase”.
Algorithm MULTICYCLECOLOR.
1. i ← s′(G),G ← G
i
2. if⌈|E(G )|/k⌉ ≥ ∆(G )andk divides|E(G )|thenapplythe”easycase”algorithm andterminate
i i i
3. else
(a) FindamatchingM ofminimumsizesuchthats′(G \M) = s′(G )−1
i i
(b) colortheedgesofM withcolori
(c) Gi−1 ← Gi\M,i← i−1
(d) ifG 6= ∅thengotostep2
i
Thecorrectness ofthealgorithm reliesonthefollowinglemma.
Lemma2. GivenamatchingM inamulticycleGsuchthat
1. s′(G\M) = s′(G)−1,
2. M hasminimumsizeamongallmatchingssatisfying condition 1,
thereexistsaminimumsumedgecoloring ofGsuchthatM isthesetofedgescoloredwithcolors′(G).
Proof. Wedistinguish threecases,a),b),andc),depending ontherelativevaluesof⌈m/k⌉and∆.
Case a) We first assume that ⌈m/k⌉ > ∆ and k does not divide m, thus m = ⌊m/k⌋ · k + r,
with r > 0. In that case, M has size exactly r. To find a minimum sum coloring, we color the edges
of M with color ⌈m/k⌉. The remaining edges are colored using the ”easy case” algorithm, which ap-
pliessince⌊m/k⌋ ≥ ∆. Thiscoloringmusthaveminimumsum,becauseonlyonecolorclasshasnotsizek.
Caseb)When∆ > ⌈m/k⌉, the matching M isaminimum matching thathits allvertices ofdegree ∆.
Wehavetoensurethatthereexistsaminimumsumcoloring suchthatM isthecolorclasss′(G) = ∆.
We consider a minimum sum coloring and the color class ∆ in this coloring. This class, say M′, must
also be a matching hitting all vertices of degree ∆. We now describe a recoloring algorithm that, starting
withthiscoloring, produces acoloringwhosesumisnotgreaterandwhosecolorclass∆isexactlyM. We
defineablockasamaximalsequenceofadjacentverticesofdegree∆. Thealgorithmexamineseachblock,
and shifts the edges of M′ if they do not match with those of M. Two cases can occur, depending on the
parityoftheblocklength.
Thefirstcaseiswhenablockcontains anoddnumberofvertices ofdegree∆,sayv1,v2,...,v2t+1 for
some integer t. In that case, the only way in which M and M′ can disagree is, without loss of generality,
whenM′containsedgesoftheformv0v1,v2v3,...,v2tv2t+1,whileM containsv1v2,v3v4,...,v2t+1v2t+2
(seefigure2(a)-2(b)),wherev0 andv2t+2 arethepredecessor ofv1 andthesuccessorofv2t+1,respectively.
Sincethedegreeofv0is,bydefinitionofablock,strictlylessthan∆,theremustexistacolorα ∈ Cv1\Cv2.
Furthermore, since all vertices within the block have degree ∆, the color class for color α contains t +1
edgesoftheformv2i+1v2i+2 for0 ≤ i ≤ t. HencewecanrecolortheedgesofM′ oftheformv2iv2i+1 for
0 ≤ i≤ twithcolorα,andthet+1edgesofcolorαwithintheblockwithcolor∆. Notethatatthispoint,
thecoloring mightbenotproperanymore,astwoedgescolored ∆mightbeincidenttov2t+2.
7
(a) oddcase:edgesofM′ (b) oddcase:edgesofM
(c) evencase:edgesofM′ (d) evencase:edgesofM
Figure2: Illustration oftheproofofLemma2.
Theothercaseiswhenablock contains anevennumberofvertices ofdegree∆,sayv1,v2,...,v2t for
someintegert. Inthatcase,sinceM isminimum,itcontainsedgesoftheformv1v2,v3v4,...,v2t−1v2t. The
onlywayinwhichM′candisagreewithM isbycontainingedgesv0v1,v2v3,...,v2tv2t+1 (seefigure2(c)-
2(d)). Like in the previous case, there must be a color α 6∈ C , so we can recolor the edges of M′ of the
v0
formv2iv2i+1 for0 ≤ i <twithcolorα,andtheedgesofcolorαwithintheblockwithcolor∆. Notethat
atthispointthecoloring isnotproperanymore,sincetheedgesv2t−1v2t andv2tv2t+1 bothhavecolor∆.
Weproceed inthiswayforeachblock. Noticethatthesumofthecoloring isunaltered, andthattheset
ofedgesofcolor∆isnowasupersetofM. Also,whileGisnotnecessarily properlycoloredanymore,the
graph G\M isproperly colored withat most∆colors. Butsince removing M decreases the strength, we
know we can recolor G\M with ∆−1 colors without increasing the sum. Doing that and glueing back
theedgesofM colored withcolor∆,weobtainaminimumsumcoloring whereonlytheedgesofM have
color∆,asclaimed.
Casec)Finally,inthecasewhere⌈m/k⌉ = ∆,withm = ⌊m/k⌋·k+r,thematchingM consistsofat
least r edges that together hit all vertices ofdegree ∆. If M has exactly size r, then case a) above applies,
sinceweknowthatbyremovingM,wealsodecreasethemaximumdegree. Otherwisecaseb)applies.
Wehavetomakesurethatthemainstepofthealgorithm canbeimplementedefficiently.
Lemma3. FindingamatchingM inamulticycleGsuchthats′(G\M) = s′(G)−1andM hasminimum
sizecanbedoneinO(n)time.
Proof. The three cases of the previous proof must be checked. In the case where ⌈m/k⌉ > ∆ and m =
⌊m/k⌋·k+r,wecanpickanymatching ofsizer,whichcanclearly bedoneinlineartime. Inthesecond
case, when⌈m/k⌉ < ∆,weneedtofindaminimummatching hitting allverticesofdegree ∆. Thiscanbe
achievedinlineartimeaswellbyproceeding inaclockwise greedyfashion.
Finally,inthelastcase,weneedtofindaminimumsetofatleastredgesthattogetherhitallverticesof
degree ∆. This can also be achieved in O(n) time as follows. Wefirst find the minimum matching hitting
all maximum degree vertices. If the resulting matching has size at least r, then we are done and back to
the previous case. Otherwise, we need to include additional edges. For that purpose, we can proceed in
theclockwise direction anditeratively extendeachblock inorder toinclude theexactnumberofadditional
8
edges. This can take linear time as well if we took care to count the size of each block and of the gaps
betweenthemintheprevious pass.
Theorem5. AlgorithmMULTICYCLECOLOR findsaminimumsumcoloringofamulticycleswithnvertices
andmaximumdegree∆edgesintimeO(∆n).
Proof. Thenumber of iterations of the algorithm is atmost s′(G) = max{⌈m/k⌉,∆}. Hence the running
timeisO(max{⌈m/k⌉n,∆n}) = O(max{m,∆n}) = O(∆n).
We deliberately ignored the situation in which after some iterations, the multicyle G does not contain
i
a full cycle anymore, that is, one of the edge multiplicity m drops to 0. Weare then left with a collection
i
of disjoint multipaths, for which the minimum sum coloring problem becomes easier. This special case is
described inthefollowingsection.
4.2 A lineartimealgorithmforevenlength multicycles
We turn to the special case n = 2k, that is, the number of vertices is even. We show that in that case,
minimumsumcoloringshaveaconvenientpropertythatcanbeexploitedinafastalgorithm. Thisalgorithm
first color a uniform multicycle contained in G such that the remaining edges of G form a (possibly
unconnected) multipath. Thismultipath isthencolored separately.
Webeginthissectionbythefollowingresultonmultipaths. Weconsidermultipathswithverticeslabeled
{1,2,...,n},suchthatedgesareonlybetweenverticesoftheformi,i+1.
Lemma4. Therealwaysexistsaminimumsumedgecoloringf ofamultipathH,suchthatitscolorclasses
E are maximum matchings in the graphs H′ = H \∪i−1E ; furthermore these matchings contain all the
i j=1 j
edgesappearing inoddposition fromlefttorightineachconnected componentofH′.
Proof. Assumethati > 0istheminimum positiveinteger forwhichE isnotamaximummatching ofthe
i
graphH′ = H \∪i−1E . NoticethattheedgesinH′ haveacoloratleastequal toi. Letk bethesizeofa
j=0 j
maximummatching inH′.
We first suppose that H′ is connected. By hypothesis, we have that |E | < k. We consider a maximal
i
sequence ofconsecutive vertices inH′,sayA = {a1,...,a2t},suchthatoneoftheedgesbetweenvertices
a2q−1 anda2q iscoloredbyf withcolori,with1 ≤q ≤ t.
If vertex a1 is the second vertex in H′, then we can recolor the edges of H′ as follows. Let α0 6= i be
anycolor appearing ontheedges between a0 anda1. Werecolor suchanedge ofcolor α0 withcoloriand
color the edge between vertices a1 and a2 of color i with color α0. Now, for each j, with 1 ≤ j < t, we
recolor theedgea2j+1a2j+2 ofcoloriwithacolorαj appearing ontheedges a2ja2j+1,andcolortheedge
a2ja2j+1 of color αj with color i. The color αj is chosen such that αj = αj−1 if color αj−1 appears on
edges a2ja2j+1, and it is any color appearing on edges a2ja2j+1 otherwise. At the end of this process, we
havetwocases. (i)Colorαt−1 appearsontheedgesbetweenverticesa2t anda2t+1. Inthiscase,recoloring
theedgea2ta2t+1 ofcolorαt−1 withcolori,weobtainanewproperedgecoloringofH′ whosesumisless
thantheoneinduced byf,whichisacontradiction. (ii)Colorαt−1 doesnotappear ontheedgesa2ta2t+1.
Inthiscase,recoloringanyedgebetweenverticesa2tanda2t+1withcolori,weobtainagainacontradiction
totheoptimality off.
If sequence A begins at the jth vertex of H′, with j > 2, we can assign color i to an edge between
verticesj−2,j−1,andtoanedgebetweenverticesj−4,j−3,andsoon,untilthenewsequencebegins
9
at the first or second vertex of H′. If it begins at the second vertex of H′, we apply the above recoloring
procedure. Hencethesequence AmustbeginatthefirstvertexofH′.
Ifanother,disjoint,suchsequencefollowssequenceAinH′,byusingasimilarrecoloringargument,we
canmergethesetwosequences, obtaining againacontradiction totheoptimality off. Therefore, |E |= k,
i
andE contains alltheedgesappearing atoddpositions fromlefttorightinH′.
i
Finally, if H′ is unconnected, the same reasoning can be applied to each connected component of H′.
FromLemma4,wecandeducethefollowingresult,thatsettlesthecaseofmultipaths.
Theorem6. Thegreedyalgorithmthatiterativelypicksamaximummatchingformedbyalledgesappearing
inoddposition ineachconnected component ofamultipath H,computes aminimumedgesumcoloring of
H intimeO(m).
We now consider the case of even multicycles. We assume that the vertices in the multicycle G on
n = 2k vertices are labelled clockwise with integers 0,1,...,n− 1, and arithmetic operations are taken
modulo n. For each 0 ≤ i < n, we recall that m denotes the number of parallel edges between two
i
consecutive vertices i and i+1 in G. Let p be a positive integer. A multicycle G with m = pn edges is
calledp-uniformifm = pforeveryisuchthat0≤ i < n.
i
Lemma 5. Let G be a multicycle of even length and let p = min m . Let f be any minimum sum edge
i i
coloringofG. Then,f canbetransformedintoanotherminimumsumedgecoloringf′suchthatthefirst2p
colorclassesE inducedbyf′,with1≤ i ≤ 2p,aresuchthat|E |= kandtheirunioninducesap-uniform
i i
multicycle.
Proof. Letf beanyminimumsum edge coloring ofG, withn = 2k forsomeinteger k > 1. Clearly, asf
isminimum,wehavethat|E1| ≥ |E2|≥ ... ≥ |Eχ′|. Letusconsiderthefollowingclaim.
Claim2. Thecoloringf canbetransformedintoaminimumsumedgecoloringf′havingthepropertythat
theedgescoloredwithcolors1and2induceasubgraph ofGisomorphic toancycle.
Notice that, by using Claim 2, the lemma follows directly by induction on p. So, in order to prove Claim
2, first notice that, by using a similar recoloring argument as in the proof of Lemma4, wecan deduce that
|E1|= k.
Now,withoutlossofgenerality, assumethatf issuchthatthereisanedgecoloredwithcolor1between
vertices 2j and2j +1foreachj with0 ≤ j < k. Moreover, letc ≥ 2betheminimumcolorappearing on
theedgesbetweenvertices2j +1and2j +2,forall0 ≤ j < k.
Supposethatthereexistsamaximalsequencei1,...,i2t ofconsecutiveverticesinG,suchthatcolors1
andcbelong tothesetofcolorsassigned byf totheedges betweenverticesi2q−1 andi2q,with1 ≤ q ≤ t.
Then by using the same recoloring argument as in the proof of Lemma 4, we can move color c in order to
transform such asequence into a(c,1)-path. Moreover, again by using the samerecoloring argument asin
theproofofLemma4,wecandeducethat|E | = k.
c
So,ifc = 2wearedone,otherwise,wecanswapthecolors2andcsothat|E2| = kandE1∪E2induce
acycle.
Theorem 7. There exists an O(m)-time algorithm for computing a minimum sum edge coloring of G of a
multicycleofevenlengthwithmedges.
10