On this page
"Five balls into three boxes" can have at least five different answers, depending on words you might read past: different or identical balls, different or identical boxes, empty boxes allowed or not. Most wrong answers in this topic come from picking a formula before settling those words. This post gives a two-question test, works through each case with checked numbers, and ends with a practice routine.
Where is this in the syllabus?
The JEE (Main) 2026 syllabus lists "The fundamental principle of counting, permutations and combinations; Meaning of P(n, r) and C(n, r). Simple applications." The JEE (Advanced) 2026 brochure lists permutations and combinations. NCERT's Class 11 chapter on permutations and combinations teaches the counting principle and the formulas; the distribution methods below are applications of it that JEE papers use. Check your exam's current documents.
Our guide to permutations and combinations covers splitting people into pairs and the basic sweets-and-dividers count. This post goes through every combination of distinct and identical.
Which two questions decide the method?
Ask: are the objects distinct? and are the groups distinct? Then note any rule about empty groups or limits.
Distinct objects, distinct groups: each object chooses a group, so k groups give kⁿ ways for n objects.
Identical objects, distinct groups: line up the objects and place dividers, giving C(n + k − 1, k − 1).
Distinct objects, identical groups: split into groups and do not order them.
Identical objects, identical groups: only the group sizes matter, so list them.
Worked example 1: distinct balls, distinct boxes
Five different balls go into three different boxes.
Empty boxes allowed: each ball has 3 choices, so 3⁵ = 243.
No box empty: subtract the ways that miss a box. Missing one chosen box leaves 2⁵ = 32 ways, and there are 3 boxes to miss, so subtract 96. That removed the cases missing two boxes twice, so add back 3 × 1⁵ = 3. The total is 243 − 96 + 3 = 150.
Check by group sizes. Three non-empty groups from five balls have sizes 3, 1, 1 or 2, 2, 1. Splits of type 3, 1, 1: 5!/(3! × 1! × 1! × 2!) = 120/12 = 10, dividing by 2! because the two single balls form groups of equal size. Type 2, 2, 1: 5!/(2! × 2! × 1! × 2!) = 120/8 = 15. That makes 25 splits. Labelling them as three different boxes multiplies by 3! = 6, giving 150. Both methods agree.
Worked example 2: distinct balls, identical boxes
If the boxes are identical and none may be empty, the answer is the 25 splits counted above, with no 3! at the end. If empty boxes are allowed, add the splits into two groups (2⁴ − 1 = 15) and into one group (1): 25 + 15 + 1 = 41.
Worked example 3: fixed group sizes
Nine different books are split into groups.
Sizes 2, 3 and 4: 9!/(2! × 3! × 4!) = 362,880/288 = 1,260. The sizes are all different, so the groups are told apart by size and nothing more is divided.
Three groups of 3, unlabelled: 9!/((3!)³ × 3!) = 362,880/1,296 = 280.
Three each to three students: the students are labels, so 280 × 3! = 1,680, which is 9!/(3!)³.
Worked example 4: identical objects, with limits
Ten identical sweets go to three children, and no child may get more than 5.
Without the limit, the count is C(12, 2) = 66. Now remove the cases where one child gets 6 or more: give that child 6 first and share the other 4 freely, C(6, 2) = 15 ways, for each of 3 children, so 45. Two children cannot both get 6, since 12 is more than 10. The answer is 66 − 45 = 21.
If six identical sweets go into three identical bags, empty bags allowed, only the sizes matter: 6, 5+1, 4+2, 3+3, 4+1+1, 3+2+1 and 2+2+2, which is 7 ways.
Which mistakes cost the most marks?
Using kⁿ for identical objects, or the divider formula for distinct ones.
Dividing by 3! when group sizes differ, as in the 2, 3, 4 split.
Forgetting to add back the cases removed twice when no box may be empty.
Not checking a small case by listing.
A practice routine
The hard part is choosing the case, not the arithmetic. In a study of children practising four kinds of maths problems, Taylor and Rohrer (2010) found that mixing problem types lowered scores during practice but doubled scores on a test a day later; an analysis of errors suggested mixing helped students pair each problem with the right procedure.
Label before you count. Write "objects: distinct/identical; groups: distinct/identical; empty: yes/no" for every problem.
Mix the four cases in sets of eight, with no headings.
Count one problem two ways, as in example 1.
List a small version whenever two methods disagree.
When your count comes out too large and you cannot see why, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. Our post on counting divisors uses the same multiplication principle on numbers.
Today, rewrite five old counting questions with the three labels, and see how many you had classified wrongly.



