## Friday, April 27, 2018

### some Chessboard Puzzle solutions

In the previous post I mentioned some mathematical chessboard puzzle puzzles, created as part of working through the book Across the Board, by John J. Watkins. This post provides some possible solutions to the puzzles on that puzzle page.

Queens on a 5 by 5 board

The puzzle "Place 3 queens on a 5x5 chessboard. The board must be dominated," is asking you to find the minimal dominating set for queens on a 5x5 board (3 is the queen's domination number for 5x5 boards). Here are two solutions:

The large dots show where the queens are placed, and a small dot appears on every square that is reachable by a queen. In the solution on the left, all three queens can be attacked, but in the solution on the right, the queen in the corner is uncovered.

The puzzle "Place 5 queens on a 5x5 chessboard. The board must be dominated. The pieces must be independent," is asking you to find the maximal independent set for queens on a 5x5 board (5 is the queens independence number for 5x5 boards). Here's a solution:

There is also a puzzle that asks you to find an arrangement between the domination and independence numbers, "Place 4 queens on a 5x5 chessboard. The board must be dominated. The pieces must be independent." Here is one solution for that:

Queens on other boards

On a 6x6 board, our queen puzzles will be bounded by the domination number of 3 and the independence number of 6. Here are solutions for those:

In between these, we have "Place 5 queens on a 6x6 chessboard. The board must be dominated. The pieces must be independent;" here's a solution for that one:

Just to get a sense of what solutions to these might look like in general, let's jump up to 8x8. In this case, the domination number for queens is 5, so the puzzle in our set with the fewest queens on 8x8 is "Place 5 queens on a 8x8 chessboard. The board must be dominated. The pieces must be independent." Here is one solution:

This particular solution is of interest because the pieces are in a pattern known as the Spencer-Cockayne construction, which can be used to find coverings of square boards of side length 9, 10, 11, and 12 as well. More interesting details can be found in Across the Board.

Knights on a 5x5 board

There are plenty of "independence and domination" problems for the knight on a 5x5 board, because the gap between the domination number (5) and the independence number (13) is so large (compared to queens on the 5x5, at least). Finding solutions for some of the intermediate numbers is a bit tricky, you may find.

For example, here is a solution to "Place 9 knights on a 5x5 chessboard. The board must be dominated. The pieces must be independent":

Knights on other boards

All puzzles based on the maximum number of independent knights on a board have the same solution: put a knight on every square of the colour that has the most squares (on odd boards, one colour has more squares than the other).

Here is an example of a puzzle based on a "sub-optimal" dominating set that is also independent: "Place 11 knights on a 6x6 chessboard. The board must be dominated. The pieces must be independent." And a solution:

Bishops on 5x5

Of the remaining pieces that we have puzzles for, bishops, kings, and rooks, the bishop is the most interesting, and the 5x5 board gives a good idea of how to construct the puzzle solutions.

Consider these two puzzles:

"Place 5 bishops on a 5x5 chessboard. The board must be dominated. The pieces must be independent."

"Place 8 bishops on a 5x5 chessboard. The board must be dominated. The pieces must be independent."

The minimum dominating set for bishops on a 5x5 board has 5 pieces, and the maximum independent set has 8. In between these, we can also form puzzles based on non optimal dominating sets (that are also independent), such as:

"Place 6 bishops on a 5x5 chessboard. The board must be dominated. The pieces must be independent."

"Place 7 bishops on a 5x5 chessboard. The board must be dominated. The pieces must be independent."

Solutions for finding similar solutions for bishops on boards of other sizes follow the same patterns as those on the 5x5 board.

Hopefully, these examples will help you out if you get stuck on any of the puzzles. As mentioned earlier, if you are interested in learning more about the mathematics behind these puzzles, check out Across the Board.

Related posts and pages
domination and independence puzzles
post introducing chessboard puzzles
chess tour puzzles
post on chess tour puzzles

## Tuesday, April 24, 2018

### Mathematical Chessboard Puzzles

A useful and very readable guide to mathematical chessboard problems is Across the Board, by John J. Watkins. I’ve been playing around with knight tours for a few years, and since picking up this book a while back, I have been returning to it again and again to learn new and interesting things about them. Although I had heard about other mathematical chessboard problems, like the eight queens problem, Across the Board introduced me to the general category of chess independence and domination problems and encouraged me to learn more about them.

A group of chess pieces of the same type is said to dominate a board if every square is either occupied or a neighbour (reachable in one move) of an occupied square. A group of chess pieces of the same type is said to be independent if no piece is a neighbour of any other piece. Domination (sometimes called covering) problems are, generally, to find a minimal dominating set, for example, the smallest number of queens required to dominate a board. Independence (or un-guarding) problems generally require you to find a maximal set of pieces that can be placed and remain independent; the greatest number of knights, for example, that can be placed so that no knight attacks another.

Uninteresting examples of dominating queens and independent knights.
A minimal dominating set and a maximal independent set would be more interesting

As part of working through Across the Board and understanding chess domination and independence, I tried to create an interactive ‘mathematical chessboard puzzle’ set (try it out here). Here is a screenshot example:

An example puzzle from the online set.
The solver is not off to a good start.

What is the difference between a mathematical chessboard problem and a mathematical chessboard puzzle? When considering the problem of queens independence, we would expect a serious treatment: a solution which finds the maximum number of independent queens for boards up to a certain size, an algorithm or method for generating maximal independent arrangements, and for some cases that remain unsolved by methods provided, some way of placing bounds on the independence number. A puzzle based on the idea of queens independence is a much simpler thing: merely an instruction like “Find a way to place 8 queens on an 8x8 board so that the board is dominated and the queens are independent.” Across the Board provides a great survey of results that mathematicians have used in tackling the problems of finding dominating sets, independent sets, and tours. The rest of this post is about puzzles (like the example above) that are generated from those results.

In puzzles inspired by the problems of domination and independence, we want to ask the solver to come up with arrangements of pieces of a single type, constrained so that the pieces either dominate the board, are independent, or both. Recall that the domination problem is looking for a minimum number of pieces required to cover the board (either by placement or by attack), while the independence problem is looking for a maximum number of pieces that can be placed independently. For example, for queens on a 5x5 board, the domination number is 3, but the independence number is 5. So for queens on a 5x5 board, our puzzles will require placements of sets ranging from 3 to 5 queens.

There is an asymmetry between domination and independence that we have to keep in mind: A solution to the domination problem might not be independent, but the maximal independent set will always be dominating. The example of 3 queens on the 5x5 board shows that you cannot always make your dominating set independent. On the other hand, a maximal independent set will always dominate: if the set does not dominate the board, that means there is a square that cannot be attacked by any of the current pieces - you can therefore add one more piece to the board at that spot, contradicting the fact that you already had a maximal independent set.

For our puzzles, we’ll just consider boards from 4x4 to 8x8 (so that they fit reasonably on the screen). In the table below, the lowest number in each cell represents the domination number for that piece on the given board size, and the largest represents the independence number. The letters next to each number indicate whether the set of that size should be said to be independent (i) and/ or dominant (d) - some of this information is redundant, but all indicators are included for completeness. The numbers between the least and greatest represents other possible arrangements. For example, for queens on a 4x4 board, the domination number is 2 (dominant set is not independent in this case), and the independence number is 4, but it is possible to find a dominating independent set of size 3, giving us the entries 2d, 3di, and 4di.

The independence and domination numbers in the table above are from the results described in Across the Board; the values between were found looking at the solutions for either domination or independence and perturbing them slightly. For example, to fill in the values for queens on an  8x8 board, start with one of the solutions to the queens domination problem for 8x8, which consists of an arrangement of 5 pieces, and move one of the pieces to a reachable square with fewer neighbours, and fill in the gaps with additional pieces. Proceeding by trial and error, this leads to dominating independent sets of 6 and 7 pieces. Finding additional dominating and independent sets for knights is a little more challenging than others - there are some gaps in the table (maybe you can fill them). Most of these possible puzzles were written out in a format for displaying online, which you can view here.

If you interested in exploring the mathematical chessboard problems through the playful medium of chessboard puzzles, please give these a try; if you are interested in learning more about the mathematics behind these puzzles, check out Across the Board.

domination and independence puzzles: https://dmackinnon1.github.io/chessdom/puzzles.html
chess tour puzzles: https://dmackinnon1.github.io/kixote/

some puzzle solutions