Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.068 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'algorithm': 0.04; 'matches': 0.07; 'mentioned,': 0.07; '128': 0.09; 'solution,': 0.09; 'python': 0.11; 'language.': 0.14; 'cases:': 0.16; 'clues': 0.16; 'solver': 0.16; 'solver.': 0.16; 'wrote:': 0.18; 'solution.': 0.20; 'example': 0.22; 'error': 0.23; 'specify': 0.24; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; '(on': 0.31; 'running': 0.33; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'should': 0.36; 'wrong': 0.37; 'being': 0.38; 'minimum': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'recent': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'times': 0.62; 'more': 0.64; 'different': 0.65; 'mar': 0.68; 'frank': 0.68; 'eight': 0.74; 'article': 0.77; '2015': 0.84; '5.9': 0.84; '884': 0.84; 'benchmark': 0.84; 'right).': 0.84; 'careful': 0.91; 'confirms': 0.95 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=8v1fCEb5tnKg4yEaQK1LQ7p8sn/+L6a8tw2Z0hFz1UI=; b=mgUIeoFtiUSTBBOqlJt0FmvLOqBGJX/cUB4/3c/DQ/R9WZP9A8HSW3mbX8I91jyFK8 7Iq1GHf3VD1YVQ4gpLoNd0qlSlZdUoFtEKeOM8D3tq6K0YP4LxEEHhXjtYj7ANMsMibj d1VgeYal1Sgmu+l0t5SkxJdeFqRKJ8z+8CAJ/xEwOBYCt9bEH6zvm4iyJsLbLLnlQMrt HteNSThDRB3MXv31pqG94K7NhFT/eaugpvtPGQxd/wh8+5Eo9SmjI4GdjO+0a+BSSFCi MTUyu8tU5GyOOYV1OW25CabdFQIhoOmQ8UsQg2jl0Gcx5HysXtcLd04HnFKjHY1GDzcP KjMQ== X-Received: by 10.70.21.227 with SMTP id y3mr26387943pde.101.1427698243116; Sun, 29 Mar 2015 23:50:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87619j7kbu.fsf@elektro.pacujo.net> References: <87r3sdnw5t.fsf@elektro.pacujo.net> <4e81bdb9-52db-46e6-b449-d4241cb2a3f2@googlegroups.com> <87twx8amww.fsf@elektro.pacujo.net> <82e7c5b9-2f0f-405b-859c-b74916c475e0@googlegroups.com> <55176c2c$0$13009$c3e8da3$5496439d@news.astraweb.com> <87619j7kbu.fsf@elektro.pacujo.net> From: Ian Kelly Date: Mon, 30 Mar 2015 00:50:01 -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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427698246 news.xs4all.nl 2955 [2001:888:2000:d::a6]:33831 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88319 On Sun, Mar 29, 2015 at 12:03 PM, Marko Rauhamaa wrote: > BartC : > >> As Chris mentioned, when I say 'faster than C', I mean X running my >> algorithm was faster then C running Marko's algoritim (on Ian's data). >> This was just an illustration of algorithm being more important than >> language. > > Be careful with the benchmark comparisons. Ian's example can be solved > with the identical algorithm in eight different ways (four corners, left > or right). I ran the example with my recent Python solver and got these > times in the eight cases: > > 884 s > 2.5 s > 13 s > 499 s > 5.9 s > 128 s > 1360 s > 36 s That sounds to me like either a transcription error was made to the puzzle at some point, or there's something wrong with your solver. The whole point of that example was that it was a puzzle with the minimum number of clues to specify a unique solution. I tried entering that puzzle into the solver at http://www.sudoku-solutions.com/. It confirms that there is a unique solution, and the solution it gives matches the one given in the article as well as the solution that I got from Norvig's solver. Also, Frank Millman successfully ran the Eppstein solver on it upthread, which purportedly should complain if the puzzle does not have a unique solution.