LibraryDerangements

Derangements

Learn about Derangements as part of CAT Quantitative Aptitude Mastery

Derangements: The Art of Misplacing

Welcome to the fascinating world of derangements! In competitive exams like the CAT, understanding permutations and combinations is crucial. Derangements, a specific type of permutation, often appear in problems involving arrangements where no element is in its original position. Mastering this concept can give you a significant edge.

What is a Derangement?

A derangement is a permutation of the elements of a set, such that no element appears in its original position. Imagine you have 'n' letters and 'n' envelopes, each addressed to a different person. A derangement occurs when you put the letters into the envelopes such that no letter goes into its correctly addressed envelope.

What is the core condition for a permutation to be a derangement?

No element remains in its original position.

The Derangement Formula

The number of derangements of n items, denoted as !n or D_n, can be calculated using a specific formula.

The formula for derangements is based on the principle of inclusion-exclusion. It involves the factorial of n and alternating sums of terms divided by factorials.

The number of derangements of n distinct objects, denoted by !n!n or DnD_n, is given by the formula:

Dn=n!(111!+12!13!++(1)n1n!)D_n = n! \left( 1 - \frac{1}{1!} + \frac{1}{2!} - \frac{1}{3!} + \dots + (-1)^n \frac{1}{n!} \right)

This can also be expressed as:

Dn=n!i=0n(1)ii!D_n = n! \sum_{i=0}^{n} \frac{(-1)^i}{i!}

An alternative recursive formula is:

Dn=(n1)(Dn1+Dn2)D_n = (n-1)(D_{n-1} + D_{n-2}) for n2n \ge 2, with D0=1D_0 = 1 and D1=0D_1 = 0.

The formula for derangements is closely related to the Taylor series expansion of exe^x evaluated at x=1x=-1. Specifically, DnD_n is the nearest integer to n!/en!/e.

Calculating Derangements: Examples

Let's look at some small examples to build intuition.

nSetDerangements (!n)Number of Derangements (D_n)
0{}{}1 (by convention)
1{1}None0
2{1, 2}{2, 1}1
3{1, 2, 3}{2, 3, 1}, {3, 1, 2}2
4{1, 2, 3, 4}{2, 1, 4, 3}, {2, 3, 4, 1}, {2, 4, 1, 3}, {3, 1, 4, 2}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 3, 1, 2}, {4, 3, 2, 1}9

Application in Problem Solving

Derangements are often disguised in word problems. Key phrases to look out for include 'no item in its correct place,' 'everyone receives the wrong item,' or 'misplaced objects.' Understanding the underlying derangement concept is key to solving these efficiently.

If there are 5 letters and 5 envelopes, how many ways can all letters be placed in the wrong envelopes?

This is a derangement problem for n=5. D_5 = 5! * (1 - 1/1! + 1/2! - 1/3! + 1/4! - 1/5!) = 120 * (1 - 1 + 1/2 - 1/6 + 1/24 - 1/120) = 120 * (60/120 - 20/120 + 5/120 - 1/120) = 120 * (44/120) = 44.

The Principle of Inclusion-Exclusion and Derangements

The formula for derangements can be derived using the Principle of Inclusion-Exclusion. We start with the total number of permutations (n!n!) and subtract the permutations where at least one element is in its correct place. Then, we add back permutations where at least two elements are in their correct places, and so on. This alternating sum precisely cancels out all arrangements where one or more elements are fixed, leaving only the derangements.

📚

Text-based content

Library pages focus on text content

Let AiA_i be the set of permutations where the ii-th element is in its correct position. We want to find the total number of permutations minus the size of the union of all AiA_i. By the Principle of Inclusion-Exclusion:

i=1nAi=AiAiAj+AiAjAk+(1)n1A1An|\cup_{i=1}^n A_i| = \sum |A_i| - \sum |A_i \cap A_j| + \sum |A_i \cap A_j \cap A_k| - \dots + (-1)^{n-1} |A_1 \cap \dots \cap A_n|

For example, Ai=(n1)!|A_i| = (n-1)! (fix the i-th element, permute the rest). There are (n1)\binom{n}{1} such terms. AiAj=(n2)!|A_i \cap A_j| = (n-2)!. There are (n2)\binom{n}{2} such terms. Continuing this pattern leads to the derangement formula.

Key Takeaways for CAT

Remember the formula Dn=n!i=0n(1)ii!D_n = n! \sum_{i=0}^{n} \frac{(-1)^i}{i!} and the recursive relation Dn=(n1)(Dn1+Dn2)D_n = (n-1)(D_{n-1} + D_{n-2}). Practice identifying derangement problems in various contexts. The values for small 'n' (D0=1,D1=0,D2=1,D3=2,D4=9,D5=44D_0=1, D_1=0, D_2=1, D_3=2, D_4=9, D_5=44) are good to memorize as they can speed up problem-solving.

Learning Resources

Derangements - Brilliant.org(documentation)

A clear explanation of derangements with examples and formulas, suitable for competitive exam preparation.

Introduction to Derangements - GeeksforGeeks(blog)

Provides a detailed explanation of derangements, including the formula and a step-by-step derivation using inclusion-exclusion.

Derangements - Mathematics Stack Exchange(paper)

A forum discussion with various proofs and insights into the derangement formula, offering deeper understanding.

Permutations and Derangements - YouTube Tutorial(video)

A video tutorial explaining derangements and their applications, which can aid visual learners.

The Subfactorial or Derangements - MathWorld(documentation)

A comprehensive resource on subfactorials (derangements), including properties, formulas, and related concepts.

Principle of Inclusion-Exclusion - Khan Academy(video)

Learn the fundamental Principle of Inclusion-Exclusion, which is crucial for understanding the derivation of the derangement formula.

Derangements - Wikipedia(wikipedia)

The Wikipedia page on derangements offers a broad overview, historical context, and various formulas and applications.

Combinatorics: Derangements - MIT OpenCourseware(paper)

Lecture notes from MIT covering derangements as part of a broader combinatorics course, providing rigorous mathematical treatment.

Practice Problems on Derangements - IndiaBIX(blog)

A collection of practice problems specifically on derangements, ideal for honing skills for competitive exams.

Understanding Derangements with Examples - YouTube(video)

Another excellent video resource that breaks down derangements with clear, step-by-step examples.