QlarIITy

MathematicsJEE Main 2023 · 6 AprilInteger

The number of ways of giving 20 distinct oranges to 3 children such that each child gets at least one orange is _____

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. Different objects with no one left out are counted by inclusion and exclusion.

Concept refresher. The number of ways to give nn different objects to 3 people so that each gets at least one is

N=3n−3×2n+3N = 3^n - 3 \times 2^n + 3

by inclusion and exclusion.

Picture the situation. Each orange is different, so giving out the oranges means choosing a child for every orange. Without any condition each orange has three possible owners. The condition that no child is left out is handled by removing the assignments in which some child receives nothing.

Approach. Apply inclusion and exclusion to the assignments that leave out one or two children.

  1. Step 1: All assignments

    Each of the 20 different oranges can go to any of the 3 children, so there are 3203^{20} assignments.

  2. Step 2: Remove the bad ones

    Assignments in which a given child gets nothing number 2202^{20}, and there are 3 such children. Assignments in which two given children get nothing number 1, and they have been removed twice, so 3 are added back.

  3. Step 3: Evaluate

    So the number of ways is 320−3×220+33^{20} - 3 \times 2^{20} + 3. With 320=34867844013^{20} = 3486784401 and 220=10485762^{20} = 1048576 this is 3486784401−3145728+33486784401 - 3145728 + 3, which equals 3483638676.

Answer. 3483638676

Sanity check. The same formula with 3 oranges gives 27−24+3=627 - 24 + 3 = 6, the 3!3! ways of giving one orange to each child.

Common wrong answers

  • 3483638673: Forgetting to add back the 3 assignments that give every orange to one child gives 3483638673.
  • 171: Treating the oranges as identical gives 19C2=171{}^{19}C_2 = 171, which counts only how many oranges each child gets.

Key takeaway

The trap. Assignments that leave out two children are removed twice and must be added back.

How toppers think. They test the formula on a tiny case before using it on large numbers.

Remember. N=3n−3×2n+3N = 3^n - 3 \times 2^n + 3

More on Distribution Problems