Rich Strauss wrote:
>
> At 06:42 AM 1/7/2004, you wrote:
> >Many thanks in advance for any help.
> >The letters "abcd" can be arranged in 4P4 = 24 ways. They can be spelt
> >out on paper without difficulty (abcd, abdc, ... etc.) For larger
> >words the number of permutations soon runs into billions... which
> >brings me to my question:
> >does anyone have any vba code to spell out each permutation on large
> >words (12 letters and upwards)?
It's probably in Knuth (though not, I fancy, in Visual Basic!) But are
you sure you really want to go this route?
As you probably don't want to pay for the paper to print out any
significant part of the output of such a routine (on the order of half a
million sheets for n=12, and getting worse fast), nor have the time to
read it, I deduce that you intend to perform some sort of search that
discards most of the outputs.
It would almost certainly be preferable to rearrange your search to
prune earlier, hopefully reducing the problem to one which can run in
polynomial time.
-Robert Dawson
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
. http://jse.stat.ncsu.edu/ .
=================================================================