Sudoku (digit-single) (originally called Number Place) is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids that compose the grid (also called "boxes", "blocks", or "regions") contain all of the digits from 1 to 9. The puzzle setter provides a partially completed grid, which for a well-posed puzzle has a single solution.
Completed games are always a type of Latin square with an additional constraint on the contents of individual regions. For example, the same single integer may not appear twice in the same row, column, or any of the nine 3×3 subregions of the 9×9 playing board.
A completed Sudoku grid is a special type of Latin square with the additional property of no repeated values in any of the nine blocks (or boxes of 3×3 cells). The relationship between the two theories is known, after it was proven that a first-order formula that does not mention blocks is valid for Sudoku if and only if it is valid for Latin squares.
The general problem of solving Sudoku puzzles on n2×n2 grids of n×n blocks is known to be NP-complete. Many computer algorithms, such as backtracking and dancing links can solve most 9×9 puzzles efficiently, but combinatorial explosion occurs as n increases, creating limits to the properties of Sudokus that can be constructed, analyzed, and solved as n increases. A Sudoku puzzle can be expressed as a graph coloring problem. The aim is to construct a 9-coloring of a particular graph, given a partial 9-coloring.
数独(数字单)(最初称为数字位置)是基于逻辑的组合数字放置难题。目标是用数字填充9×9网格,以便组成网格的每个列,每行和九个3×3子网格中的每一个(也称为“框”,“块”或“区域”)包含从1到9的所有数字。拼图设定器提供了一个部分完成的网格,对于一个完美的拼图有一个单一的解决方案。
完成的游戏总是一种拉丁方,对个别区域的内容有额外的限制。例如,相同的单个整数可能不会在9×9播放板的同一行,列或九个3×3子区域中的任何一个中出现两次。
完成的数独网格是一种特殊类型的拉丁方,在九个块(或3×3个单元格的框)中的任何一个中都没有重复值的附加属性。两种理论之间的关系是已知的,在证明了一个没有提到块的一阶公式对于Sudoku是有效的,当且仅当它对拉丁方格有效时。
已知在n×n块的n2×n2个网格上解决数独谜题的一般问题是NP完全的。许多计算机算法,例如回溯和跳舞链接可以有效地解决大多数9×9谜题,但是随着n的增加,组合爆炸发生,对Sudokus的属性产生限制,可以在n增加时构建,分析和解决。数独谜题可以表示为图形着色问题。目的是在给定部分9色的情况下构建特定图的9色。