comp.lang.ada
 help / color / mirror / Atom feed
From: Mike H <postmaster@ada-augusta.demon.co.uk>
Subject: Re: OT: A bit  of Sudoku
Date: Fri, 6 Jun 2014 11:59:48 +0100
Date: 2014-06-06T11:59:48+01:00	[thread overview]
Message-ID: <C$0rwWCk8ZkTFwEV@ada-augusta.demon.co.uk> (raw)
In-Reply-To: alpine.DEB.2.10.1406061056170.1469@debian

In message <alpine.DEB.2.10.1406061056170.1469@debian>, 
Stefan.Lucks@uni-weimar.de writes
>As I understand for the Sudoku case, the entire change is to assign a 
>digit to an empty cell, and undoing means to turn the cell's state back 
>to empty. If I am right, undoing changes is very easy, indeed!
Not quite? Unless one is using brute force trial and error, there is 
some unavoidable housekeeping to be done Every cell, or rather the value 
or absence of value in that cell, influences the 24 other cells that 
have its line, column and block in common. However, if the caller 
retains its own copy of the state of the problem domain at the time that 
it made its call, it now has an additional piece of information. It now 
"knows" that calling the callee was not a correct option and, if the 
program is to continue, must have some alternative course of action up 
its sleeve. In a recursive process, one such alternative must be to 
return control to its own caller.

-- 
"Why," said Ford squatting down beside him and shivering, "are you lying face
down in the dust?" "It's a very effective way of being wretched," said Marvin.
Mike ;-(


  reply	other threads:[~2014-06-06 10:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 17:49 OT: A bit of Sudoku Mike H
2014-06-05 18:30 ` Adam Beneschan
2014-06-05 19:00   ` J-P. Rosen
2014-06-05 19:18     ` Jeffrey Carter
2014-06-05 19:43       ` J-P. Rosen
2014-06-05 20:05     ` Mike H
2014-06-05 23:12     ` Robert A Duff
2014-06-05 23:39       ` Adam Beneschan
2014-06-06  7:51         ` Dmitry A. Kazakov
2014-06-06  9:21           ` Georg Bauhaus
2014-06-06 13:38             ` Dmitry A. Kazakov
2014-06-06 15:47           ` Adam Beneschan
2014-06-06 17:09             ` Dmitry A. Kazakov
2014-06-07  6:03             ` J-P. Rosen
2014-06-06 14:13         ` Brad Moore
2014-06-13  0:21     ` Shark8
2014-06-13  6:30       ` J-P. Rosen
2014-06-13 10:10       ` Mike H
2014-06-13 12:37         ` Dmitry A. Kazakov
2014-06-13 15:47         ` Shark8
2014-06-05 20:03   ` Mike H
2014-06-05 20:40     ` Adam Beneschan
2014-06-06  9:10       ` Stefan.Lucks
2014-06-06 10:59         ` Mike H [this message]
2014-06-06 16:06         ` Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox