• combin(n, k)—Returns the number of subsets of k elements that can be formed from n elements. Each subset is known as a combination, defined as follows:
• permut(n, k)—Returns the number of ways of ordering n distinct elements taken k at a time. Each ordered arrangement is known as a permutation, defined as follows:
Combinations and permutations are both methods of counting subsets of items, however, internal order is significant in a permutation but not in a combination. The number of combinations is usually denoted by. The number of permutations is usually denoted by .
Arguments
• n
and
k are integers greater than or equal to 0, with n ≥ k.