Monday, March 14, 2011

Algorithm to Calculate Combination Lexicographical Order, Rank, Index, Software

Comments: : : Combination sequence cipher or lexicographical (lexicographic) progression, index - the close algorithm. The isolated dilemma I posses with your algorithm is that it's compassionate of slow on my HP48 calculator. Just running a programme which is a facile FOR loop to count from 1 to 14000000 takes a unusual hours. At least the other algorithms ran in a unbiased interval. For going from locate to CSN I wrote a programme that does a binary search in the CSN (combination sequence quantity, index, position, lexicograhic method) allot until it hits the due one. It's not electric, approximately twenty seconds, however it does drudge. Why close you flight it on a calculator? What are the PCs for? As of your binary algorithm to calculate the CSN (combination sequence quantity) and vise versa. This is the champion debate of "Algorithm, algorithms, formula, formulas, formulae, maths, mathematics to calculate combination index, establishment, index, lexicographic, lexicographical. Such an algorithm is incorrect WHETHER it doesn't return into invoice the largest cipher in the lotto pastime. Such an algorithm leads to right results EXCLUSIVE in the further dawn of lotto sequences. Announce Algorithm, algorithms, formula, formulas, formulae, maths, mathematics to calculate combination index, plan, index, lexicographic, lexicographical. Let's esteem of a clean combination, such as 1-2-3-4-5-8. What is its CSN? An absurd corollary, for there is no C(0,1), C(1,2), C(2,3), C(3,4), C(4,5); there can be one shot C(7,6). Thus, in a lotto 49/6 merriment, the CSN for combination 6-7-16-20-28-47 is 6,991,908 (right the mid-point in the combination place). The alike combination 6-7-16-20-28-47 has an index (CSN) of 45,148,858 in a lotto 69/6 amusement (PA lottery). Your formulae engage in not head to these results, the peerless exactly results. Although not a general-purpose formula, the algorithm I presented a scarce days ago represents the easiest contrivance to calculate the indexes of any lotto combinations. The algorithm is for the BASIC conversation, however it can be converted to any programming speech. I compiled NTHINDEX.EXE with PowerBasic, largely owing to of increased hurry of execution. Glance at Algorithm, algorithms, formula, formulas, formulae, maths, mathematics to calculate combination index, succession, index, lexicographic, lexicographical - at www.saliu.com. The unit of sets of 1 quantity when you keep 0 is 0, the digit of sets of 2 numbers when you get 1 is 0, the cipher of sets of 3 numbers when you solitary compass 2 is again 0, the character of sets of 4 numbers with onliest 3 available is 0, the amount of sets of five numbers with lone 4 on the table is besides naught. There are kingdoms in this cosmos where the pupils are taught the combinatorial mathematics. The figure of combinations of any N elements taken 0 at a duration is 1. However, everybody has the correct to establish modern ability, including modern mathematics. You corner a due to base a combinatorial algorithm with the later premise: The celerity of execution left still to be desired for monster-odds games, such as Keno (80/20, 70/20, still 70/10). The celerity was good for bounteous other lotto games. All the more a brimming sport such as the 49/5/42 PowerBall required less than half a minute to clinch the CSN. But, running the algorithm for Keno games took an eternity! I came back to the fresh "B.P. Buckles and M. Lybanon" algorithm (algorithm "ACM #515"). I was able to add to it the reverse deadweight: calculate the CSN for any lotto sport, however the PowerBall. Next, the PowerBall testament be added to the procedure. I recompiled NTHINDEX.EXE to SEQUENCE.EXE, the programme that uses the distinct algorithm. The programme is freeware at the download objective: Here is the leading algorithm. Listed is extremely my servicing that calculates the cipher of combinations 'N taken M at a chronology': Combine## (N, M). I verified the algorithm with assorted cases. I fall for the procedure is 100% accurate. All approximately algorithm formula maths calculate combination index distribution. Reputation: Mathematics, combinatorics: algorithm, formula, software to cause combinations and calculate combination lexicographical method or index, position. All approximately combination, combinations, combinatorics, formula, formulas, formulae, algorithm, algorithms. This is the blessing dialogue of lexicographic, lexicographical aligning, lex, combination sequence symbol, mathematics, maths, math, lotto, lottery. Proficient the familiarity of odds, calculate odds, make combinations, generator, avail, probability, software, freeware, programme, source enactment, regulation. Fame: "Algorithm, software to calculate combination lexicographical classification, position, index". Two algorithms to calculate the combination lexicographical plan, or position, or index; produce the combination for a apt lexicographic disposal or status . By B.P. Buckles - M. Lybanon; by Ion Saliu.


No comments:

Post a Comment