BRAINBIT
CoursesExamsUse casesPricingAbout
Get started
CoursesExamsUse casesPricingAbout
CoursesMathematicsP & C: Derangements, Distribution & Divisors

Chapter 4: Permutations, Combinations & Binomial Theorem

P & C: Derangements, Distribution & Divisors

Count derangements, share identical and distinct objects among boxes, split objects into groups and count divisors.

JEE MainJEE Advanced

Explanation

Derangements Dₙ = n!(1 − 1/1! + 1/2! − … +…

A derangement puts every item in a wrong place: no letter in its own envelope. The count comes from inclusion–exclusion.

Learn the first five: zero, one, two, nine, forty-four.

Derangements Dₙ = n!(1 − 1/1! + 1/2! − … + (−1)ⁿ/n!) · D₁ = 0, D₂ = 1, D₃ = 2, D₄ = 9, D₅ = 44

N identical things into r boxes

Identical objects into different boxes is stars and bars: n stars and r minus one bars, so n plus r minus one choose r minus one. If every box needs at least one, it becomes n minus one choose r minus one.

n identical things into r boxes: C(n + r − 1, r − 1) · none empty: C(n − 1, r − 1)

N distinct things into r boxes

Distinct objects into distinct boxes: each object chooses a box, so r to the n. To keep every box non-empty, subtract the cases that miss a box, add back the double misses, and so on.

n distinct things into r boxes: rⁿ · none empty: rⁿ − C(r, 1)(r − 1)ⁿ + C(r, 2)(r − 2)ⁿ − …

2n distinct things into 2 equal groups

Splitting into equal groups: divide by the factorials of the group sizes, and also by the number of equal groups, because swapping them changes nothing. If the groups have names, like teams A and B, don't divide by that.

2n distinct things into 2 equal groups: (2n)!/(2! (n!)²) · named groups: drop the 2!

Divisors of N = pᵃ qᵇ rᶜ

To count divisors, write the number as a product of prime powers. Each prime can appear zero up to a times, so the count is a plus one times b plus one, and so on.

Divisors of N = pᵃ qᵇ rᶜ: (a + 1)(b + 1)(c + 1)

Worked example

10 identical sweets among 3 children, each child getting at least one. Give each child one sweet first, then share the other 7 freely: C(7 + 2, 2) = C(9, 2) = 36.

Memory tricks

  • Derangements run 0, 1, 2, 9, 44 for one to five letters.Derangement: 0, 1, 2, 9, 44, ek se paanch tak.
  • Identical things in different boxes: count them with stars and bars.Same cheezein, alag dabbe: stars aur bars se gin lo.
  • Named groups never get divided by the extra factorial.Groups ke naam hain toh k! se bhaag mat do.

Try 3 practice questions

  1. Q1. 6 identical balls into 3 distinct boxes, empty boxes allowed

    1. A. 28
    2. B. 21
    3. C. 10
    4. D. 729
    Show answer

    Answer: 28

    C(6 + 2, 2) = 28

  2. Q2. 5 distinct balls into 2 distinct boxes, no box empty

    1. A. 30
    2. B. 32
    3. C. 31
    4. D. 15
    Show answer

    Answer: 30

    2⁵ = 32 ways, minus the 2 ways with one box empty

  3. Q3. 6 distinct books split into 2 piles of 3 (piles not named)

    1. A. 10
    2. B. 20
    3. C. 120
    4. D. 15
    Show answer

    Answer: 10

    6!/(3! 3!) = 20 counts named piles; the two piles can swap, so divide by 2!

Learn P & C: Derangements, Distribution & Divisors the fun way

Voice-explained cards, mini-games, full practice and the exam round. Free with one account.

Start Mathematics
PreviousBinomial TheoremNextMatrices, Determinants & Linear Systems

More from Permutations, Combinations & Binomial Theorem

  • Permutations & Combinations
  • Binomial Theorem
BRAINBIT

Bite-sized, game-like lessons for JEE, NEET, Banking and SSC aspirants.

Courses

  • Inorganic Chemistry
  • Organic Chemistry
  • Physical Chemistry
  • Physics
  • Mathematics
  • Biology
  • Logical Reasoning
  • Quantitative Aptitude
  • Data Interpretation
  • English Language
  • General Awareness
  • Typing
  • Vedic Math
  • Abacus
  • Logical Puzzles

Exams

  • JEE Main
  • JEE Advanced
  • NEET
  • IBPS PO
  • SBI PO
  • SSC CGL
  • CAT
  • RRB NTPC

Brainbit

  • Courses
  • Exams
  • Use cases
  • Pricing
  • About

© 2026 Brainbit. All rights reserved.

Privacy PolicyTerms & Conditions
Sign in
Get started
Start Mathematics