14

I was playing a casual game of Sudoku today when a friend came by and asked "What's the hardest game of Sudoku possible?"

My response: "A Sudoku puzzle with the minimal amount of starting numbers where the puzzle is still solvable."

However, I am not happy with this because I want to know the actual minimum to the amount of starting squares I can have. Of course, position matters as well, so I will assume you can place the numbers wherever for optimization.

The closest I can do is look at individual situations to see if they are solvable. But even when I do that, I don't know if there is a setup with even less starting numbers?

Q1: What is the least amount of starting numbers required for a game of Sudoku to be solvable?

Q2: How would you define the "hardest" game of Sudoku?

  • 7
    It's actually known that the least amount of starting numbers is 17, I'm not sure however, how one would define hard, it could be such a sudoku that is solvable only if one uses one particular method. And that has to be one hard method.. – windircurse May 31 '16 at 20:13
  • @windircurse Hm, how would you prove something like that? – Simply Beautiful Art May 31 '16 at 20:16
  • 9
    It has been proved, massive computations involved, that 17 squares are required to force there to be only one solution. Such puzzles are usually not very difficult, however. Difficult is entirely relative to the collection of methods an individual person has learned. Meanwhile, every puzzle can be solved by computer "backtracking" – Will Jagy May 31 '16 at 20:16
  • I'm not happy with your response because there's no good way of defining the concept of the partial order "harder". Plus, minimal starting numbers might not trivially imply that the filling out of the squares doesn't come out easily, e.g., you might have a minimal puzzle with a lot of squares with very few possibilities. – Git Gud May 31 '16 at 20:17
  • After reading these comments, I've edited the question to include what the "hardest game of Sudoku" could be. – Simply Beautiful Art May 31 '16 at 20:25
  • 1
    I should take back what I said partially, what I'm not happy with is the question itself. It only makes sense if one can formalize "harder" here. If one does it, maybe it's even trivial to answer. Without defining it, the question is merely a senseless string of words. – Git Gud May 31 '16 at 20:28
  • @GitGud But what would make a game of Sudoku "hard"? Looking at what Will Jagy has said, "hard" is probably based off the methods required to solve the puzzle, and that doesn't seem to make a great definition of "hard", formally. Maybe the question is just too broad to answer. Thanks for the input anyways. – Simply Beautiful Art May 31 '16 at 20:32
  • 2
    I should emphasize that people have invented many, many strategies for solving, the more responsible authors trying to stick to something a human being might do. In all cases, no collection of human-reasonable strategies can solve all puzzles. As I said, backtracking can solve all of them, and an article appeared in the Notices that adapted backtracking for humans using colored pencils. For me, not much fun, though. – Will Jagy May 31 '16 at 20:41
  • 1
    @SimpleArt "Hard" and "hardest/harder" are two very different concepts. The former is an adjective. There's little hope of anyone ever being able to give a mathematical definition that properly encompasses it. The latter is (or rather hopes to be) a partial order and even though it is not as hard to formalize as "hard", its formalization still looks bleak. In your question you asked about "hardest". "Hardest" is the maximum of the partial order to be "harder" and it has nothing to do with the adjective "hard". – Git Gud May 31 '16 at 22:06
  • 1
    my definition of hard is that using the common heuristics used for speeding the backtracking will fail : the first heuristic is to list what are the possible values in each cell, and choose the most constrained one, i.e. the one with the least number of possible values, and try one. the other common heuristic, one step further, is to choose instead the most constraining variable first : this is heuristically a good idea since when trying a value for a highly constraining variable, if the value is un-correct we should be able to detect it very soon... @SimpleArt – reuns May 31 '16 at 22:59
  • 1
    then you should take a look at Sudoku as a Constraint Problem which is about the very general wiki/Constraint_programming itself a specialized (and higher-level) subset of SAT. With those you can solve any puzzles with only one solver, but this solver will have to perform backtracking (try a value and see it if works, recursively) and this will have an exponential complexity ( see https://en.wikipedia.org/wiki/P_versus_NP_problem) – reuns May 31 '16 at 23:11
  • I'm not fully conversant with the exact definitions, but some die-hard solvers measure the difficulty of a given puzzle (or, more precisely, a given proof of uniqueness of the solution of a given puzzle) in terms of how long chains they need to study to be able to make deductions (such as eliminating a certain number as a possibility from a certain cell). The links on those chains are "atomic" propositions about the truth of the appearance of a given number (or a given group of numbers) in a given cell (or a given group of cells). – Jyrki Lahtonen Jun 09 '16 at 20:44
  • (cont'd) The overall difficulty figure of a solution is then a weighted sum of the lengths of those chains with longer chains having higher weights. Undoubtedly that's not the only way to measure the difficulty of a sudoku puzzle. – Jyrki Lahtonen Jun 09 '16 at 20:45
  • Puzzle fans use Sudoku Explainer or other similar tools to define Sudoku difficulty. These tools solve Sudokus by logical arguments which humans use, not backtracking. – guest Feb 15 '17 at 02:26

3 Answers3

4

What about this paper : arXiv:1208.0370v1 ?

The authors Maria Ercsey-Ravasz and Zoltan Toroczkai made a study on how to classify sudoku problems relatively to a Richter-type scale. They express the problem in term of the time used by a k-SAT deterministic continuous time solver to solve the problem.

To enter a bit into detail, in fact they show that such problems (k-SAT) solving time grow exponentially with the number of variables and that the dynamic of the solver evolves to a chaotic system if the logical clause cannot be statified.

Since sudoku have always a solution, the solver escape chaos at some point and converges to a solution. This is precisely this escape-rate from chaotic state which is used as a measure of the difficulty of the puzzle.

According to their measure, the subjectively difficult puzzles known so far [there is a list of some in the bibliography of this paper] are actually receiving a high score from this measure, so making them also objectively difficult in some sense.

The scale range from $0$ to $4$, with $[0,1]$ being the easy sudokus, $[1,2]$ medium ones, $[2,3]$ hard ones and finally above $3$ the top hard problems. The high score presented in the paper is around $3.6$.

zwim
  • 29,833
3

There is at least one very good article introducing a technique, ARTICLE by David Eppstein, pdf free. One of the, well, professional features is Section 3.6 on pdf page 16, called "Experimental Results," including

We conclude that these nonlocal rules significantly reduced the number of unsolvable puzzles

The book from 2005 that told me about the article has been re-issued as BOOK

Will Jagy
  • 146,052
2

One potential way to define "hard" would be in terms of how long it takes a particular Sudoku-solving algorithm takes to solve the puzzle. If we wanted to make it less method dependent, we could use an average over all Sudoku algorithms which meet certain criteria {e.g. all algorithms with optimal average-case time complexity}