Slashdot Mirror


The Chaos Within Sudoku - a Richter Scale of Difficulty

mikejuk writes "A pair of computer scientists from the Babes-Bolyai University (Romania) and the University of Notre Dame (USA) have made some remarkable connections between Sudoku, the classic k-SAT problem, and the even more classic non-linear continuous dynamics. But before we go into the detail let's look at what this means for Sudoku enthusiasts. Maria Ercsey-Ravasz and Zoltan Toroczkai have devised a scale that provides an accurate determination of a Sudoku puzzle's hardness. So when you encounter a puzzle labelled hard and you find it easy, all you need to do is to compute a co-efficient that measures the hardness of the problem. An easy puzzle should fall in the range 0-1, medium ones in 1-2, hard ones in 2-3, and for ultra-hard puzzles, 3+, with the hardest puzzle, the notorious Platinum Blond, being top of the scale at 3.6. We will have to wait to see if newspapers and websites start to use this measure of difficulty. The difficulty is measured by the time it takes the classical dynamics corresponding to the problem to settle in the ground state and this depends on the degree of chaos in the search for a solution (PDF)."

74 comments

  1. Infinite Hardness ? by mbone · · Score: 1, Interesting

    Is there any proof that the classical dynamics corresponding to any given problem will settle in the ground state in a finite time? Or, in other words, could there be Sudoku puzzles with infinite hardness ?

    1. Re:Infinite Hardness ? by gl4ss · · Score: 0

      Is there any proof that the classical dynamics corresponding to any given problem will settle in the ground state in a finite time? Or, in other words, could there be Sudoku puzzles with infinite hardness ?

      sure, make the starting setup impossible to finish. pretty easy to argue though that in a case like that proving that it can't be finished would be the solution, as the sudoku board is certainly finite in size and possible markings on it, it most certainly isn't infinite. it's just a fucking sudoku you know.

      --
      world was created 5 seconds before this post as it is.
    2. Re:Infinite Hardness ? by dmomo · · Score: 2

      It's possible to design a Soduku that is ambiguous; meaning, there is more that one acceptible answer. I image that such a puzzle could be considered "infinitely hard". But, could such a puzzle be considered a Soduku? Does the definition of a Soduku require that it only have one answer?

    3. Re:Infinite Hardness ? by Frans+Faase · · Score: 1

      It is easy to define a Soduku with more than one solution. Just take a Soduko and remove some hints. Great chance it will now have multiple solutions.

    4. Re:Infinite Hardness ? by Anonymous Coward · · Score: 0

      Yep. Pick any size grid. No starting numbers. Go!

    5. Re:Infinite Hardness ? by russotto · · Score: 0

      It has been shown in studies that people who bandy about profanity for no reason or reasons of base humor - are not taken seriously at work and rarely progress.

      Unless you're in management, you're by definition at the bottom of the hierarchy, whether you're a Help Desk monkey or a Principal Engineer. I have no desire to be in management. Therefore, fuck you.

    6. Re:Infinite Hardness ? by Anonymous Coward · · Score: 0

      It's possible to design a Soduku that is ambiguous; meaning, there is more that one acceptible answer. I image that such a puzzle could be considered "infinitely hard". But, could such a puzzle be considered a Soduku? Does the definition of a Soduku require that it only have one answer?

      a true Sudoku has only 1 solution

    7. Re:Infinite Hardness ? by AK+Marc · · Score: 2

      I think that mathematical labels on human issues are usually false. There should be an analysis on the techniques used by novice solvers, then rate whether the puzzle is solvable with only those techniques, and the number of iterations necessary (for the 0-3 range), then, for the 4-7 range, look at the intermediate solvers. Then, for the 8-10 hardness, the techniques talked about here may be appropriate, as some are solvable only through trial and error.

    8. Re:Infinite Hardness ? by HornWumpus · · Score: 4, Funny

      I started a new job. In the first week I heard the CEO tell the VP to 'go fuck himself' in the hall. I knew I was home.

      Perhaps you just work with pussies.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    9. Re:Infinite Hardness ? by gl4ss · · Score: 1

      a sudoku with multiple answers wouldn't qualify as being infinitely hard, it would qualify as easier.

      if the rules were such that you had to end up with specific solution or all the possible solutions, then it would be a bit harder, but in the specific solution required it would be just a trick question.

      --
      world was created 5 seconds before this post as it is.
    10. Re:Infinite Hardness ? by gl4ss · · Score: 1

      It has been shown in studies that people who bandy about profanity for no reason or reasons of base humor - are not taken seriously at work and rarely progress. In your case, I suspect you are a 45 year old first-tier Help Desk monkey.

      how the hell would someone who keeps spouting profanities manage to keep a helpdesk job?
      stupid answer for a stupid question, if a problem has possible solutions it can't be infinitely hard to solve, furthermore sudokus are stupid.

      --
      world was created 5 seconds before this post as it is.
    11. Re:Infinite Hardness ? by Galaga88 · · Score: 1

      Congratulations on your job with Microsoft.

    12. Re:Infinite Hardness ? by Anonymous Coward · · Score: 0

      That's not infinitely hard. A blank sudoku is a trivially easy puzzle. It is also one with multiple answers.

    13. Re:Infinite Hardness ? by Anonymous Coward · · Score: 0

      Watch out for chairs.

  2. Huh? by Pieroxy · · Score: 4, Informative

    We will have to wait to see if newspapers and websites start to use this measure of difficulty

    Why would they? What's the incentive for grandma to see the Sudoku as '1.1' instead of 'Hard' ?

    1. Re:Huh? by 1u3hr · · Score: 1

      Especially since the "measure" is an invisible "eta". See TFA to discover the Greek letters and mathematical symbols that these idiots lost when they pasted it into Slashdot.

    2. Re:Huh? by Anonymous Coward · · Score: 0

      forget about eta. The reason is bad parsing of < and > signs as HTML tag delimiters. I was confused as to why 0-3 is easy but hardest is 3.6.

    3. Re:Huh? by ThatsMyNick · · Score: 3, Insightful

      No, but Grandma will be disappointed if an easy puzzle is marked as hard. If I ran a newspaper, I would run this score, and define scores 0-1.5 Easy 1.5-2.5 Medium and 2.5+ Hard. This was grandma is not confused, neither is she disappointed by the hardness level.

    4. Re:Huh? by LordLimecat · · Score: 1

      Multiply the number by 30 and we're in business. 0-45= easy, 45-75=medium, 75+=hard. The aforementioned "Platinum Blond" would be a 108, but whatever.

  3. All you need to to is compute its , by Anonymous Coward · · Score: 2, Funny

    Compute its comma? I think the editors accidentally a word.

    1. Re:All you need to to is compute its , by bistromath007 · · Score: 1

      Blah, cancelling misspent moderation.

  4. Tip for editors; by 91degrees · · Score: 1

    Edit submission before posting.

    When you paste >'s and <'s into a submission they'll be treated as HTML tags

    1. Re:Tip for editors; by mikejuk · · Score: 1

      My fault - there is a missing greek (I always think that should be geek) letter before the comma and I didn't see that the gt lt signs had been removed.

    2. Re:Tip for editors; by Megane · · Score: 1

      If you had seen it in firehose, you would know that this is as-is from the submitter. Slashdot editors rarely edit.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    3. Re:Tip for editors; by Anonymous Coward · · Score: 0

      You're forgiven though. You;re just a civilian:) The slashdot editors are meant to do this stuff professionally.

  5. Who cares? by JMJimmy · · Score: 0

    Sudokus are all the same difficulty: easy. Simple pairing method can solve almost any sudoku so long as you stick to pairing. The only difficulty comes when it's a multiple solution sudoku in which case it just depends on the first number you start working with.

    1. Re:Who cares? by Anonymous Coward · · Score: 1

      Sudokus are all the same difficulty: easy. Simple pairing method can solve almost any sudoku so long as you stick to pairing. The only difficulty comes when it's a multiple solution sudoku in which case it just depends on the first number you start working with.

      Sudoku puzzles should have one unique solution else they are in error.

    2. Re:Who cares? by Anonymous Coward · · Score: 0

      Strictly speaking, yes. But in terms of the amount of effort required, they can vary. And that's what the scale is based on. e.g. you can find at least one square with one possibility. and as you start filling, others follow the suit. Then for the next level, you have cases where square 1 can have {x,y} and square 7 can have {x,y}. In that case you can't determine either's value but you can eliminate those values from other squares in the row. This allows you to proceed a little further and you can revisit sqaures 1 & 7 later.

    3. Re:Who cares? by Yobgod+Ababua · · Score: 2

      It gets much, MUCH more complicated than that.

      In the "most" difficult puzzles you can actually reach a point where you cannot gain any additional useful information by logic (even triples exclusion, X-wing exclusion and other less obvious to the naked eye things) and are forced to guess on a square, test the validity of that guess, then potentially rewind and guess again. Computers can actually solve any valid sudoku purely by this method, but it's not as fun as teasing out the logic (if it exists).

    4. Re:Who cares? by Anonymous Coward · · Score: 0

      A sudoku with more than one solution is broken. Solving a sudoku with only one method is boring. What's the point? Aren't you curious to find out new rules?

    5. Re:Who cares? by Anonymous Coward · · Score: 1

      you can find at least one square with one possibility

      If that were the case, all Sudokus would be easy: Find that square, fill it in. You get a new Sudoku. By your assertion this new Sudoku also has one square with an unique solution, etc.

    6. Re:Who cares? by JMJimmy · · Score: 1

      Computer Science 101 - build a simple brute force sudoku solver which solves for every variant. See how false that statement is.

    7. Re:Who cares? by JMJimmy · · Score: 1

      While "pairing" maybe an over simplified way of describing it, the method I use requires that I only "place" possible numbers if they fit in 2 boxes. If they fit in 3 the possibilities are ignored. The reasons for this are as follows:

      - Eliminating 1 of the 2 possibilities immediately gets a result
      - Often (not always) provides straight lines which can be used to eliminate other possibilities
      - When a straight line isn't available, one can "assume" the position of a number, tease out the logic, if it doesn't work out you know it's not a possibility and the other location is.
      - once you have any 2 possibilities in both boxes of a possible number set you can immediately eliminate all other numbers as possibilities.

  6. Chaos... what? by zippthorne · · Score: 4, Insightful

    Sudoku puzzles are like solving simultaneous equations, sometimes it's really easy to fill in a cell - it's the last empty one in a row, for instance. One equation. Sometimes you need to keep track of many cells and their effects to solve them all at once.

    The difficulty of a sudoku depends on how many cells have to be solved at once in the most difficult set in the puzzle. There could also be a number of difficult sets that individually are moderately difficult, but taken as a whole require some endurance. Those are probably more satisfying to solve than a puzzle with a huge set, but they're not more difficult.

    If I needed a hardness rating, that's what I'd pick - the the number of cells in the largest group that must be solved together. This chaos method offers no fidelity. 0-3 is easy and the hardest puzzle they found to study is 3.6, wth?

    --
    Can you be Even More Awesome?!
    1. Re:Chaos... what? by Anonymous Coward · · Score: 0

      RTFA. /. editors are lazy. This is an example of HTML tag parsing gone bad and no one bothering to fix it.

      To save you some pain: 0-1 is easy, 1-2 is medium, 2-3 is hard and 3.6 is hardest possible.

    2. Re:Chaos... what? by Anonymous Coward · · Score: 1

      The Richter scale is a log scale, 4 (10,000) is 10 time more than 3 (1000). In decimal there is thus a rather large difference between 3 and 3.6 on a log scale.....

    3. Re:Chaos... what? by finity · · Score: 1

      There are a lot of ways to look at hard, somewhat generic problems, like Sudoku. Have you seen the SAT problem? http://en.m.wikipedia.org/wiki/Boolean_satisfiability_problem One way to consider it is like you describe - a set of simultaneous equations. Another way to consider it is to use the equations and some rules to draw a graph, then perform graph operations. NP problems are an active area of academic interest. It's generally not possible to know how hard these problems are before solving them, so if this technique can be more general than just Sudoku, that could be important.

    4. Re:Chaos... what? by freality · · Score: 1

      So, I think the solution process for an arbitrary system of simultaneous equations actually has a *propensity* to lead to deterministic chaos. I was just looking for a paper discussing this, but came up short; but for the background see:

          http://en.wikipedia.org/wiki/Iterated_function_system

      Note, the way I'm interpreting this is that *solving* the system leads to iteration of candidate systems in your head, therefore there's an (hypothetical) expected chaotic dynamic. (haven't rtfa yet.. :)

      Is there something about the way sudoku systems are chosen, e.g. they're too simple, that excludes this?

  7. Ignorance is bliss by Anonymous Coward · · Score: 0

    Clearly didn't read the paper. There's a huge category of "almost" that most people don't find fun.

  8. Algorithms by Dan+East · · Score: 1

    The difficulty lies in the algorithms required to solve the puzzle. Difficult puzzles have "choke points" that you cannot go past (not counting guessing) unless you can identify a pattern that fits an algorithm. That is hard for two reasons. One, you have to know the algorithms, and the advanced ones are not intuitive (like X-Wing, Swordfish, etc). Second, you have to spend a lot of time staring at numbers trying to recognize a pattern that you can use the algorithm on.

    So when it comes to "hard" puzzles, the difficulty depends on which specific algorithms must be used to solve the puzzle, and other less obvious factors, such as how difficult it is to identify the pattern. For example, if you must use an advanced algorithm early on, before many numbers have been solved, then there are more penciled in numbers to analyze, thus the puzzle is more difficult and will take longer to solve.

    --
    Better known as 318230.
    1. Re:Algorithms by russotto · · Score: 1

      Or you could just use a brute-force solver. It only takes 2^54 tries, max, to solve any given puzzle.

    2. Re:Algorithms by dalias · · Score: 1

      Only?

    3. Re:Algorithms by Frans+Faase · · Score: 2

      Sudoku's are really simple for computers. Simply map them to an Exact Cover and then solve the Exact Cover by reduction. Never takes more than a few seconds, even for the most hard ones. This is because Sudoku's have one solution and I have never come across a Sudoku that has one solution and cannot be solved by simple logic reasoning. There do exist Exact Covers that have one solution, but require guessing. But even if some Sudoku would require some guessing, it still cannot be a complex problem, and a back-tracking algorithm would solve it quickly. See Hardest Sudoku for some more details, algorithms and such.

    4. Re:Algorithms by jeremyp · · Score: 1

      It's actually much lower than that. Taking into account all the symmetries (i.e. rotations, reflections and the fact that you can swap all instances of any pair of numbers) there are only just over 40,000 different final grids.

      I once wrote a brute force solver with a small amount of logic to eliminate illegal solutions i.e. if you put a 1 in the top left corner, it noted in all the there squares on the same row, column and small square, that you weren't allowed a 1. If that left a square with no possibilities, it would back track and try a different number.

      I was quite surprised that my solver would solve any puzzle in less than a second.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    5. Re:Algorithms by e70838 · · Score: 1

      Sudoku is very efficiently solved using DLX (dancing links). It solves thousands of sudoku per second whatever the level of difficulty.

    6. Re:Algorithms by russotto · · Score: 1

      You're describing a backtracking solver, which is what most people mean by a brute-force sudoku solver. I'm referring to the dumbest brute force solver -- iterate through all possible combinations of the missing numbers, checking if each is a valid grid. Number of attempts is max 64^9 (81 numbers on the grid, a minimum 17 clues, 9 possibilities for each number) = 2^54

      Wikipedia claims the number of essentially distinct complete grids is 5,472,730,538. I'm not sure if you could, given a partial grid, do a lookup into a canonical set of complete grids without doing as much work as you would trying every possible rotation and permutation.

  9. Compute its what? by wonkey_monkey · · Score: 0

    all you need to do is to compute its , a co-efficient that measures the hardness of the problem.

    Which is apparently so hard to do no-one can even name the thing. Or is it just called ","?

    --
    systemd is Roko's Basilisk.
  10. Summary. by Anonymous Coward · · Score: 0

    Somebody's rewritten the summary since the tag 'itswhat' was added, and I think they just removed the fragmented sentence that ended with '[...] has calculated its .' (its value of something?)

    With this part removed, it makes even LESS SENSE. Just rewrite it completely!

  11. Richter scale? by elfprince13 · · Score: 1

    On a "News for Nerds" site, I have to question why we're calling it a "Richter scale" instead of simply a "log-scale".

    1. Re:Richter scale? by icebraining · · Score: 2

      Because that's what the authors used on their paper:

      A Richter-type scale for Sudoku hardness

    2. Re:Richter scale? by Anonymous Coward · · Score: 0

      Maybe Moh's scale would have been more appropriate.

  12. plagiarism by Anonymous Coward · · Score: 0

    with no attribution to xkcd either.

    http://xkcd.com/74/

    obviously violates the CC BY-NC 2.5 license

  13. Try this nasty Sudoku by SpaceLifeForm · · Score: 2
    I am guessing you are referring to unique rectangles and variants.

    You probably have never seen enough really nasty puzzles to realize that those techniques will not work.

    Here is a valid, single solution Sudoku that using your technique may result in your insanity.

    .318....7
    ........9
    ....6..2.
    46...1...
    ..3.7...6
    1..2....8
    .2...59..
    ..5.3....
    .....2.4.

    .318....7........9....6..2.46...1.....3.7...61..2....8.2...59....5.3.........2.4.

    Good luck.

    --
    You are being MICROattacked, from various angles, in a SOFT manner.
    1. Re:Try this nasty Sudoku by SpaceLifeForm · · Score: 1
      Sorry, s/techniques will not work/techniques will not always work/

      Unique rectangles and variants are actually a very powerful technique. But, they are not enough for really nasty puzzles. There are too many possibilities to keep track of.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    2. Re:Try this nasty Sudoku by DMUTPeregrine · · Score: 1

      931 824 657
      642 157 389
      578 963 124
      467 381 592
      283 579 416
      159 246 738
      824 615 973
      795 438 261
      316 792 845

      Lots of "forcing chains" to solve it, no use of unique rectangles.

      --
      Not a sentence!
    3. Re:Try this nasty Sudoku by JMJimmy · · Score: 1

      This was trivial.

      You can quickly get the board to this state: .3182...7 ..2.....9 ....6..2.
      46.3.1...
      2.3.7...6
      1..2..6..8 .2...59.. ..5.3.... .....2.4.

      This doesn't seem like much having only placed 5 numbers... but the bottom right and middle right boxes now only have two places each where 2 can go. This means that either it's a multiple solution (which you've stated is not the case) so I now know that if I tease out one solution by placing a 2 in two of those 4 boxes it will either be right or wrong. Once you get the correct 2 they fall quickly in this order: 4, 6, 5, 7, 8, 3, 1, 9

    4. Re:Try this nasty Sudoku by SpaceLifeForm · · Score: 1

      Got it. I misread what you were saying. Basically, you are doing two simultaneous guesses. Cool, will look for this more often.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
  14. There are no hard sudoku by leenoble_uk · · Score: 2

    I'm not being flippant or showing off, but for a while when they first came about in the UK papers I was partial to the odd Sudoku and in order to speed up the process of grid filling, I printed out some prepared grids with all the little numbers (the ones you're supposed to pencil in) in every single box.

    Then after filling in the published starting numbers it became a simple task to simply black out those small numbers that were no longer possible i.e all the ones of the same number in the same square, row or column). Then almost invariably I'd be left with a number of squares that could be filled and the process repeated. Then, as with normal play I'd find a row column or square with pairs or triples of numbers enabling other numbers to be black out. This would solve most Sudoku, and it didn't even require any thinking.

    And that's what ultimately weaned me off the things. I was essentially imitating a computer process, blacking out and filling in numbers as the rules laid down allowed. In other words utterly pointless and boring.

    There are puzzles this won't solve, but then there's no actual skill to be employed in solving those ones either. Sudoku guides would bill this as "ariadne's thread", but ultimately it comes down to guesswork. When you're stuck then you have to pick a square and take a guess. If you're right, and it works, you solve the puzzle, otherwise your guess was wrong, you go back to where you were and choose the other number. To give it another name: brute force. No skill, no intelligence, just number crunching. Sudoku puzzles aren't puzzles at all, they're just an exercise in box filling.

    1. Re:There are no hard sudoku by Anonymous Coward · · Score: 0

      You're approach sounds just like that taken by almost all computer algorithms. If you ask a strong human sudoku solver how they approach a difficult problem or situation or give them a problem you couldn't solve yourself you might be amazed by the deeper logical reasoning they use to avoid guesswork.

      With Sudoku, Guesswork is never required. If you are guessing then the problem is too hard for you.

    2. Re:There are no hard sudoku by cryptizard · · Score: 1

      You can say that about any game or problem, given enough computation you can try every possible configuration until you win. Even chess is like this, albeit with much more work than sudoku. The fun is in not doing it that way, but trying to keep it all in your head and use your natural human reasoning and intuition to figure it out.

    3. Re:There are no hard sudoku by Anonymous Coward · · Score: 0

      Indeed, the easiest way to ratchet up the difficulty of the AI player in chess is to just give it more time to match your moves up to known strategies and find a counter. Or predict play several moves out choosing the most optimal move to advance things in the AI's favor.

    4. Re:There are no hard sudoku by Anonymous Coward · · Score: 0

      People like you do make me laugh :) You may as well say they're all easy because if you turn to the back page the answer is there.

      The ones you can do using your naive method are called "easy" sudoku. My 9-year-old can do these.

      The ones you don't know how to do without guessing are called "medium" or "hard" sudoku.

      What you're missing is that there are ways to solve these without guessing, and it's that which is the interesting part of sudoku, which takes skill, and which totally went over your head when you looked at this puzzle.

    5. Re:There are no hard sudoku by Anonymous Coward · · Score: 0

      Hey there,

      I read all the way through your comment but you didn't link to pics explaining how guessing is unnecessary. Do you mind providing an example or two?

      Another Anon

      PS. Hey OP, please don't get down with these comments about people who have "other ways" and its "interesting" and "insightful" about how they solve the puzzles. I fill in the boxes with numbers as well as try and use "other ways," and at the end of the day everyone wrote numbers in boxes. If you want to really mess with people shoulder surfing you, fill in obviously wrong choices on purpose then yawn and set the puzzle down, it drives "real players" nuts.

    6. Re:There are no hard sudoku by Mirar · · Score: 1

      This puzzle,

      http://www.telegraph.co.uk/science/science-news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html

      will have you 'guess' no less than 10 times. I don't see right now how it measures in the 'richter' scale in the original article.

  15. Infinite tedium by Anonymous Coward · · Score: 0

    Sudoku is probably the most boring puzzle game ever. Read a book, dammit.

  16. Not again by uninformedLuddite · · Score: 1

    Is there anything that mathematicians can't do?

    --
    The new right fascists are bilingual. They speak English and Bullshit.
    1. Re:Not again by meloneg · · Score: 1

      No. No there is not.