comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <eachus@mitre.org>
Subject: Re: Eight Queens problem (was Re: Kindness)
Date: 1999/09/14
Date: 1999-09-14T21:38:49+00:00	[thread overview]
Message-ID: <37DEC173.FA3D5083@mitre.org> (raw)
In-Reply-To: 7qsqvb$974$1@nnrp1.deja.com

Robert Dewar wrote:
 
> Well there is no magic in real life, so the normal
> implementation of AD is to make an arbitrary choice, and
> then if you get stuck later, go back and change it. This
> is called "back tracking", and basicaly the 8-queens
> problem is precisely an excercise in back tracking.
 
    The method used by Nico Lomuto's solution was to create a task for
each possible placement at each level, and the first task that
corresponded to a correct solution would stop the creation of new tasks
and cause all the waiting tasks, whether part of an incorrect or correct
solution, to terminate.  The problem is that doing this requires lots of
tasks, I believe Nico's program potentially created 8! (40,320) of
them.  Since Nico's program was written to show a clever use of the
terminate alternative it wouldn't run correctly even on systems that
waited during task creation for a task descriptor to become free--all
tasks waited for a solution to be found.

    Ah, the advantage of being a pack rat.  The original article was in
Ada Letters March-April 1983 pages II-5.62-75.  I think that the
application to the Eight Queens problem was published later as a
concrete example of the paper, but it would probably be much easier to
reconstruct it than find it.

-- 

                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  reply	other threads:[~1999-09-14  0:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-31  0:00 Kindness Mark Lundquist
1999-09-02  0:00 ` Kindness Larry Kilgallen
1999-09-03  0:00   ` Kindness Robert Dewar
1999-09-03  0:00     ` Kindness Andy Askey
1999-09-05  0:00       ` Kindness Robert Dewar
1999-09-07  0:00         ` Kindness Andy Askey
1999-09-07  0:00           ` Kindness Bill Findlay
1999-09-02  0:00 ` Kindness Jerry Petrey
1999-09-02  0:00   ` Kindness Nick Roberts
1999-09-02  0:00 ` Kindness Marin David Condic
1999-09-03  0:00   ` Kindness Geoff Bull
1999-09-03  0:00     ` Kindness Marin David Condic
1999-09-03  0:00       ` Kindness Larry Kilgallen
1999-09-03  0:00         ` Kindness Robert I. Eachus
1999-09-04  0:00           ` Eight Queens problem (was Re: Kindness) Daryle Walker
1999-09-05  0:00             ` Robert Dewar
1999-09-14  0:00               ` Robert I. Eachus [this message]
1999-09-06  0:00             ` Vladimir Olensky
1999-09-06  0:00               ` Robert Dewar
1999-09-07  0:00                 ` bourguet
1999-09-08  0:00                   ` Robert Dewar
1999-09-08  0:00                     ` bourguet
1999-09-08  0:00                       ` Robert Dewar
1999-09-08  0:00                         ` Ted Dennison
1999-09-03  0:00         ` Kindness tmoran
1999-09-03  0:00           ` Kindness Marin David Condic
     [not found]         ` <37D55622.69B27515@rational.com>
1999-09-07  0:00           ` Homework (was Re: Kindness) Larry Kilgallen
1999-09-08  0:00             ` Ted Dennison
1999-09-08  0:00           ` Homework Mark Lundquist
1999-09-03  0:00     ` Kindness Robert Dewar
1999-09-03  0:00       ` Kindness Aidan Skinner
1999-09-03  0:00         ` Kindness Larry Kilgallen
1999-09-04  0:00           ` Kindness Aidan Skinner
1999-09-03  0:00         ` Kindness Marin David Condic
1999-09-06  0:00           ` Kindness Bill Findlay
1999-09-06  0:00             ` Kindness Robert Dewar
1999-09-07  0:00             ` Kindness Marin David Condic
1999-09-07  0:00               ` Kindness Bill Findlay
1999-09-06  0:00       ` Kindness Geoff Bull
1999-09-05  0:00         ` Kindness Aidan Skinner
1999-09-03  0:00 ` Kindness Matthew Heaney
1999-09-09  0:00   ` Kindness James William Zuercher
1999-09-10  0:00     ` Kindness Mark Lundquist
1999-09-10  0:00       ` Kindness Robert Dewar
1999-09-10  0:00     ` Kindness Robert Dewar
replies disabled

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