BIROn - Birkbeck Institutional Research Online
Goodall, A. and Hermann, M. and Kotek, T. and Makowsky, J.A. and Noble,
Steven (2017) On the complexity of generalized chromatic polynomials.
Advances in Applied Mathematics 94 , pp. 71-102. ISSN 0196-8858.
Downloaded from:
Usage Guidelines:
Please refer to usage guidelines at
or alternatively
On the Complexity of
Generalized Chromatic Polynomials
A. Goodalla,2, M. Hermannb,1, T. Kotekc,3, J.A. Makowskyd,1,∗, S.D. Noblee,2
aIUUK, MFF, Charles University, Prague, Czech Republic bLIX (CNRS, UMR 7161), ´Ecole Polytechnique, 91128 Palaiseau, France cTechnische Universit¨at Wien, Institut f¨ur Informationssysteme, 1040 Wien, Austria
dDepartment of Computer Science, Technion–IIT, 32000 Haifa, Israel
eDepartment of Economics, Mathematics and Statistics, Birkbeck, University of London, London,
United Kingdom
Abstract
J. Makowsky and B. Zilber (2004) showed that many variations of graph colorings, calledCP-colorings in the sequel, give rise to graph polynomials. This is true in par-ticular for harmonious colorings, convex colorings,mcct-colorings, and rainbow
color-ings, and many more. N. Linial (1986) showed that the chromatic polynomialχ(G;X)
is#P-hard to evaluate for all but three valuesX = 0,1,2, where evaluation is inP. This dichotomy includes evaluation at real or complex values, and has the further prop-erty that the set of points for which evaluation is inPis finite. We investigate how the complexity of evaluating univariate graph polynomials that arise fromCP-colorings varies for different evaluation points. We show that for someCP-colorings (harmo-nious, convex) the complexity of evaluation follows a similar pattern to the chromatic polynomial. However, in other cases (proper edge colorings,mcct-colorings,H-free
colorings) we could only obtain a dichotomy for evaluations at non-negative integer points. We also discuss someCP-colorings where we only have very partial results.
Keywords: Graph polynomials, Counting Complexity, Chromatic Polynomial,
MSC classes: 05C15, 05C31, 05C85, 68Q17, 68W05
∗Corresponding author
Email addresses:[email protected](A. Goodall),
[email protected](M. Hermann),[email protected](T. Kotek),
[email protected](J.A. Makowsky),[email protected](S.D. Noble)
URL:http://kam.mff.cuni.cz/˜andrew(A. Goodall),
http://www.lix.polytechnique.fr/Labo/Miki.Hermann(M. Hermann),
http://forsyte.at/˜kotek/(T. Kotek),http://www.cs.technion.ac.il/˜janos
(J.A. Makowsky),http://www.bbk.ac.uk/ems/faculty/steven-noble(S.D. Noble)
1Work done in part while the authors were visiting the Simons Institute for the Theory of Computing in
Spring 2016.
2Supported by the Heilbronn Institute for Mathematical Research, Bristol, UK.
3Supported by the Austrian National Research Network S11403- N23 (RiSE) of the Austrian Science
Contents
1 Introduction 3
1.1 The complexity spectrum . . . 4 1.2 Easy computation of the polynomial versus its easy evaluation . . . . 5 1.3 Linial’s Trick . . . 5 1.4 The Difficult Point Dichotomy . . . 7
2 One, two, many chromatic polynomials 8
2.1 Many chromatic polynomials . . . 8 2.2 P-colorings and variations . . . 10
3 Detailed case study: Dichotomy theorems 11
3.1 Harmonious colorings . . . 11 3.2 Convex colorings . . . 13 3.3 DU(H)-colorings . . . 14
4 Counting convex colorings is#P-complete: the proof 17
4.1 Cuts, crossing sets, and cocircuits . . . 17 4.2 Reductions . . . 18
5 Detailed case study: Discrete spectra 21
5.1 Proper edge colorings . . . 21 5.2 mcct-colorings . . . 22
5.3 H-free-colorings . . . 25
6 More graph polynomials 26
6.1 Graph polynomials with incomplete complexity spectrum . . . 26 6.2 NP-hardness . . . 27
1. Introduction
By a classical result of R. Ladner, and its generalization by K. Ambos-Spies, [Lad75, AS87], there are infinitely many degrees (via polynomial time reducibility) betweenP
andNP, and betweenPand#P, providedP 6=NP. In contrast to this, the com-plexity of evaluating partition functions or counting graph homomorphisms satisfies a dichotomy theorem: either evaluation is inPor it is#P-complete, [DG00, BG05, CCL13]. For the definition of the complexity class#P, see [GJ79] or [Pap94].
In accordance with the literature in graph theory a finite graphG= (V(G), E(G))
withn(G) =|V(G)|ande(G) =|E(G)|hasordern(G)andsizee(G). Otherwise, thesize of a finite setis its cardinality.
In this paper we study the complexity of the evaluation of generalized univari-ate chromatic polynomials, as introduced in [MZ06] and further studied in [KMZ08, KMZ11]. They will be called in the sequelCP-colorings (forCountingPolynomials). Among these we find:
Examples 1.1. (i) Trivial (unrestricted) vertex colorings using at mostkcolors are just functionsV(G) → [k]. We denote byχtrivial(G;k)the number of trivial
colorings ofG, henceχtrivial(G;k) =k|V(G)|∈Z[k].
(ii) Proper vertex colorings using at mostkcolors, where two neighboring vertices receive different colors, are counted byχ(G;k), the classical chromatic polyno-mial .
(iii) Proper edge colorings using at mostkcolors, where two edges with a common vertex receive different colors, are counted byχedge(G;k), the edge chromatic
polynomial. We note that they are exactly the proper vertex colorings of the line graphL(G)ofG.
(iv) Convex colorings using at mostkcolors are vertex colorings, which are not nec-essarily proper, but where each color class induces a connected subgraph. They are counted byχconvex(G;k). Convex colorings are first introduced in [MS07].
(v) Harmonious colorings using at mostk colors are proper vertex colorings such that no two edges have end-vertices receiving the same pair of colors. They were introduced in [HK83, EM95, Edw97]. We denote the number of harmo-nious colorings using at mostkcolors by χharm(G;k). The graph parameter
χharm(G;X)is a polynomial inkby [MZ06, KMZ11] which was further studied
more recently in [DBG17].
(vi) For a fixed connected graphH,DU(H)-colorings are vertex colorings, where each color class induces a disjoint collection of copies ofH. The graph parame-ter counting the number ofDU(H)-colorings with at mostkcolors is a polyno-mial ink, and the corresponding graph polynomial is denoted byχDU(H)(G;k). (vii) For a fixed t ∈ N+, an mcct-coloring using at most k colors is a vertex
col-oring, where the connected components of the subgraphs induced by each color class have at mostt vertices. They were previously studied in [ADOV03] and [LMST07]. The graph parameter χmcct(G;k) counting the number of mcct
-colorings with at mostkcolors is also a polynomial inkbut not int.
the proper vertex colorings. The graph parameterχH−f ree(G;k)counting the
number ofH-free colorings with at mostkcolors is also a polynomial ink.
More examples are presented in Section 2, where we also discuss a general theorem which allows us to find infinitely many generalized chromatic polynomials, and in Section 6.
1.1. The complexity spectrum
Let F be a fixed field that contains Q, the rational numbers, and in which the
arithmetic operations are polynomial time computable. For our discussion we use the unit-cost4model for the field computations inF.
Given a graph polynomial P(G;X) ∈ F[X] and an element a ∈ F, we view Pa(G) =P(G;a)as a graph parameter. We will look at the complexity of the problem
of evaluatingP(G;a) for a fixed a ∈ F and at the problem of computing all the coefficients ofP(G;X).
Problem:P(G;a)
Input:GraphG.
Output:The value ofP(G;X)forX =a.
Problem:P(G;X)
Input:GraphG.
Output:All the coefficients ofP(G;X)as a vector overF.
We denote byTPa(n)the time needed to computeP(G;a)on graphs withn ver-tices in the Turing model of computation. SimilarlyTPX(n)denotes the time needed to compute all the coefficients ofP(G;X). Clearly, for everya∈Fthe problemP(G;a)
is reducible to computing the coefficients ofP(G;X). The converse is not true in gen-eral, but we shall see cases where for certaina0 ∈ Fcomputing the coefficients of P(G;X)is reducible toP(G;a0). When we speak informally of thecomplexity
spec-trum ofP(G;X)we have in mind the variability ofTPa(n)wherea ∈ F, without giving the term a precise definition. For a graph polynomialP(G;X), we are inter-ested in describing the complexity ofPa(G)for alla∈F. A more modest task would
be to describe it only fora∈ N. In the case ofa ∈Nwe speak of thediscrete
com-plexity spectrum, in the case ofa∈Fwe speak of thefull complexity spectrum, if the context requires it.
4If instead we use the binary cost model for computations in, say,Q, the main results still hold, but
We define
EASY(P) ={a∈F: there existsd∈NwithTPa(n)≤n
d
for alln≥2}
Analogously, we define
#PHARD(P) ={a∈F:Pa(G)is#P-hard}.
1.2. Easy computation of the polynomial versus its easy evaluation
In the definition ofEASY(P), we require that the evaluation ata∈Ftakes poly-nomial time, but the exponentd may depend ona, which is to say the polynomial bound for evaluatingP(G;a)isnon-uniform.
If we could compute all of the coefficients ofP(G;X)in polynomial time, we could also evaluateP(G;a)for everyain polynomial timeO(nd)wheredis indepen-dent ofa, andP(G;a)can be evaluated in polynomial time uniformly.
However, ifEASY(P)is infinite with a non-uniform polynomial bound, then it does not follow that there existsdsuch that for everyGthe coefficients ofP(G;X)
maybe computed in timeO(nd).
Proposition 1.2. (i) If the coefficients of the polynomialP(G;X)can be computed in polynomial time fromGalone, thenEASY(P) =F.
(ii) If, in addition to (i), there isa∈Fsuch thata∈#PHARD(P), thenP= #P.
Proof. As all the coefficients ofP(G;X)can be computed together in polynomial time, the degreeδ=δ(G)ofP(G;X)is polynomial in the number of vertices ofG, and so is the size of the coefficients.
Evaluating such a polynomial can be done in polynomial time in the order ofG. Therefore ifa∈EASY(P)∩#PHARD(P)we haveP= #P.
The characteristic polynomialpA(G;X)of a graphGis the characteristic
polyno-mial of its adjacency matrix. A variant of this,pL(G;X), is obtained by replacing the
adjacency matrix by the Laplacian ofG. Both are obtained by computing a determi-nant, therefore evaluating bothpA(G;X)andpL(G;X)can be done in timeO(n3),
irrespective of the evaluation pointX = a ∈ F. Hence EASY(pA(G;X)) = F
(EASY(pL(G;X)) =F) uniformly.
In Section 3.1 we shall see an example whereEASY(P) =Nnon-uniformly.
1.3. Linial’s Trick
In the case of the chromatic polynomialχ(G;X), N. Linial set the paradigm in the following theorem:
Theorem 1.3([Lin86]). #PHARD(χ) =F− {0,1,2}andEASY(χ) ={0,1,2}.
To show this N. Linial observed the following:
(i) A functionf :V(G ./ K1)→[k]is a proper coloring withkcolors if and only if there is a functiong:V(G)→ {1, . . . , i−1, i+ 1, . . . , k}which is a proper coloring ofGwithk−1colors andf|V(G)=g, i.e.,gis the restriction off to V(G), andf(u) =i.
(ii) χ(G ./ K1;k) =k·χ(G;k−1)
(iii) χ(G ./ Kn;k) =k(n)·χ(G;k−n)wherek(n)is the falling factorial: k(n)=k(k−1)(k−2). . .(k−(n−1)) = (n−k!k)!.
This allows one fora6∈Nto evaluateχ(G, a−n)by computingχ(G ./ Kn, a).
It also shows that evaluatingχ(G;k)is reducible to evaluatingχ(G;k+ 1)fork≥3.
Proof of Theorem 1.3. First one proves that χ(G; 3) is #P-complete directly, as in [Lin86]. For the casesa ∈ N− {0,1,2}one uses (ii) of Linial’s trick iteratively to
reduce the computation ofχ(G; 3)to the computation ofχ(G;a). For the casesa∈
F−None uses (iii) of Linial’s trick to computeχ(G;a−n)forn= 0,1, . . . , n(G). By
Lagrange interpolation the polynomialχ(G;X)is thereby determined since the degree ofχ(G;X)isn(G). In particular computingχ(G; 3)is polynomial time reducible to computingχ(G;a). Hence, Theorem 1.3 follows.
Similarly, for the generating matching polynomial
gm(G;X) = X
M⊆E(G) X|M|,
we have, see [AM]5.
Proposition 1.5. #PHARD(gm) =F− {0}andEASY(gm) ={0},
G-polynomial E= EASY(P) #PHARD(P) OTHER Reference
χtrivial(G;X) Etrivial=F, u ∅ ∅ trivial
pA(G;X) Echar=F, u ∅ ∅ folklore
gm(G;X) Ematch={0} F−Ematch ∅ folklore
χ(G;X) Echrom={0,1,2} F−Echrom ∅ Theorem 1.3
χharm(G;X) Eharm=N, nu F−Eharm ∅ Theorem 3.2
χconvex(G;X) Econvex={0,1} F−Econvex ∅ Theorem 3.6
χDU(Kα)(G;X) EDU(Kα)={0,1} F−EDU(Kα) ∅ Theorem 3.16 α≥2
Table 1: Full complexity spectra, u=uniformly, nu=non-uniformly
G-polynomial E= EASY(P) #PHARD(P) OTHER Reference
χedge(G;X) Eedge={0,1} N−Eedge ∅ Theorem 5.2
χmcct(G;X) Emcct ={0,1} N−Emcc2 ∅ Theorem 5.8 t≥2, k≥2
[image:8.612.134.488.122.213.2]χH−f ree(G;X) EH−f ree={0,1} N− {0,1,2} {2}(+) Theorem 5.10
Table 2: Discrete complexity spectra only,Hof size2, (+) onlyNP-hard is known
The purpose of this paper is to study the complexity spectrum of generalized uni-variate chromatic polynomials arising fromCP-colorings.
In the examples we study, the complexity spectrum is easily described with the two setsEASY(P)and#PHARD(P). Our results on full complexity spectra are summarized in Table 1. Cases where only the discrete spectrum is understood are given in Table 2.
To get a complete description of the full complexity spectrum of P(G;a), one needs two ingredients:
(i) Enough pointsa ∈Nfor which the complexity ofPa(G) =P(G;a)is known,
and
(ii) some form of reducibility betweenPa(G)andPb(G)for the remaining values
a, b∈F.
From the literature we often, but not always, can get enough information for (i). We give here new results for (i), namely Theorems 3.5, 3.14 and 5.6. For (ii) we try to adapt Linial’s Trick, which in some cases is more or less straightforward, while in other cases requires finding a new gadget as in Theorem 3.2. A precise description of what is needed for (ii) is given in [BDM10], which also covers the case for multivariate graph polynomials.
1.4. The Difficult Point Dichotomy
We say that a univariate graph polynomial has theDifficult Point Dichotomyif
(i) for everya∈Feithera∈EASY(P)ora∈#PHARD(P), and (ii) EASY(P) =ForEASY(P)⊆N.
In [Mak08a, MKR13] it is conjectured that, for every univariate graph polyno-mialP(G;X)definable in Second Order LogicSOL, the setEASY(P)is either fi-nite orEASY(P) = Fand thatEASY(P)∪#PHARD(P) = F. In [Mak08a] the same was also conjectured for univariate graph polynomials definable in Monadic Sec-ond Order LogicMSOL. The example ofχharm(G;X)isSOL-definable and
there-fore disproves the conjecture forSOL-definable graph polynomials. However, it was shown in [KM14] thatχharm(G;X)is notMSOL-definable. Rather than conjecturing
Problem 1.6. Which univariate graph polynomialsP(G;X)satisfy the Difficult Point Dichotomy?
In particular,
(i) Is it true for everyMSOL-definable univariate graph polynomialP(G;X)?
(ii) Can one find a criterion which applies to an infinite family of univariate graph polynomialsP(G;X)which are not partition functions, or which do not count homomorphisms, and which implies the Difficult Point Dichotomy.
Outline of the paper
In Section 2 we give a simplified proof of the result from [MZ06] that not only counting proper graph colorings, but counting many other graph colorings, give rise to infinitely many generalized chromatic graph polynomials. We give many explicit examples, and show that there are infinitely many such graph polynomials which are mutually semantically incomparable, cf. [MRB14, KMR17]. In Sections 3 and 5 we analyze in detail the graph polynomials from Table 1 and 2. In Section 4 we give the proof that counting convex colorings with2colors is#P-complete (Theorem 3.5). In Section 6 we discuss graph polynomials for which we have only partial results. Finally, in Section 7 we summarize our conclusions and list some open problems.
2. One, two, many chromatic polynomials
LetG= (V(G), E(G))be a finite graph andk∈N+a positive integer. We denote the set{1, . . . , k}by[k]. Unless otherwise stated all graphs are simple, i.e., loop-free and without multiple edges. Avertex (edge) coloring f withkcolors is a function f :V(G)→[k](f :E(G)→[k]). The coloringfisproperif no two vertices (edges) with a common edge (vertex) have the same color.
Letχ(G;k)(χedge(G;k)) denote the number ofpropervertex (edge) colorings of
Gwithkcolors. In 1912 G. Birkhoff [Bir12] noticed thatχ(G;k)andχedge(G;k)are
polynomials inZ[k], and therefore can be extended to polynomials inC[X], denoted,
by abuse of notation, byχ(G;X)andχedge(G;X). Birkhoff’s proof forχ(G;X)was
based on a recurrence relation involving deletion and contraction of edges, which was generalized and led, in its most general form, to the Tutte polynomial. Forχedge(G;X)
one simply observes that
χ(L(G);X) =χedge(G;X), (*)
whereL(G)is the line graph ofG. Although proper edge colorings have been studied in the literature, the polynomialχedge(G;X)has not received wide attention, probably
because of (*).
2.1. Many chromatic polynomials
Two vertex coloringsf1, f2 : V(G)→ [k]are isomorphic if there is an automor-phismα : V(G) → V(G)of Gand a permutationπ : [k] → [k] such that for all v∈V(G)
π(f1(v)) =f2(α(v)).
LetCOL =S G∈G
S
k∈N+[k]V(G). Acoloring propertyΦis a subset ofCOLthat is closed under isomorphisms of colorings.
For a fixed coloring propertyΦ, a graphG∈ G,k∈N+andI⊆[k], let
χΦ(G;k) =|{f ∈Φ :f :V(G)→[k]}|
and let
cΦG(I, k) =|{f ∈Φ :f :V(G)→[k]withf(V(G)) =I}|
be the number of coloringsf ∈ΦofGwhich use exactly the colors inI. We say thatΦis aCP-Propertyif the following two conditions are satisfied:
(A) For allk∈N+andI, J⊆[k]with|I|=|J|=iwe have
cΦG(I, k) =cΦG(J, k).
(B) For allk, k0∈N+withI⊆[k]∩[k0]we havecΦ
G(I, k) =cΦG(I, k0).
If (A) holds we letcΦ
G(i, k)denote the common value ofcΦG(I, k), where|I|=i, and
if both (A) and (B) hold, we letcΦ
G(i)denote the common value ofcΦG(i, k), fork≥i.
We now computeχΦ(G;k)using (A) and (B):
χΦ(G;k) = X I⊆[k]
cΦG(I, k) = X
i
cΦG(i) k
i
.
This establishes the following result, first shown in [MZ06]:
Theorem 2.1([MZ06]). IfΦis aCP-property, the counting functionχΦ(G;k)is a polynomial inZ[k].
Examples 2.2. (i) In the case of the chromatic polynomial, both (A) and (B) are satisfied. Hence we get a new proof of Birkhoff ’s Theorem.
(ii) LetχˆΦ(G;k) = cΦG(k)be the graph parameter that counts the number of
color-ings inΦofGwhich use exactlykcolors.
Note that the functionχΦˆ (G;k)need not be a polynomial inkwhenχΦ(G;k)is a polynomial ink.
(iii) LetΦ1be the coloring property which saysf is a proper coloring withkcolors
where all thekcolors are used. Here (B) is violated, and indeed,χΦ1(G;k)is
not a polynomial.
(iv) LetΦ2be the coloring property which saysf is a proper coloring withkcolors
such thatf(v) =i+ 1if and only if the degree ofvisi. Here (A) is violated, but (B) is still true, andχΦ2(G;k)is still a polynomial.
2.2. P-colorings and variations
Two graph polynomials may be compared via theirdistinctive power. Two graphs G1andG2aresimilarif they have the same number of vertices, edges and connected components. A graph polynomialQ(G;X)isless distinctive thanP(G;Y), written QP, if for every two similar graphsG1andG2
P(G1;X) =P(G2;X)impliesQ(G1;Y) =Q(G2;Y).
We also say thatP(G;X)determinesQ(G;X)ifQ P. Two graph polynomials P(G;X)andQ(G;Y)are equivalent in distinctive power (d.p.-equivalent) if for every two similar graphsG1andG2
P(G1;X) =P(G2;X)iffQ(G1;Y) =Q(G2;Y).
Here we show how to obtain infinitely many graph polynomials that are mutually in-comparable in distinctive power.
LetP be any graph property (a class of finite graphs closed under graph isomor-phism).
A functionf : V(G) → [k] is aP-coloringif for everyi ∈ [k]the setf−1(i)
induces a graphG[f−1(i)]∈ P. Clearly, this is aCP-coloring for any graph property P. Hence χP(G;k), the number of P-colorings of G with at most k colors, is a polynomial ink.
Theorem 2.3([KMR17]). There are infinitely many graph polynomials of the form
χP(G;k)with mutually incomparable distinctive power.
We can generalize this further. LetP1 andP2 be two graph properties. TheP 1-colorings such that the union of any two color classes induces a graph inP2form also aCP-property. Let
χP1,P2(G;k) =
|{f :V(G)→[k] :∀i∈[k]G[f−1({i})]∈ P1,∀i,j∈[k],i6=jG[f−1({i, j})]∈ P2}|
denote the number of such colorings. Then, for k ∈ Nand a graphG, the graph
invariantχP1,P2(G;k)is a polynomial ink.
Problem 2.4. For which graph propertiesP1,P2 can we describe the complexity of χP1,P2(G;k)? In particular, for which graph properties does the Difficult Point
Di-chotomy hold?
Remark 1. In Problem 2.4 it may be reasonable to impose some complexity restrictions onP1andP2, e.g., we might require them to be inNP.
LetAHbe any additive induced hereditary property (closed under taking induced subgraphs and disjoint unions).AH-colorings have been studied in [Bro96, Far04], in which the following is shown:
(ii) ([Far04])χAH(G;k)isNP-hard, unlessAHis the class of empty (=edgeless)
graphs.
Table 3 unifies theCP-colorings considered in Table 1 asP1-colorings such that the union of any two color classes induces a graph inP2. Table 3 also contains the definitions ofacyclic colorings,t-improper coloringsandco-colorings, which will be discussed in Section 6.
CP-coloring P1 P2
trivial all graphs all graphs
proper edgeless graphs all graphs
acyclic edgeless graphs forests
convex connected graphs all graphs harmonious edgeless graphs at most one edge
mcct conn. cpts size≤t all graphs
DU(H) disjoint union of∼=H all graphs
t-imp max. degreet all graphs
co-coloring clique or edgeless all graphs
AH-coloring AH all graphs
Table 3:P1-colorings where the union of any two color classes is inP2. In the last lineP1is an additive
induced hereditary property (closed under taking induced subgraphs and disjoint unions).
3. Detailed case study: Dichotomy theorems
3.1. Harmonious colorings
Recall that a coloring isharmoniousif it is a proper vertex coloring and every pair of colors occurs along some edge at most once, andχharm(G;X)is the corresponding
graph polynomial.
Proposition 3.1. For everyk ∈ Nthere is a polynomial time Turing machineT(k)
which computesχharm(−;k). In other wordsN⊆EASY(χharm)non-uniformly.
Proof. ForX = ka positive integer and a graphGonnvertices,χharm(G;k)6= 0
implies thatGhas at moste(k) = k2
edges. Furthermore, there arek2·e(k)colorings of2·e(k)vertices withkcolors. Leti(G)be the number of isolated vertices ofG,
T(k)proceeds as follows:
(i) Determine|E(G)|. If|E(G)| ≥e(k) + 1we haveχharm(G;k) = 0.
(ii) Otherwise, we stripGof all its isolated vertices to obtainG0, which has at most
2·e(k)vertices.
(iii) We count the colorings ofG0 which are harmonious, i.e.,χ
harm(G0;k), which
takes timet(k), independently of the number of vertices ofG. (iv) Thereforeχharm(G;k) =ki(G)·χharm(G0;k).
[image:12.612.184.429.213.349.2]G G1 S(G)
Figure 1: ConstructingS(G)fromG
Remark 2. In spite of the low complexity of the above algorithms, we cannot compute all the coefficients ofχharm(G;X)in polynomial time. To computeχharm(G;X)for
a graphGonnvertices we would have to compute forn+ 1valuesk1, . . . , kn+1ofX
the value of the functionχharm(G;X)and then use Lagrange interpolation. However,
the above algorithm inspects k2·e(k) colorings, which for at least one of the values χharm(G;ki)is bigger thann2·e(n). It follows from Theorem 3.2 below that, indeed,
χharm(G;X)cannot be computed in polynomial time unlessP= #P.
Theorem 3.2. For eacha∈F−Nthe evaluation ofχharm(G;a)is#P-hard.
Proof. LetGbe a graph. We formS(G)in the following way (see Figure 1).
We first formG1usingGby adding a new vertexvefor each edgee = (u, v)ofG.
Then replace the edgeeby two new edges(u, ve)and(ve, v).
UsingG1we now formS(G): We connect all the new verticesve:e ∈E(G)ofG1
such that they form a complete graph on|E(G)|vertices. For a graphGandk∈N,
χharm(S(G);k+e(G)) =χ(G;k)·
k+e(G)
e(G)
e(G)!, (1)
wheree(G) = |E(G)|andχ(G;k)is the chromatic polynomial ofGevaluated atk. Since Equation (1) holds for everyk ∈ N, it is a polynomial identity, which can be
written as follows:
χharm(S(G);X) =X(e(n))·χ(G;X−e(G)). (2)
Equation (2) provides a polynomial time reduction from the coefficients ofχ(G;X)
to the coefficients of χharm(S(G);X), and vice versa. In particular, determining
χharm(S(G);X)is#P-hard. We also see from Equation (2) that for a ∈ F−N,
the graph parameterχ(G;a−e(G))is polynomial time equivalent to the evaluation χharm(S(G);a).
Finally, evaluatingχ(G;a−e(G))is#P-hard fora6∈N. To see this, first observe the
following polynomial identity by the multiplicativity of the chromatic polynomial over disjoint unions:
χ(GtK1,n;X−e(GtK1,n)) =
χ(K1,n;X−e(GtK1,n))·χ(G;X−e(GtK1,n)) = (X−e(G)−n)·(X−e(G)−n−1)n·χ(G;X−e(G)−n).
Fora∈F−N, we use Equation (3) to obtain the evaluationsχ(G;a−e(G)−n)for
n= 0,1, . . . ,|V(G)|and we apply Lagrange interpolation to computeχ(G;X−e(G)). By Equation (2) this determinesχharm(S(G);X), which as we have seen is a#P-hard
problem. Consequently evaluatingχharmatX =ais#P-hard.
Remark 3. From Equation (1) we also see that, since evaluatingχ(G; 3) is #P -complete, we must indeed have non-uniform polynomial time evaluation ofχharm(G;X)
at positive integer points, as stated in Proposition 3.1.
Hence we have shown:
Theorem 3.3. The Difficult Point Dichotomy is true forχharm(G;X)
withEASY(χharm) =Nnon-uniformly, and#PHARD(χharm) =F−N.
3.2. Convex colorings
Recall that aconvex coloringof a graphGis an assignment of colors to its vertices so that for each colorcthe subgraph ofGinduced by the vertices receiving colorcis connected6. The resulting graph polynomial isχ
convex(G;X).
The following is easily verified:
Proposition 3.4. (i) ForX = 1we have
χconvex(G; 1) = (
1 ifGis connected
0 else.
(ii) Fork∈N+we have
χconvex(GtK1;k) =k·χconvex(G;k−1).
In [Mak08b], it was asked whetherχconvex(−; 2)is#P-hard. The question was
answered in the positive and posted in [GN08], but remained unpublished. Note that the number of convex colorings using at most two colors is equal to zero ifGhas three or more connected components and equal to two ifGhas exactly two connected components. So we may restrict our attention to connected graphs.
Theorem 3.5(A. Goodall and S. Noble, [GN08]). Evaluatingχconvex(G;X)forX = 2on connected graphs is#P-complete.
The proof is given in Section 4. Combining Proposition 3.4 and Theorem 3.5 we get the following:
Theorem 3.6. EASY(χconvex) ={0,1}and#PHARD(χconvex) =F− {0,1}.
3.3. DU(H)-colorings
LetH be a fixed connected graph. A coloringf : V(G) → [k]is anDU(H) -coloringwithkcolors, if each color class induces a disjoint union of copies ofH. We denote byχDU(H)(G;k)the number ofDU(H)-colorings ofGwith at mostkcolors, and byχˆDU(H)(G;k)the number ofDU(H)colorings ofGwith exactlykcolors.
We easily verify:
Proposition 3.7. (i) Being aDU(H)-coloring withkcolors is aCP-property, hence
χDU(H)(G;k) is a polynomial in k. However, χˆDU(H)(G;k) is not a CP
-property, and in general is not a polynomial ink.
(ii) χDU(H)(G;k) =P
k i=1
k i
ˆ
χDU(H)(G;i).
(iii) χDU(H)(G;k)is multiplicative over disjoint unions.
(iv) Fork= 1, a graphGisDU(H)-colorable iffGis a disjoint union ofHs.
(v) Forn(G)6≡0 modn(H)the polynomialχDU(H)(G;k)vanishes.
Letv∈V(H). We defineH,v(G)to be the graph with vertex setV(G)tV(H),
and edge setE(G)tE(H)tV(G)× {v}. We can apply Linial’s Trick, cf. Lemma 1.4, to analyze the complexity ofχDU(H)(G;a).
Proposition 3.8. LetHbe a connected graph.
(i) χDU(H)(H,v(G);k) =k·χDU(H)(G;k−1).
(ii) For everya, b ∈ Nandb > a,χDU(H)(G;a)is polynomial time reducible to χDU(H)(G;b).
(iii) For everya0∈F−N, computing the coefficients ofχDU(H)(G;X)is polynomial
time reducible toχDU(H)(G;a0).
The proof is the same as in [Lin86]. For the convenience of the reader we sketch it here.
Proof. (i) All the vertices ofV(H)have to be colored by the same color but differently from the vertices inV(G).
(ii) Apply (i)b−amany times.
(iii) LetG0=G,Gi+1=H,v(Gi). UsingχDU(H)(−;a0)we can computeχDU(H)(Gi;a0)
for sufficiently manyi’s and then use Lagrange Interpolation to compute the coeffi-cients ofχDU(H)(G;X).
Related decision and counting problems have been considered in the literature. In the followingαis a nonnegative integer.
Problem:CliqueCoverα
Input:GraphG. Ifα≥1thenn(G) =α·m.
Question:Can we partitionV(G)into setsVisuch that eachViinduces a clique
Problem:#CliqueCoverα
Input:GraphG. Ifα≥1thenn(G) =α·m.
Output:The number of partitions ofV(G)into setsVisuch that eachViinduces
a clique (forα= 0) or induces a copy ofKα(forα≥1).
We note forα= 0this is the classical clique cover decision problem of Richard Karp’s original 21 problems, see [GJ79].
From the literature we know the following:
Theorem 3.9. (i) CliqueCover0isNP-complete and#CliqueCover0is#P-complete,
[GJ79, HIMRS98].
(ii) CliqueCover1and#CliqueCover1are both trivial.
(iii) CliqueCover2is the same as finding a perfect matching, and is inP, and#CliqueCover2
is#P-complete by [Val79].
(iv) CliqueCover3 is NP-complete and#CliqueCover3 is#P-complete, [KH83,
HIMRS98].
Problem 3.10. For whichα≥4is#CliqueCoverα#P-complete?
The connection between#CliqueCoverαandχDU(Kα)(G;X)is given as follows:
Proposition 3.11. (i) χDU(K1)(G;X) =χ(G;X), the chromatic polynomial. (ii) χˆDU(Kα)(G;
n α) =
n α
!·#CliqueCoverαwhereα6= 0andn(G)is divisible by
α.
Proof. Ifn=n(G)is divisible byα, the maximal valueksuch thatχˆDU(Kα)(G;k)6=
0isk=n
α. In this case the subgraph induced by each color class is isomorphic toKα,
and there are nα
!many such colorings.
We will prove that χDU(Kα)(G; 2) is #P-hard for every α ≥ 2 in Theorem 3.14 below by describing a polynomial time reduction from the #P-hard problem
#α-of-2α-SAT. From [CH96] we know that#α-of-2α-SATis#P-complete.
Problem:#α-of-2α-SAT
Input:2αCNF formulaΘ.
Output:The number of truth assignments such that, in each clause,αliterals are true and the otherαare false.
Now we proceed to describe the construction of a graphGΘfor every inputΘto
#α-of-2α-SAT. We will prove that#α-of-2α-SAT(Θ) =χDU(Kα)(GΘ; 2). LetΘ =Vs
i=1Cibe a2αCNF formula with clausesCi=li,1∨ · · · ∨li,2α. Without
are either variablesxtor negation of variables¬xt. We definevar(xt) = var(¬xt) =
xt.
For every clauseCiofΘ, letGibe a clique of size2αwhose vertices are labeled
byli,1, . . . , li,2αrespectively. LetGΘbe the disjoint union ofGifor all clausesCiof Θ. For every variablext:t∈[r]letDtbe a clique of size2αin whichαvertices are
labeledxtand the otherαvertices are labeled¬xt. LetDΘ be the disjoint union of Dt:t∈[r].
We construct a graphGΘ as follows. The graphGΘis obtained from the disjoint unionGΘtDΘofGΘandDΘby adding an edge between any vertex ofGΘand any vertex ofDΘwhose labels are negations of each other (i.e. one isxtand the other is
¬xt,t∈[r]).
Any coloring c : V(GΘ) → [2]can be interpreted as assigning the truth values
true(for the color1) andfalse(for the color2) to the literals labeling the vertices. A coloringcofGΘisconsistentif the truth values assigned bycto the literals induce a well-defined truth value assignmentascto the variables. More precisely,cis consistent
if any two vertices labeled the same (bothxtor both¬xt,t∈[r]) have the same color
and any two vertices with opposing labels (xtand¬xt,t∈[r]) have different colors.
Lemma 3.12. Letc:V(GΘ)→[2]be a coloring ofGΘ. (i) Ifcis aDU(Kα)-coloring, thencis consistent.
(ii) Ifcis consistent, then the following are equivalent:
(a) cis aDU(Kα)-coloring.
(b) ascsatisfies the condition of#α-of-2α-SAT.
Proof. For (i), we assumec is aDU(Kα)-coloring. For alliandt, Gi andDtare
cliques of size2α. Hence, in each of the cliquesGi andDtexactlyαvertices are
colored1 and the otherαvertices are colored2. As a consequence, no vertexuis adjacent to any vertexvsuch thatc(u) =c(v)anduandvbelong to different cliques inGΘtDΘ.
Letube a vertex ofGΘsuch thatuis labeled bylandvar(l) =xt. Since there are
edges betweenuand theαvertices labeled by the negation oflinDt, theseαvertices
cannot have the colorc(u). As a consequence, theαvertices labeled bylinDtmust
have the colorc(u). We get that all the vertices ofGΘlabeled withlreceive the same color, which is different from the color of the vertices labeled by the negation ofl, and we get (i). Moreover,c assigns exactlyαvertices in eachGi to each of the colors,
which implies thatascassigns exactlyαof the literals ofCitotrueand the otherαto
false. Henceasc is counted by#α-of-2α-SAT, and we get the direction (a)⇒(b) of
(ii).
For the direction (b)⇒(a) of (ii), let c be a consistent coloring such that asc is
counted by#α-of-2α-SAT. We will prove thatcis aDU(Kα)-coloring. Sinceascis
counted by#α-of-2α-SAT, it assignstruetoαliterals andfalseto the otherαliterals of each clause. Hence,ccolors every cliqueGi so thatαvertices receive color1and
the otherαreceive color2. Each of the two colors induces a clique of sizeαinGi.
Sinceasc is consistent andDt consists ofαvertices labeled by some label l andα
between the color classes, hence does not belong to the induced subgraph of any of the two colors. Consequently, each of the colors induces a disjoint union of cliques of size αinGΘ.
As a consequence of Lemma 3.12 we have#α-of-2α-SAT(Θ) =χDU(Kα)(GΘ; 2). From [CH96] we have:
Theorem 3.13. For everyα≥2,#α-of-2α-SATis#P-hard.
From Lemma 3.12 and Theorem 3.13, and using the fact that the construction of GΘcan be done in polynomial time, we get:
Theorem 3.14. For everyα≥2,χDU(Kα)(G; 2)is#P-hard.
Proposition 3.15. χDU(Kα)(G; 0)andχDU(Kα)(G; 1)are polynomial time computable.
Proof. ForX = 0, χDU(Kα)(G; 0)is always 0and hence trivially polynomial time computable. ForX = 1, there is exactly one coloringc : V(G) → [1]andcis a DU(Kα)-coloring iffGis a disjoint union of copies ofKα, which can be verified in
polynomial time.
Putting all this together we get the full complexity spectrum forχDU(Kα)(G;X) forα≥2. Recall thatχDU(K1)(G;X) =χ(G;X)is the chromatic polynomial.
Theorem 3.16. For allα≥2, we haveEASY(χDU(Kα)) ={0,1}and
#PHARD(χDU(Kα)) =F− {0,1}.
Moreover, forα≥1the Difficult Point Dichotomy is true forχDU(Kα)(G;X), as for α= 1it includes the chromatic polynomial.
4. Counting convex colorings is#P-complete: the proof
The purpose of this section is to prove Theorem 3.5. This answers a question originally asked in [Mak08b], whether the problem of counting the number of convex colorings using at most two colors, i.e. computingχconvex(−; 2), is#P-complete on
connected graphs.
This section follows almost verbatim the preprint posted as [GN08].
4.1. Cuts, crossing sets, and cocircuits
LetX andY be disjoint sets of vertices of a graphG. The set of edges ofGthat have one endpoint inXand the other inY is denoted byδ(X, Y). Given a connected graphG, a cut is a partition ofV(G)into two (non-empty) sets called itsshores. The
crossing setof a cut with shoresX andY isδ(X, Y). A cut is acocircuitif no proper subset of its crossing set is the crossing set of a cut. Given a setAof edges, we denote byG\Athe graph obtained by removing the edges inA fromG. We will use the following observation:
Note that our terminology is slightly at odds with standard usage in the sense that the terms cut and cocircuit usually refer to what we call the crossing set of respectively a cut and a cocircuit. Our usage prevents some cumbersome descriptions in the proofs. We will however abuse our notation by saying that a cut or cocircuit has sizekif its crossing set has sizek.
4.2. Reductions
We prove Theorem 3.5 by a sequence of reductions involving the following prob-lems:
Problem:#COCIRCUITS
Input:Connected graphG.
Output:The number of cocircuits ofG.
Problem:#REQUIREDSIZECOCIRCUITS
Input:Connected graphG, strictly positive integerk.
Output:The number of cocircuits ofGof sizek.
Problem:#MAXCUT
Input:Connected graphG, strictly positive integerk.
Output:The number of cuts ofGof sizek.
Problem:#MONOTONE2-SAT
Input:A Boolean formula in conjuctive normal form in which each clause con-tains two variables and there are no negated literals.
Output:The number of satisfying assignments.
It is easy to see that each of these problems is a member of#P. The following result is from Valiant’s seminal paper on#P [Val79].
Theorem 4.2. #MONOTONE2-SATis#P-complete.
#MONOTONE2-SAT∝#MAXCUT∝#REQUIREDSIZECOCIRCUITS ∝#COCIRCUITS∝χconvex(−; 2)
Combining Theorem 4.2 with these reductions shows that each of the five problems that we have discussed is#P-complete. As far as we are aware, each of these reductions is new. We have not been able to find a reference showing that#MAX CUTis#P complete. Perhaps it is correct to describe this result as ‘folklore’. In any case we provide a proof below. Some similar problems, but not exactly what we consider here, are shown to be#Pcomplete in [PB83].
Lemma 4.3. #MONOTONE2-SAT∝#MAXCUT.
Proof. Suppose we have an instanceIof#MONOTONE2-SAT with variablesx1, . . . , xn
and clausesC = {C1, . . . , Cm}. We construct a corresponding instance M(I) = (G, k)of#MAXCUTby first defining a graphGwith vertex set
{x} ∪ {x1, . . . , xn} ∪ [
{{ci,1, . . . , ci,6}: 1≤i≤m}
For each clause we add nine edges toG. Suppose Cj isxu∨xv. Then we add the
edges
xcj,1, cj,1cj,2, cj,2xu, xucj,3, cj,3cj,4, cj,4xv, xvcj,5, cj,5cj,6, cj,6x.
Distinct clauses correspond to pairwise edge-disjoint circuits, each of size9. Now let k= 8|C|. We claim that the number of solutions of instanceM(I)of #MAXCUTis
equal to3|C|times the number of satisfying assignments ofI.
Given a solution ofI, letL1be the set of variables assigned the value true andL0 the set of variables assigned false together withx. Observe that for each clauseCj =
xu∨xvthere are three choices of how to add the verticescj,1, . . . , cj,6to eitherL0or L1so that exactly eight edges of the circuit corresponding toCjhave one endpoint in
L0and the other inL1. Clearly the choices for each clause are independent and distinct satisfying assignments result in distinct choices ofL0andL1. Any of the choices of L0 andL1 constructed in this way may be taken as the shores of a cut of size8|C|. Hence we have constructed3|C| solutions ofM(I)corresponding to each satisfying assignment ofI.
In any graph the intersection of a set of edges forming a circuit and a crossing set of a cut must always have even size. So in a solution ofM(I)each of the edge-disjoint circuits making upGand corresponding to clauses ofImust contribute exactly eight edges to the cut. SupposeU andV\Uare the shores of a cut ofGof size8|C|. Then it can easily be verified that for any clauseC=xu∨xvbothU andV \Umust contain
at least one element from{xu, xv, x}. So it is straightforward to see that this solution
ofM(I)is one of those constructed above corresponding to the satisfying assignment where a variable is false if and only if the corresponding vertex is in the same set as x.
Proof. Suppose(G, k)is an instance of#MAXCUT. We construct an instance(G0, k0)
of#REQUIREDSIZECOCIRCUITSas follows. SupposeGhasnvertices. To formG0 add new verticesx, x0, x1, . . . , xn2toG. Now add an edge fromxto every other vertex ofG0 exceptx0 and similarly add an edge fromx0to every other vertex ofG0except x. Letk0 =n2+n+k. From each solution of the#MAXCUTinstance(G, k)we construct2n2+1
solutions of the#REQUIRED SIZE COCIRCUITSinstance (G0, k0). SupposeC= (U, V(G)\U)is a solution of(G, k)then we may freely choose to add x, x0, x1, . . . , xn2to eitherUorV(G)\U, with the sole proviso thatxandx0are not both added to the same set, to obtain a cut inG0of sizek0=n2+n+k. Furthermore this cut is a cocircuit because both shores contain exactly one ofxandx0 and so they induce connected subgraphs.
Conversely supposeC= (U, V(G0)\U)is a cocircuit inG0of sizek0. Consider the pair of edges incident withxj. Note that the partition(xj, V(G0)\xj)is a cocircuit.
So if both of the edges incident withxj are in the crossing set ofCthen because of
its minimality we must haveC = (xj, V(G0)\xj)which is not possible becauseC
would then have size2< k0. Now suppose that neither edge incident withxj is in the
crossing set ofC.
Then bothxandx0, and hencex1, . . . , xn2, lie in the same block of the partition constitutingC. But sinceGis a simple graph, the maximum possible size of such a cocircuit is at most2n+ n2< n2+n+k. Hence precisely one of the edges adjacent toxjis in the crossing set. Soxandx0are in different shores ofC. Hence the crossing
set ofCcontains: for eachjprecisely one edge incident toxj (n2edges in total), for
eachv∈V(G)precisely one of edgesvxandvx0(nedges in total) andkother edges with both endpoints inV(G). So the partitionC0= (U∩V(G), V(G)\U)is a cut ofG of sizekand henceCis one of the cocircuits constructed in the first part of the proof. Consequently the number of solutions of the instance(G0, k0)of #REQUIRED SIZE
COCIRCUITSis2n2+1multiplied by the number of solutions of the instance(G, k)of
#MAXCUT
Lemma 4.5. #REQUIREDSIZECOCIRCUITS∝#COCIRCUITS
Proof. Given a graphGletNk(G)denote the number of cocircuits of sizekandN(G)
denote the total number of cocircuits. LetGldenote thel-stretch ofG, that is, the graph
formed fromGby replacing each edge ofGby a path withledges. Letm=|E(G)|. Then we claim that
N(Gl) = m X
k=1
lkNk(G) + l
2
m.
To see this, suppose thatCis a cocircuit ofGl. If the crossing set ofCcontains
two edges from one of the paths corresponding to an edge ofGthen by the minimality of the crossing set ofCwe see that it contains precisely these two edges. The number of such cocircuits is 2l
m.
Otherwise the crossing setCcontains at most one edge from each path inGl
cor-responding to an edge ofG. Suppose the crossing set ofCcontainsksuch edges. Let Adenote the corresponding edges inG. ThenAis the crossing set of a cocircuit inG of sizek. From each such cocircuit we can constructlk cocircuits ofG
lby choosing
If we computeN(G1), . . . , N(Gm)then we may retrieveN1(G), . . . , Nm(G)by
using Gaussian elimination because the matrix of coefficients of the linear equations is an invertible Vandermonde matrix. The fact that the Gaussian elimination may be carried out in polynomial time follows from [Edm67].
Lemma 4.6. #COCIRCUITS∝χconvex(−; 2)
Proof. The lemma is easily proved using the following observation. When two colors are available, there are two convex colorings of a connected graph using just one color and the number of convex colorings using both colors is equal to twice the number of cocircuits.
The preceding lemmas imply our main result, Theorem 3.5, thatχconvex(−; 2)is #P-hard.
5. Detailed case study: Discrete spectra
In this section we dicuss cases where we were not able to find a suitable version of Linial’s Trick, but where we could determine the complexity of the evaluations for non-negative integers.
5.1. Proper edge colorings
Recall thatχedge(G;k)counts the number of proper edge colorings of a graphG
withkcolors. It is a polynomial inkbecause
χedge(G;k) =χ(L(G);k),
whereL(G)is the line graph ofGandχ(G;k)is the chromatic polynomial. We have χedge(G; 0) = 0and
χedge(G; 1) = (
1 ifGconsists of isolated edges and vertices
0 otherwise
Althoughχedge(G;k) = χ(L(G);k), whereL(G)is the line graph ofG, not every
graphGis the line graph of some graphG0.
The class of all finite line graphs,LG, has been completely characterized, [Bei70, BLS99].
Theorem 5.1(Beineke, 1970, [Bei70]). There are nine graphsFi : 1≤i ≤9, each
with at most6vertices, such thatG∈ LGif and only if noFiis an induced subgraph
ofG.
The complexity spectrum of the chromatic polynomial restricted to the classLG has, to the best of our knowledge, not been studied.
Surprisingly, the complexity of counting proper edge colorings was proven#P -hard only recently, [CGW14]:
(i) χedge(G;k)is#P-hard over planarr-regular graphs for allk≥r≥3.
(ii) χedgeis trivially tractable whenk≥r≥3does not hold.
The proof given in [CGW14] reducesχedge(G;k)to computation of the diagonal
of the Tutte polynomialT(G;X, X)using several intermediate steps via Holants7.
Problem 5.3. Find an elementary (holant-free) proof of Theorem 5.2.
Theorem 5.2 gives us the discrete complexity spectrum fork∈N.
We were unable to adapt Linial’s Trick to proper edge colorings. Therefore we do not know how to determine the complexity ofχedge(G;X)forX=aanda∈C−N
or evena∈Q−N.
Problem 5.4. Determine the full complexity spectrum ofχedge(G;X)forX =aand
a∈Qora∈C.
5.2. mcct-colorings
Lett ∈ N. Recall that a coloringf : V(G) → [k]is anmcct-coloringwithk
colors, if the connected components of each color class have at mosttvertices. We easily verify:
Proposition 5.5. (i) For fixedt ∈ N+ being anmcct-coloring with kcolors is a CP-property, henceχmcct(G;k)is a polynomial ink(but not int).
(ii) χmcct(G;k)is multiplicative over disjoint unions.
(iii) Fort= 1we haveχmcc1(G;k) =χ(G;k), i.e., it is the chromatic polynomial. (iv) Fork = 1a graphGismcct-colorable iffGis a disjoint union of connected
graphs with at mosttvertices.
We next establish a complexity result.
Theorem 5.6. Computingχmcct(G; 2)is#P-complete fort≥2.
To prove Theorem 5.6 we use a result due to Creignou and Hermann [CH96]. Let
NAEk be the Boolean relation of allk-tuples having at least one0and at least one1,
i.e. NAEk ={0,1}kr{0· · ·0,1· · ·1}, commonly called the not-all-equal relation.
LetNAEk(x1, . . . , xk)be a constraint which is satisfied only by all tuples from the
relationNAEk. ANAEk formulaϕ = c1∧ · · · ∧cn is satisfied if each clauseciis
not-all-equal satisfied. Given a CNF formulaϕ, the counting problem#NAEkSAT
asks for the number of not-all-equal satisfying assignments ofϕ.
Theorem 5.7([CH96]). #NAEkSATis#P-complete for eachk≥3.
Proof of Theorem 5.6. The membership in#Pis clear, therefore we focus on the proof of#P-hardness. We perform a parsimonious reduction from#NAEt+1SAT.
Given aNAEt+1 formulaϕ, we associate with it the graphGϕ in the following
way. For each clausec = NAEt+1(x1, . . . , xt+1)construct the clause gadget (as in
x2 x1
c1
c2
x3 x4
(a) Clause gadget
y2 x1 b x1 z2
c1
1 c
1 2
c2
1 c
2 2
y3 y4 z4 z3
[image:24.612.180.433.229.514.2](b) Bridge
Figure 2: Clause gadget (a) for a clausec = NAE4(x1, x2, x3, x4)and a bridge (b) connecting two
Figure 2a fort= 3), consisting of a complete graphK2t. Labelt+ 1vertices ofK2t
by the variablesx1, . . . ,xt+1and the remainingt−1vertices byc1, . . . ,ct−1, wherec is the identifier of the clause.
Connect different copies of the same variable in two clause gadgets by a bridge with a new vertexb. There is a new bridge vertexbfor each pair of variable vertices labeled by the same variablexin different clause gadgets. Figure 2b illustrates (for t= 3) how two copies of the variablex1in clausesc1 = NAEt+1(x1, y2, . . . , yt+1) andc2= NAEt+1(x1, z2, . . . , zt+1)are connected through a bridge with a new nodeb. We show that eachmcct-coloring of the graphGϕencodes aNAEt+1-satisfiability of the formulaϕ. A validmcct2-coloring of each clause gadget forcestvariables to
be colored by the color0 and thetothers by the color1. Restricted to the variable nodesx1, . . . ,xt+1 of the clause gadget, this represents a correct assignment of the constraintNAEt+1(x1, . . . , xt+1). No other2-coloring of the clause gadget is a valid mcctcoloring.
When two occurrences of the same variablexare connected through a bridge with a vertexb, this bridge vertexbmust be colored by a different color than the vertices labeled byx. Indeed, in a validmcctcoloring, the vertex xin the clause gadget is
connected to anothert−1vertices colored by the same color. This induces a different color for the vertexb, otherwise there would be a connected component containing t+ 1vertices and colored by the same color. This also forces the two copies of the variablex, connected by a bridge, to be colored by the same color.
Hence, the satisfying assignments of aNAEt+1SATformulaϕare in one-to-one correspondence to themcct2-colorings ofGϕ, which constitutes a parsimonious
re-duction from#NAEt+1SAT.
Next we determine the complexity ofχmcct(G;k)fork, t∈N.
Theorem 5.8. For any integerstandkthat are both at least two,χmcct(G;k)is#P
-complete.
Proof. Membership in#Pis clear. We shall show that ift andk are integers and both at least two, thenχmcct(G;k)is polynomial time reducible toχmcct(G;k+ 1). Combining this with Theorem 5.6 gives the result.
Given a graphG, formG0fromGby adding a clique ont(k+ 1)new vertices and joining one of the new vertices to every vertex ofG. In any valid coloring ofG0 with k+ 1colors, each color class must contain preciselytof the new vertices and these vertices can be colored in (t,t,...,tk+1)t
ways, where (t,t,...,tk+1)t
is the multinomial coefficient counting the number of ways of choosing an ordered collection ofk+ 1subsets each of sizetfrom a set of size(k+ 1)t. Once the new vertices have been colored there are kcolors available to color the vertices ofG. Thus
χmcct(G
0;k+ 1) =
(k+ 1)t
t, t, . . . , t
χmcct(G;k).
The result follows.
Remark 4. The statement
χmcct(G
0;k+ 1) =(k+ 1)t t, t, . . . , t
appears at first sight to be an instance of Linial’s Trick, but there is a subtle difference. In the proof above the choice ofG0 =f(G, t, k)both depends ontandk.
In applying Linial’s Trick we require that the graphG0=g(G)does not depend on
kin order to get a polynomial identity of the form
χmcct(g
n(G);k+n) =f(k, n, t)
·χmcct(G;k).
Currently we do not know whether there is a version of Linial’s Trick which can be used forχmcct(G;X).
Using the fact thatχmcc1(G;X)is the chromatic polynomial and the previous dis-cussion (Proposition 5.5, and Theorems 5.6 and 5.8) we get
Corollary 5. Evaluatingχmcct(G;X)is inPfort= 1andk= 0,1,2, and fort≥2
andk= 1. For all other values oft, k∈Nevaluation is#P-complete.
Problem 5.9. What is the complexity spectrum for χmcct(G;a)for t ≥ 2 and a ∈
F−N?
In Theorem 3.16 we have determined completely the complexity spectrum for χDU(Kα)(G;X). This was meant to be a warm-up exercise for determining the com-plexity spectrum forχmcct(G;X), as eachDU(Kα)-coloring is also anmccα-coloring. However, determining the difficulty of evaluatingχmcct(G;X)seems to be much more demanding.
5.3. H-free-colorings
A functionf :V(G)→[k]is anH-free coloring if no color class induces a graph isomorphic toH. Clearly this is aCP-property, henceχH−f ree(G;k)is a polynomial
ink. The discrete complexity spectrum is rather well understood:
Theorem 5.10. (i) ([ABCM98])χH−f ree(G;k)is#P-hard for everyk≥3andH
with at least2vertices.
(ii) ([Ach97])χH−f ree(G; 2)isNP-hard for everyHwith at most2vertices.
It is easy to see that forX = 0,1we have the following evaluations:
χH−f ree(G; 0) = 0
and
χH−f ree(G; 1) = (
1 ifGisH−free
0 otherwise.
Problem 5.11. What is the complexity of evaluation ofχH−f ree(G;a)fora∈F−N?
6. More graph polynomials
In this section we discuss some graph polynomials for which we have only partial knowledge, if any, about the complexity spectrum. The graph polynomialsχΦ(G;k)
we discuss arise fromCP-propertiesΦdefined in Section 6.1. Three of them, (i-iii), belong to the framework ofP1− P2-colorings from Subsection 2.2, listed in Table 3, and the remaining two, (iv,v), are mentioned here because they have a rich literature.
In each case we do not know — but suspect — that evaluation of χΦ(G;X)is
#P-hard forX =afor at least onea∈F.
Problem 6.1. Determine the full complexity spectrum ofχΦ(G;X)for each of the graph polynomials in Section 6.1.
Instead of counting colorings one can look at the corresponding decision problem which asks whetherχΦ(G;k) >0. Clearly, the counting problem is at least as hard as this decision problem. For each of the graph propertiesΦabove we do know that computing the polynomialχΦ(G;X)isNP-hard. Furthermore, in two cases we dis-cuss dichotomy theorems showing that an evaluation ofχΦ(G;X)is either in Por
NP-hard.
6.1. Graph polynomials with incomplete complexity spectrum
We consider the following colorings:
(i) Let t ∈ N. A functionc : V(G) → [k] is a t-improper coloring if every color induces a graph of maximal degreet. t-improper colorings were studied in [CGJ97]. They originate in certain network problems.
(ii) A functionc : V(G)→[k]is anacyclic coloringif it is proper and there is no two colored cycle inG. Acyclic colorings were introduced in [Gru73] and further studied in [AMR91].
(iii) A functionf :V(G)→[k]is aco-coloringif every color class induces a graph which is either a clique or an independent set. Co-colorings were first studied in [HJL77].
(iv) A functionf : E(G) → [k]is a rainbow-path coloring (rainbow coloring for short) if every two vertices are connected by a path in which every two edges are colored differently. Rainbow colorings were first introduced in [CJMZ08]. (v) A functionf :V(G)→[k]is an injective coloring if it is injective on the open
neighborhood of every vertex. f does not have to be a proper coloring. In other words, if there is a path of length2 betweenv anduthenuandv must have different colors.
LetΦt−imp, Φacyc,Φco−co,Φrainbow, andΦinject denote respectively the coloring
properties oft-improper colorings for fixed t ∈ N, acyclic colorings, co-colorings, rainbow colorings, and injective colorings. Clearly, each of these coloring properties
Φis a CP-property, and hence the number of colorings in eachΦ is a polynomial ink. We denote byχt−imp(G;k), χacyc(G;k),χco−co(G;k), χrainbow(G;k), and
χinject(G;k)the graph polynomialsχΦ(G;k)counting colorings with at mostkcolors
For acyclic colorings, co-colorings, rainbow colorings and injective colorings, the complexity spectrum is completely unknown. Fort-improper colorings, partial results are known. Fort= 0, thet-improper colorings are exactly the proper colorings, hence χ0−imp(G;k) =χ(G;k)and the complexity spectrum is completely understood. For
t= 1andk∈Nwe haveχ1−imp(G;k) =χmcc2(G;k)and the complexity spectrum is completely understood. Fort = 2every color class consists of a disjoint union of paths and cycles. This is the first case where the complexity spectrum ofχ2−imp(G;k)
is not known.
6.2. NP-hardness
From the literature, we have that each of the graph polynomials defined in Sec-tion 6.1 isNP-hard:
Theorem 6.2. (i) Lett∈N. LetΦbe one ofΦt−impΦco−co,Φrainbow, andΦinject.
Computing the minimal integerk∈Nsuch thatχΦ(G;k)>0isNP-hard.
(ii) It is NP-hard to decide for a givenGandkif the acyclic chromatic number ofG
is at mostk.
Proof. The case oft-improper colorings in Theorem 6.2(i) follows directly from [CGJ97]. The case of co-colorings is proven in [GKS94]. The case of rainbow colorings is proven in [CFMY11]. The case of injective colorings follows directly from [HKSS02]. Theo-rem 6.2(ii) is proven in [Kos78].
Fort-improper colorings we are able to give a dichotomy theorem for graphs with multiple edges:
Proposition 6.3. (i) For everya∈F−{0,1}the problem of evaluatingχt−imp(G;a),
where the input runs over the class of graphs with multiple edges allowed, isNP -hard.
(ii) The evaluationsχt−imp(G; 0)andχt−imp(G; 1)are inP.
Proof. Let G ./t K1 be the graph obtained fromG by adding a new vertexv and
puttingt+ 1edges betweenvand any vertex ofG. Clearly,v cannot be colored the same color as any other vertex ofG. Therefore, we can use Linial’s Trick.
For acyclic colorings, we have a partial dichotomy. The evaluations ofχacyc(G;X)
withX = 0andX = 1are trivial by definition, because every proper coloring with less than two colors is acyclic.
Proposition 6.4. For everya /∈N, it is NP-hard to computeχacyc(G;a).
Proof. We use a version of Linial’s Trick for the chromatic polynomial. Consider G ./ K1. Every acyclic coloringfofG ./ K1with color set[k]must color the vertex K1with a unique color. The coloringf|Ginduced byf onGis clearly proper and does
not contain any two-colored cycles, sincefis acyclic. On the other hand, every acyclic coloringgofGwith color set[k−1]can be transformed to an acyclic coloringf of G ./ K1with color set[k]by coloringK1with any of thekcolors, and then setting
f(v) = (
g(v) g(v)< f(K1)
for anyv∈V(G). Hence we get
χacyc(G ./ K1;x0) =χacyc(G;x0−1)·x0.
Using Theorem 6.2(ii) we complete the proof.
A solution of the following problem would complete the dichotomy:
Problem 6.5. What is the complexity of the evaluationχacyc(G;a)fora∈N−{0,1}?
7. Conclusions and open problems
In the light of the discovery of many univariate graph polynomials in [KMZ11], and the fact that infinitely many of them are incomparable in expressive power, The-orem 2.3, we initiated the systematic study of these graph polynomials. Inspired by N. Linial’s work in [Lin86] we have concentrated in this paper on the complexity of evaluating these graph polynomials. We have introduced the full and the discrete com-plexity spectrum of univariate graph polynomials. In this paper we concentrated our attention on graph polynomials arising from graph colorings previously studied in the literature.
Throughout the paper we have listed8 open problems we encountered in our
ex-plorations. They mostly ask for the complete determination of the full complexity spectrum for specific graph polynomials. Among the more interesting challenges we have the following:
Problem 7.1. Determine the full complexity spectrum of
(i) the edge chromatic polynomialχedge(G;X);
(ii) the polynomialχmcct(G;X)fort≥2; (iii) the polynomialsχH−f ree(G;X)fort≥2;
(iv) the generalized chromatic polynomials derived fromt-improper colorings, acyclic colorings, co-colorings, rainbow-path colorings and injective colorings of Sec-tion 6.
We have not found a single graph polynomial which does not have a complexity spectrum satisfying the Difficult Point Dichotomy. Our results so far suggest that there might bemeta-theoremto be formulated, and finally also to be proven, which says that for a large class of graph polynomials Difficult Point Dichotomy holds. The large class in question should be defined by some definability criterion. Examples of such criteria could come from descriptive complexity theory.
Here are some candidates for logically defined classes9of univariate graph
polyno-mials
(i) AllSOL-definable graph polynomials.
8These are Problems 1.6, 2.4, 5.3, 5.4, 3.10, 5.9, 5.11, 6.1 and 6.5.
9For a discussion of logically defined classes of graph polynomials,
(ii) AllMSOL-definable graph polynomials.
(iii) All P-chromatic polynomials where P is in NP, or equivalently, where P is definable in∃SOL, the existential fragment ofSOL.
Previous experience suggests that it is too early to formulate a solid conjecture.
Problem 7.2. Formulate and prove a meta-theorem for the Difficult Point Dichotomy.
We hope the search for a meta-theorem will spawn further research and will lead to new insights both in graph theory and in descriptive complexity theory.
Acknowledgements
We would like to thank two anonymous referees of an earlier version of this paper for their accurate reading and spotting gaps and imprecisions, and for their extremely valuable comments. We would also like to thank the editors of this special issue, J. Ellis-Monaghan, J. Kung and I. Moffatt for their patience and support.
References
[ABCM98] D. Achlioptas, J. I. Brown, D. G. Corneil, M. S. Molloy. The existence of uniquely- g colourable graphs, Discrete Math., 179 (1998) 1–11.
[Ach97] D. Achlioptas. The complexity of G-free colourability, Discrete Math., 165 (1997) 21–30.
[ADOV03] N. Alon, G. Ding, B. Oporowski, D. Vertigan. Partitioning into graphs with only small components, Journal Combin. Theory, Ser. B, 87 (2003) 231–243.
[AM] I. Averbouch, J.A. Makowsky. The complexity of multivariate matching polynomials, Preprint, January 2007.
[AMR91] N. Alon, C. McDiarmid, B. Reed. Acyclic coloring of graphs, Random Structures Algorithms, 2 (1991) 277–288.
[AS87] K. Ambos-Spies. Polynomial time degrees of NP-sets, In E. B¨orger, editor, Trends in Theoretical Computer Science, Computer Science Press 1987, 95–142.
[BDM10] M. Bl¨aser, H. Dell, J. A. Makowsky. Complexity of the Bollob´as-Riordan polynomial: Exceptional points and uniform reductions, Theory Comput. Systems, 46 (2010) 690–706.
[Bei70] L. W. Beineke. Characterizations of derived graphs, J. Combin. Theory, 9 (1970) 129–135.
[Bir12] G.D. Birkhoff. A determinant formula for the number of ways of coloring a map, Ann. of Math., 14 (1912) 42–46.
[BLS99] A. Brandst¨adt, V.B. Le, J. Spinrad. Graph Classes: A survey, SIAM Monographs on Discrete Mathematics and Applications. SIAM, 1999.
[Bro96] J. I. Brown. The complexity of generalized graph colorings, Discrete Appl. Math., 69 (1996) 257–270.
[CCL13] J. Cai, X. Chen, P. Lu. Graph homomorphisms with complex values: A dichotomy theorem, SIAM J. Comput., 42 (2013) 924–1029.
[CFMY11] S. Chakraborty, E. Fischer, A. Matsliah, R. Yuster. Hardness and algo-rithms for rainbow connection, Journal Combin. Optim., 21 (2011) 330– 347.
[CGJ97] L. Cowen, W. Goddard, C. E. Jesurum. Defective coloring revisited, J. Graph Theory, 24 (1997) 205–219.
[CGW14] J. Cai, H. Guo, T. Williams. The complexity of counting edge colorings and a dichotomy for some higher domain holant problems, Res. Math. Sci., 3 (2016) 18.
[CH96] N. Creignou, M. Hermann. Complexity of generalized satisfiability counting problems, Inform. and Comput., 125 (1996) 1–12.
[CJMZ08] G. Chartrand, G.L. Johns, K.A. McKeon, P. Zhang. Rainbow connection in graphs, Math. Bohem., 133 (2008) 85–98.
[CLX11] J. Cai, P. Lu, M. Xia. Computational complexity of holant problems, SIAM J. Comput., 40 (2011) 1101–1132.
[DBG17] E. Drgas-Burchardt, K. Gibek. Harmonious colourings of graphs, Discrete Appl. Math., 217 (2017) 175–184.
[DG00] M. Dyer, C. Greenhill. The complexity of counting graph homomor-phisms, Random Structures Algorithms, 17 (2000) 260 – 289.
[Edm67] J. Edmonds. Systems of distinct representatives and linear algebra, Jour-nal of Research of the NatioJour-nal Bureau of Standards Section B, 71B (1967) 241–245.
[Edw97] K. Edwards. The harmonious chromatic number and the achromatic num-ber, In R. A. Bailey, editor, Survey in Combinatorics, London Math. Soc. Lecture Note Ser., 241 (1997) 13–47.
[EM95] K. Edwards, C. McDiarmid. The complexity of harmonious colouring for trees, Discrete Appl. Math., 57 (1995) 133–144.
[GJ79] M.G. Garey, D.S. Johnson. Computers and Intractability, Mathematical Series. W.H. Freeman and Company, 1979.
[GKS94] J. Gimbel, D. Kratsch, L. Stewart. On cocolourings and cochromatic numbers of graphs, Discrete Appl. Math., 48 (1994) 111–127.
[GN08] A. J. Goodall, S. D. Noble. Counting cocircuits and convex two-colourings is#P-complete, arXiv preprint arXiv:0810.2042v1, 2008
[Gru73] B. Grunbaum. Acyclic colorings of planar graphs, Israel J. Math., 14 (1973) 390–412.
[HIMRS98] H. B. Hunt III, M. V. Marathe, V. Radhakrishnan, R. E. Stearns. The complexity of planar counting problems, SIAM J. Comput., 27 (1998) 1142–1167.
[HJL77] L. Straight, H.J. Lesniak. The cochromatic number of a graph, Ars Com-bin., 3 (1977) 39–46.
[HK83] J.E. Hopcroft, M.S. Krishnamoorthy. On the harmonious coloring of graphs, SIAM J. Algebraic Discrete Methods, 4 (1983) 306–311.
[HKSS02] G. Hahn, J. Kratochvil, J. Siran, D. Sotteau. On the injective chromatic number of graphs, Discrete Math., 256 (2002) 179–192.
[KH83] D.G. Kirkpatrick, P. Hell. On the complexity of general graph factor problems, SIAM J. Comput., 12 (1983) 601–609.
[KM14] T. Kotek, J.A. Makowsky. Connection matrices and the definability of graph parameters, Log. Methods Comp. Sci., 10 (2014).
[KMR17] T. Kotek, J.A. Makowsky, E.V. Ravve. On sequences of graph polynomi-als arising from graph invariants, arXiv preprint arXiv:1701.08564v2.
[KMZ08] T. Kotek, J.A. Makowsky, B. Zilber. On counting generalized colorings, In: Computer Science Logic, CSL’08, Lecture Notes in Computer Sci-ence, 5213 (2008) 339–353.
[KMZ11] T. Kotek, J.A. Makowsky, B. Zilber. On counting generalized colorings, In: M. Grohe, J.A. Makowsky, editors, Model Theoretic Methods in Fi-nite Combinatorics, Contemporary Mathematics, 558 (2011) 207–242.
[Kos78] A. V. Kostochka. Upper bounds of chromatic function, PhD thesis, Ph. D. Thesis, Novosibirsk, 1978 (in Russian), 1978.
[Kot12] T. Kotek. Definability of combinatorial functions, PhD thesis, Technion - Israel Institute of Technology, Haifa, Israel, March 2012.
[Lin86] M. Linial. Hard enumeration problems in geometry and combinatorics, SIAM J. Algebraic Discrete Methods, 7 (1986) 331–335.
[LMST07] N. Linial, J. Matousek, O. Sheffet, G. Tardos. Graph coloring with no large monochromatic components, Electron. Notes Discrete Math., 29 (2007) 115–122.
[Mak08a] J.A. Makowsky. From a zoo to a zoology: Towards a general theory of graph polynomials, Theory Comput. Syst., 43 (2008) 542–562.
[Mak08b] J.A. Makowsky. Problem posed at the problem session at “Building Bridges: A conference on mathematics and computer science in honour of Laci Lov´asz”, 2008.
[MKR13] J.A. Makowsky, T. Kotek, E.V. Ravve. A computational framework for the study of partition functions and graph polynomials, In: Proceedings of the 12th Asian Logic Conference ’11, World Scientific, (2013), 210– 230.
[MRB14] J.A. Makowsky, E.V. Ravve, N.K. Blanchard. On the location of roots of graph polynomials, European J. Combin., 41 (2014) 1–19.
[MS07] S. Moran, S. Snir. Efficient approximation of convex recolorings, J. Comput. System Sci., 73 (2007) 1078–1089.
[MZ06] J.A. Makowsky, B. Zilber. Polynomial invariants of graphs and totally categorical theories, MODNET Preprint No. 21, 2006,
http://www.logique.jussieu.fr/modnet/Publications/Preprint%20server.
[Pap94] C. Papadimitriou. Computational Complexity, Addison Wesley, 1994.
[PB83] J.S. Provan, M.O. Ball. The complexity of counting cuts and of comput-ing the probability that a graph is connected, SIAM J. Comput., 12 (1983) 777–788.
[Val79] L.G. Valiant. The complexity of enumeration and reliability problems, SIAM J. Comput., 8 (1979) 410–421.