Function Repository Resource:

# GenerateKillerSudokuPuzzle

Generate a killer sudoku puzzle

Contributed by: Paritosh Mokhasi
 ResourceFunction["GenerateKillerSudokuPuzzle"][] generates a 9×9 killer sudoku puzzle and provides the regular sudoku puzzle used to generate it.

## Details and Options

The first element returned by the function is the reference sudoku puzzle.
The second element returned by the function is a two element List {pos,vals}:
The first element is a list of lists containing the matrix positions of the cage.
The second element is a list of positive integers and represents the sum of all the numbers in that cage.
The objective is to use the cage information to find all the elements of the board such that the final solved puzzle must obey the three rules of a standard sudoku board.
The three rules of a standard sudoku board are:
First, each row must contain all the numbers 1–9.
Second, each column must contain all the numbers 1–9.
Third, each 3×3 block must contain all the numbers 1–9.

## Examples

### Basic Examples (4)

Generate a killer sudoku puzzle:

 In[1]:=
 Out[2]=

Display the killer sudoku puzzle with the resource function DisplayKillerSudokuPuzzle:

 In[3]:=
 Out[3]=

Solve the killer sudoku puzzle:

 In[4]:=
 Out[4]=

Display the solved sudoku puzzle using the resource function DisplaySudokuPuzzle:

 In[5]:=
 Out[5]=

Paritosh Mokhasi

## Version History

• 1.0.0 – 20 May 2020