Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!spool.mu.edu!darwin.sura.net!haven.umd.edu!socrates!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Subject: Re: Generating permutations
In-Reply-To: freeman@gradient.cis.upenn.edu's message of 12 Feb 93 20:05:59 GMT
Message-ID: <ROCKWELL.93Feb12191301@socrates.umd.edu>
Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell)
Organization: Traveller
References: <109359@netnews.upenn.edu>
Date: Sat, 13 Feb 1993 00:13:01 GMT
Lines: 35

Jon W. Freeman:
   I don't know if anyone on this newsgroup also reads comp.theory,
   but the folks over there have just wrapped up a long and rather
   tedious discussion about precisely this topic [generating
   permutations], complete with mistakes, corrections,
   counter-mistakes, and pseudo-code galore.  I suggest that looking
   at those articles could save a lot of bandwidth here.

Sounds fun, but my news feed expires after 3 days.  Could you
summarize the thread?

As a side note: dealing with n distinct integers requires n log n
space (n integers x log n bits).  Assuming that these numbers have to
go through some sort of serial bottleneck, that means the minimum time
to process these numbers is also n log n.

Of course, the time/space requirements to represent an individual
integer is usually ignored -- usually with the justification that only
a finite set of integers is being dealt with.  What I find amusing is
that this puts a constant bound on even NP hard problems.

Of course, that constant bound is traditionally ignored.

On the other hand, ignoring your constant bounds isn't always a good
idea.

[Meanwhile, back at the ranch, using gradeup on a set of random
integers introduces a significant bias only when you're dealing with a
very short list of integers.  The "practical" reason for using gradeup
instead of a series of swaps seems to be the serial bottleneck of the
series of swaps.  Though I'm not sure that there is any real
"theoretical advantage" to using gradeup.]

Raul

