Алгоритм и программа расчета числа сочетаний для больших чисел без вычисления промежуточных факториалов путем их разложения на простые множители и сокращений | AN ALGORITHM AND A PROGRAM FOR CALCULATING THE NUMBER OF COMBINATIONS FOR LARGE NUMBERS WITHOUT CALCULATING THE INTERMEDIATE FACTORIALS BY THEIR DECOMPOSITION INTO PRIME FACTORS AND ABBREVIATIONS
2016
Lutsenko Y. V.
Classical combinatorial formula to calculate the number of combinations from n on m: C(n,m)=n!/(m!(nm)!) involves the intermediate calculation of factorials, which is often impossible when n>170, due to limitations in the capacity of numbers that are used in programming languages and created through these systems. However, in some cases it is necessary to calculate the number of combinations for n and m much larger than this limit, such as when a value greater than 10000. In such cases, there is a definite problem, which manifests itself, for example in the fact that many on-line services meant to calculate the number of combinations with these parameters do not work properly. In this article, we present its solution in the form of an algorithm and software implementation. The essence of the approach is to first decompose the factorials into prime factors and reduce them, and then to produce multiplication. This approach differs from those cited in the Internet
Afficher plus [+] Moins [-]Informations bibliographiques
Cette notice bibliographique a été fournie par Kuban State Agrarian University
Découvrez la collection de ce fournisseur de données dans AGRIS