Chromatic polynomial of a cycle on n vertices

480 Views Asked by At

I'm trying to compute the chromatic polynomial of a cycle on n vertices, and I saw the answer Prove that the chromatic polynomial of a cycle graph $C_{n}$ equals $(k-1)^{n} + (k-1)(-1)^{n}$

The answer makes sense to me. I used another method which gave me a different answer, but I don't know why it is wrong. The following is my proof: Pick one vertex to start with, there are x possible colors we can assign to that vertex. Assign colors clockwise, the next (n-2) vertex should each be assigned a different color than the previous vertex, so there are (x-1) possile colors we can assign to each of them. For the last remaining vertex, it should be assigned a different color with both its previous vertex and the first vertex, so there are (x-2) possible colors we can assign. Therefore, the chromatic polynomial is $$x(x-1)^{n-2}(x-2)$$.

Why is this wrong?