Sudoku Enumeration Problem

Everything about Sudoku that doesn't fit in one of the other sections

continum

Postby StrmCkr » Tue Jan 09, 2018 2:40 am

Code: Select all
123|456|789
45*|***|***
***|AAA|BBB
-----------
2..|...|...
...|...|...
...|...|...
-----------
...|...|...
...|...|...
...|...|...


starting with A then B cell there is precisely 360 valid permutations to cycle through for digits

Code: Select all
123|456|789
45F|DDD|EEE
CCC|AAA|BBB
-----------
2..|...|...
...|...|...
...|...|...
-----------
...|...|...
...|...|...
...|...|...


this reduces C,D,E sectors to 1 set of 3 numbers each with 6 possible arrangement {permutations}
and cell F as a single digit choice.


the first band has exactly 360 * 6*6*6 *1 different unique arrangements
specifically : = 77,760 different unique arrangements

add to the mixed digit cycling (1..9) and you have 77,760 * 9! ==> 77,760 * 362,880 =>> 28,217,548,800 arrangements for band 1.

2nd stage
Code: Select all
123|456|789
45F|DDD|EEE
CCC|AAA|BBB
-----------
2HH|FFF|GGG
...|...|...
...|...|...
-----------
...|...|...
...|...|...
...|...|...


cycle the combinations of 3 digits from 13456789 for section F cycling each of the 6 potential permutation of that combination removing line of sight permutations that are invalid.
cycle the combinations of 3 digits from (13456789 - selection F) for position G then cycle each of the 6 potential permutations
that leaves H locations as pair of digits {fixed or not}

this is where we note a problem carrying forward

best illustrated with examples.

Stage three problem and solution:

Code: Select all
123|456|789
45F|DDD|EEE
CCC|AAA|BBB
-----------
2HH|FFF|GGG
***|***|***
***|iii|***
-----------
...|...|...
...|...|...
...|...|...


the problem arise from selection of combination of valid numbers In i

Code: Select all
.---------------------------.---------------------.------------------------.
| 1       2        3        | 4      5      6     | 7       8       9      |
| 4       5        6789     | 19     17     179   | 23      236     236    |
| 679     679      679      | 3      2      8     | 4       1       5      |
:---------------------------+---------------------+------------------------:
| 2       13       1        | 7      9      4     | 6       5       8      |
| 568     68       568      | 12     13     123   | 9       479     47     |
| 79      479      479      | 6      8      5     | 123     23      123    |
:---------------------------+---------------------+------------------------:
| 356789  1346789  12456789 | 12589  13467  12379 | 123589  234679  123467 |
| 356789  1346789  12456789 | 12589  13467  12379 | 123589  234679  123467 |
| 356789  1346789  12456789 | 12589  13467  12379 | 123589  234679  123467 |
'---------------------------'---------------------'------------------------'


take the above grid, selection i matches selection h's combination set. {658} that leaves a combination set of 123 in the middle row.

when we choose "I" as 123 the middle row is always left as 658! meaning row 4 and 5 can be swapped and will off set the solution count. by a factor of 2.
Code: Select all
.---------------------------.---------------------.------------------------.
| 1       2        3        | 4      5      6     | 7       8       9      |
| 4       5        6789     | 9      17     179   | 23      236     236    |
| 679     679      679      | 3      2      8     | 4       1       5      |
:---------------------------+---------------------+------------------------:
| 2       13       1        | 7      9      4     | 6       5       8      |
| 79      479      479      | 568    68     5     | 123     23      123    |
| 56      68       568      | 1      3      2     | 9       479     47     |
:---------------------------+---------------------+------------------------:
| 356789  1346789  12456789 | 25689  14678  13579 | 123589  234679  123467 |
| 356789  1346789  12456789 | 25689  14678  13579 | 123589  234679  123467 |
| 356789  1346789  12456789 | 25689  14678  13579 | 123589  234679  123467 |
'---------------------------'---------------------'------------------------'


a solution is the use a Combination set and Fix the last 5 positions for col 1. {instead of permutations.}

that way each potential permutation can only be applied to each row once in rows 5,6 and again for rows 678 if we don't fix all 5 spots we also have a 3! row swap problem in the last band.

Stage three:
Code: Select all
123|456|789
45F|DDD|EEE
CCC|AAA|BBB
-----------
2HH|FFF|GGG
J**|***|***
J**|iii|***
-----------
K..|...|...
K..|...|...
K..|...|...



J is a fixed Combination of 2 digits selected from ([1,2,3,4,5,6,7,8,9] - ([1,4,2] + [active digit in R3C1 of C if single, else j cannot reduce R3C1 to [] ]))
where R56C1 <> digits from [h] {as H is always a pair of locked digits}
solving R56C1 in sequential order

K is a fixed Combination of 3 digits selected from ([1,2,3,4,5,6,7,8,9] - ([1,4,2] + [active digit in R3C1 of C if single else j+F cannot reduce R3C1 to []] + step above))
solving R789C1 in sequential order

then proceed to select a 3 digit combinations for "i" as ( [1,2,3,4,5,6,7,8,9] - (f + R6C1)) and cycle the 6 permutations.
which leaves all the *'s cells as 1 set of 3 digit each with 1-6 potential permutations.

Stage 4, to be continued.
Some do, some teach, the rest look it up.
User avatar
StrmCkr
 
Posts: 732
Joined: 05 September 2006

Previous

Return to General