In this post, we will see that with just four questions we can easily understand which formula to apply.
Context
Permutations and combinations are basic mathematical concepts with numerous real-world applications.
Combinations are the process of selecting objects without regard to order, whereas permutations are the process of arranging objects in specific orders, with each arrangement being unique.
These principles underpin fields ranging from cryptography to genetics, allowing for problem-solving across multiple domains, and understanding their distinctions is critical for solving a wide range of puzzles and challenges accurately.
How to know which formula to use
To calculate the total number of combinations/permutations, you must first answer the following questions:
Order matter?
There is repetition?
What is the number of total observations?
What is the number of observations to be selected?
Example 1: Order matter with repetition
Assume we want to know the number of password combinations with only numbers in a four-digit password, such as 1234.
Order matters?
Yes, because a password such as 1234 differs from a 4321.
There is repetition?
Yes, because a password could be 1111.
What is the number of total observations?
Is 10 because we have the options 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
What is the number of observations to be selected?
Is 4, because the password will have four digits.
If we can repeat the numbers and have ten options, the total number of passwords is 10x10x10x10 = 1.000.
\(r\) is the number of observations to be selected.
Example 3: Order does not matter without repetition
Assume we have a deck of 52 cards and want to know how many combinations exist in a three-card hand.
Order matters?
No, because only the cards themselves are important, not the order.
There is repetition?
No, since each card is unique in the deck.
What is the number of total observations?
Is 52, because the total number of cards to be drawn is 52.
What is the number of observations to be selected?
Is three because that is the number of cards in a hand.
Using Equation 2 we would have 132,600 combinations. But let’s take a single hand with the cards 1, 2 and 3, also applying Equation 2 to this subset, that would mean a total of 6 combinations considering the order:
1 - 2 - 3
1 - 3 - 2
2 - 1 - 3
2 - 3 - 1
3 - 1 - 2
3 - 2 - 1
So, for example, all of these six hands are actually one, scince order is irrelevant, so the true number of hands is acutally 132,600/6 = 22,100.
\(r\) is the number of observations to be selected.
Example 4: Order does not matter with repetition
Let’s say we need to add four extra ingredients to an Açai Bowl delivery and have five options to choose from:
[B] Banana
[S] Strawberry
[G] Grape
[C] Chocolate
[O] Oat
So, combinations such as [B,B,B,B], [B,B,B,C] or [B,S,C,G] can be made.
Order matters?
No, because we only care about the ingredients used.
There is repetition?
Yes, because we can reuse the ingredient.
What is the number of total observations?
Is 5, because the number of ingredient options is five.
What is the number of observations to be selected?
Is three because that is the number of ingredients to be added.
Applying Equation 3 we would have5 combinations: [B,S,G,C], [B,S,G,O], [B,G,S,C], [B,G,O,C] and [S,G,C,O]. But now we need to take in consideration the repeated ingredients.
So, how should we think about the repetition? Now we must consider the repetitions, using Banana as an example:
So, we have 1 + 4 + 6 + 4 + 4 + 4 + 12 = 35 combinations, which means we must do 35 x 5? No, because some combinations would be repeated, and in this case, the order is irrelevant.
We can use Equation 3 but considering \(n\) as \(n+r-1\).