TITLE: Prove that the chromatic polynomial of a cycle graph $C_{n}$ equals $(k-1)^{n} + (k-1)(-1)^{n}$
QUESTION [10 upvotes]: This is a homework question. But I am completely stuck.
My only intuition was to go about it inductively from a "greedy algorithm" maybe know as the deletion-contraction algorithm. And to somehow use the information about the jth cycle to solve the j+1th. But I'm not sure how I'd do it. Thank you very much for looking this over.

REPLY [3 votes]: You can also do this directly using the principle of inclusion–exclusion.  Label the vertices of $C_n$ sequentially using the integers $0$, $1$, ..., $n-1$.  For $S\subseteq\{0,1,\ldots,n-1\}$, let $T_S$ be the set of colorings (proper or improper) of $C_n$ in which, for each $j\in S$, the color of vertex $j$ is the same as that of vertex $j-1$ (with arithmetic performed mod $n$).  The number of proper colorings is then
$$
\lvert T_{\{\}}\rvert-\sum_{i=0}^{n-1}\lvert T_{\{i\}}\rvert+\sum_{0\le i<j<n}\lvert T_{\{i,j\}}\rvert-\ldots+(-1)^n\lvert T_{\{0,1,\ldots,n-1\}}\rvert.
$$
Now there are $\binom{n}{m}$ different $S$ of size $m$.  Furthermore,
$$
\lvert T_S\rvert=\begin{cases}k^{n-\lvert S\rvert} & \text{if $\lvert S\rvert<n$,}\\ k & \text{if $S=\{0,1,\ldots,n-1\}$.}\end{cases}
$$
Hence the number of proper colorings is
$$
(-1)^nk+\sum_{m=0}^{n-1}\binom{n}{m}k^{n-m}(-1)^m
$$
The result follows immediately from the binomial theorem.