ChromaticPolynomial

ChromaticPolynomial[g,k]

gives the chromatic polynomial of the graph g.

ChromaticPolynomial[{vw,},]

uses rules vw to specify the graph g.

Details

• ChromaticPolynomial[g,k] gives the number of vertex colorings of g with k colors.
• gives a pure function representation of the chromatic polynomial of g.

Examples

open allclose all

Basic Examples(1)

The chromatic polynomial of a cycle graph:

Plot the polynomial:

Scope(6)

ChromaticPolynomial works with undirected graphs:

Directed graphs:

Multigraphs:

Mixed graphs:

Use rules to specify the graph:

Evaluate at specific value:

Applications(3)

Compute the number of 3-colorings of the Petersen graph:

Find the chromatic number of a graph:

Chromatic polynomials for complete graphs with vertices:

Cycle graphs:

Properties & Relations(3)

Use TuttePolynomial to compute ChromaticPolynomial:

A graph with vertices is a tree if and only if its chromatic polynomial is k(k-1)n-1:

Isomorphic graphs have the same chromatic polynomial:

Wolfram Research (2014), ChromaticPolynomial, Wolfram Language function, https://reference.wolfram.com/language/ref/ChromaticPolynomial.html (updated 2015).

Text

Wolfram Research (2014), ChromaticPolynomial, Wolfram Language function, https://reference.wolfram.com/language/ref/ChromaticPolynomial.html (updated 2015).

CMS

Wolfram Language. 2014. "ChromaticPolynomial." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/ChromaticPolynomial.html.

APA

Wolfram Language. (2014). ChromaticPolynomial. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChromaticPolynomial.html

BibTeX

@misc{reference.wolfram_2024_chromaticpolynomial, author="Wolfram Research", title="{ChromaticPolynomial}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ChromaticPolynomial.html}", note=[Accessed: 07-September-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_chromaticpolynomial, organization={Wolfram Research}, title={ChromaticPolynomial}, year={2015}, url={https://reference.wolfram.com/language/ref/ChromaticPolynomial.html}, note=[Accessed: 07-September-2024 ]}