Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mathematics knundrum
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00780672
Message ID:
00781240
Vues:
43
WOW. I have with interest followed this thread, even sat down yesterday and tryed to come up with a solution myself, didn't get it completely finished in time. Plus not as smooth and fast as the solution based on the binary system.

now, abaut that number below - That's big. is there a word for that one? i can already count up to a trillion (used to know one above that, but foregot it), but a 1 with 21 zeros, well now - i gues i have some growing up to do. :-)

i wrote a statistical lottery program once (about 5 years ago) in C++ for speed. going though all possibilities with a 12 number chain (6 out of 49 game) and then comparing to history. that thing ran 24 hours, for 3 month straight.



>The number of combinations to check is the binomial coefficient sum, which sounds bad, but all that means is this:
>
>When you have n data items, you will have 2^n - 1 sums to check. So, for
>
>n=4, there are 2^4 - 1 or 15 checks.
>
>n=10, there are 2^10 - 1 or 1023 checks
>
>n=70, there are 2^70 - 1 or 1,180,591,620,717,411,303,423 checks
>
>That is getting to be a large number of checks! This might be time to look for mathematical optimization, as Steve and I were discussing. That just means to look for ways to abort/eliminate some loops, say by using the target value's size, might be one way. Splitting the prg up into modules to only run part of the checks at one time may be another. Runtime reduction may be vital, in fact, with so many checks to do.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform