by **Guest** » Wed May 25, 2005 8:05 pm

In response to the previous post, I'll recap briefly on our method:

(1) Fill in blocks 1-3.

Originally Bertram was just filling block 1 and the top row of blocks 2 and 3, but my contribution was to point out that one can exploit many more symmetries by filling in all of blocks 2 and 3. The idea now is to use these symmetries to show that each such configuration of blocks 1-3 is equivalent to one in a very small list of configurations. (By equivalent, I mean that they can both be completed to a full grid in the same number of ways.)

We can reduce the list we have by several methods. Firstly:

(a) Relabel the entries.

(b) Permute the three rows of the configuration.

(c) Permute the three blocks of the configuration.

(d) Permute the three columns within any block.

By relabelling the first block, and then permuting the columns of blocks 2 and 3, and then exchanging blocks 2 and 3, one can get down to 36288 possibilities. But we can do better by looking at more permutations; for example, if we allow ourselves to carry out all permutations as in (c) and (d), and then relabelling to get block 1 as 123/456/789, one gets down to 2051. Allowing also permutations as in (b) gets down to 416 [if you program this sensibly -- I was down to around 1000 here, but Bertram had a better way to store and program the equivalences].

But there are still more equivalences, as I mentioned in my reply to tinfoil much earlier. If the configuration has a 2x2 subrectangle with a..b above b..a, then, as I pointed out there, we can exchange a..b with b..a, and keep the rest of the configuration the same. Bertram programmed this in addition to the other reductions above, and got the answer down to 174 possibilities [in practice, the first version of programming these equivalences got down to 306, which is the point that the program was first run].

In fact, Bertram later improved this by observing that the same holds if there is a 2x3 subrectangle a..b..c above any permutation, e.g., b..c..a -- and for any 2x4 rectangle. Incorporating all these symmetries takes you down to testing just 71 possibilities for blocks 1-3.

I'd observed most of those symmetries and how they worked if one starts with the first three blocks, but Bertram programmed them extremely efficiently (which I hadn't), and wrote a program to do an exhaustive search to complete a given configuration to all possible full grids which worked in less than 2 minutes (compared with my 36 hours!). For the same reason that one can get a factor of 72 by permuting the columns of blocks 2 and 3, and possibly swapping them, Bertram's program then fixes one of the 10 choices for the left column of blocks 4 and 7. Then Bertram's program seems to fill in the remaining numbers in a slightly unexpected (to me) order, but which turns out to be remarkably efficient.

So using my symmetries sped up the algorithm by a factor of around 100 (nearly 500 in the end). [I'm sure that the same methods would quickly have struck Bertram!] And then Bertram's amazing programs gave another factor of 1000 on my programs...

How to prove this number? Well, we hope that other people are going to verify it independently. At least one other person is currently doing so, and will hopefully confirm the answer soon... or not? We shall see... I gather that the method is along the lines of that proposed by Brian, filling in the 1s, then the 2s and so on.

In the previous posting, there is some double counting there; a rotation by 180 degrees can also be achieved by permutations of rows and columns. Also, the existence of a large prime doesn't preclude the existence of a nice combinatorial method; one might be able (simplifying somewhat) to show that there are essentially two methods of constructing grids [in practice, it will be many more!]. Both of the two methods might have easy and nice answers, but when you add them, a large prime appears. For example, if one method has 250 solutions, and the other has 144, say, then the sum 394 has a factor of 197. (On the other hand, I'm pessimistic that there is such a nice method.)

This turned into a rather less brief post than I had originally intended!

Frazer