排列与组合
The number of ways to choose \( x \) items from \( n \) items is given by the binomial coefficient, which is calculated using the combination formula:
\[ C(n, x) = \frac{n!}{x!(n-x)!} \]
This is read as "n choose x" and represents the number of distinct ways to choose \( x \) items from a set of \( n \) items, without regard to the order of selection. Here, \( n! \) denotes the factorial of \( n \), which is the product of all positive integers from 1 to \( n \), and similarly for \( x! \) and \( (n-x)! \).
The proof for the formula \( C(n, x) = \frac{n!}{x!(n-x)!} \), also known as "n choose x", is based on combinatorial reasoning. Here's a step-by-step explanation:
1. **Permutations:** If we want to select \( x \) items from \( n \) items and consider different orders as distinct, we are talking about permutations. The number of permutations of \( x \) items from \( n \) is given by:
\[ P(n, x) = n \cdot (n-1) \cdot (n-2) \cdot \ldots \cdot (n-x+1) \]
This can also be expressed as \( n! \) divided by the number of ways to arrange the remaining \( n-x \) items, which is \( (n-x)! \):
\[ P(n, x) = \frac{n!}{(n-x)!} \]
2. **Combinations:** However, for combinations, we do not care about the order of selection. Therefore, we have to adjust the permutation count by the number of ways to arrange \( x \) items, since selecting the same \( x \) items in a different order should count as one combination. The number of ways to arrange \( x \) items is \( x! \).
3. **Division by Redundant Arrangements:** To convert from permutations to combinations, we divide the permutation count by the number of redundant arrangements of the \( x \) items:
\[ C(n, x) = \frac{P(n, x)}{x!} = \frac{n!}{x!(n-x)!} \]
This formula counts each selection of \( x \) items once, regardless of order, which is precisely what we mean by "combinations".
4. **Proof by Example:** Consider a small example for clarity. If you have 3 items (A, B, C) and you want to select 2, there are 3 permutations: AB, BA, BC, CB, AC, CA. But there are only 3 combinations: AB, BC, AC because in combinations, AB is the same as BA, and so on.
The proof relies on understanding that combinations are permutations adjusted for the fact that order does not matter. By dividing by the factorial of the number of items selected (\( x! \)), we eliminate all the different possible orders those \( x \) items could be in, thus counting each unique set of \( x \) items exactly once.