Article 76FB2 Queens on a prime order board

Queens on a prime order board

by
John
from John D. Cook on (#76FB2)

Then queens problem is to place on ann *n chessboardn queens so that none attacks any other. This means there is only one queen on every horizontal, vertical, and diagonal line.

Whenn is a prime number >= 5, it is sufficient to place the queens on a line that has slope 2, 3, 4, ..., n - 2. (The slope cannot be 1 because that's a diagonal. And it cannot be n - 1 because n- 1 = -1 modn is also a diagonal.) [1]

Here we imagine opposite edges of the board being joined together. Geometrically, this makes the chessboard a torus (donut). Algebraically, the points on a line of slope s have the coordinates

(a +k,b +ks)

where addition is carried out modn.

All solutions to then queens problem have this form whenn = 5. Some solutions will have this form for larger prime values of n but not all.

For example, whenn = 7, here is a solution where all the queens are on a line of slope 2.

queens71.png

But here is another solution where the queens do not all lie on a line of constant slope.

queens72.png

Related posts

[1] W. H. Bussey. A Note on the Problem of the Eight Queens. The American Mathematical Monthly, Vol. 29, No. 7 (August 1922), pp. 252-253

The post Queens on a prime order board first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments