For the best explanation (the easisest form of explanation), I would like to recommend you to visit Combinations and Permutations pages of Math is Fun.
Both ideas answer the same kind of question: how many ways can you pick r items out of n ? The answer depends on two things. The first is whether the order of the picked items matters, and the second is whether an item can be picked more than once. This page works through the four cases with one small example, and then shows where the same counts appear in communication engineering.
- What is the difference between a permutation and a combination ?
- What changes when an item can be picked more than once ?
- Where do these counts appear in communication engineering ?
- Reference
What is the difference between a permutation and a combination ?
Let's use one small example for everything on this page: choose r = 3 items out of n = 5, and never pick the same item twice. The only question left is whether the order of the three items matters. If it does, you are counting permutations. If it does not, you are counting combinations.
For a permutation, you fill three ordered slots. The first slot has 5 choices, the second has 4 left, and the third has 3 left, so there are 5 x 4 x 3 = 60 ordered picks. The formula in Figure 1 writes the same product as n!/(n - r)!. Dividing 5! by 2! simply cancels the factors 2 x 1 that were never used.
Figure 1 gives the three common notations for this count, P(n, r), nPr and nPr. The note under the formula states the two conditions: no repetition, and order matters.

Figure 1. Permutation - r items out of n without repetition, where order matters. For n = 5 and r = 3, the count is 5!/2! = 60.
A combination ignores the order, so every group of 3 items is counted once instead of once per arrangement. Each group of 3 can be arranged in 3! = 6 orders, and all 6 appear among the 60 permutations. So the number of combinations is 60/6 = 10. In general, C(n, r) = P(n, r)/r! = n!/(r!(n - r)!).
Figure 2 shows the binomial coefficient notation for this count, n over r in brackets, which you read as n choose r. Its note changes one condition from the permutation case: order does not matter.

Figure 2. Combination - r items out of n without repetition, where order does not matter. For n = 5 and r = 3, the count is 5!/(3! x 2!) = 10.
A three-letter check makes the difference easy to see. From A, B and C, the permutations of two letters are AB, AC, BA, BC, CA and CB, which is 3!/1! = 6. The combinations are AB, AC and BC, which is 3!/(2! x 1!) = 3, because AB and BA are the same group.
Order is the only difference between the two counts : a permutation counts arrangements, and a combination counts groups.C(n, r) = P(n, r)/r! : each group of r items appears r! times among the permutations.C(n, r) = C(n, n - r) : choosing the r items you keep is the same as choosing the n - r items you leave, so C(5, 3) = C(5, 2) = 10.
What changes when an item can be picked more than once ?
The two formulas above assume that a picked item leaves the pool. Many real problems put it back, such as a PIN code where a digit can repeat. Repetition changes both counts, and the change is different for the ordered case and the unordered case.
With order mattering, each of the r slots again has all n choices, so the count is nr. For n = 5 and r = 3, that is 53 = 125. A 4-digit PIN is the same case with n = 10 and r = 4, which gives 10000 codes.
Without order, the count is C(n + r - 1, r). The usual argument for it is called stars and bars. You write the r picks as r stars, and you separate the n item types with n - 1 bars. Every arrangement of the r stars and n - 1 bars is one possible selection, so the count is the number of ways to place r stars among n + r - 1 positions. For n = 5 and r = 3, that is C(7, 3) = 35.
So the four cases for n = 5 and r = 3 give 60, 10, 125 and 35. The table below puts them side by side, and it is the table to check first when a counting problem looks unfamiliar.
Order matters |
Repetition allowed |
Count |
n = 5, r = 3 |
Yes |
No |
n!/(n - r)! |
60 |
No |
No |
n!/(r!(n - r)!) |
10 |
Yes |
Yes |
nr |
125 |
No |
Yes |
(n + r - 1)!/(r!(n - 1)!) |
35 |
With repetition and order, every slot has n choices : the count is nr, and it can be larger than n!.With repetition and no order, count stars and bars : the count is C(n + r - 1, r).Ask two questions before you pick a formula : does the order matter, and can an item repeat ?
Where do these counts appear in communication engineering ?
An engineer meets these counts far from textbook exercises. The binomial coefficient appears every time you ask how many ways errors can fall in a block of bits, or how many ways a scheduler can pick a set of subbands or resource blocks.
Let's take a block of n bits sent over a channel that flips each bit independently with probability p. The probability of exactly k errors is C(n, k) pk(1 - p)n - k. Here C(n, k) counts the positions where the k errors can sit, and the order of those positions does not matter. A Hamming (7, 4) code corrects any single error, so its block fails when 2 or more errors occur. With p = 0.01, this probability is about 0.00203. The two-error term alone, C(7, 2) x 0.012 x 0.995, is about 0.00200, so it dominates the result.
The same count tells you how many syndromes a code needs. A 7-bit block has C(7, 1) = 7 single-error patterns, and the 3 parity bits of Hamming (7, 4) give 23 - 1 = 7 nonzero syndromes. So the code has exactly one syndrome for each single-error pattern.
LTE uses combinations to signal a set of positions in a few bits. In 36.213 clause 7.2.1, a UE in a UE-selected subband CSI mode reports which M subbands out of N it selected. It sends a combinatorial index r built from extended binomial coefficients, and each set of M subbands gets a unique label. There are C(N, M) possible sets, so the index needs at least log2 C(N, M) bits. For N = 8 and M = 3, the C(8, 3) = 56 sets fit into 6 bits, while a bitmap of the 8 subbands would need 8 bits. Uplink resource allocation type 1 in clause 8.1.2 reuses the same index with M = 4 to signal two sets of resource block groups.
In practice you let software do the arithmetic. Matlab has factorial(n) and nchoosek(n, r), and Python 3.8 or later has math.perm(n, r) and math.comb(n, r). The numbers grow very fast, because 10! is already 3628800 and 20! is about 2.4 x 1018. So compute C(n, r) with these functions, or with logarithms, rather than by dividing two huge factorials.
Error patterns are combinations : C(n, k) counts where k bit errors can sit in an n-bit block.A combinatorial index saves bits : labeling one of C(N, M) sets needs about log2 C(N, M) bits instead of an N-bit bitmap.Factorials overflow quickly : use nchoosek or math.comb instead of computing n! directly.
Reference
- 36.213 v19.4.0 : Evolved Universal Terrestrial Radio Access - Physical layer procedures, clauses 7.2.1 and 8.1.2