Your skill will accomplishwhat the force of many cannot PerlMonks

### Re: Golf: Sudoku solving

by lidden (Curate)
 on Nov 08, 2007 at 20:17 UTC Need Help??

in reply to Golf: Sudoku solving

"(This input has two solutions. Both are required to be correct.)"

I am pretty sure a sudoku is only considered to be correct if it has one and only one solution.

Replies are listed 'Best First'.
Re^2: Golf: Sudoku solving
by erroneousBollock (Curate) on Nov 12, 2007 at 03:40 UTC
I'm pretty sure you're mistaken.

Sudoku is a simple constraint resolution problem. The static constraints describe the rules of the game. The dynamic constraints are specified by the initial state of the board.

You seem to be implying that for some initial state (a partially filled board), there'll be only one correct solution (filled board).I'm quite sure that's not the case.

It's surely the case that for some problems where the board is mostly filled, that there is only one correct solution; I'd need to see a damn nifty proof to believe that is the case for all conceivable (and valid) starting states.

-David

If you are given a Sudoku grid to solve (such as in a newspaper or a puzzle book) and there is more than one solution to it, then you've gotten a decidedly inferior offering, some would say an invalid one (as would I).

I'm at a loss as to how you got from "only considered to be correct" to "all possible starting states". And proving that, for example, a standard grid with only a single digit filled in can be "solved" in more than one way is trivial.

But I would disagree with lidden if that was an implied assertion that a program for solving a Sudoku need not be able to deal with such flawed offerings. Indeed, it should probably be able to produce at least two solutions so that you can include them when you write to the source of the puzzle to complain. :)

- tye

Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://649795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
As of 2024-03-03 21:43 GMT
Voting Booth?
My favourite way to spend a leap day ...

Results (30 votes). Check out past polls.