Calculate combinations C(n, k), permutations or combinations with repetition from n and k, or solve for n or k from a known combination count.
- All Math and Numbers Calculators
- Permutations Calculator
- Binomial Coefficient Calculator
- Permutation Multiplication Calculator
- Set Cardinality Calculator
- Compound Probability Calculator
- Law of Total Probability Calculator
- Midpoint and Section Point Calculator โ partition a segment by an internal or external ratio
Partition Formula
The formula below is the binomial coefficient: it counts unordered selections of k distinct items from n, or a chosen subset and its complement as two labeled groups. It does not count general set partitions. The formula is:
Variables:
- P is the number of combinations (unordered k-item selections)
- n is the total number of items in the set
- k is the number of items in a subset
To calculate combinations, divide n! by k! ร (n โ k)!, with whole numbers 0 โค k โค n. The calculator uses exact integer arithmetic rather than floating-point factorials.
Integer Partition Number p(n)
An integer partition writes a nonnegative integer n as a sum of positive integers without counting different orders separately. Choose Integer partition number p(n) and enter n from 0 to 10,000. The result is an exact count. This mode is different from combinations C(n, k) and from set partitions of distinct objects.
With p(0) = 1 and p(t) = 0 for t < 0, Euler’s recurrence is p(n) = p(n โ 1) + p(n โ 2) โ p(n โ 5) โ p(n โ 7) + p(n โ 12) + p(n โ 15) โ โฆ . The offsets are k(3k โ 1)/2 and k(3k + 1)/2 for k = 1, 2, โฆ, with signs +, +, โ, โ repeating. Terms stop when their arguments become negative.
For example, enter n = 5 to get p(5) = 7: 5; 4 + 1; 3 + 2; 3 + 1 + 1; 2 + 2 + 1; 2 + 1 + 1 + 1; and 1 + 1 + 1 + 1 + 1. Writing 1 + 4 instead of 4 + 1 does not add another partition. For n = 0, the empty sum gives p(0) = 1.
What is a Partition in Combinatorics?
In combinatorics, a set partition divides a set into nonempty, non-overlapping blocks covering every element. General set partitions are counted by Bell numbers, and partitions into a specified number of blocks by Stirling numbers of the second kind. The binomial formula on this page instead counts selected subsets; it is not a Bell or Stirling-number calculator.
How to Calculate Combinations?
The following steps outline how to calculate combinations without repetition:
- First, determine the total number of items in the set (n).
- Next, determine the number of items in a subset (k).
- Next, gather the formula from above = P = n! / (k! * (n – k)!).
- Finally, select Combinations and calculate the number of unordered selections (P).
- After inserting the variables and calculating the result, check your answer with the calculator above.
Example Problem :
Use the following variables as an example problem to test your knowledge.
Total number of items in the set (n) = 5
Number of items in a subset (k) = 2. The result is C(5, 2) = 10. In the inverse k mode, a count of 10 for n = 5 gives k = 2 or k = 3.
