Combination and Permutation Formulas:
From: | To: |
Combinations and permutations are fundamental concepts in combinatorics that count the number of ways to select items from a larger set. Combinations (C(n,r)) count selections where order doesn't matter, while permutations (P(n,r)) count arrangements where order matters.
The calculator uses the following formulas:
Where:
Explanation: The combination formula divides by r! to account for the different orderings that would count as the same combination. The permutation formula doesn't have this division because order matters.
Details: These calculations are essential in probability, statistics, game design, cryptography, and any field requiring counting of possible outcomes or arrangements.
Tips: Enter the total number of items (n) and the number to select (r). Both must be non-negative integers with r ≤ n. The calculator will compute both combinations and permutations.
Q1: What's the difference between combinations and permutations?
A: Combinations are for selections where order doesn't matter (like lottery numbers). Permutations are for arrangements where order matters (like passwords).
Q2: What if r > n?
A: By definition, both C(n,r) and P(n,r) are 0 when r > n since you can't select more items than you have.
Q3: How does this relate to the binomial coefficient?
A: The combination C(n,r) is exactly the binomial coefficient used in the binomial theorem.
Q4: What are some real-world examples?
A: Combinations: lottery tickets, committee selections. Permutations: password possibilities, race finishing orders.
Q5: How does this calculator handle large numbers?
A: It uses PHP's integer handling, but very large factorials (n > 20) may exceed integer limits and return inaccurate results.