Mon, 1 Sep 2014 19:35:31 -0500
From: Geoff Canyon <gcan...@gmail.com>

> I have a set of code that seems to do the trick. It takes as an argument the 
> number of each element to permute.

Great, Geoff, this works fine. Quite clever thinking :-)


Mon, 1 Sep 2014 19:47:58 -0500
From: Geoff Canyon <gcan...@gmail.com>

> I think this is faster for many arguments. It might be slower for others.

Your right. The only thing with this script is, that it sometimes generates too 
many permutations. E.g. 111223 as input is ok. But 1112223 generates too many 
permutations. 11122233 is ok again.
I haven't figured out why. For the time being I appended a deletion of 
duplicates, and the right number of Permutations comes out. But it slows the 
script down, enough to make it slower than the one you posted just before (the 
long one).
It's a pity, because even in generating too many permutations, this last script 
is faster with large input strings than the other scripts. I'll have a look if 
I can find where it sometimes goes wrong.

Geoff, thanks again, I really appreciate your work and input, as well as the 
way you think. Very inspiring :-)

Cheers, Beat
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to