Lecture 18 – Inclusion/Exclusion

You may want to download the lecture slides that were used for these videos (PDF).

1. Inclusion/Exclusion – Prelude

This video reviews material you have probably been exposed to in previous courses, and asks some motivating questions. (4:01)

2. Inclusion/Exclusion

This video gives a more precise treatment of inclusion/exclusion, and finds a formula for the number of elements in a set X which satisfy none of the properties in a list of properties. (8:29)

3. Derangements

In this video we introduce the concept of a derangement and provide some examples. (4:10)

4. A Formula for Derangements

This video uses the inclusion/exclusion formula to derive a formula for the number of derangements of [n]. (9:42)

5. The Hatcheck Problem

This video introduces a historically famous problem: the hatcheck problem. We will use derangements to analyze this problem.  (3:02)

6. The Hatcheck Problem (Solution)

The hatcheck problem is solved in this video. It is our first example of a calculation that can be done quickly with inclusion/exclusion.  Surprisingly, the probability that a random permutation of length n is a derangement approaches 1/e as n goes to infinity.  (3:43)

7. Counting Surjections

As a second example, we introduce and explore a problem: counting surjections. (7:56)

8. A Formula for Surjections

This video introduces and derives a formula for surjections by using inclusion/exclusion. (3:26)

9. Counting Surjections with Our Formula

We return to our problem, calculating S(5,3), using our newly-derived formula. (2:21)

10. The Euler ϕ-Function

As a final example, we introduce the Euler ϕ-function, and explore how it can be calculated using inclusion/exclusion.  In order to compute the ϕ-function of a number n efficiently, we need to know the prime factorization of n. (11:29)