![]() Part 1: Permutations Permutations Where Repetition is Allowed Now let's take a closer look at these concepts. There may as well be water, sugar and coffee, it's still the same cup of coffee. It doesn't matter which order I add these ingredients are in. Like my cup of coffee is a combination of coffee, sugar and water. With Combinations on the other hand, the focus is on groups of elements where the order does not matter. If I change the order to 7917 instead, that would be a completely different year. That's number 1 followed by number 9, followed by number 7, followed by number 7. With Permutations, you focus on lists of elements where their order matters.įor example, I was born in 1977. The key difference between these two concepts is ordering. I'm going to introduce you to these two concepts side-by-side, so you can see how useful they are. You have fewer combinations than permutations.Permutations and Combinations are super useful in so many applications – from Computer Programming to Probability Theory to Genetics. ![]() Combinations sound simpler than permutations, and they are. P(10,3) = 720.ĭon’t memorize the formulas, understand why they work. Permutation: Listing your 3 favorite desserts, in order, from a menu of 10. Permutation: Picking a President, VP and Waterboy from a group of 10. Here’s a few examples of combinations (order doesn’t matter) from permutations (order matters).Ĭombination: Picking a team of 3 people from a group of 10. Writing this out, we get our combination formula, or the number of ways to combine k items from a set of n: Which means “Find all the ways to pick k people from n, and divide by the k! variants”. In our case, we get 336 permutations (from above), and we divide by the 6 redundancies for each permutation and get 336/6 = 56. If we want to figure out how many combinations we have, we just create all the permutations and divide by all the redundancies. So, if we have 3 tin cans to give away, there are 3! or 6 variations for every choice we pick. If you have N people and you want to know how many arrangements there are for all of them, it’s just N factorial or N! Wait a minute… this is looking a bit like a permutation! You tricked me! So we have $3 * 2 * 1$ ways to re-arrange 3 people. Well, we have 3 choices for the first person, 2 for the second, and only 1 for the last. For a moment, let’s just figure out how many ways we can rearrange 3 people. This raises an interesting point - we’ve got some redundancies here. Either way, they’re equally disappointed. If I give a can to Alice, Bob and then Charlie, it’s the same as giving to Charlie, Alice and then Bob. Well, in this case, the order we pick people doesn’t matter. How many ways can I give 3 tin cans to 8 people? In fact, I can only afford empty tin cans. Let’s say I’m a cheapskate and can’t afford separate Gold, Silver and Bronze medals. If we have n items total and want to pick k in a certain order, we get:Īnd this is the fancy permutation formula: You have n items and want to find the number of ways k items can be ordered:Ĭombinations are easy going. Where 8!/(8-3)! is just a fancy way of saying “Use the first 3 numbers of 8!”. What’s another name for this? 5 factorial!Īnd why did we use the number 5? Because it was left over after we picked 3 medals from 8. This is where permutations get cool: notice how we want to get rid of $5 * 4 * 3 * 2 * 1$. Unfortunately, that does too much! We only want $8 * 7 * 6$. To do this, we started with all options (8) then took them away one at a time (7, then 6) until we ran out of medals. ![]() The total number of options was $8 * 7 * 6 = 336$. We picked certain people to win, but the details don’t matter: we had 8 choices at first, then 7, then 6. Silver medal: 7 choices: B C D E F G H.Gold medal: 8 choices: A B C D E F G H (Clever how I made the names match up with letters, eh?).We’re going to use permutations since the order we hand out these medals matters. How many ways can we award a 1st, 2nd and 3rd place prize among eight contestants? (Gold / Silver / Bronze) We’re using the fancy-pants term “permutation”, so we’re going to care about every last detail, including the order of each item. ![]() Let’s start with permutations, or all possible ways of doing something. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |