25-Sep-2024 21:49:33 sudoku_test(): MATLAB/Octave version 6.4.0 Test sudoku(). sudoku_test01(): sudoku_solve() solves a Sudoku puzzle. Here is the initial Sudoku puzzle: +---------+---------+---------+ | _ _ 1 | 9 _ _ | _ _ 8 | | 6 _ _ | _ 8 5 | _ 3 _ | | _ _ 7 | _ 6 _ | 1 _ _ | +---------+---------+---------+ | _ 3 4 | _ 9 _ | _ _ _ | | _ _ _ | 5 _ 4 | _ _ _ | | _ _ _ | _ 1 _ | 4 2 _ | +---------+---------+---------+ | _ _ 5 | _ 7 _ | 9 _ _ | | _ 1 _ | 8 4 _ | _ _ 7 | | 7 _ _ | _ _ 9 | 2 _ _ | +---------+---------+---------+ Here is the Sudoku solution: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ sudoku_test02(): sudoku_digit_permute() permutes the digits of a Sudoku puzzle. Here is the initial Sudoku puzzle: +---------+---------+---------+ | _ _ 1 | 9 _ _ | _ _ 8 | | 6 _ _ | _ 8 5 | _ 3 _ | | _ _ 7 | _ 6 _ | 1 _ _ | +---------+---------+---------+ | _ 3 4 | _ 9 _ | _ _ _ | | _ _ _ | 5 _ 4 | _ _ _ | | _ _ _ | _ 1 _ | 4 2 _ | +---------+---------+---------+ | _ _ 5 | _ 7 _ | 9 _ _ | | _ 1 _ | 8 4 _ | _ _ 7 | | 7 _ _ | _ _ 9 | 2 _ _ | +---------+---------+---------+ Here is the permutation: Original Permuted 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 1 Here is the permuted Sudoku: +---------+---------+---------+ | _ _ 2 | 1 _ _ | _ _ 9 | | 7 _ _ | _ 9 6 | _ 4 _ | | _ _ 8 | _ 7 _ | 2 _ _ | +---------+---------+---------+ | _ 4 5 | _ 1 _ | _ _ _ | | _ _ _ | 6 _ 5 | _ _ _ | | _ _ _ | _ 2 _ | 5 3 _ | +---------+---------+---------+ | _ _ 6 | _ 8 _ | 1 _ _ | | _ 2 _ | 9 5 _ | _ _ 8 | | 8 _ _ | _ _ 1 | 3 _ _ | +---------+---------+---------+ sudoku_test03(): sudoku_line_row_swap() swaps two rows of a Sudoku; the rows must be in the same "box row". sudoku_line_column_swap() swaps two columns of a Sudoku; the columns must be in the same "box column". Here is the initial Sudoku puzzle: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Our swap parameters are: BOX_ROW = 3 LINE_ROW1 = 1 LINE_ROW2 = 2 (In the third set of 3 rows, swap rows 1 and 2.) Here is the permuted Sudoku: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 9 1 6 | 8 4 2 | 3 5 7 | | 4 2 5 | 3 7 1 | 9 8 6 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Our swap parameters are: BOX_COLUMN = 1 LINE_COLUMN1 = 2 LINE_COLUMN2 = 3 (In the first set of 3 columns, swap columns 2 and 3.) Here is the permuted Sudoku: +---------+---------+---------+ | 3 1 4 | 9 2 7 | 5 6 8 | | 6 2 9 | 1 8 5 | 7 3 4 | | 8 7 5 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 4 3 | 2 9 6 | 8 7 5 | | 2 8 7 | 5 3 4 | 6 1 9 | | 5 9 6 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 9 6 1 | 8 4 2 | 3 5 7 | | 4 5 2 | 3 7 1 | 9 8 6 | | 7 3 8 | 6 5 9 | 2 4 1 | +---------+---------+---------+ sudoku_test04(): sudoku_box_row_swap() swaps two rows of boxes in a Sudoku; sudoku_box_column_swap() swaps two columns of boxes in a Sudoku; Here is the initial Sudoku puzzle: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Our swap parameters are: BOX_ROW1 = 3 BOX_ROW2 = 1 Here is the permuted Sudoku: +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ Our swap parameters are: BOX_COLUMN1 = 1 BOX_COLUMN2 = 2 Here is the permuted Sudoku: +---------+---------+---------+ | 3 7 1 | 4 2 5 | 9 8 6 | | 8 4 2 | 9 1 6 | 3 5 7 | | 6 5 9 | 7 8 3 | 2 4 1 | +---------+---------+---------+ | 2 9 6 | 1 3 4 | 8 7 5 | | 5 3 4 | 2 7 8 | 6 1 9 | | 7 1 8 | 5 6 9 | 4 2 3 | +---------+---------+---------+ | 9 2 7 | 3 4 1 | 5 6 8 | | 1 8 5 | 6 9 2 | 7 3 4 | | 4 6 3 | 8 5 7 | 1 9 2 | +---------+---------+---------+ sudoku_test05(): sudoku_box_invert() swaps boxes through the center box in a Sudoku; Here is the initial Sudoku puzzle: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Here is the box-inverted Sudoku: +---------+---------+---------+ | 9 8 6 | 3 7 1 | 4 2 5 | | 3 5 7 | 8 4 2 | 9 1 6 | | 2 4 1 | 6 5 9 | 7 8 3 | +---------+---------+---------+ | 8 7 5 | 2 9 6 | 1 3 4 | | 6 1 9 | 5 3 4 | 2 7 8 | | 4 2 3 | 7 1 8 | 5 6 9 | +---------+---------+---------+ | 5 6 8 | 9 2 7 | 3 4 1 | | 7 3 4 | 1 8 5 | 6 9 2 | | 1 9 2 | 4 6 3 | 8 5 7 | +---------+---------+---------+ sudoku_test06(): sudoku_rotate() rotates a Sudoku by 90 degrees; Here is the initial Sudoku puzzle: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Here is the rotated Sudoku: +---------+---------+---------+ | 8 4 2 | 5 9 3 | 6 7 1 | | 6 3 9 | 7 1 2 | 8 5 4 | | 5 7 1 | 8 6 4 | 9 3 2 | +---------+---------+---------+ | 7 5 3 | 6 4 8 | 1 2 9 | | 2 8 6 | 9 3 1 | 7 4 5 | | 9 1 4 | 2 5 7 | 3 8 6 | +---------+---------+---------+ | 1 2 7 | 4 8 9 | 5 6 3 | | 4 9 5 | 3 7 6 | 2 1 8 | | 3 6 8 | 1 2 5 | 4 9 7 | +---------+---------+---------+ Here is the rotated Sudoku: +---------+---------+---------+ | 1 4 2 | 9 5 6 | 3 8 7 | | 7 5 3 | 2 4 8 | 6 1 9 | | 6 8 9 | 1 7 3 | 5 2 4 | +---------+---------+---------+ | 3 2 4 | 8 1 7 | 9 6 5 | | 9 1 6 | 4 3 5 | 8 7 2 | | 5 7 8 | 6 9 2 | 4 3 1 | +---------+---------+---------+ | 2 9 1 | 3 6 4 | 7 5 8 | | 4 3 7 | 5 8 1 | 2 9 6 | | 8 6 5 | 7 2 9 | 1 4 3 | +---------+---------+---------+ Here is the rotated Sudoku: +---------+---------+---------+ | 7 9 4 | 5 2 1 | 8 6 3 | | 8 1 2 | 6 7 3 | 5 9 4 | | 3 6 5 | 9 8 4 | 7 2 1 | +---------+---------+---------+ | 6 8 3 | 7 5 2 | 4 1 9 | | 5 4 7 | 1 3 9 | 6 8 2 | | 9 2 1 | 8 4 6 | 3 5 7 | +---------+---------+---------+ | 2 3 9 | 4 6 8 | 1 7 5 | | 4 5 8 | 2 1 7 | 9 3 6 | | 1 7 6 | 3 9 5 | 2 4 8 | +---------+---------+---------+ sudoku_test07(): sudoku_reflect() reflects a Sudoku across a line of symmetry; Here is the initial Sudoku puzzle: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ Reflected across the 0 degree line: +---------+---------+---------+ | 7 8 3 | 6 5 9 | 2 4 1 | | 9 1 6 | 8 4 2 | 3 5 7 | | 4 2 5 | 3 7 1 | 9 8 6 | +---------+---------+---------+ | 5 6 9 | 7 1 8 | 4 2 3 | | 2 7 8 | 5 3 4 | 6 1 9 | | 1 3 4 | 2 9 6 | 8 7 5 | +---------+---------+---------+ | 8 5 7 | 4 6 3 | 1 9 2 | | 6 9 2 | 1 8 5 | 7 3 4 | | 3 4 1 | 9 2 7 | 5 6 8 | +---------+---------+---------+ Reflected across the 45 degree line: +---------+---------+---------+ | 1 7 6 | 3 9 5 | 2 4 8 | | 4 5 8 | 2 1 7 | 9 3 6 | | 2 3 9 | 4 6 8 | 1 7 5 | +---------+---------+---------+ | 9 2 1 | 8 4 6 | 3 5 7 | | 5 4 7 | 1 3 9 | 6 8 2 | | 6 8 3 | 7 5 2 | 4 1 9 | +---------+---------+---------+ | 3 6 5 | 9 8 4 | 7 2 1 | | 8 1 2 | 6 7 3 | 5 9 4 | | 7 9 4 | 5 2 1 | 8 6 3 | +---------+---------+---------+ Reflected across the 90 degree line: +---------+---------+---------+ | 8 6 5 | 7 2 9 | 1 4 3 | | 4 3 7 | 5 8 1 | 2 9 6 | | 2 9 1 | 3 6 4 | 7 5 8 | +---------+---------+---------+ | 5 7 8 | 6 9 2 | 4 3 1 | | 9 1 6 | 4 3 5 | 8 7 2 | | 3 2 4 | 8 1 7 | 9 6 5 | +---------+---------+---------+ | 6 8 9 | 1 7 3 | 5 2 4 | | 7 5 3 | 2 4 8 | 6 1 9 | | 1 4 2 | 9 5 6 | 3 8 7 | +---------+---------+---------+ Reflected across the 135 degree line: +---------+---------+---------+ | 3 6 8 | 1 2 5 | 4 9 7 | | 4 9 5 | 3 7 6 | 2 1 8 | | 1 2 7 | 4 8 9 | 5 6 3 | +---------+---------+---------+ | 9 1 4 | 2 5 7 | 3 8 6 | | 2 8 6 | 9 3 1 | 7 4 5 | | 7 5 3 | 6 4 8 | 1 2 9 | +---------+---------+---------+ | 5 7 1 | 8 6 4 | 9 3 2 | | 6 3 9 | 7 1 2 | 8 5 4 | | 8 4 2 | 5 9 3 | 6 7 1 | +---------+---------+---------+ sudoku_test08(): sudoku_choice() counts choices in a Sudoku puzzle. Here is the Sudoku puzzle: +---------+---------+---------+ | _ _ 1 | 9 _ _ | _ _ 8 | | 6 _ _ | _ 8 5 | _ 3 _ | | _ _ 7 | _ 6 _ | 1 _ _ | +---------+---------+---------+ | _ 3 4 | _ 9 _ | _ _ _ | | _ _ _ | 5 _ 4 | _ _ _ | | _ _ _ | _ 1 _ | 4 2 _ | +---------+---------+---------+ | _ _ 5 | _ 7 _ | 9 _ _ | | _ 1 _ | 8 4 _ | _ _ 7 | | 7 _ _ | _ _ 9 | 2 _ _ | +---------+---------+---------+ Here is the Sudoku choice array: +---------+---------+---------+ | 4 3 _ | _ 2 3 | 3 4 _ | | _ 3 2 | 4 _ _ | 1 _ 3 | | 6 5 _ | 3 _ 2 | _ 3 4 | +---------+---------+---------+ | 4 _ _ | 3 _ 4 | 4 5 3 | | 4 5 4 | _ 2 _ | 4 5 4 | | 3 5 3 | 3 _ 4 | _ _ 4 | +---------+---------+---------+ | 4 4 _ | 4 _ 4 | _ 4 4 | | 3 _ 4 | _ _ 3 | 3 2 _ | | _ 3 3 | 3 2 _ | _ 5 5 | +---------+---------+---------+ Here is the Sudoku puzzle: +---------+---------+---------+ | _ 3 2 | _ 6 9 | 1 7 4 | | 6 _ 1 | _ _ _ | _ 5 _ | | 7 _ 4 | 1 _ _ | _ 6 _ | +---------+---------+---------+ | 1 _ 9 | 6 5 7 | 4 3 _ | | _ _ 7 | 3 _ _ | 9 _ 6 | | 3 4 6 | 9 8 2 | 7 1 5 | +---------+---------+---------+ | _ 7 _ | _ _ 8 | 6 _ _ | | _ 6 _ | _ _ _ | _ _ _ | | 2 1 8 | 4 3 6 | 5 9 7 | +---------+---------+---------+ Here is the Sudoku choice array: +---------+---------+---------+ | 2 _ _ | 2 _ _ | _ _ _ | | _ 2 _ | 3 3 2 | 3 _ 4 | | _ 3 _ | _ 1 2 | 3 _ 4 | +---------+---------+---------+ | _ 2 _ | _ _ _ | _ _ 2 | | 2 3 _ | _ 2 2 | _ 2 _ | | _ _ _ | _ _ _ | _ _ _ | +---------+---------+---------+ | 3 _ 2 | 2 3 _ | _ 2 3 | | 3 _ 2 | 3 4 2 | 3 3 4 | | _ _ _ | _ _ _ | _ _ _ | +---------+---------+---------+ sudoku_test09(): sudoku_choice_print() prints choices in a Sudoku puzzle. Here is the Sudoku puzzle: +---------+---------+---------+ | _ _ 1 | 9 _ _ | _ _ 8 | | 6 _ _ | _ 8 5 | _ 3 _ | | _ _ 7 | _ 6 _ | 1 _ _ | +---------+---------+---------+ | _ 3 4 | _ 9 _ | _ _ _ | | _ _ _ | 5 _ 4 | _ _ _ | | _ _ _ | _ 1 _ | 4 2 _ | +---------+---------+---------+ | _ _ 5 | _ 7 _ | 9 _ _ | | _ 1 _ | 8 4 _ | _ _ 7 | | 7 _ _ | _ _ 9 | 2 _ _ | +---------+---------+---------+ Possibilities |--------------------------------------| |.23 .2. ... |... .23 .23 |... ... ... | |45. 45. ... |... ... ... |.56 456 ... | |... ... ... |... ... 7.. |7.. 7.. ... | | | |... .2. .2. |12. ... ... |... ... .2. | |... 4.. ... |4.. ... ... |... ... 4.. | |... ..9 ..9 |7.. ... ... |7.. ... ..9 | | | |.23 .2. ... |.23 ... .23 |... ... .2. | |45. 45. ... |4.. ... ... |... 45. 45. | |.89 .89 ... |... ... ... |... ..9 ..9 | | | |--------------------------------------| |12. ... ... |.2. ... .2. |... 1.. 1.. | |.5. ... ... |..6 ... ..6 |.56 .56 .56 | |.8. ... ... |7.. ... 78. |78. 78. ... | | | |12. .2. .2. |... .23 ... |..3 1.. 1.3 | |... ..6 ..6 |... ... ... |..6 ..6 ..6 | |.89 789 .89 |... ... ... |78. 789 ..9 | | | |... ... ... |..3 ... ..3 |... ... ..3 | |.5. .56 ..6 |..6 ... ..6 |... ... .56 | |.89 789 .89 |7.. ... 78. |... ... ..9 | | | |--------------------------------------| |.23 .2. ... |123 ... 123 |... 1.. 1.3 | |4.. 4.6 ... |..6 ... ..6 |... 4.6 4.6 | |.8. .8. ... |... ... ... |... .8. ... | | | |.23 ... .23 |... ... .23 |..3 ... ... | |... ... ..6 |... ... ..6 |.56 .56 ... | |..9 ... ..9 |... ... ... |... ... ... | | | |... ... ..3 |1.3 ..3 ... |... 1.. 1.3 | |... 4.6 ..6 |..6 .5. ... |... 456 456 | |... .8. .8. |... ... ... |... .8. ... | | | |--------------------------------------| Here is the Sudoku puzzle: +---------+---------+---------+ | _ 3 2 | _ 6 9 | 1 7 4 | | 6 _ 1 | _ _ _ | _ 5 _ | | 7 _ 4 | 1 _ _ | _ 6 _ | +---------+---------+---------+ | 1 _ 9 | 6 5 7 | 4 3 _ | | _ _ 7 | 3 _ _ | 9 _ 6 | | 3 4 6 | 9 8 2 | 7 1 5 | +---------+---------+---------+ | _ 7 _ | _ _ 8 | 6 _ _ | | _ 6 _ | _ _ _ | _ _ _ | | 2 1 8 | 4 3 6 | 5 9 7 | +---------+---------+---------+ Possibilities |--------------------------------------| |... ... ... |... ... ... |... ... ... | |.5. ... ... |.5. ... ... |... ... ... | |.8. ... ... |.8. ... ... |... ... ... | | | |... ... ... |.2. .2. ..3 |.23 ... .23 | |... ... ... |... 4.. 4.. |... ... ... | |... .89 ... |78. 7.. ... |.8. ... .89 | | | |... ... ... |... .2. ..3 |.23 ... .23 | |... .5. ... |... ... .5. |... ... ... | |... .89 ... |... ... ... |.8. ... .89 | | | |--------------------------------------| |... .2. ... |... ... ... |... ... .2. | |... ... ... |... ... ... |... ... ... | |... .8. ... |... ... ... |... ... .8. | | | |... .2. ... |... 1.. 1.. |... .2. ... | |.5. .5. ... |... 4.. 4.. |... ... ... | |.8. .8. ... |... ... ... |... .8. ... | | | |... ... ... |... ... ... |... ... ... | |... ... ... |... ... ... |... ... ... | |... ... ... |... ... ... |... ... ... | | | |--------------------------------------| |... ... ..3 |.2. 12. ... |... .2. 123 | |45. ... .5. |.5. ... ... |... 4.. ... | |..9 ... ... |... ..9 ... |... ... ... | | | |... ... ..3 |.2. 12. 1.. |.23 .2. 123 | |45. ... .5. |.5. ... .5. |... 4.. ... | |..9 ... ... |7.. 7.9 ... |.8. .8. .8. | | | |... ... ... |... ... ... |... ... ... | |... ... ... |... ... ... |... ... ... | |... ... ... |... ... ... |... ... ... | | | |--------------------------------------| sudoku_test10(): sudoku_check() checks that a Sudoku is legal; Errors have the form KIJ 0IJ means that A(I,J) is an illegal digit; 1IJ means A(I,J) repeats a value in row I; 2IJ means A(I,J) repeats a value in column J; 3IJ means A(I,J) repeats a value in its "box"; 0 means no violations were discovered; Here is the Sudoku to be checked: +---------+---------+---------+ | 3 4 1 | 9 2 7 | 5 6 8 | | 6 9 2 | 1 8 5 | 7 3 4 | | 8 5 7 | 4 6 3 | 1 9 2 | +---------+---------+---------+ | 1 3 4 | 2 9 6 | 8 7 5 | | 2 7 8 | 5 3 4 | 6 1 9 | | 5 6 9 | 7 1 8 | 4 2 3 | +---------+---------+---------+ | 4 2 5 | 3 7 1 | 9 8 6 | | 9 1 6 | 8 4 2 | 3 5 7 | | 7 8 3 | 6 5 9 | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 0: (Correctly filled in puzzle. CHECK = 0 is expected. Here is the Sudoku to be checked: +---------+---------+---------+ | _ _ 1 | 9 2 7 | 5 6 _ | | 6 9 2 | 1 8 5 | 7 3 4 | | _ 5 7 | 4 _ 3 | 1 _ 2 | +---------+---------+---------+ | _ _ _ | 2 9 6 | 8 7 5 | | 2 7 8 | 5 _ 4 | 6 _ _ | | 5 6 9 | 7 _ 8 | 4 2 3 | +---------+---------+---------+ | _ 2 5 | 3 7 _ | 9 8 6 | | _ 1 _ | _ 4 _ | 3 _ _ | | 7 _ 3 | 6 _ _ | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 0: (Partially filled in puzzle. CHECK = 0 is expected. Here is the Sudoku to be checked: +---------+---------+---------+ | _ _ 1 | 9 2 7 | 5 6 _ | | 6 9 2 | 1 8 5 | 7 3 4 | | _ 5 7 | 4 _ 3 | 1 11 2 | +---------+---------+---------+ | _ _ _ | 2 9 6 | 8 7 5 | | 2 7 8 | 5 _ 4 | 6 _ _ | | 5 6 9 | 7 _ 8 | 4 2 3 | +---------+---------+---------+ | _ 2 5 | 3 7 _ | 9 8 6 | | _ 1 _ | _ 4 _ | 3 _ _ | | 7 _ 3 | 6 _ _ | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 38: (Illegal 11 in A(3,8). CHECK = 38 is expected. Here is the Sudoku to be checked: +---------+---------+---------+ | _ _ 1 | 9 2 7 | 5 6 _ | | 6 _ 2 | 1 8 5 | 7 3 4 | | _ 5 7 | 4 _ 3 | 1 _ 2 | +---------+---------+---------+ | _ 9 _ | 2 9 6 | 8 7 5 | | 2 7 8 | 5 _ 4 | 6 _ _ | | 5 6 9 | 7 _ 8 | 4 2 3 | +---------+---------+---------+ | _ 2 5 | 3 7 _ | 9 8 6 | | _ 1 _ | _ 4 _ | 3 _ _ | | 7 _ 3 | 6 _ _ | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 145: (Repeated 9 in row 4, col 5. CHECK = 145 is expected. Here is the Sudoku to be checked: +---------+---------+---------+ | _ _ 1 | 9 2 7 | 5 6 _ | | 6 9 2 | 1 8 5 | 7 3 4 | | _ 5 7 | 4 _ 3 | 1 _ 2 | +---------+---------+---------+ | _ _ _ | 2 9 6 | 8 7 3 | | 2 7 8 | 5 _ 4 | 6 _ _ | | 5 6 9 | 7 _ 8 | 4 2 3 | +---------+---------+---------+ | _ 2 5 | 3 7 _ | 9 8 6 | | _ 1 _ | _ 4 _ | 3 _ _ | | 7 _ 3 | 6 _ _ | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 269: (Repeated 3 in row 6, column 9. CHECK = 269 is expected. Here is the Sudoku to be checked: +---------+---------+---------+ | _ _ 1 | 9 2 7 | 5 6 _ | | 6 9 2 | 1 8 5 | 7 3 4 | | _ _ 7 | 4 _ 3 | 1 _ 2 | +---------+---------+---------+ | _ _ _ | 2 9 6 | 8 7 5 | | 2 7 8 | 5 _ 4 | 6 _ _ | | 5 6 9 | 7 _ 8 | 4 2 3 | +---------+---------+---------+ | _ 2 5 | 3 7 _ | 9 8 6 | | _ 5 _ | _ 4 _ | 3 _ _ | | 7 _ 3 | 6 _ _ | 2 4 1 | +---------+---------+---------+ SUDOKU_CHECK = 382: (Repeated 5 at A(8,2) in box (3,1). CHECK = 382 is expected. sudoku_test(): Normal end of execution. 25-Sep-2024 21:49:39