Chromatic Polynomial

Build a graph interactively — compute P(k) via deletion-contraction, try k-colorings

Graph Editor

Click empty space: add node
Click node: select
Click 2 nodes: add/remove edge
Right-click node: delete

k=3
Chromatic Polynomial P(k):
P(k) = # proper k-colorings
Deletion-contraction: P(G,k) = P(G−e,k) − P(G/e,k)
Base: P(Kₙ,k) = k(k−1)…(k−n+1)

Chromatic number χ(G) = smallest k with P(k)>0.
P(k) is a polynomial with alternating signs; leading term = k^n.