Skip to main content

๐Ÿ”ข Combination Formula

Definition and properties of C(n,k)

Permutation P(10,3)
720
Order matters
Combination C(10,3)
120
Order doesn't matter

Combination Formula Calculator Guide

This tool simultaneously calculates both the permutation P(n,k) and combination C(n,k) for choosing k elements from n. Permutation considers the order of elements, while combination does not โ€” this is the fundamental difference between the two.

The combination number C(n,k), also known as the "binomial coefficient," is ubiquitous in the binomial theorem, probability theory, and statistics. Whether calculating lottery winning probabilities, designing sampling schemes, or solving combinatorial optimization problems, combination calculations are essential. This tool offers simple, intuitive input and clear results at a glance.

Permutation and Combination Core Formulas

ใ€Permutationใ€‘P(n,k) = A(n,k) = n! / (n-k)!
Meaning: Number of ways to arrange k of n distinct elements in order

ใ€Combinationใ€‘C(n,k) = n! / (k! ร— (n-k)!)
Meaning: Number of ways to choose k of n distinct elements (order doesn't matter)

ใ€Important Propertiesใ€‘
C(n,k) = C(n, n-k)   (Symmetry)
C(n,0) = C(n,n) = 1
C(n,1) = n
Pascal's Rule: C(n,k) = C(n-1,k-1) + C(n-1,k)

Practical Examples

๐Ÿ“‹
ใ€Example 1ใ€‘Choose 3 from 10 people to form a group (combination) n=10, k=3 C(10,3) = 10! / (3! ร— 7!) = 120 Explanation: 120 different ways to select people ใ€Example 2ใ€‘Choose 3 from 10 people to line up (permutation) n=10, k=3 P(10,3) = 10! / 7! = 720 Explanation: 720 different ways to arrange them Permutation is 6 times (=3!) the combination, because each group of 3 has 6 arrangements ใ€Example 3ใ€‘Lottery winning probability Red balls 33 choose 6: C(33,6) = 1,107,568 Blue ball 16 choose 1: C(16,1) = 16 First prize probability: 1 / (1,107,568ร—16) โ‰ˆ 1/17,721,088

Important Notes

๐Ÿ’ก
- k cannot be greater than n, otherwise the combination is 0 (cannot choose more elements than available) - When k=0, C(n,0)=1 (the empty set is one way to choose) - Permutation is always greater than or equal to combination (when k>0), the difference is a factor of k! - Combination results are always integers (despite division in the formula) - For large numbers, be aware of overflow; this tool supports up to n=170

Application Scenarios

  • - Lottery analysis: Calculate winning probabilities and expected returns for various lotteries
  • - Sampling statistics: Determine sample sizes, design stratified sampling schemes
  • - Cryptography: Calculate brute force combination space sizes
  • - Tournament scheduling: Calculate total matches in round-robin C(n,2)
  • - Biological genetics: Gene combination possibility analysis

Permutation vs Combination In-Depth

The essential difference between permutation and combination is whether order matters. An intuitive way to understand: if the question is "select" use combination; if "arrange" use permutation.

For example: choosing 2 books from 5 to give to a friend โ€” C(5,2)=10 ways; but if giving to two different friends (who gets which matters) โ€” P(5,2)=20 ways.

In programming interviews, permutation and combination problems are also common topics, often involving backtracking algorithms and dynamic programming techniques. Mastering permutation and combination calculations is the foundation for solving such problems.

Ad Slot