I can use various algorithms to list all proper $$k$$-colorings of the vertices of the ladder rung graph $$nP_2$$, the first six are show below. Is there a quick way to list all proper $$k$$-colorings of the vertices?

The chromatic polynomial can count them easily (i.e. is quick to compute).

But does the nature of the graph present a coloring technique which improves the brute force method of checking every possible coloring for at least one pair of similar, adjacent colors, rejecting, and then keeping the rest?

So far, even for $$n=6$$, listing all $$6$$-colorings takes weeks of computational time using the best known graph coloring algorithms in Mathematica 12.

• Sorry, so coloring this is like assigning a color to each vertex in the top and assigning other coloring to the bottom, so there are $k^n(k-1)^n$ of them, no? What do you mean by generated them? you want to represent them as a bijection of possible functions from $[n]$ to $[k(k-1)]$? how do you want your colorings? – Phicar Sep 4 '19 at 21:09
• To list them all with an algorithm. They are easy to count. – Alexander Kartun-Giles Sep 4 '19 at 21:11
• Yes, but listing all of them like having all of them? That is a lot of memory to handle. Having one at a time is good enough for you? – Phicar Sep 4 '19 at 22:49