in reply to Re: permute n elements2
in thread permute n elements2

Well, you can generate only unique permutations in the first place by using this: Permuting with duplicates and no memory

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
RE: (tye)Re: permute n elements2
by Anonymous Monk on Oct 28, 2000 at 05:13 UTC
    I ran your program as printed. the following : a a b b b c d should have yielded 420 permutations. i get 4976 the same number as how...permut n..". The text you wrote says "To use it, first sort.... I'm a perl newbie,please give me layman details to make this program work w/o duplicate permutations and I will be eternally grateful to you!!!! email address swanhits@hotmail.com should you choose to be more direct. thanks waiting on your reply!!!

      I get 420. It appears you ran the wrong program. You use the program just like you showed (the sorting is included in the "Sample use" part of the code).

              - tye (but my friends call me "Tye")
        you were right. however, I copied the text from permuting w/dup...and saved it with , .pl when i ran it from the command prompt it just gave me another command prompt. I had no chance to input any data. oh yeah, can it permute numbers too? my command prompt looks like as follows: perl permnodup.pl then i hit enter. Even if i doubleclick on the icon permnodup.pl the perl msdos window comes on and goes off, instead of waiting for my permutation. What am i doing wrong? I await your enlightenment!!!!!!