For a cycle graph of length , the chromatic polynomial is . The graph triangle gives the base case . For , the deletion-contraction recurrence for the chromatic polynomial gives , since deleting an edge leaves a path graph and contracting it gives the shorter cycle graph. Substitution proves the formula by mathematical induction.
For connected components of a graph of a finite graph , choices of proper vertex colourings on different connected components of a graph are independent. The multiplication principle gives . Each nonempty factor is divisible by , hence divides the chromatic polynomial. The vanishing constant term follows by mathematical induction from the deletion-contraction recurrence for the chromatic polynomial, starting with for a nonempty graph without edges.
For a finite simple loopless graph, counts proper vertex colorings with labelled available colors, initially for nonnegative integer . For an edge , proper colorings of split into those with different endpoint colors, counted by , and those with equal endpoint colors, counted by the contracted graph. Hence the deletion-contraction recurrence for the chromatic polynomial is
Parallel edges created by contraction can be suppressed since they impose the same coloring constraint. A graph with no edges has . Induction by this recurrence therefore gives a polynomial agreeing with the counting function on all nonnegative integers. That polynomial is unique because two distinct polynomials cannot agree at infinitely many points.
Induct using the same deletion-contraction recurrence for the chromatic polynomial. The edgeless graph has polynomial , so its leading coefficient is one and the others are zero. All nonempty-vertex chromatic polynomials have zero constant term, since no coloring uses zero colors.
For an existing edge, write the alternating coefficient lists of the deletion and simplified contraction as and . The contraction has vertices, so subtracting its polynomial changes its leading sign by one place. Thus
with nonexistent indices understood as zero. Both summands are nonnegative by induction. The leading coefficient is , and the next is
This proves the alternating expansion and nonnegativity of every . The coefficient assertion for is relevant when ; the one-vertex graph simply has polynomial .
For a nonnegative integer , the chromatic polynomial counts the proper vertex colourings of using a fixed set of colours. In a proper colouring, the endpoints of every edge have different colours. The counting function extends uniquely to a polynomial, as follows either from the recurrence below with the edgeless base case or from inclusion-exclusion.
Let . Every proper colouring of falls into exactly one of two classes. If and have different colours, it is a proper colouring of . If they have the same colour, identifying and gives a proper colouring of the contracted graph , and this correspondence is bijective. Parallel edges produced by contraction impose identical conditions and can be suppressed. Hence, at every nonnegative integer ,
Since polynomials agreeing at infinitely many values agree identically, the deletion-contraction recurrence for the chromatic polynomial is
Throughout, the graphs are finite and simple, as in the usual convention for these statements.
Induct on the number of edges, allowing coefficients outside the displayed degree range to be zero. An edgeless graph has , so its leading coefficient is and all others are zero. For an edge , write the alternating coefficients of as and those of the simplified contraction as . The deletion-contraction recurrence for the chromatic polynomial gives
with . Both smaller graphs have fewer edges, so induction gives nonnegative coefficients . Thus . Moreover and
For a graph with at least one vertex, , so the constant term vanishes. Therefore
In the one-vertex case, the coefficient of is simply zero; this is the same convention beyond the written summation range.
For a finite graph , its chromatic polynomial is the polynomial whose value at each positive integer counts proper vertex colourings of from a fixed palette of labelled colours. Adjacent vertices must receive different colours, and unused colours are allowed.
For an edge , the deletion-contraction recurrence for the chromatic polynomial is
Here deletes only the edge , while performs edge contraction, identifying and removing . Any parallel edges produced by edge contraction can be replaced by a single edge, since their constraints on proper vertex colourings are identical.
Indeed, the proper vertex colourings of in which differ are precisely those of , while those in which agree correspond bijectively to proper vertex colourings of . This proves the equality for every positive integer , hence as a polynomial identity. Together with for a graph without edges, the recurrence also proves by mathematical induction that the counting function is a polynomial.
Let the nonempty connected components of a graph of be . A proper vertex colouring can be chosen separately on each connected component of a graph, since no edge joins different connected components of a graph. The multiplication principle gives, first at positive integers and then as a polynomial identity,
It remains to justify that every factor has zero constant term. More generally, for every nonempty simple graph , prove by mathematical induction on the number of edges. If there are no edges, then with . Otherwise choose an edge . Both and the simplified edge contraction are nonempty graphs with fewer edges. The deletion-contraction recurrence for the chromatic polynomial and mathematical induction give
Thus for a polynomial , and
For the empty graph, and , so the conclusion also holds. This is the chromatic polynomial product over components.
First reduce the unicyclic graph to its unique graph cycle . Delete the edges of but retain every vertex. The remaining graph is a forest, since any surviving graph cycle would be a second one in . Each of its connected components of a graph contains a vertex of : follow a graph path to in the original connected graph, stopping at the first vertex of ; this initial segment uses no edge of .
No such connected component of a graph contains two vertices of . Otherwise, on the tree graph path between them, choose two successive visits to . The segment between these visits has no internal vertex on and uses no edge of . Combining it with either connecting arc of gives a second graph cycle, a contradiction. Thus the remaining graph consists of trees, each rooted at exactly one vertex of .
After choosing a proper vertex colouring of from colours, colour these rooted trees away from their roots. Each of the off-graph cycle vertices has one already coloured parent in a rooted tree, leaving exactly choices. The multiplication principle therefore gives
Equivalently, this repeatedly applies the chromatic polynomial after attaching a leaf formula.
To compute the chromatic polynomial of a cycle, the base case is the graph triangle:
For , deleting a cycle graph edge gives a path graph on vertices, while edge contraction gives . The chromatic polynomial of that path graph is , by choosing the colour of its first vertex and then each successive vertex. Hence the deletion-contraction recurrence for the chromatic polynomial gives
Using mathematical induction, substitute to obtain
Multiplying by the factor for the attached trees proves the chromatic polynomial of a unicyclic graph formula
The chromatic polynomial counts proper vertex colorings with labeled colors at positive integer . For an edge , the deletion-contraction recurrence for the chromatic polynomial is , where parallel edges in the contracted graph are merged. Induction on edges, starting from the edgeless polynomial , shows that the coefficients have alternating signs: the contracted graph has one fewer vertex, so subtracting its alternating polynomial reinforces the same signs. The leading coefficient stays one. The coefficient of decreases by one per added edge, hence it is . Thus , with , and all .
For a tree, choose a root, give it any of colors, and give every other vertex any of the colors different from its parent. This gives . Conversely, a graph with this polynomial has . The chromatic polynomial of a disjoint union is the product of those of its connected components, each divisible by . The given polynomial has a simple zero at zero, forcing a single connected component. A connected graph with edges is a tree. The converse holds.
Finally the polynomial determines the number of vertices, the number of edges and the chromatic number. If it equals that of the Turán graph , with , then has chromatic number , so has no , and has the maximum possible number of edges for such a graph. The equality case in Turán's theorem makes isomorphic to . This is the chromatic polynomial determines a Turán graph property. If , the graph is simply complete and its edge count already determines it.
For a positive integer , the chromatic polynomial is defined to be the number of proper vertex colourings of using a fixed palette of colours.
We prove that this counting function is a polynomial by induction on the number of edges. If has vertices and no edges, every assignment of colours is proper, so
Otherwise choose an edge . Every proper colouring of either gives different colours, in which case it is a colouring of , or gives them the same colour, in which case it corresponds to a proper colouring of the contracted graph . Hence the deletion-contraction recurrence for the chromatic polynomial is
Both terms on the right are polynomials by induction, so is a polynomial.