An easier approach in understanding them,
Exponent: Let us say there are four different grades in a class - A, B, C, D. Five students. We can provide a grade to any number of students. We won't run out of grades. When more students get added we can keep giving them all A grades, for instance. For n students and k grades the possible number of outcomes is k^n.
Factorial: Consider a scenario where you have three different candies. The candies can be same, or have differences in flavor/brand/type. Now you have to distribute this to three children. When you give away your first candy to the first kid, that candy is gone. We have finite number of objects to be distributed among a finite set of members. Also notice that different distribution will result in a different outcome for the children. This is permutation (order matter...which kid gets which candy matters),but this is also a special case of permutation because number of members are equal to number of products. We have n! outcomes when there are n candies going to n children.
Permutation: Consider the case above, but instead of having only 3 children we have 10 children out of which we have to choose 3 to provide the 3 candies to. This is also permutation but a more general case. Here number of members is not equal to number of objects. We have n!/(n-r)! outcomes. From the example, we have 10 children so n = 10, 3 candies so r = 3. So factorial is same as the permutation, but when n = r.
Combination: Now consider a slightly different example of case 3 above. Instead of assigning candies, you have to pick three candies from a bucket full of candies. The bucket may have about 10 candies in total. And you get to keep all 3 of them that you pick. Now, does it matter in what order you pick the three? It doesn't. In a scenario like this, picking candy1, candy2, candy3 in that order will be no different for you from picking candy3, candy2, candy1 (different order). So this is a case pf permutations but where certain outcomes are equal to each other. Hence the total combinations of r picks from n items is n!/r!(n-r)!
I haven't discussed the mathematics of deriving the equation in depth. But this answer aims to provide an understanding that would help recognize patterns when you have to apply them.
Answer from Swathi Shanmugasundaram on Stack ExchangeI tried to get my teacher to help me distinguish factorials from permutations and how to know when to use which, and well, he pretty much couldn't. Can anybody clear up how to know when to use which? I understand that 4! would be 1 * 2 * 3 * 4, and that you use factorial when repetitions are aloud, while with permutations, you want to get rid of repetitions.
What are the core differences in the math behind factorials VS. permutations, and how can I know when I need to use one or the other in a question?
An easier approach in understanding them,
Exponent: Let us say there are four different grades in a class - A, B, C, D. Five students. We can provide a grade to any number of students. We won't run out of grades. When more students get added we can keep giving them all A grades, for instance. For n students and k grades the possible number of outcomes is k^n.
Factorial: Consider a scenario where you have three different candies. The candies can be same, or have differences in flavor/brand/type. Now you have to distribute this to three children. When you give away your first candy to the first kid, that candy is gone. We have finite number of objects to be distributed among a finite set of members. Also notice that different distribution will result in a different outcome for the children. This is permutation (order matter...which kid gets which candy matters),but this is also a special case of permutation because number of members are equal to number of products. We have n! outcomes when there are n candies going to n children.
Permutation: Consider the case above, but instead of having only 3 children we have 10 children out of which we have to choose 3 to provide the 3 candies to. This is also permutation but a more general case. Here number of members is not equal to number of objects. We have n!/(n-r)! outcomes. From the example, we have 10 children so n = 10, 3 candies so r = 3. So factorial is same as the permutation, but when n = r.
Combination: Now consider a slightly different example of case 3 above. Instead of assigning candies, you have to pick three candies from a bucket full of candies. The bucket may have about 10 candies in total. And you get to keep all 3 of them that you pick. Now, does it matter in what order you pick the three? It doesn't. In a scenario like this, picking candy1, candy2, candy3 in that order will be no different for you from picking candy3, candy2, candy1 (different order). So this is a case pf permutations but where certain outcomes are equal to each other. Hence the total combinations of r picks from n items is n!/r!(n-r)!
I haven't discussed the mathematics of deriving the equation in depth. But this answer aims to provide an understanding that would help recognize patterns when you have to apply them.
You use combinations for calculating the number of subsets of size in a set of size
, denoted by
. When you consider subsets, the order of elements doesn't matter.
When you want to know the number of ordered tuples of size with different elements taken from a set of size
, you use $_nP_k$.
notice .
When you want to know the number of permutations of all the elements is a set of elements, you use
. Because the first position has
choices, the second position has
choices and so on...
When you want to calculate the number of functions from a set of elements to a set of
elements, you use
. Because for each element in the set with
elements, there are
possible choices for it to be mapped to.
Videos
So, let's say we've got characters of [a,b,c] and all the possible words from these characters: 3! = 6, right?
let's say we've got character of [a,a,b,b] and all the possible words from these characters: 4! / 2! 2! = 6.
so I wonder why and how we use factorials to find these results? What does factorials have to do with it? I want to learn the logic behind this permutation and using factorial to find it.
I saw this famous fact in some thead on reddit that there are less visible stars than there are possible combinations of outcomes when shuffling a deck of 52 cards.
That is by using factorial. And I've been taught that x! or "factorial" is an arithmetic process used only when elements of the group can repeat themselves, i.e. your outcome could be a deck full of aces. But this outcome is impossible.
If this is wrong, does this mean that there is a different proces than factorial that gives you even larger number?