Difference between revisions of "Box Canonicalization of a Floor"
From Sudopedia, the Free Sudoku Reference Guide
Jump to navigationJump to search (Created page with "A band of 3 rows from a Sudoku solution grid can be modified to its minimum lexicographic equivalent. For a Sudoku grid with only givens a different algorit...") |
|||
| Line 2: | Line 2: | ||
For a Sudoku grid with only [[given]]s a different algorithm is used, to account for missing [[digit]]s. | For a Sudoku grid with only [[given]]s a different algorithm is used, to account for missing [[digit]]s. | ||
== Steps to find all | == Steps to find all 108 starting permutations == | ||
* Try each of the 3 [[box]]es as box 1. (3 permutations) | |||
* Permute the 3 [[row]]s. (6 permutations) | * Permute the 3 [[row]]s. (6 permutations) | ||
* Permute the 3 [[ | * Permute the 3 [[column]]s in box 1. (6 permutations) | ||
== Steps to normalize a starting permutation== | == Steps to normalize a starting permutation== | ||
| Line 17: | Line 17: | ||
* Sort the [[column]]s in box 2 so that r1c4=4, r1c5 < r1c6 | * Sort the [[column]]s in box 2 so that r1c4=4, r1c5 < r1c6 | ||
* Sort the columns in box 3 so that r1c7 < r1c8 < r1c9. | * Sort the columns in box 3 so that r1c7 < r1c8 < r1c9. | ||
== Compare results == | |||
* The numbers to compare can be found in cells a-q below: | |||
1 2 3 | 4 a b | c d e | |||
4 5 6 | f g h | i j k | |||
7 8 9 | l m n | o p q | |||
* Of the 108 starting permutations, choose the one with the lowest numerical value | |||
* For all possible configurations of the 27 numbers in a band, there are only 416 essentially different ones. | |||
Revision as of 13:41, 26 October 2021
A band of 3 rows from a Sudoku solution grid can be modified to its minimum lexicographic equivalent.
For a Sudoku grid with only givens a different algorithm is used, to account for missing digits.
Steps to find all 108 starting permutations
- Try each of the 3 boxes as box 1. (3 permutations)
- Permute the 3 rows. (6 permutations)
- Permute the 3 columns in box 1. (6 permutations)
Steps to normalize a starting permutation
- Relabel the numbers so that box 1 reads:
123 456 789
- Sort box 2 and 3 so that box 2 contains 4 in the top row.
- Sort the columns in box 2 so that r1c4=4, r1c5 < r1c6
- Sort the columns in box 3 so that r1c7 < r1c8 < r1c9.
Compare results
- The numbers to compare can be found in cells a-q below:
1 2 3 | 4 a b | c d e 4 5 6 | f g h | i j k 7 8 9 | l m n | o p q
- Of the 108 starting permutations, choose the one with the lowest numerical value
- For all possible configurations of the 27 numbers in a band, there are only 416 essentially different ones.