printing all possible permutations of a set of characters

Discussion in 'Perl Misc' started by OL/2, May 26, 2004.

  1. OL/2

    OL/2 Guest

    Hi everyone. By counting up from 0, it is possible to print all permutations
    of an n-digit number, but what if I want to include certain characters in
    that range? How can I print all n-length permutations of an arbitrary set of
    characters?

    cheers
    OL/2, May 26, 2004
    #1
    1. Advertising

  2. OL/2 <_> wrote:

    > Hi everyone. By counting up from 0, it is possible to print all
    > permutations of an n-digit number, but what if I want to include
    > certain characters in that range? How can I print all n-length
    > permutations of an arbitrary set of characters?


    perldoc -q permute

    You are expected to check the FAQ before you post.

    Have you seen the Posting Guidelines that are posted here frequently?

    (Preceding question is plagiarized, because I was too lazy to find
    another way to say it.)
    David K. Wall, May 26, 2004
    #2
    1. Advertising

  3. OL/2

    Bill Guest

    "OL/2" <_> wrote in message news:<40b46ac6$0$3035$>...
    > Hi everyone. By counting up from 0, it is possible to print all permutations
    > of an n-digit number, but what if I want to include certain characters in
    > that range? How can I print all n-length permutations of an arbitrary set of
    > characters?
    >
    > cheers


    http://search.cpan.org/~edpratomo/Algorithm-Permute-0.06/Permute.pm
    Bill, May 26, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gunnar G

    find all permutations

    Gunnar G, Sep 12, 2004, in forum: C++
    Replies:
    2
    Views:
    483
    Kai-Uwe Bux
    Sep 12, 2004
  2. Chris Lasher

    Counting all permutations of a substring

    Chris Lasher, Apr 5, 2006, in forum: Python
    Replies:
    7
    Views:
    363
    Michele Simionato
    Apr 6, 2006
  3. darin dimitrov
    Replies:
    4
    Views:
    1,294
  4. chiara
    Replies:
    6
    Views:
    456
    Barry Schwarz
    Oct 6, 2005
  5. sanket
    Replies:
    3
    Views:
    497
Loading...

Share This Page