Combinations and Permutations
You might refer to the characters in a password or the digits on a padlock as a combination. Strictly speaking, this isn’t true though, as the position of each letter, number or symbol is significant, so it’s actually a permutation.
Excel has two functions for combinations and the same number for permutations. All four have the same arguments:
COMBIN/COMBINA/PERMUT/PERMUTATIONA (number
, number_chosen
)
• number
— the number of items
• number_chosen
— the number of items in each combination/permutation
COMBIN and PERMUT exclude repetitions, whereas COMBINA and PERMUTATIONA include them.
Let’s have a look at the examples in the document.
Combinations
COMBIN finds how many combinations can be made with three coloured balls out of a possible four. Without repeating any, it’s impossible to have more combinations than the total items, so a #NUM! error occurs next to those greater than four. (Page 2)
Just by changing the function to COMBINA, it dramatically increases the combinations to 20. That’s because the likes of red–red–blue, green–green–blue and yellow–yellow–yellow are counted. (Page 3)
Permutations
Both examples focus on how many permutations can be created with any two balls from the four.
Order matters, so PERMUT recognises red–blue and blue–red as separate entities. #NUM! is also returned for any number above four. (Page 4)
PERMUTATIONA allows repetitions, which means results increase exponentially. I remember as a child sitting in a maths lesson amazed how many there could be with such tiny numbers! (Page 5)