Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.gtn.com!osn.de!noris.net!blackbush.xlink.net!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Really hard [Inform] problem
Message-ID: <erkyrathDzApr8.5ox@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <326238DA.2D50@shef.ac.uk> <yxsu3rx38xv.fsf@stint.cl.cam.ac.uk> <53ts4g$j6h@nr1.calgary.istar.net> <erkyrathDzA9wB.BH0@netcom.com> <53ucol$okd@nr1.calgary.istar.net>
Date: Tue, 15 Oct 1996 02:33:08 GMT
Lines: 38
Sender: erkyrath@netcom11.netcom.com

Roger Carbol (rog@col.ca) wrote:
> Andrew Plotkin wrote:

> > (Correctness has nothing to do with whether the algorithm is fast, by the
> > way. It so happens (I'm pretty sure) that Dijkstra's algorithm is as
> > efficient as possible; that's a separate proof.)

> > It's common terminology in computer science, and not emotionally
> > loaded.

> Oh, I see...still, wouldn't it be possible to have an algorithm
> which might not arrive at a solution within a finite amount of time?

Sure. Then you can get more finicky with your terminology. Sometimes you
can prove the algorithm ends within N steps, and gives the right answer.
Sometimes you can't prove the algorithm ends in a bounded time, but you
can prove that *if* it completes then it gives the right answer. I would
call both of those "correct" algorithms, although someone with a math
textbook may (ahem) correct me. 

> (Obligatory IF thread comment:  How is the random number generator
> implemented in the Z-Machine, anyways?  Or is it just a black box
> in the specs?)

Black box. The @RANDOM opcode returns a random number between 1 and N. 
It's the interpreter's job to make sure this doesn't suck. In an ideal 
world, the interpreter would have a little Geiger counter hooked into 
it... 

(Actually there's a little more specification, about seeding repeatable 
pseudo-random sequences. See documentation.)

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
