AllRounder.ai
Chapters in this course

Enrol to start learning

Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.

Enrol free

23.5.1. Categories of Derangements

Interactive Audio Lesson

Session 1: Introduction to Derangements

Unlock the classroom podcast

The transcript is free to read. A free account plays the conversation back.

Sarah
SarahInstructor

Today, we are going to explore derangements. A derangement is essentially a permutation where no object is in its original position. For example, if we have three objects labeled 1, 2, and 3, the derangements would be 2, 3, 1 and 3, 1, 2.

Noah
Noah

So, if I understood correctly, for a derangement, each number has to move?

Sarah
SarahInstructor

Exactly! Think about it like a party where no one can stay in their assigned seat. This ensures all arrangements are deranged.

Session 2: Categories of Derangements

Unlock the classroom podcast

The transcript is free to read. A free account plays the conversation back.

Robert
RobertInstructor

Now, let’s categorize derangements based on where the first element is placed. If we fix the first element in one position and see where it could go next, it can lead to two scenarios.

Isabella
Isabella

What are those scenarios?

Robert
RobertInstructor

First, the designated element can occupy another position, and we need to derange the remaining elements. The second scenario is when we don’t place the first element in its original seat, which alters the arrangement altogether.

Akash
Akash

Does this mean we can use previous results to find new derangements?

Robert
RobertInstructor

Precisely! This leads us to a recurrence relation.

Session 3: Recurrence Relation for Derangements

Unlock the classroom podcast

The transcript is free to read. A free account plays the conversation back.

Sarah
SarahInstructor

The recurrence relation is defined as D(n) = (n - 1) * (D(n - 1) + D(n - 2)). This means the number of derangements of n items can be expressed using its two previous terms. The initial conditions are D(0) = 1 and D(1) = 0.

Ananya
Ananya

Could you explain why those initial conditions are set that way?

Sarah
SarahInstructor

Certainly! For D(0), there's one way to correctly arrange zero items, and for D(1), it’s impossible to derange one item.

Noah
Noah

Got it! So, using this relation, we can find derangements for larger sets?

Sarah
SarahInstructor

Exactly! This is the power of recurrence! Let’s practice some calculations.