Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88149

Re: Sudoku solver

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status UNSURE 0.311
X-Spam-Level ***
X-Spam-Evidence '*H*': 0.38; '*S*': 0.00; "board's": 0.16; 'fits': 0.16; 'those,': 0.16; 'uniquely': 0.16; 'wording': 0.16; '(you': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'seems': 0.21; 'rules': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'adds': 0.24; 'logical': 0.24; 'simpler': 0.24; 'least': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'absolute': 0.30; 'cells': 0.31; 'consequence': 0.31; 'continues': 0.31; 'them?': 0.31; "we're": 0.32; 'run': 0.32; 'another': 0.32; 'fri,': 0.33; 'guess': 0.33; 'actual': 0.34; 'sense': 0.34; 'but': 0.35; 'there': 0.35; 'sequence': 0.36; 'method': 0.36; 'possible': 0.36; 'should': 0.36; 'error.': 0.37; 'list': 0.37; 'step': 0.37; 'to:addr:python-list': 0.38; 'fact': 0.38; 'pm,': 0.38; 'does': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'identify': 0.61; 'numbers': 0.61; 'entire': 0.61; 'simply': 0.61; 'further': 0.61; 'reach': 0.63; 'information': 0.63; 'term': 0.63; 'more': 0.64; 'charset:windows-1252': 0.65; 'direct': 0.67; 'between': 0.67; 'mar': 0.68; 'book.': 0.68; 'frank': 0.68; 'received:74.208': 0.68; 'trial': 0.83; '"it': 0.84; '2015': 0.84; 'disagreement': 0.84; 'given.': 0.84; 'received:74.208.4.194': 0.84; 'resorts': 0.84; 'step,': 0.84
Date Fri, 27 Mar 2015 09:14:27 -0400
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Sudoku solver
References <87r3sdnw5t.fsf@elektro.pacujo.net> <mailman.188.1427358005.10327.python-list@python.org> <87fv8sndw1.fsf@elektro.pacujo.net> <mf36kv$ko6$1@ger.gmane.org> <CAPTjJmpUxitmFq7tW-LT4JtwPU4cvzgLfDMj1XD_25piJuTmtA@mail.gmail.com>
In-Reply-To <CAPTjJmpUxitmFq7tW-LT4JtwPU4cvzgLfDMj1XD_25piJuTmtA@mail.gmail.com>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V03:K0:WGsAPQ8aSY6SPrmliaK9/RCPBpnzrA/ifUskvJa/qg7P6nOnj90 YjoMazkgnmtTod7fQRsDBvzJPnIMOGjYLtp69jEz3UtKm0BOylTAW5JW3EGNUQ1TQ9vG4re lVi4wXIX3/wwPBYoUquQ2DwIRXvPrR6fkzjarRXaa7KFjpUg3tgfE8BybEpDIDKYLEsIWg9 ShvOndeRdXDXu0ztSFOxQ==
X-UI-Out-Filterresults notjunk:1;
X-Mailman-Approved-At Fri, 27 Mar 2015 14:15:24 +0100
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.247.1427462125.10327.python-list@python.org> (permalink)
Lines 46
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1427462125 news.xs4all.nl 2902 [2001:888:2000:d::a6]:38410
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:88149

Show key headers only | View raw


On 03/27/2015 05:25 AM, Chris Angelico wrote:
> On Fri, Mar 27, 2015 at 8:07 PM, Frank Millman <frank@chagford.com> wrote:
>> There seems to be disagreement over the use of the term 'trial and error'.
>> How about this for a revised wording -
>>
>> "It should be possible to reach that solution by a sequence of logical
>> deductions. Each step in the sequence must uniquely identify the contents of
>> at least one cell based on the information available. Each time a cell is
>> identified, that adds to the information available which can then be used to
>> identify the contents of further cells. This process continues until the
>> contents of all cells have been identified."
>>
>> Any puzzle that cannot be solved by this method does not qualify as a true
>> Sudoku puzzle.
>
> That's reasonable wording. Another way to differentiate between the
> "trial and error" that we're objecting to and the "logical deduction"
> that we're liking: Avoid backtracking. That is, you never guess a
> number and see if the puzzle's solvable, and backtrack if it isn't; at
> every step, the deductions you make are absolute certainties.
>
> They might, in some cases, not result in actual result numbers (you
> might deduce that "either this cell or that cell is a 2"), but it's a
> certainty, based solely on the clue numbers given.
>

I like that wording.  It fits what I meant by trial and error.

Frank:

But now I have to disagree about "true Sudoku puzzle."  As we said 
earlier, it might make sense to say that puzzles that cannot be solved 
that way are not reasonable ones to put in a human Sudoku book.  But why 
isn't it a "true Sudoku puzzle"?

Isn't the fact that one resorts to trial and error simply a consequence 
of the fact that he/she has run out of ideas for more direct rules and 
the data structures to support them?

The simpler rules can be built around a list of possible values for each 
cell.  More complex rules can have a more complex data structure for 
each cell/row/column/box.  And when you run out of ideas for all those, 
you use guess and backtrack, where the entire board's state is your data 
structure.
-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-25 13:39 +0200
  Re: Sudoku solver John Ladasky <john_ladasky@sbcglobal.net> - 2015-03-25 11:44 -0700
    Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 13:05 -0600
    Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-25 21:37 +0200
      Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 14:09 -0600
        Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-25 22:31 +0200
          Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-26 09:40 +1100
          Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 18:07 -0600
            Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-27 20:04 +0000
          Re: Sudoku solver Abhiram R <abhi.darkness@gmail.com> - 2015-03-26 08:26 +0530
          Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-25 21:24 -0600
          Re: Sudoku solver Abhiram R <abhi.darkness@gmail.com> - 2015-03-26 08:58 +0530
            Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 14:13 +0200
              Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 16:15 +0200
          Re: Sudoku solver albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-04-10 23:10 +0000
      Re: Sudoku solver Sayth <flebber.crue@gmail.com> - 2015-03-27 20:39 -0700
        Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-28 23:50 +0000
          Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-29 11:12 +1100
            Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 21:59 +0100
              Re: Sudoku solver Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-29 22:19 +0100
                Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 22:59 +0100
          Re: Sudoku solver Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-29 14:06 +1100
            Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-29 15:10 +1100
              Re: Sudoku solver Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-29 21:35 +1100
                Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-29 21:54 +1100
                Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 13:01 +0100
                Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 16:23 +0100
            Re: Sudoku solver Christian Gollwitzer <auriocus@gmx.de> - 2015-03-29 09:57 +0200
              Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-30 11:54 +0100
            Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 12:25 +0100
              Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-29 21:03 +0300
                Re: Sudoku solver Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-29 19:26 +0100
                Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-29 21:33 +0300
                Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 22:11 +0100
                Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-30 00:50 -0600
                Re: Sudoku solver Christian Gollwitzer <auriocus@gmx.de> - 2015-03-30 09:13 +0200
                Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-30 01:29 -0600
                Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-30 12:16 +0300
                Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-30 04:16 -0400
                Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-30 02:57 -0600
                Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-30 20:13 +1100
          Re: Sudoku solver Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-29 22:21 +0100
            Re: Sudoku solver BartC <bc@freeuk.com> - 2015-03-29 23:17 +0100
              Re: Sudoku solver Seymore4Head <Seymore4Head@Hotmail.invalid> - 2015-03-29 21:40 -0400
  Re: Sudoku solver Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-26 09:50 +1100
    Re: Sudoku solver Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-25 23:04 +0000
      Re: Sudoku solver Christian Gollwitzer <auriocus@gmx.de> - 2015-03-27 07:40 +0100
  Re: Sudoku solver "Frank Millman" <frank@chagford.com> - 2015-03-26 10:19 +0200
    Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 14:26 +0200
      Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-26 23:37 +1100
      Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-26 07:15 -0600
        Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 16:23 +0200
          Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-26 09:06 -0600
            Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 17:48 +0200
              Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-26 10:20 -0600
                Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 18:47 +0200
      Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-26 10:14 -0400
      Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-27 01:41 +1100
      Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-26 11:03 -0400
        Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-26 17:42 +0200
          Re: Sudoku solver Pete Forman <petef4+usenet@gmail.com> - 2015-03-26 22:24 +0000
      Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-27 02:21 +1100
      Re: Sudoku solver Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-03-26 20:42 -0400
      Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-27 09:14 -0400
      Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:25 +1100
      Re: Sudoku solver "Frank Millman" <frank@chagford.com> - 2015-03-27 15:35 +0200
        Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-27 15:56 +0200
          Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-27 10:09 -0400
            Re: Sudoku solver sohcahtoa82@gmail.com - 2015-03-27 11:18 -0700
              Re: Sudoku solver Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 12:46 +1100
            Re: Sudoku solver Larry Hudson <orgnut@yahoo.com> - 2015-03-27 16:48 -0700
          Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-28 01:07 +1100
          Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-28 01:19 +1100
            Re: Sudoku solver Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-03-28 14:13 +1300
            Re: Sudoku solver Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 12:40 +1100
              Re: Sudoku solver Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-28 02:24 -0600
          Re: Sudoku solver Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-27 16:03 +0000
          Re: Sudoku solver Virgil Stokes <vs@it.uu.se> - 2015-03-28 19:36 +0100
      Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-27 09:48 -0400
      Re: Sudoku solver Dave Angel <davea@davea.name> - 2015-03-27 09:52 -0400
      Re: Sudoku solver Chris Angelico <rosuav@gmail.com> - 2015-03-28 00:58 +1100
  Re: Sudoku solver mr.smittye@gmail.com - 2015-03-29 16:39 -0700
    Re: Sudoku solver Marko Rauhamaa <marko@pacujo.net> - 2015-03-30 12:24 +0300

csiph-web