General Solution to Kings on Chessboard

147 Views Asked by At

This question was inspired by the numerous other king on chessboard questions asked on this site. Specifically this one:

Kings on a chessboard

My question is "just more general: "What is the number of ways to place $k$ nonattacking kings of a $p \times q$ chessboard?"

I know that the solution incorporates generating function but I am unsure how to use them.

Please help.