Hi,

Mathimagics!

Mathimagics wrote:- Code: Select all
`123456789456789231789231564234867195518943627697512843372695418861374952945128376`

This grid has no UA4's, and only 4 x UA6's, none of which have the desired {3r2c} or {2r3c} patterns:

- Code: Select all
`{12,13,41,42,71,73}`

{34,36,65,66,94,95}

{41,49,51,58,88,89}

{58,59,85,89,95,98}

I am very impressed again by your speed! Well done!

I am still thinking about efficient LS canonicalization algorithm.

It's not important - has a LS grid UA4/UA6 or no. But we should know

smallest size of its two-row UA set.

Let, for example, the smallest size of LS grid's two-row UA set is 8 (UA8). In this case we can be sure that r1 and r2 LS rows will have such view:

- Code: Select all
`123456789`

234167895

I have no proof of this statement right now though. But it's very likely.

If it's true, the columns order is fixed, and we get rid of 9! column permutations.

In this case we should check all pairs of rows (36 checks) for their two-row UA sets sizes. Pairs having two-row UA sets with minimum size will be checked as r1/r2 rows candidates.

When we are checking r1/r2 rows candidates, we should check 2 possibilities for pairs of rows - which row will be choosen as r1. In both cases we'll get the same view of r1 and r2 rows, but necessary column permutations will be different to come to that canonic view.

If pair of rows contains several two-row UA sets of minimum size, we should check all possible orders of these UA sets (they must follow each other from the beginning of the r2 row).

Doing above pair of rows check, we should compute the rest (r3-r9) LS rows under given relabelling and given columns permutation.

This procedure will be fast, but it needs correctness proof ...

Serg