Sudoku is a puzzle that requires filling a 3x3 grid of 3x3 sub-grids in a way that each column, row and sub-grid contains every digit from 1 to 9.
Questions tagged [sudoku]
19 questions
22
votes
2 answers
If I can solve Sudoku, can I solve the Travelling Salesman Problem (TSP)? If so, how?
Let us say there is a program such that if you give a partially filled Sudoku of any size it gives you corresponding completed Sudoku.
Can you treat this program as a black box and use this to solve TSP? I mean is there a way to represent TSP…
user101371
17
votes
4 answers
Efficient encoding of sudoku puzzles
Specifying any arbitrary 9x9 grid requires giving the position and value of each square. A naïve encoding for this might give 81 (x, y, value) triplets, requiring 4 bits for each x, y, and value (1-9 = 9 values = 4 bits) for a total of 81x4x3 = 972…
Kevin
- 1,082
- 10
- 22
14
votes
2 answers
Random Sudoku generator
I want to generate a completely random Sudoku.
Define a Sudoku grid as a $9\times9$ grid of integers between $1$ and $9$ where some elements can be omitted. A grid is a valid puzzle if there is a unique way to complete it to match the Sudoku…
Justin
- 273
- 2
- 4
14
votes
3 answers
How much complexity difference can there be between finding a solution to a Sudoku puzzle and PROVING that the solution is the unique solution?
So usually Sudoku is $9 \times 9$, but this question extends to $n^2 \times n^2$ puzzles with $n > 3$ as well. There are many polynomial time deduction rules that can make progress in finding a solution to a Sudoku puzzle. But then sometimes…
user2566092
- 1,741
- 10
- 18
12
votes
3 answers
Minimum number of clues to fully specify any sudoku?
We know from this paper that there does not exist a puzzle that can be solved starting with 16 or fewer clues, but it implies that there does exist a puzzle that can be solved from 17 clues. Can all valid sudoku puzzles be specified in 17 clues? If…
Kevin
- 1,082
- 10
- 22
7
votes
2 answers
Are there ways to automatically (no human testing) measure a $9 \times 9$ Sudoku puzzle's average hardness for a human to solve?
So most resources providing Sudoku puzzles assign a difficulty category to each puzzle, even some I've seen with 15 or more difficulty categories. But what is a good way to assign these difficulty categories? If enough human puzzle solvers were…
user2566092
- 1,741
- 10
- 18
6
votes
1 answer
Minimum number of givens for General Sudoku of size $n^2 \times n^2$
Here, it is well known that the minimal number of givens for a size $9 \times 9$ board of Sudoku requires 17 "givens" in order to be solved (i.e., no puzzle can be solved with $\le 16$ givens).
What is the minimal number of givens for a size $n^2…
Ryan Dougherty
- 1,033
- 8
- 19
2
votes
2 answers
Is any sudoku solver an SAT solver?
I have recently created a sudoku solver using C#, which outputs the solution to a sudoku after a reasonable amount of time in many cases. I have used the basic sudoku SAT-reduction (i.e. x111 meaning this is true if column 1, row 1 is filled by 1).…
Schmetterling
- 113
- 3
2
votes
0 answers
How to color sudoku with this added constraint?
I couldn't figure out an algorithm for following graph coloring problem:
Output color of each vertex for this graph:
Given a solved 9*9 sudoku board that is a 9-colored board, applied first three rules below( a 4*4 one is in the picture as…
FazeL
- 149
- 5
2
votes
0 answers
Least constraining value heuristic in Sudoku
I was trying to implement Least Constraining Value Heuristic in Sudoku but wasn't getting the idea on how to do it. Can someone share their idea for the same ?
math_coder
- 21
- 1
2
votes
1 answer
Will this algorithm always solve a constrained sudoku puzzle in quadratic time?
Constrained Puzzle Generation:
Let us say a sudoku puzzle is generated with the following procedure:
Gather a sequence input of 9 unique numbers in the range $[1 .. 9]$. Call it $S$.
Map $S$ to a $3 \times 3$ grid $G$ as follows:
$$G_{i,j} =…
The T
- 321
- 2
- 11
1
vote
2 answers
What algorithm paradigm is a recursive solver of Sudoku?
I am interested in knowing what algorithmic paradigm are the usual recursive sudoku solvers. Can I consider it a local search? or are they Dynamic programming, greedy, divide and conquer, backtracking?
AspiringMat
- 623
- 5
- 19
1
vote
0 answers
Worst-case recursion depth for guessing numbers in a Sudoku puzzle when certain polynomial-time deduction rules are used
So for an arbitrary $n^2 \times n^2$ Sudoku puzzle, there are rules for inferring values and auxillary information in cells that run in polynomial time, e.g. using the filled in values to check to see if only one number is possible for a cell, using…
user2566092
- 1,741
- 10
- 18
1
vote
1 answer
Sudoku Puzzles in O log n time although inefficient
Suppose, I got a hypothetical fixed list of all possible general Sudoku puzzles. I then create the pseudo-code to demonstrate the algorithm.
The algorithm does a search to compare the indexes of elements
in the puzzle that are not listed as…
The T
- 321
- 2
- 11
0
votes
1 answer
How can I complete my derivation of an algorithm to solve Sudoku puzzles from my formalisation of the rules?
I'm hoping to design and implement an intuitive algorithm that solves 9x9 Sudoku puzzles. I want to do this by first formalising the basic rules of the puzzle, and then deriving principles from these that when followed should be sufficient for…
Daniel Philpott
- 35
- 4