ABSTRACT

We are interested in a somewhat more challenging version of the problem. We are given an n×n chessboard over which we hope to place n sets of n queens such that no two queens from the same set attack each other. A solution is demonstrated in Figure 13.2. Note that in each row, column, and diagonal, each color appears only once. The ambitious reader can stop here and try to find more solutions, and to generalize the solution to any chessboard size. A generous hint was already given in the opening line of this chapter: number theory. This suggests that there is a scheme or an expression by which the n sets of n queens can be placed on an n × n board. Moreover, the problem and the solution can be easily generalized for a cubic board of n × n × n, over which we place n sets of n × n 3D queens that attack along all diagonals (including those that traverse between orthogonal slices) and rows across any axis.