Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

SudokuHints

Guides

  • Sudoku Hints

Symbols

  • BackTracking
  • CellSize
  • ColoredCells
  • CommonCellColor
  • Disks
  • DoubleCandidates
  • EditSudoku
  • EnterClues
  • EnterSudoku
  • ExportSudoku
  • ExtraBlockCellColor
  • ExtraBlocks
  • HiddenPairs
  • HiddenQuadruples
  • HiddenSingles
  • HiddenTriples
  • Hints
  • IncludeCandidates
  • LockedCandidates
  • MaxSolutions
  • MaxSteps
  • MonitorSteps
  • Pairs
  • ReduceSudoku
  • SetDisplay
  • ShowCandidates
  • ShowInfo
  • Singles
  • SolveSudoku
  • SudokuFromString
  • Sudoku
  • SudokuToString
  • ThreeGroups
  • Triples
  • YWing
  • $AllRules
  • $Sudoku
Sudoku Hints
The paclet SudokuHints is a tool for getting hints about solving a sudoku manually. It can be used for all sorts of single and multi sudoku's of blocksize 9. Entering these sudoku's is straightforward.
Functions
Entering and storing sudoku`s
Sudoku
— represents a sudoku
SetDisplay
— sets the display options of a sudoku
EnterSudoku
— a tool for entering a sudoku
EditSudoku
— a tool for editing the clues of a sudoku
SudokuFromString
— reads the string representation of a sudoku
SudokuToString
— returns a string representation of a sudoku
ExportSudoku
— a tool for exporting a sudoku to a file.
Logical rules
$AllRules
HiddenSingles
Singles
LockedCandidates
DoubleCandidates
HiddenPairs
Pairs
HiddenTriples
Triples
HiddenQuadruples
ThreeGroups
YWing
Solving a sudoku
Hints
— a tool for getting hints for manually solving a sudoku
ReduceSudoku
— logically reduces a sudoku as much as possible with a given list of rules
SolveSudoku
— tries to solve a sudoku
Background
A standard sudoku puzzle is normally presented as a picture, like so:
The goal of the puzzle is to place in each open cell one of the numbers 1, …, 9 such that in each of the nine rows, in each of the nine columns and in each of the nine 3x3 blocks all numbers 1, …, 9 turn up.
The nine blocks are not necessarily 3x3-squares. This is a so called jigsaw sudoku:
Besides the nine regular blocks, we may have extra blocks. This is a diagonal sudoku:
It requires that not only in the nine rows, columns and regular blocks, but also in the two extra blocks, the diagonals, all numbers 1, …, 9 will appear.
Sudoku's can be combined to multi sudoku's. The following example is a twin. It consists of two standard sudoku's, that have three columns in common.
Not rarely we see the X-sudoku, consisting of 5 standard sudoku's in the form of an X, overlapping each other in one of the blocks.
Many other variants exist.
Each picture that we see above consists of cells. In some of the cells, the value is already given. That are the clues of the sudoku. The rows, columns, regular blocks and extra blocks are just groups of nine cells. Every sudoku problem amounts to the following:
Given is a set of cells and a set of groups of nine cells, covering the set. Assign to each of the cells one of the numbers 1, …, 9 such that in all groups the numbers will 1, …, 9 appear.
The advantage of this abstract formulation is that there is no difference at all between the various sudoku's. The standard sudoku and the jigsaw sudoku have a set of 81 cells and 27 groups. When we have a diagonal sudoku, the number of groups is 29. The twin sudoku consists of 135 cells and 48 groups. All functions in this paclet will work for all sorts of sudoku's.
A sudoku problem may have no solution at all, a unique solution of many solutions. Normally, the sudoku's presented in a picture are such that when we start with the given clues, by logical deduction we can find the values of the other cells, thereby arriving at the unique solution. These logical arguments have nothing to do with the picture of the sudoku; they are always formulated in terms of groups.
Though we will restrict ourselves to sudoku examples given by pictures, a lot of sudoku problems exist that do not origin from a picture with rows, columns and blocks. The simplest example is of course a set of nine cells and one group, the set of cells itself. All solutions are permutations of the numbers 1, …, 9, and we need 8 clues when we want that the problem has a unique solution.
Finally: often we will use the terminology that two cells see each other. This too has nothing to do with a picture. It just means that a group exists that contains both cells.
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com