Permutations and Combinations

https://slides.com/georgelee/ics141-permutations-combinations/live

Permutations

Definition

permutation of a set of objects is an ordered arrangement of a subset of these objects. If there are r elements in the subset, we have an r-permutation.

 

Similar to the product rule in that a permutation involves an ordered sequence. Keep in mind that there's no replacement.

 

P(n, r) = n! / (n - r)!

Example

George is raising money for his food startup in San Francisco. There are 10 different venture capitalists he needs to go to in a single day. How many possible trips (where a trip is an ordered sequence of visits) are there?

Example

George is going to take a trip next year. He wants to go to Paris, London, Washington DC, Tokyo, Seoul, and New Zealand. He only has enough money to visit 3 of those cities in a single trip. How many possible orderings are there?

Combinations

Question

How many poker hands are there?

 

We could use what we know about permutations, but we will double count. Ordering does not matter.

Definition

combination is an unordered subset of a set that has n elements. A r-combination is an unordered subset of size r (also known as a subset since subsets are unordered).

 

You may hear me say "n choose r", which means it's an r-combination.

 

Formally, C(n, r) = n! / r!(n - r)!

Example

How many poker hands are there?

 

A lottery ticket has 3 numbers between 1 and 20. When we select a winner, we draw three numbers. Any ticket with those three numbers (in any order) wins. How many possible winning tickets are there?

Binomial Theorem

Binomial Theorem

Consider the function f(x, y) = (x + y)n. Then, the expansion of all of the terms is:

 

 

(x+y)^n = {n \choose 0}x^n y^0 + {n \choose 1}x^{n-1}y^1 + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x^1 y^{n-1} + {n \choose n}x^0 y^n
(x+y)n=(n0)xny0+(n1)xn1y1+(n2)xn2y2++(nn1)x1yn1+(nn)x0yn(x+y)^n = {n \choose 0}x^n y^0 + {n \choose 1}x^{n-1}y^1 + {n \choose 2}x^{n-2}y^2 + \cdots + {n \choose n-1}x^1 y^{n-1} + {n \choose n}x^0 y^n

Example

What is the coefficient of x3y4

With Repetition

Permuations with Replacement

This is pretty straightforward. With replacement, this just becomes the product rule.

Combinations with Replacement

Combinations with replacement are a little more difficult to explain.

 

The formula for combinations with replacement is:

 

C(n + k - 1, k) = (n + k - 1)! / k! (n - 1)!

Permutations with Indistinguishable Objects

Question: How many strings can be made by reordering the letters of the word "SUCCESS"?

Permutations with Indistinguishable Objects

The number of different permutations of n objects, where there are n1 indistinguishable objects of type 1, n2 indistinguishable objects of type 2, ..., and nk indistinguishable objects of type k is:

 

n! / (n1! * n2! * ... * nk!)

Permutations and Combinations

By George Lee

Permutations and Combinations

  • 1,160