Permutations and Combinations

Patrick McAtee, Tom Rice, and Jesse Whidden

Generalized Permuations and Combinations

Summary

In this section, we've examined how repetition or sampling with replacement can change the number of possibilities, or the probability of an event. Whenever you're calculating combinations, it's important to first identify the n and r values. It is also important to determine whether or not repetition is allowed.

Remember that n is always the number of things you have to choose from and r is always how many of those items you want to pick.


Here is a summary of the main formulas introduced so far:

Summary Repetition Allowed Repetition not Allowed
r-permutations
(order matters)
nr n!

(n-r)!
r-combinations
(order does not matter)
(n+r-1)!

r!(n-1)!
n!

r!(n-r)!


For comparison, here is an example of how the different formulas can afffect your final answer:

Source code: pcApp.java