Lecture 4: Counting Boards

We are on to one last, more abstract, mathematical question. How many ways are there to arrange the numbers 1,2,3,4 on the 4x4 grid to start off making your own KenKen puzzle? This will be noticeably harder and noticeably more abstract than the previous lectures and assumes some basic knowledge of permutations.

Let's think first about some smaller examples, starting with a 2x2 board on which we will arrange the numbers 1 and 2. In this case there are only two choices for how to do the arranging. Once we choose whether the upper left hand cell has a 1 or a 2 in it, we know what the one remaining entry in the first row and the first column must be because we can only have one of each number in each row and column.

Now let's move on to the 3x3 example and try to do things systematically. Note that given any latin square, we can re-arrange the columns so that the top row reads 1,2,3 and the re-arrange the remaining two rows so that the left most column reads 1,2,3 as well. Therefore, let's start by counting latin squares in "standard" form, with the numbers 1,2,3 in order in the first row and the first column. There are then one choice for the second cell of the second row, the "elbow" cell, since 2 is not a choice according to the rules, and if we choose 1 then we would have to put a 3 under the 3 in the last cell of the row. Once we have filled in the elbow cell, we are out of choices to make. There is only one way to finish filling in the row, because there is only one number missing. Once we have filled in two of the three rows there is, of course, only one way to fill in the last row.

Now we are left to figure out how many non-standard forms there are for each standard form. We can re-arrange the columns to put the first row in any order, there are 3! arrangements for ways to do this. Now, we can arrange the last two rows in any order, and there are 2! ways to do this.

Multiplying these all together, we can see that there are 2*3!*2!=24 ways to do this.

Can you use the way that we figured out the 3x3 example to do the 4x4 example? Try it, and then follow this link to figure out if you were right.

It turns out that this is the beginning of a math problem that isn't done. The boards that we have talked about here go by the name latin squares. One problem that mathematicians don't know an answer to is how many nxn latin squares there are, that is, how many ways there are of filling in of an nxn board with the numbers 1 to n appearing exactly once in each row and column, there are for an arbitrary n. More on the available scholarly articles on latin squares can be found here.




This work was made possible through a grant from the National Science Foundation.