Sudoku is a long history, but also a particularly popular mathematical intelligence game, it not only has a strong interest, but also exercise our logical thinking ability, I in the "Strongest Brain" program also saw this project. Sudoku Game "Chessboard" is composed of 9,981 small squares, players require:
Players in each square, fill in 1 to 9 of any number, so that the entire chessboard of each column, each row, and each 3*3 of the small matrix in the number does not repeat.
Solution One: Randomly generate a complete legal solution, and then remove some of the numbers in the grid. The fewer numbers we delete, the simpler the game is, and the more difficult it is.
Solution two: From a 3*3 small matrix extended to the 9*9 of the large matrix, the expansion process is as follows:
(1) Initialization of a 3*3 feasible solution, as follows:
(2) A 3*3 small matrix is placed in the middle position (B5) extended to a large matrix of 9*9, the following expansion steps:
(3) The B5 is expanded by line as follows:
(4) B5 is expanded as follows by column:
(5) B4 extended B1 and B7,b6 extensions B3 and B9, the results are as follows:
Summary: How many feasible solutions. This is a question!