Circular lists - 26 letters

Discussion in 'Perl Misc' started by sln@netherlands.com, Jan 12, 2009.

  1. Guest

    I need to permute the 26,25,24,... letters of the alphabet.
    How many words can I make with that? Will it take much memory?
    How much ram do I need, how long will it take?
    Do I need circular lists?

    sln
     
    , Jan 12, 2009
    #1
    1. Advertising

  2. smallpond Guest

    On Jan 12, 3:35 pm, wrote:
    > I need to permute the 26,25,24,... letters of the alphabet.
    > How many words can I make with that? Will it take much memory?
    > How much ram do I need, how long will it take?
    > Do I need circular lists?
    >
    > sln


    See: Math::Counting::bperm
     
    smallpond, Jan 12, 2009
    #2
    1. Advertising

  3. Jim Gibson Guest

    In article <>,
    <> wrote:

    > I need to permute the 26,25,24,... letters of the alphabet.


    Which alphabet? There are 26 letters in the English alphabet. You can
    get an alphabet consisting of 25 letters by eliminating one letter from
    the English alphabet. There are 26 ways to do that. You can eliminate 2
    letters to get a 24-letter alphabet; there are 26*25 ways to do that.

    Given N distinct letters, there are N! permutations formed by selecting
    N letters from the set in order. N! = N * (N-1) * (N-2) * ... * 3 * 2 *
    1 (but you knew that).

    Given N distinct letters, there are N!/(N-M)! different ways to select
    M letters in order from N distinct letters (M < N).

    <http://en.wikipedia.org/wiki/Permutation>

    > How many words can I make with that?


    Every word in the English language that does not have repeated letters,
    and then some! What is your definition of a "word".

    > Will it take much memory?


    Not if you generate the permutations one-at-a-time. See, for example,
    'perldoc -q permute'

    > How much ram do I need,


    Not much (see above).

    > how long will it take?


    A very long time. Enough time to generate

    26! + 26! + (26!/2!) + (26!/3!) + (26!/4!) + . . . + (26*25) + 26 + 1

    permutations ( or thereabouts -- my math might be off a little). Since
    26! is 4.0329E26, you will need about 10**13 years assuming you can
    generate and process 1,000,000 permutations per second.

    > Do I need circular lists?


    No.

    --
    Jim Gibson
     
    Jim Gibson, Jan 12, 2009
    #3
  4. Guest

    On Mon, 12 Jan 2009 14:56:27 -0800, Jim Gibson <> wrote:

    >In article <>,
    ><> wrote:
    >
    >> I need to permute the 26,25,24,... letters of the alphabet.

    >
    >Which alphabet? There are 26 letters in the English alphabet. You can
    >get an alphabet consisting of 25 letters by eliminating one letter from
    >the English alphabet. There are 26 ways to do that. You can eliminate 2
    >letters to get a 24-letter alphabet; there are 26*25 ways to do that.
    >
    >Given N distinct letters, there are N! permutations formed by selecting
    >N letters from the set in order. N! = N * (N-1) * (N-2) * ... * 3 * 2 *
    >1 (but you knew that).
    >
    >Given N distinct letters, there are N!/(N-M)! different ways to select
    >M letters in order from N distinct letters (M < N).
    >
    ><http://en.wikipedia.org/wiki/Permutation>
    >
    >> How many words can I make with that?

    >
    >Every word in the English language that does not have repeated letters,
    >and then some! What is your definition of a "word".
    >
    >> Will it take much memory?

    >
    >Not if you generate the permutations one-at-a-time. See, for example,
    >'perldoc -q permute'
    >
    >> How much ram do I need,

    >
    >Not much (see above).
    >
    >> how long will it take?

    >
    >A very long time. Enough time to generate
    >
    >26! + 26! + (26!/2!) + (26!/3!) + (26!/4!) + . . . + (26*25) + 26 + 1
    >
    >permutations ( or thereabouts -- my math might be off a little). Since
    >26! is 4.0329E26, you will need about 10**13 years assuming you can
    >generate and process 1,000,000 permutations per second.
    >
    >> Do I need circular lists?

    >
    >No.


    Total utteral hogwash, to even reply is ignorance personified!!

    sln
     
    , Jan 13, 2009
    #4
    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. Kiuhnm
    Replies:
    16
    Views:
    758
    Jonathan Mcdougall
    Jan 3, 2005
  2. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    435
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  3. Merrigan
    Replies:
    4
    Views:
    594
    Chris
    Dec 14, 2007
  4. Venugopal
    Replies:
    11
    Views:
    1,625
    Tassilo v. Parseval
    Nov 5, 2003
  5. gamo

    Circular lists

    gamo, Jan 9, 2009, in forum: Perl Misc
    Replies:
    53
    Views:
    466
    Xho Jingleheimerschmidt
    Jan 18, 2009
Loading...

Share This Page