Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.123 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.78; '*S*': 0.02; '"this': 0.03; 'remaining': 0.07; 'thus,': 0.09; 'down."': 0.16; 'work.)': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'example': 0.22; 'otherwise,': 0.22; 'error': 0.23; "i've": 0.25; 'equivalent': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'candidate.': 0.31; 'probably': 0.32; 'candidate': 0.34; "can't": 0.35; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'ian': 0.60; 'course': 0.61; 'here': 0.66; 'mar': 0.68; '26,': 0.68; 'trial': 0.83; '2015': 0.84; 'reasoning': 0.91; 'sheets': 0.91; 'have.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ejhH5ipSQgEgy6mGBhe8M1BufiE3ars7vRAMfk2NVB0=; b=084obARBfBy86AQO4WJnaasbofYH8tgnYSY9skOU8af1W39YD48NwZOtAHbo8suOMY WaHuk4saeLX2SPJZf44Z18r6axqJj1E3s9Fn8rWjXDX81Umqt1O20877sSPhTr26OMMy QftR3bfD4S1JkCxKJHkxsKVvx6YGH/Lsw4F+ZPlbYWf8oPogeHTTTWD17hxMmhx2FLlG 4tVxk4MRabLpGIZY5IMLYDfNTOTrZ6G3NSZjpgraVxUOH5eLiu6fZqt39/ayF8FngriH zR3ALR9rRwpD0aglX2UufacUL9Y71a6Usqa4CAvfL8X6E3FB+8tDNtOeoxuM/vp4u/cg r1Cg== X-Received: by 10.66.97.106 with SMTP id dz10mr28026712pab.66.1427382442495; Thu, 26 Mar 2015 08:07:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <874mp7on13.fsf@elektro.pacujo.net> References: <87r3sdnw5t.fsf@elektro.pacujo.net> <87fv8sndw1.fsf@elektro.pacujo.net> <874mp7on13.fsf@elektro.pacujo.net> From: Ian Kelly Date: Thu, 26 Mar 2015 09:06:42 -0600 Subject: Re: Sudoku solver To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427382450 news.xs4all.nl 2857 [2001:888:2000:d::a6]:36782 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88060 On Thu, Mar 26, 2015 at 8:23 AM, Marko Rauhamaa wrote: > Ian Kelly : > >> I don't think that I have used trial and error, in my head or >> otherwise, in any sudoku I have ever solved. > > Of course you have. "This here can't be a 2 because if it were a 2, that > there would have to be a 5, which is impossible. Thus, the only > remaining alternative is 3, so I mark that down." > > That's trial and error, aka, reductio ad absurdum. > > (Additionally, sudoku solvers are known to pencil all kinds of markings > on the sudoku sheets to help the deduction work.) Okay, I've probably used single-lookahead trial and error in my reasoning at some point. But the example you give is equivalent to the deductive process "That can't be a 5, so I remove it as a candidate. The only place left for a 5 is here, so I remove the 2 as a candidate and fill in the 5."