Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: number generator

  1. #11
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    You still have a little bit left

    EDIT: Number of combinations = multiplying the highest numbers together. The number of numbers multiplied together is the same as the number of digits in the result. 4 digit result using 10 digits = 10*9*8*7=5040.

    This reminds me of some algebra equation from my distant past. I am sure the equation I posted is flawed in some way, but it is interesting.

    EDIT: Found it ref.
    Last edited by james438; 04-26-2012 at 08:30 AM.
    To choose the lesser of two evils is still to choose evil. My personal site

  2. #12
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The number is easy enough to calculate mathematically, but actually finding all of the permutations directly without overgenerating* involves a ridiculous recursive function. It's a very hard task, although many other things aren't so hard.

    (*Of course you can overgenerate and remove the extras as needed.)

    It essentially needs to program itself. It's easy enough to write a set of embedded loops that will do it for a specific length, but allowing that to be any arbitrary length (as a parameter) is where it gets tricky.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •