Contents lists available atScienceDirect
Theoretical Computer Science
www.elsevier.com/locate/tcs
A complexity dichotomy for critical values of the b-chromatic number of graphs
Lars Jaffke
∗,1, Paloma T. Lima
∗,2DepartmentofInformatics,UniversityofBergen,Bergen,Norway
a rt i c l e i n f o a b s t ra c t
Articlehistory:
Received12July2019
Receivedinrevisedform30January2020 Accepted8February2020
Availableonline12February2020 CommunicatedbyL.M.Kirousis
Keywords:
b-coloring b-chromaticnumber Complexitydichotomy
Ab-coloringofagraph G isaproper coloringofitsverticessuch thateachcolorclass contains a vertex that has at least one neighbor in all the other color classes. The b-Coloring problem asks whether a graph G has a b-coloring with k colors. The b- chromaticnumberofagraphG,denotedby
χ
b(G),isthemaximumnumberksuchthatG admitsab-coloringwithkcolors.Weconsiderthecomplexityoftheb-Coloringproblem, wheneverthevalue ofkis closetooneoftwo upperbounds onχ
b(G):The maximum degree (G) plus one, and the m-degree, denoted by m(G), which is defined as the maximum number i such that G has i vertices ofdegree at least i−1. We obtaina dichotomyresultforallfixedk∈Nwhenkisclosetooneofthetwoabovementioned upperbounds.Concretely,weshow thatifk∈ {(G)+1−p,m(G)−p},theproblemis polynomial-time solvable whenever p∈ {0,1} and,even when k=3,it is NP-complete whenever p≥2.We furthermoreconsiderparameterizationsoftheb-Coloringproblem thatinvolvethemaximumdegree(G)oftheinputgraphGandgivetwoFPT-algorithms.First, weshow that deciding whether agraph G has ab-coloring with m(G) colors is FPTparameterizedby(G).Second,weshowthatb-ColoringisFPTparameterizedby (G)+k(G),wherek(G)denotesthenumberofverticesofdegreeatleastk.
©2020TheAuthor(s).PublishedbyElsevierB.V.Thisisanopenaccessarticleunderthe CCBYlicense(http://creativecommons.org/licenses/by/4.0/).
1. Introduction
Givenasetofcolors,apropercoloringofagraphisan assignmentofacolortoeach ofits verticesinsuch awaythat no pairofadjacentverticesreceivethesamecolor.InthedeeplystudiedGraphColoringproblem,we aregivenagraph andthequestionistodeterminethesmallestsetofcolorswithwhichwecanproperlycolortheinputgraph.Thisproblem isamongKarp’sfamouslistof21NP-completeproblems [16] andsinceitoftenarisesinpractice,heuristicstosolveitare deployed inawiderangeofapplications.Averynaturalsuchheuristicisthefollowing.Wegreedilyfindapropercoloring ofthegraph,andthentrytosuppressanyofitscolorsinthefollowingway:saywewanttosuppresscolorc.Ifthereisa vertex v that hasreceivedcolorc,andthereis anothercolorc
=
c that doesnot appearintheneighborhoodof v,then wecansafelyrecolorthevertexv withcolorc withoutmakingthecoloringimproper.Weterminatethisprocessoncewe cannotsuppressanycoloranymore.*
Correspondingauthors.E-mailaddresses:lars.jaffke@uib.no(L. Jaffke),paloma.lima@uib.no(P.T. Lima).
1 SupportedbytheBergenResearchFoundation(BFS).
2 SupportedbyResearchCouncilofNorwayviatheproject“CLASSIS”,grantnumber249994.
https://doi.org/10.1016/j.tcs.2020.02.007
0304-3975/©2020TheAuthor(s).PublishedbyElsevierB.V.ThisisanopenaccessarticleundertheCCBYlicense (http://creativecommons.org/licenses/by/4.0/).
Topredicttheworst-casebehavioroftheaboveheuristic,IrvingandManlovedefinedthenotionsofab-coloring andthe b-chromaticnumberofagraph [14].Ab-coloringofagraphG isapropercoloringsuch thatineverycolorclassthereisa vertexthathasaneighborinalloftheremainingcolorclasses,andtheb-chromaticnumberofG,denotedby
χ
b(
G)
,isthe maximumintegerksuchthatGadmitsab-coloringwithkcolors.Weobservethatinab-coloringwithkcolors,thereisno colorthatcanbesuppressedtoobtainapropercoloringwithk−
1 colors,henceχ
b(
G)
describestheworst-casebehavior ofthe previously described heuristic on thegraph G.We consider thefollowing two computational problemsassociated withb-coloringsofgraphs.Input: GraphG,integerk
Question: DoesGadmitab-coloringwithkcolors?
b-Coloring
Input: GraphG,integerk Question: Is
χ
b(
G) ≥
k?b-Chromatic Number
Wewouldliketopointoutanimportantdistinctionfromthe‘standard’notionofpropercolorings ofgraphs:IfagraphG hasab-coloringwithkcolors,thenthisimpliesthat
χ
b(
G) ≥
k.However,ifχ
b(
G) ≥
kthenwecaningeneralnotconclude that G hasa b-coloringwithk colors. Agraphforwhich thelatter implicationholdsaswell is calledb-continuous.This notionismostlyofstructuralinterest,sincetheproblemofdeterminingifagraphisb-continuous isNP-completeevenif anoptimalpropercoloringandab-coloringwithχ
b(
G)
colorsaregiven [2].Besides observing that
χ
b(
G) ≤ (
G) +
1 where(
G)
denotes the maximum degree of G, Irving andManlove [14]defined the m-degree of G as the largest integer i such that G has i vertices of degree at least i
−
1. It follows thatχ
b(
G) ≤
m(
G)
;observealsothatm(
G) ≤ (
G) +
1.Sincethedefinitionoftheb-chromaticnumberoriginatedintheanalysis oftheworst-casebehaviorofgraphcoloringheuristics,graphswhoseb-chromaticnumberstakeoncriticalvalues,i.e.values that are close to theseupper bounds, are of special interest. In particular, identifying them can be helpful instructural investigationsconcerningtheperformanceofgraphcoloringheuristics.Intermsofcomputationalcomplexity,IrvingandManloveshowedthatbothb-Coloringandb-ChromaticNumberare NP-complete [14] andSampaioobservedthat b-ColoringisNP-completeevenforeveryfixed integerk
≥
3 [19]. Panolan etal. [18] gaveanexact exponentialalgorithmforb-ChromaticNumberrunningintime O(
3nn4 logn)
andanalgorithm that solves b-Coloring in time O(nk
2n−kn4logn
)
. From the perspective of parameterized complexity [6,8], it has been shownthat b-ChromaticNumberis W[
1]
-hard parameterized by k [18] andthat the dual problemof deciding whetherχ
b(
G) ≥
n−
k,wherendenotesthenumberofverticesinG,isFPTparameterizedbyk[13].Sincetheabove mentionedupperbounds
(
G) +
1 andm(
G)
ontheb-chromaticnumberare trivialto compute,itis naturalto ask whetherthereexist efficientalgorithms that decide whetherχ
b(
G) = (
G) +
1 orχ
b(
G) =
m(
G)
. Itturns outboththeseproblemsareNP-completeaswell [12,14,17].However,itisknownthattheproblemofdecidingwhethera graphGadmitsab-coloringwithk= (
G) +
1 colorsisFPTparameterizedbyk[18,19].TheDichotomyResult.Oneofthemaincontributionsofthispaperisacomplexity dichotomyoftheb-Coloringproblem forfixedk,wheneverkisclosetoeither
(
G) +
1 orm(
G)
.Inparticular,forfixedk∈ {(
G) +
1−
p,
m(
G) −
p}
,weshow thattheproblemispolynomial-timesolvablewhenp∈ {
0,
1}
and,eveninthecasek=
3,NP-completeforallfixed p≥
2.More specifically, we give XPtime algorithms forthe casesk
=
m(
G)
,k= (
G)
, andk=
m(
G) −
1 which together with theFPTalgorithmforthecasek= (
G) +
1 [18,19] andtheaforementioned NP-hardnessresultfork=
3 completesthe picture.Wenowformallystatethisresult.Theorem1.LetG beagraph,p
∈
Nandk∈ { (
G) +
1−
p,
m(
G) −
p}
.TheproblemofdecidingwhetherG hasab-coloringwithk colorsis(i) NP-completeifk ispartoftheinputandp
∈ {
0,
1}
, (ii) NP-completeifk=
3andp≥
2,and(iii) polynomial-timesolvableforanyfixedpositivek andp
∈ {
0,
1}
.Maximum DegreeParameterizations. The positive results in our dichotomy theorem provide XP-algorithms to decide whethera graphhas a b-coloring witha number ofcolors that either preciselymeets or isonebelow one of two upper boundsontheb-chromaticnumber,theparameterbeingthenumberofcolorsineachofthecases.Towardsmore‘flexible’
(parameterized)tractability results,we considerparameterizations oftheb-Coloringproblemthat involvethemaximum degree
(
G)
of the input graph G, butask forthe existence ofb-colorings witha numberof colors that in generalis differentfrom(
G) +
1 or(
G)
.First,asanadditiontotheresultthatinFPTtimeparameterizedby
(
G)
,one candecidewhetherG hasab-coloring with(
G) +
1 colors [18,19], we show that in thesame parameterizationwe can decide inFPT time whether G has a b-coloringwithm(
G)
colors.Theorem2.LetG beagraph.TheproblemofdecidingwhetherG hasab-coloringwithm
(
G)
colorsisFPTparameterizedby(
G)
. One of the cruciallyused facts inthe algorithm of theprevious theoremis that if we ask whethera graph G has a b-coloringwithk=
m(
G)
colors,then thenumberofverticesofdegreeatleastkisatmostk.We generalizethissetting andparameterizeb-Coloringbythemaximumdegreeplusthenumberofverticesofdegreeatleastk.Weshowthatthis problemisFPTaswell.Theorem3.LetG beagraph.TheproblemofdecidingwhetherG hasab-coloringwithk colorsisFPTparameterizedby
(
G) +
k(
G)
, wherek
(
G)
denotesthenumberofverticesofdegreeatleastk inG.We now argue that parameterizing by only one of the two invariants used in Theorem 3 is not sufficient to obtain efficient parameterized algorithms. From the result of Kratochvíl et al. [17], statingthat b-Coloringis NP-complete for k
= (
G) +
1, it follows that b-Coloring is NP-complete when(
G)
is unbounded andk
(
G) =
0. On the other hand, Theorem 1(ii) implies that b-Coloring is already NP-complete when k=
3 and(
G) =
4. Together, this rules out the possibility ofFPT- andevenof XP-algorithms forparameterizationsby one ofthetwo parametersalone, unlessP=
NP.Parameterizationsofgraphcoloring problemsbythenumberofhighdegree verticeshavepreviouslybeenconsidered for vertexcoloring [1] andedgecoloring [10].
AnextendedabstractofthisworkappearedintheproceedingsofMFCS2019 [15].
Organization.Therestofthepaperisorganizedasfollows.AftergivingpreliminarydefinitionsinSection2,wepresentthe hardness resultsinSection 3,thealgorithmic resultsofthedichotomy inSection 4,andthe algorithmsforthemaximum degreeparameterizationsinSection5.WeconcludeinSection6.
2. Preliminaries
Weusethefollowingnotation:Fork
∈
N,[
k] := {
1, . . . ,
k}
.Forafunction f:
X→
Y and X⊆
X,wedenoteby f|
X the restriction of f to X andby f(
X)
theset{
f(
x) |
x∈
X}
. Foraset X andan integern,we denoteby Xn
thesetofall size-nsubsetsof X.
Graphs.Throughoutthepapera graphG withvertexsetV
(
G)
andedgeset E(
G) ⊆
V(G)2
isfiniteandsimple.Weoften denote anedge
{
u,
v} ∈
E(
G)
by theshorthand uv.Forgraphs G and H we denoteby H⊆
G that H isasubgraph ofG, i.e. V(
H) ⊆
V(
G)
and E(
H) ⊆
E(
G)
. Weoften usethe notation n:= |
V(
G)|
.Fora vertex v∈
V(
G)
,we denote by NG(
v)
the openneighborhoodof v in G,i.e. NG(
v) = {
w∈
V(
G) |
v w∈
E(
G) }
,andby NG[
v]
the closedneighborhood of v in G, i.e.NG[
v] := {
v} ∪
NG(
v)
.Forasetofvertices X⊆
V(
G)
,weletNG(
X) :=
v∈XNG
(
v) \
X andNG[
X] :=
X∪
NG(
X)
.When Gisclearfromthecontext,weabbreviate‘NG’to‘N’.Thedegreeofavertexv∈
V(
G)
isthesizeofitsopenneighborhood, andwedenoteitbydegG(
v) := |
NG(
v)|
orsimplybydeg(
v)
ifGisclearfromthecontext.Foranintegerk,wedenotebyk
(
G)
thenumberofverticesofdegreeatleastkinG.Agraphisk-regularifallitsverticeshavedegreek.Foravertexset X
⊆
V(
G)
,wedenotebyG[
X]
thesubgraphinducedby X,i.e.G[
X] := (
X,
E(
G) ∩
X2
)
.Wefurthermore let G−
X:=
G[
V(
G) \
X]
bethesubgraphofG obtainedfromremovingtheverticesinX andforasinglevertexx∈
V(
G)
, weusetheshorthand‘G−
x’for‘G− {
x}
’.AgraphG issaidtobeconnectedifforany2-partition
(
X,
Y)
of V(
G)
,thereisanedgexy∈
E(
G)
suchthat x∈
X and y∈
Y, anddisconnected otherwise.Aconnectedcomponentof agraph G isa maximalconnectedsubgraph ofG.A pathis a connected graphofmaximum degree two,having preciselytwo vertices ofdegree one, calledits endpoints. The length of apath isits numberofedges. Givena graph G andtwo verticesu andv,thedistancebetween u andv,denotedby distG(
u,
v)
(orsimplydist(
u,
v)
ifG isclearfromthecontext),isthelengthoftheshortestpathinG thathasuandv as endpoints.AgraphG isacompletegraphifeverypairofverticesofGisadjacent.AsetC
⊆
V(
G)
isacliqueifG[
C]
isacomplete graph. Aset S⊆
V(
G)
is an independentsetif G[
S]
has noedges. A graph G isa bipartitegraph if its vertexset canbe partitioned into two independent sets. A bipartite graph with bipartition(
A,
B)
is a completebipartitegraph if all pairs consistingofonevertexfrom A andonevertexfromB areadjacent,andwitha= |
A|
andb= |
B|
,wedenoteitby Ka,b.A staristhegraph K1,b,withb≥
2,andwecallcentertheuniquevertexofdegreeb andleavestheverticesofdegreeone.Colorings.GivenagraphG,amap
γ :
V(
G) → [
k]
iscalledacoloringofG withk colors.Ifforeverypairofadjacentvertices, uv∈
E(
G)
,wehavethatγ (
u) = γ (
v)
,thenthecoloringγ
iscalledproper.Fori∈ [
k]
,wecallthesetofverticesu∈
V(
G)
suchthatγ (
u) =
i thecolorclassi.Ifforalli∈ [
k]
,thereexistsavertexxi∈
V(
G)
suchthat(i)
γ (
xi) =
i,and(ii) foreach j
∈ [
k] \ {
i}
,thereisaneighbor y∈
NG(
xi)
ofxisuchthatγ (
y) =
j,then
γ
iscalledab-coloring ofG.Fori∈ [
k]
,wecallavertexxi satisfyingtheabovetwoconditionsab-vertexforcolori.ParameterizedComplexity.Let
beanalphabet.Aparameterizedproblemisaset
⊆
∗×
N.Aparameterizedproblemis said to be fixed-parametertractable,or contained inthe complexity class FPT,if there exists an algorithm that for each
(
x,
k) ∈
∗×
N decides whether(
x,
k) ∈
in time f(
k) · |
x|
c for some computable function f and fixed integer c∈
N.Aparameterizedproblemissaidtobe containedinthecomplexity classXPifthereisanalgorithmthatforall
(
x,
k) ∈
∗×
Ndecideswhether(
x,
k) ∈
intime f(
k) · |
x|
g(k)forsomecomputablefunctions f andg.Akernelizationalgorithmfora parameterizedproblem
⊆
∗×
N isapolynomial-timealgorithm thattakesasinput an instance(
x,
k) ∈
∗×
N andeithercorrectlydecides whether(
x,
k) ∈
oroutputsan instance(
x,
k) ∈
∗×
N with x+
k≤
f(
k)
forsomecomputablefunction f forwhich(
x,
k) ∈
ifandonlyif(
x,
k) ∈
.Wesaythatadmitsakernel ifthereisakernelizationalgorithmfor
.
3. Hardnessresults
Inthis section weprove the hardness resultsofour complexity dichotomy.First, we showthat b-ChromaticNumber andb-Coloring are NP-complete fork
=
m(
G) −
1= (
G)
, based on a reduction dueto Havet et al. [12] who showed NP-completenessforthecasek=
m(
G)
.Theorem3.1.b-ChromaticNumberandb-ColoringareNP-complete,evenwhenk
=
m(
G) −
1= (
G)
.Proof. Asintheproof ofHavetetal. [12],the reductionisfromthe NP-completeproblem3-EdgeColoringof3-regular graphs, whichtakes asinput a 3-regular graph G and askswhetherthe edges of G can be properly colored withthree colors.
Given an instance G of 3-EdgeColoring, an instance H of b-ChromaticNumber and b-Coloring is constructed as follows.Thegraph HhasonevertexforeachvertexofG,that wedenoteby v1
, . . . ,
vn,onevertexforeachedge,thatwe denotebyu1, . . . ,
um andasetof4n+
13 verticesthat wedenoteby S.Theedgesetof Hissuchthat H[{
v1, . . . ,
vn}]
is aclique, H[
S]
isthedisjointunionofonecopyofthecompletebipartitegraph Kn,n+3 andtwocopiesofK2,n+3 and viuj is an edgeif theedge corresponding to uj isincident to the vertexcorresponding to vi in G. The constructedgraph H issuch that(
H) =
n+
3 and H hasn+
4 verticesofdegree n+
3,which impliesthatm(
H) =
n+
4.The differenceto theconstructionusedin [12] isthatinsteadofthethreecompletebipartitegraphsmentionedabove,theauthorsusethree copiesofthestarK1,n+2.Claim3.1.1.AconnectedcomponentofH thatisacompletebipartitegraphcancontainb-verticesofatmostonecolorin anyb-coloringof Hwithatleastn
+
3 colors.Proof. Consideracomponentof H thatinducesa Ki,n+3,withi
∈ {
2,
n}
.Inanyb-coloringwithk≥
n+
3 colors,onlythe verticesofdegreeatleastn+
2,sointhiscasetheverticesofdegreen+
3 canbeb-verticesin H.Ifxisab-vertexfora givencolor,thentheremaining k−
1 colorsappearontheverticesof N(
x)
.We concludethatanyothervertexofdegree n+
3 ofthiscomponentwillbeassignedthesamecolorasx.WeprovethatHhasab-coloringwithk
=
n+
3 colorsifandonlyifGisaYes-instancefor3-EdgeColoringbyusingthe samestepsasintheproofofTheorem3of[12] andwiththeadditionaluseofClaim3.1.1.ThisprovestheNP-completeness ofb-Coloringwhenk=
m(
G) −
1= (
G)
.Furthermore,weprovethatχ
b(
H) ≥
n+
3 ifandonlyifHhasab-coloringwith n+
3 colors.Thisyieldstheanalogousresultforb-ChromaticNumber.First,assume that G isaYes-instancefor3-EdgeColoring.Let
γ
E:
E(
G) → [
3]
be aproper 3-edgecoloringforG.We constructab-coloringγ
H forH inthefollowingway.Foreach1≤
i≤ |
E(
G) |
,γ
H(
ui) = γ
E(
ei)
andeach1≤
j≤
n,weletγ
H(
vj) =
j+
3. Note that sinceγ
E is a 3-edgecoloring for G, thevertices v1, . . . ,
vn in H are b-verticesfor thecolors 4, . . . ,
n+
3:AnyvertexinGisincidentwith3 edgessinceGis3-regular,andsinceγ
E isproper,eachsuchedgereceivesa differentcolor.Hence,foranyvertexvi,thecolors{
1,
2,
3}
appearonNH(
vi) ∩ {
u1, . . . ,
u|E(G)|}
.Nowwecancolortherest ofthegraphHinsuchawaythateachconnectedcomponentthatisacompletebipartitegraphcontainsab-vertexforone ofthethreeremainingcolors.Nowweconsidertheotherdirection.WestartbyobservingthatClaim3.1.1impliesthat H doesnotadmitab-coloring withn
+
4=
m(
H) = (
H) +
1 colors,sincethesetofverticesofdegreen+
3 cancontainb-verticesforatmostthreecolors inanysuchab-coloring.Thisimpliesthatχ
b(
H) ≥
m(
H) −
1= (
H)
ifandonlyifHhasab-coloringwithm(
H) −
1= (
H)
colors.Assume H hasab-coloring
γ
H withn+
3 colors. Sinceby Claim3.1.1 theset S contains b-verticesforatmostthree colors,wehavethattheverticesv1, . . . ,
vn areb-verticesinthiscoloring.Moreover, sincetheyinduceacliqueinH,theyallhavedistinctcolors.Assume,withoutlossofgenerality,that
γ
H( {
v1, . . . ,
vn} ) = {
4, . . . ,
n+
3}
.Thisimpliesthatforeach i,γ
H(
N(
vi) ∩ {
u1, . . . ,
u|E(G)|} ) = {
1,
2,
3}
.Itfollowsthatγ
E:
E(
G) →
N,definedasγ
E(
ei) = γ
H(
ui)
,fori∈ {
1, . . . , |
E(
G)|}
, is a 3-edgecoloring of G.We arguethatγ
E isproper. Suppose fora contradictionthat thereexist adjacentedge ei and ej,sharingtheendpoint vs,such thatγ
E(
ei) = γ
E(
ej) =
c.SincedegG(
vs) =
3,andtwo ofitsincident edgesreceived the samecolorc,we canconcludethatatleastoneofthecolors{
1,
2,
3}
doesnot appearintheneighborhoodof vs in H,a contradictionwiththefactthatvsisab-vertexofitscolorinγ
H.Theprevioustheorem,togetherwiththeresultthatb-ColoringisNP-completewhenk
= (
G) +
1 [17] andwhenk=
m(
G)
[12], proves Theorem 1(i). We now turnto the proof of Theorem1(ii), that is, we show that b-Coloringremains NP-completefork=
3 ifk= (
G) +
1−
pork=
m(
G) −
pforany p≥
2,basedonareductionduetoSampaio [19].Note thatthefollowingpropositionindeedprovesTheorem1(ii) asforfixed p≥
2,wehavethat3∈ {(
G) +
1−
p,
m(
G) −
p}
if andonlyif(
G) =
p+
2 orm(
G) =
p+
3.Proposition3.2.Foreveryfixedintegerp
≥
2,theproblemofdecidingwhetheragraphG hasab-coloringwith3colorsisNP- completewhen(
G) =
p+
2orm(
G) =
p+
3.Proof. SampaioshowedthattheproblemofdecidingwhetheragraphG hasab-coloringwithkcolorsisNP-completefor anyfixedk
∈
N [19,Proposition4.5.1].Forthecaseofk=
3,thereductionisfrom 3-Coloringonplanar 4-regulargraphs whichisknowntobe NP-complete [11].Inthisreduction,onetakesthegraphofthe 3-Coloringinstanceandaddsthree starswithtwoleaveseachtothegraphwhichcanserveastheb-verticesintheresultinginstanceofb-Coloring.Sincethis doesnotincreasethemaximumdegree,weimmediatelyhavethattheproblemofdecidingwhetheragraphofmaximum degree 4 has a b-coloringwith3 colors isNP-complete.Inother words, thisproves NP-completenessof thequestion of whether a graph G with maximumdegree p+
2 admits a b-coloring with3 colors in the case p=
2. Furthermore, by addingmoreleavestooneofthestarsandtherebyincreasingthemaximumdegreeofthegraphintheresultinginstance, we havethatforanyfixedinteger p≥
2,itisNP-completetodecidewhethera graphofmaximumdegree(
G) =
p+
2 hasab-coloringwiththreecolors.Towardsthestatement regardingm
(
G)
,wefirstobservethat fora 4-regulargraphG on atleastfivevertices,wehave thatm(
G) =
5.Weobservethatinanystarwithatleasttwoleaves,thecentervertexcanbeab-vertexinacoloringwith3 colors.WeconstructagraphGbyaddingfivestarswithfourleaveseachtoG,andweagainhavethat G hasa3-coloring ifandonlyifG hasab-coloringwith3 colors,showingthat theproblemofdecidingwhethera graphH withm(
H) =
5 hasa b-coloring with3 colors,is NP-complete.Inother words,itisNP-completetodecideifagraph H hasab-coloring withm(
H) =
p+
3 hasab-coloringwith3 colorsinthecasep=
2.Notethatinthisreduction,thecenterverticesofthe starscanberegardedastheverticesdeterminingthem-degreeofthegraphintheresultinginstanceofb-coloringwith3 colors,sowecanextendthisresultinasimilarwayasabove.Thatis,foranyp≥
2,givena4-regulargraphG,wecanadd p+
3 starswithp+
2 leaveseachtoG,implyingthatfortheresultinggraphG,m(
G) =
p+
3.Again, Ghasa3-coloring ifandonlyifGhasab-coloringwith3 colors,implyingthesecondstatementoftheproposition.Weconcludethissectionbyconsideringthecomplexityofthetwoproblemsongraphswithfewverticesofhighdegree.
Sinceb-ChromaticNumberandb-ColoringareknowntobeNP-completewhenk
= (
G) +
1 [17],wemakethefollowing observationwhichisofrelevancetoussinceinSection5.2,weshowthatb-ColoringisFPTparameterizedby(
G) +
k(
G)
.Observation3.3.b-ChromaticNumberandb-ColoringareNP-completeongraphswith
k
(
G) =
0,wherek istheintegerassoci- atedwiththerespectiveproblem.4. Dichotomyalgorithms
In thissectionwe give thealgorithms inourdichotomy result, provingTheorem 1(iii). Weshow thatforfixed k
∈
N, theproblemofdecidingwhetheragraphG admitsab-coloringwithkcolorsispolynomial-timesolvablewhenk=
m(
G)
(Section4.2),whenk= (
G)
(Section4.3),andwhenk=
m(
G) −
1 (Section4.4),byprovidingXP-algorithmsforeachcase.Anaturalwayofsolvingtheb-Coloringproblemistotrytoidentifyasetofk b-vertices,andforeachvertexintheseta setofk
−
1 neighborsthatcanbeusedtomakeavertexab-vertexforitscolor,andthenextendtheresultingcoloringto theremainder ofthegraph.Weguessallsuchsetsandcolorings,andshowthattheproblemofdecidingwhetheragiven coloringcanbe extendedtoapropercoloringoftheremainderofthegraphissolvableinpolynomialtimeineachofthe abovecases.The strategy of identifying the set of b-vertices andsubsets of their neighbors that make them b-vertices was (for instance) alsoused to give polynomial-timealgorithms tocompute theb-chromatic number oftrees [14] andof graphs withlargegirth [4].Wecaptureitbydefiningthenotionofab-precoloringinthenextsubsection.
4.1. b-precolorings
Allalgorithmsinthissectionarebasedonguessingapropercoloringofseveralverticesinthegraph,forwhichwenow introducethenecessaryterminologyandestablishsomepreliminaryresults.
Definition4.1(Precoloring).LetGbeagraphandk
∈
N.AprecoloringwithkcolorsofagraphGisanassignmentofcolors toasubsetofitsvertices,i.e.for X⊆
V(
G)
,itisamapγ
X:
X→ [
k]
.Wecallγ
X proper,ifitisapropercoloringofG[
X]
. Wesaythatacoloringγ :
V(
G) → [
k]
extendsγ
X,ifγ |
X= γ
X.Weusethefollowingnotation.Fortwoprecolorings
γ
X andγ
Y with X∩
Y= ∅
,we denotebyγ
X∪ γ
Y theprecoloring that colors thevertices in X accordingtoγ
X andthevertices in Y accordingto Y, i.e.theprecoloringγ
X∪Y:= γ
X∪ γ
Y definedas:γ
X∪Y(
v) =
γ
X(
v),
ifv∈
Xγ
Y(
v),
ifv∈
Y for allv∈
X∪
YNext,wedefineaspecialtypeofprecoloringwiththepropertythatanypropercoloringthat extendsitisa b-coloring ofthegraph.
Definition4.2(b-precoloring).Let G be agraph,k
∈
N, X⊆
V(
G)
andγ
X a precoloring.We callγ
X ab-precoloringwithk colorsifγ
X isab-coloringofG[
X]
.Ab-precoloringγ
X iscalledminimalifforanyY⊂
X,γ
X|
Y isnotab-precoloring.Itisimmediatethatanyb-coloringcanbeobtainedbyextendingaminimalb-precoloring,afactthatwecaptureinthe followingobservation.
Observation4.3.LetG beagraph,k
∈
N,andγ
ab-coloringofG withk colors.Then,thereisasetX⊆
V(
G)
suchthatγ |
X isa minimalb-precoloring.Thenext observationcapturesthestructureofminimalb-precoloringswithk colors.Roughlyspeaking,each suchpre- coloring onlycolors aset ofk b-verticesandforeach b-vertex a setofk
−
1 of its neighborsthat makethat vertexthe b-vertex ofitscolor.We willusethispropertyinthe enumerationalgorithminthissection toguaranteethat we indeed enumerateallminimalb-precoloringswithagivennumberofcolors.Observation4.4.Let
γ
Xbeaminimalb-precoloringwithk colors.Then,X=
B∪
Z ,where (i) B= {
x1, . . . ,
xk}
andfori∈ [
k]
,γ
X(
xi) =
i,and(ii) Z
=
i∈[k]Zi,whereZi
∈
N(xi)k−1
and
γ
X(
Zi) = [
k] \ {
i}
.Wearenowreadytogivetheenumerationalgorithmforminimalb-precolorings.
Lemma4.5.LetG beagraphonn verticesandk
∈
N.Thenumberofminimalb-precoloringswithk colorsofG isatmostβ(
k) :=
nk·
k(k−1)· (
k−
1) !
k,
(1)where
:= (
G)
andtheycanbeenumeratedintimeβ(
k) ·
kO(1).Proof. ByObservation4.4,anyminimalb-precoloringonlycolorsasetofk b-vertices,andforeachofthemasize-
(
k−
1)
subsetofitsneighborsthatarecoloredbijectivelywiththeremainingcolors.To guessall b-verticesin G,we enumerateall ordered vertex sets of size k, let
{
x1, . . . ,
xk}
be such a set.Next, we enumerate all size-(
k−
1)
subsets ofneighbors of each xi that can make xi theb-vertex ofcolor i. Let(
Z1, . . . ,
Zk)
be a tupleofsuch setsofneighbors.Then we enumerateforeach i∈ [
k]
,all bijectivecolorings ofπ
i:
Zi→ [
k] \ {
i}
– these areprecisely thecoloringsof Zi thatcanmake xi theb-vertexforcolori.Givensucha tuple( π
1, . . . , π
k)
,we makesure thatitisconsistent:foreachi,
j∈ [
k]
andeachvertexv∈
Zi∩
Zj,weensurethatπ
i andπ
j assign v thesamecolor,i.e.π
i(
v) = π
j(
v)
; similarly, ifxi∈
Zj,then we ensurethatπ
j(
xi) =
i (recallthat xi is supposed tobe theb-vertex of color i).Ifso,weconstructa precoloringγ
B∪Z accordingtoourchoiceof B= {
x1, . . . ,
xk}
and( π
1, . . . π
k)
andifitisaminimal b-precoloringweoutputit.WegivethedetailsinAlgorithm1.Wenowshowthatthealgorithmiscorrect.
Claim4.5.1.Aprecoloring
γ
X isaminimalb-precoloringwithkcolorsifandonlyifAlgorithm1returnsitinline8insome iteration.Input :AgraphG,apositiveintegerk.
Output:Allminimalb-precoloringswithkcolorsofG
1 foreachB
∈
V(G)k
andeveryorderingx1
, . . . ,
xkoftheelementsofBdo2 foreach
(
Z1, . . . ,
Zk) ∈
N(x1)k−1
× · · · ×
N(xk)k−1
do
3 foreach
( π
1, . . . , π
k)
,(i) whereforalli
∈ [
k]
,π
i:
Zi→ [
k] \ {
i}
isabijection, (ii) foralli,
j∈ [
k]
andallv∈
Zi∩
Zj,π
i(
v) = π
j(
v)
,and (iii) foralli,
j∈ [
k]
,ifxi∈
Zj,thenπ
j(
xi) =
i4 do
5 LetZ
:= ∪
i∈[k]Ziandγ
B∪Z:
B∪
Z→ [
k]
;6 fori
∈ [
k]
doγ
B∪Z(
xi) :=
i;7 fori
∈ [
k]
andv∈
Zidoγ
B∪Z(
v) := π
i(
v)
;8 if
γ
B∪Zisaminimalb-precoloringthen outputγ
B∪Z andcontinue;Algorithm 1:Enumerating all minimalb-precolorings withkcolors of a graph.
Proof. SupposeAlgorithm1returnsaprecoloring
γ
X.Wefirstarguethatγ
X iswell-defined.Let X=
B∪
Z followingthe notation ofAlgorithm1.Itisimmediatethatγ
X|
B iswell-defined.Fortheremainingverticesv∈
Z,weverifyascondition (ii) inline3 thatwhenever v∈
Zi∩
Zj,π
i(
v) = π
j(
v)
.Moreover, condition (iii) inline3ensures that whenever xi∈
Zj, thenπ
j(
xi) =
i.Henceifthetuple( π
1, . . . , π
k)
passesthecheckinline3,thenforeachvertexv∈
Z thereispreciselyone color thatγ
X assigns to v inline7, andif v∈
Zj∩
B,thenπ
j assigns v acolor that isconsistent withline 6. We can concludethatγ
X iswell-defined.Bythecheckperformedinline8,wecanconcludethatγ
X isaminimalb-precoloring.NowsupposethatGcontainsaminimalb-precoloring
γ
X.ByObservation4.4,X consistsofan(ordered)setofb-vertices B= {
x1, . . . ,
xk}
withγ
X(
xi) =
i fori∈ [
k]
,andaset Z thatcontains,foreachxi,asetofk−
1 neighborsZi⊆
Z suchthatγ
X(
Zi) = [
k] \ {
i}
.SinceAlgorithm1enumeratesall suchpossiblesetsinlines 1and2,we havethatinsome iteration,it guessed B∪
Z asthesetofvertices tocolor.Since thealgorithmenumerates allcombinationsof possibilitiesofcoloring the sets Zi bijectively withcolors[
k] \ {
i}
inline 3, it guessed a tupleof bijections( π
1, . . . , π
k)
from whichwe obtainγ
X.Clearlywe havethatinthat case,( π
1, . . . , π
k)
passesthecheck inline3andbyassumption,γ
X passesthecheck in line8.It remainstoargueits runtime.Inline1,therearen
k
choicesfortheset B andk
!
choicesforitsorderings, inline2, thereareatmostk−1
k
choicesofk-tuplesofsize-
(
k−
1)
setsofneighbors,andinline3,weenumerate(
k−
1) !
kk-tuples of bijectionsof setsof sizek−
1. Theremaining steps can beexecuted in timekO(1): Byconstruction,|
B∪
Z| ≤
k2,and every colorhas a b-vertex. It remains to verify whetherthe coloringγ
B∪Z is proper on G[
B∪
Z]
to conclude that it is a b-precoloring. Ifso, we can verifyminimality in polynomial time by simplytrying foreach vertex x∈
B∪
Z,whetherγ
B∪Z\{x}isstillab-precoloring.Ifwecanfindsuchavertexx,thenγ
B∪Z isnotminimal,otherwiseitis.Thetotalruntime amountsto n kk
! ·
k
−
1 k· (
k−
1) !
k·
kO(1)≤
nk·
k(k−1)· (
k−
1) !
k·
kO(1)= β(
k) ·
kO(1),
asclaimed.Theupperboundof
β(
k)
onthenumberofb-precoloringswithkcolorsfollowssincethekO(1)factorintherun- timeonlyconcernstheconstructionoftheprecoloringsandtheverificationofwhethertheyareindeedb-precolorings.4.2. Algorithmfork
=
m(
G)
OurfirstapplicationofLemma4.5istosolvetheb-Coloringprobleminthecasewhenk
=
m(
G)
intimeXPparame- terizedbyk.Itturnsoutthat inthiscase,we aredealingwithaYes-instanceassoonaswe foundab-precoloringinthe inputgraphthatalsocolorsallhigh-degreevertices(seeClaim4.6.1).Theorem4.6.LetG beagraph.ThereisanalgorithmthatdecideswhetherG hasab-coloringwithk
=
m(
G)
colorsintimenk2·
2O(k2logk).Proof. Let D
⊆
V(
G)
denotethe setofverticesin G that havedegreeatleastk.Notethat by thedefinitionofm(
G)
,we havethat|
D| ≤
k.Claim4.6.1. Ghasab-coloringwithkcolorsifandonlyifG hasab-precoloring