PDA

View Full Version : Help


lastchance
12-21-2005, 03:05 AM
I have no idea what combinations and Permutations are and mean. I have everything else down, but those are useful shortcuts, so it'd be helpful if someone gave a nice post explaining permutations and combinations well.

12-21-2005, 04:20 AM
Say you have a collection of objects, for example, all four aces from a deck of cards. Since you have four distinct cards, there are 4! (4 choices for the first card * 3 choices for the next card * 2 * 1), or 24 ways to order the aces. If you want to know how many ways there are to pick only 2 of the aces, you can use the formula for permutations: n! / (n - r)!, where n is the number of objects in your collection (4), and r is the number of objects to pick from it (2). So, there are 4! / (4 - 2)! = 24 / 2 = 12 ways to pick 2 aces.

You might have noticed that there are actually only 6 ways to be dealt a pair of aces. What happened is that the formula for permutations calculates all distinguishable pairings, i.e. choosing the aces of spades and then the ace of clubs is considered different from choosing the ace of clubs and then the ace of spades. So, if order is not important (as often happens with card problems), you use the formula for combinations: n! / ((n - r)! * r!). This is almost the same as the previous formula; the extra r! in the denominator removes the issue with overcounting. Using this, we calculate that there are 4! / ((4 - 2)! * 2!) = 24 / (2 * 2) = 6 ways to choose 2 of the 4 aces if order is not a concern, which is what we expected.

To summarize:
Permutation - Choosing r objects from n objects, where order matters. Often represented as nPr. nPr = n! / (n - r)!
Combination - Choosing r objects from n objects, where order is irrelevent. Often represented as nCr. nCr = n! / ((n - r)! * r!)

Hope that helps!

Senni