Chromatic Polynomial & Graph Coloring

The chromatic polynomial P(G,k) counts proper k-colorings of graph G. Computed via deletion-contraction: P(G,k) = P(G−e,k) − P(G/e,k), with P(E_n,k) = k^n (edgeless graph). Evaluating at k gives the number of colorings; the smallest positive k with P(G,k) > 0 is the chromatic number χ(G). Click edges to add/remove them.

P(G,k) for k=3
Chromatic number χ(G) =
Polynomial P(G,k):
Click near an edge to remove it.
Click between two nodes to add an edge.
Drag nodes to reposition.