MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Sudoku puzzle

  • To: mathgroup at
  • Subject: [mg58392] Re: Sudoku puzzle
  • From: Scott Hemphill <hemphill at>
  • Date: Thu, 30 Jun 2005 04:37:28 -0400 (EDT)
  • References: <d9r4vd$560$> <d9tco2$388$>
  • Reply-to: hemphill at
  • Sender: owner-wri-mathgroup at

Paul Abbott <paul at> writes:

> The solutions by Fred Simons and Andrzej Kozlowski (previously posted to 
> MathGroup) involving backtracking work fine (I did not select their 
> solutions for TMJ because it did not show progress towards the solution) 
> -- but I wonder if for the sudoku puzzles whether backtracking is ever 
> required?

Backtracking is not required because you can (in principle) generate a list
of all possible puzzles, along with their answers.  Then your code can
look like:

  If[puzzle == puzzle1, Return[answer1]]
  If[puzzle == puzzle2, Return[answer2]]

So the question should be what minimum logical complexity (under some
defined metric) is required to avoid backtracking.

Scott Hemphill	hemphill at
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear

  • Prev by Date: Re: Mathematica Visualization site - update
  • Next by Date: Re: (presumably) easy AspectRatio question
  • Previous by thread: Re: Sudoku puzzle
  • Next by thread: Re: Sudoku puzzle