Combinations C(N, R) Calculator PHP Program by Jay Tanner | ||||
Given a total pool of (N) distinct items, this program computes the total count of possible unique combinations of random groups of (R) taken at a time from that pool. Any two groups containing the same (R) items are considered identical, regardless of the order in which the items are selected from the pool.
NOTE: Since this program computes EXACT values and performs all of its computations in arbitrary-precision, in some cases, the computed values may extend out to tens of thousands of digits and could possibly take up to several seconds to return the computed result. The EXACT value of C(1, 1) is computed below and consists of 1 digit.
1.E+0 | ||||
Combinations are mixtures of items, but in no particular order. In each group of (R) items selected from a pool of (N) items, only which items make up the group is considered important, not the sequential order in which the items are selected for any group.
For example, ABCDEF is identical to DFACBE, BDFCEA, DABFCE and all other combinations (mixtures) of the same six letters. The 5 cards making up a straight flush dealt in a poker game would be a good example of a combination where only which 5 cards are held is important, not the order in which they were dealt or received. | ||||
Jay Tanner - 2024
|