Wednesday, June 15, 2016

Combination And Permutation

Combination And Permutation

Permutations are for lists (order matters) and combinations are for groups (order doesn’t matter).

Combinations are easy going. Order doesn’t matter. You can mix it up and it looks the same. Let’s say I’m a cheapskate and can’t afford separate Gold, Silver and Bronze medals. In fact, I can only afford empty tin cans.

How many ways can I give 3 tin cans to 8 people?
Well, in this case, the order we pick people doesn’t matter. If I give a can to Ali, Abu and then Ahmad, it’s the same as giving to Ahmad, Ali and then Abu. Either way, they’re equally disappointed.

This raises an interesting point — we’ve got some redundancies here. Ali Abu Ahmad = Ahmad Abu Ali. Let’s just figure out how many ways we can rearrange 3 people.
Well, we have 3 choices for the first person, 2 for the second, and only 1 for the last. So we have 3 · 2 · 1 ways to re-arrange 3 people.

So, if we have 3 tin cans to give away, there are 3, or 6 variations for every choice we pick. If we want to figure out how many combinations we have, we just create all the permutations and divide by all the redundancies. In our case, we get 336 permutations (from above), and we divide by the 6 redundancies for each permutation and get 336/6 = 56.

For example:
Here’s a few examples of combinations from permutations:- 
  • Combination: Picking a team of 3 people from a group of 10. C(10,3) = 10!/(7! · 3!) = 10 · 9 · 8 / (3 · 2 · 1) = 120.
    Permutation: Picking a President, VP and Waterboy from a group of 10. P(10,3) = 10!/7! = 10 · 9 · 8 = 720.
  • Combination: Choosing 3 desserts from a menu of 10. C(10,3) = 120.
    Permutation: Listing your 3 favorite desserts, in order, from a menu of 10. P(10,3) = 720.

No comments:

Post a Comment