Count admissible constructions exactly once, then use prime exponents when factorials become too large to expand.
JEE Main · JEE Advanced80 min study guide11 indexed sections
BY THE END, YOU CAN
Choose between ordered arrangements and unordered selections.
Handle leading-zero, adjacency, separation, repetition and circular restrictions.
Use complements, inclusion-exclusion and bounded distributions with explicit cases.
Derive the exponent of a prime in a factorial.
Compute trailing zeros and composite divisibility using all required prime factors.
BEFORE YOU START
Factorials, binomial coefficients and basic set operations.
Integer prime factorization and floor notation.
Simple algebra and finite sums.
Original educational lesson. Work through the examples before revealing the practice answers. Check the current official syllabus separately; historical question frequency does not establish eligibility or predict future questions.
CONNECT THE CONCEPT TO THE EXAM
Selected exam questions & worked solutions
These selected examples are separate from the original practice below. Each identifies its exam, year and wording. They do not represent every paper or every selected year.
No source-verified exam questions have been published for this lesson yet. The worked examples and practice below are original teaching material, not past-exam questions.
01 / UNDERSTAND & APPLY
1. Define what counts as a different outcome
Before counting, decide what the objects are and when two outcomes are considered the same. Assigning a president and secretary is ordered because the roles differ. Choosing a two-person committee is unordered. Arranging distinct labelled books differs from arranging repeated letters whose copies are indistinguishable. The formula follows from this equivalence rule, not from a keyword alone.
The multiplication principle counts successive choices when the number of options at each stage is known for every earlier choice in that stage. If a later option count depends on the earlier case, split into cases first. The addition principle combines disjoint cases. Adding overlapping cases requires a correction or a disjoint reformulation.
For r ordered distinct choices from n objects without repetition, the count is n(n−1)⋯(n−r+1)=n!/(n−r)!. For an unordered r-subset, divide by r! because each selected set has exactly r! internal orders. This division is justified by equal overcounting; dividing by a factorial merely because an answer looks large is not.
A restriction is best handled at the stage where it affects choices. For a number with no leading zero, fill the leading position with a permitted nonzero digit. For parity, the last digit controls the condition and is often a good first choice. A carefully chosen order of construction can eliminate complicated correction terms.
02 / UNDERSTAND & APPLY
2. A zero in the last position changes the leading choices
Digit problems often combine no repetition, a forbidden leading zero and a divisibility condition. The last digit may need to be even, but zero behaves differently from other even digits because using it at the end removes a digit that was never allowed at the front. Treat those cases separately rather than assigning a single leading-position count.
After fixing the restricted positions, count the remaining available digits. Distinguish choosing the digits from arranging them. If the remaining positions are labelled by place value, an ordered product is appropriate. If the problem asks only for a set of digits, combinations are appropriate instead.
For divisibility by 3 or 9, the digit sum is relevant, so grouping choices by residue classes can be useful. For divisibility by 4, the last two digits matter. These are different constraints, and a parity shortcut alone does not solve them. Always check the numerical condition defining admissibility.
A small brute-force enumeration can independently verify a counting argument, but the written solution should still explain why the cases are exhaustive and disjoint. This is especially important when a zero case or a boundary length behaves differently.
ORIGINAL WORKED EXAMPLE
Four-digit even numbers with no repeated digit
How many four-digit even numbers can be formed from 0,1,2,3,4,5 without repetition?
Case 1: the units digit is 0. The thousands digit has 5 nonzero choices, and the remaining two positions have 4 and 3 choices. This gives 5·4·3=60.
Case 2: the units digit is 2 or 4, giving 2 choices. The thousands digit has 4 choices because it cannot be zero or the already used units digit.
After those positions are filled, the hundreds and tens places have 4 and 3 choices. This case gives 2·4·4·3=96.
The cases are disjoint and exhaust all even final digits. The total is 60+96=156.
Answer 156 numbers.
03 / UNDERSTAND & APPLY
3. Adjacency uses blocks; separation uses gaps
If several specified distinct objects must be consecutive, treat them as one block, arrange the block among the remaining objects, and multiply by the admissible internal orders. This works when the restriction truly says consecutive as a single group. Pairwise adjacency requirements that overlap may need a more careful interpretation.
To keep selected objects separated, first arrange the other objects and use the gaps before, between and after them. If k distinct separators have been arranged in a row, they create k+1 gaps. Placing at most one selected object in each gap prevents adjacency. Choose the occupied gaps and then arrange the selected distinct objects in them.
The gap method requires enough gaps. If more selected objects must be separated than available gaps, the count is zero. If repeated selected objects are indistinguishable, do not multiply by their factorial. If the arrangement is circular, the gap count and rotational equivalence need separate treatment.
Complement counting can be shorter for a single forbidden adjacency: total arrangements minus adjacent arrangements. With several forbidden events, their overlaps matter, leading naturally to inclusion-exclusion rather than repeated independent subtraction.
ORIGINAL WORKED EXAMPLE
Three selected objects are mutually separated
Seven distinct objects consist of three marked objects and four unmarked objects. Count row arrangements with no two marked objects adjacent.
Arrange the four unmarked objects first in 4! ways.
They create five gaps: before the first, three internal gaps, and after the last. Choose three distinct gaps for the marked objects in C(5,3) ways.
Arrange the three distinct marked objects in the chosen gaps in 3! ways.
The total is 4!·C(5,3)·3!=24·10·6=1440. Each allowed final arrangement uniquely determines the unmarked order, selected gaps and marked order, so nothing is double-counted.
Answer 1440 arrangements.
04 / UNDERSTAND & APPLY
4. Divide only by symmetries that identify outcomes
For n objects with indistinguishable groups of sizes n₁,…,n_k summing to n, the number of distinct row arrangements is n!/(n₁!⋯n_k!). Start with artificially labelled copies; permuting labels within each identical group changes no visible arrangement. Every visible arrangement has the same product of internal label permutations, justifying the division.
For n distinct objects around a circle when rotations are considered the same but reflections are different, the count is (n−1)!. Fix one distinguished object as an anchor, then arrange the rest around it. If the seats themselves are labelled, rotations do not identify outcomes and the count is n! instead.
If mirror images are also identified and all n≥3 objects are distinct, the circular count becomes (n−1)!/2. With repeated objects, rotational or reflection symmetries can have different stabilizers, so simply dividing a linear count by n or 2n may fail. State the symmetry convention and avoid overgeneralizing the distinct-object formula.
For a circular gap restriction, there are n gaps around n already arranged objects, rather than n+1 row gaps. The start and end of a row become adjacent when the row is closed into a circle. This boundary change is the source of many off-by-one counts.
ORIGINAL WORKED EXAMPLE
Repeated letters and circular conventions
How many distinct arrangements of the letters in BANANA are there? Separately, how many circular arrangements of six distinct labelled objects identify rotations but not reflections?
BANANA has six letters, with A repeated three times, N repeated twice and B once.
The distinct row count is 6!/(3!2!)=720/12=60.
For six distinct objects around an unlabelled circle, fix one object and arrange the other five, giving 5!=120.
The two divisions have different reasons: identical-letter relabelling in the first problem and rotational equivalence in the second. Neither formula should be transferred to the other setting without checking its assumptions.
Answer 60 letter arrangements; 120 circular arrangements.
For a finite universe U and forbidden events A₁,…,A_k, inclusion-exclusion counts the allowed outcomes by subtracting individual forbidden counts, adding pairwise overlaps, subtracting triple overlaps, and continuing. An outcome belonging to several forbidden sets is corrected to the proper net count by the alternating terms.
A derangement is a permutation with no object in its original labelled position. For n objects, choose j positions that are fixed, leaving (n−j)! permutations of the others. Inclusion-exclusion gives Dₙ = Σⱼ₌₀ⁿ(−1)ʲC(n,j)(n−j)! = n!Σⱼ₌₀ⁿ(−1)ʲ/j!. This is an exact integer formula, not merely an approximation n!/e.
Before applying inclusion-exclusion, define the forbidden event for each label precisely. Some intersections may be impossible, contributing zero; others may merge several constraints into one block or force particular choices. Assuming all intersections have the same size without justification can be as wrong as ignoring overlaps.
For a small number of restrictions, draw a case tree or Venn-style accounting diagram. For many symmetric restrictions, an indexed sum is cleaner. In either form, the proof should show why each overlap term has the claimed size.
ORIGINAL WORKED EXAMPLE
No object returns to its original position
Four distinct objects are assigned bijectively to four labelled positions. How many assignments put none in its original position?
There are 4!=24 total assignments. For each specified fixed position, the other objects can be assigned in 3! ways, so subtract 4·3!=24.
Add back intersections with two specified fixed positions: C(4,2)·2!=12.
Subtract the triple-fixed intersections: C(4,3)·1!=4, then add the all-fixed assignment 1.
The total is 24−24+12−4+1=9. The overlap corrections are essential because the identity permutation belongs to every forbidden set.
Answer 9 derangements.
06 / UNDERSTAND & APPLY
6. Stars and bars, then bounds
The number of nonnegative integer solutions of x₁+⋯+x_k=N is C(N+k−1,k−1), for integers N≥0 and k≥1. Represent N identical stars separated into k labelled groups by k−1 bars. Adjacent bars allow an empty group, so zero values are included. The groups are labelled even though the objects are identical.
For positive integer solutions, subtract one from each variable: yᵢ=xᵢ−1≥0. The count becomes C(N−1,k−1) when N≥k. If N<k there are no positive solutions. Lower bounds are handled by analogous shifts, provided the remaining total is nonnegative.
Upper bounds require more than the basic formula. One option is inclusion-exclusion: subtract solutions where a variable exceeds its cap after shifting that variable by cap+1, then correct overlaps. Another option is a complementary substitution when all variables are close to the cap. Choose the route that makes the residual total small.
Stars and bars does not count distributions of distinct objects without further work. Assigning N distinct objects to k labelled boxes has kᴺ unrestricted outcomes, not a binomial-coefficient count. Likewise, unlabelled boxes create a different equivalence problem.
ORIGINAL WORKED EXAMPLE
A bounded distribution with two checks
Count nonnegative integer triples x+y+z=10 with each variable at most 4.
Use the complementary variables u=4−x, v=4−y, w=4−z. They are nonnegative and satisfy u+v+w=12−10=2.
Every nonnegative triple summing to 2 automatically has each coordinate at most 4, so the transformation is a bijection with the original admissible triples.
Stars and bars gives C(2+3−1,3−1)=C(4,2)=6.
As an inclusion-exclusion check, unrestricted triples number C(12,2)=66. Subtract 3C(7,2)=63 for a variable at least 5, add 3C(2,2)=3 for two variables at least 5, and obtain 66−63+3=6.
Answer 6 triples.
07 / UNDERSTAND & APPLY
7. Count prime factors in layers instead of expanding a factorial
For a prime p and positive integer M, let v_p(M) be the largest exponent e such that pᵉ divides M. In a product, exponents add: v_p(AB)=v_p(A)+v_p(B). For an integer quotient A/B, they subtract. These rules let us analyze factorial expressions without writing their enormous decimal values.
Among 1,2,…,n, exactly floor(n/p) numbers contribute at least one factor p. Multiples of p² contribute an additional factor, counted by floor(n/p²). Multiples of p³ contribute one more, and so on. Therefore v_p(n!)=floor(n/p)+floor(n/p²)+floor(n/p³)+⋯, stopping when the power exceeds n.
The layers intentionally count a number such as p³ three times, because it contributes three prime factors. Counting only multiples of p would miss the extra factors in higher powers. The formula requires p to be prime; using a composite base directly in the same floor sum does not generally give its exponent in a factorial.
For a binomial coefficient, v_p(C(n,r)) = v_p(n!)−v_p(r!)−v_p((n−r)!). The result must be a nonnegative integer because the binomial coefficient is an integer. This provides a strong arithmetic check and can establish divisibility by p without evaluating the coefficient itself.
v_p(n!) = Σⱼ≥1 floor(n/pʲ)
For prime p; only finitely many summands are nonzero.
v_p(C(n,r)) = v_p(n!) − v_p(r!) − v_p((n−r)!)
For integers 0≤r≤n; subtract prime exponents of the factorial denominators.
ORIGINAL WORKED EXAMPLE
A factorial and a binomial coefficient
Find v₂(20!) and v₂(C(10,4)).
For 20!, count factors in layers: floor(20/2)+floor(20/4)+floor(20/8)+floor(20/16)=10+5+2+1=18.
For the binomial coefficient, v₂(10!)=5+2+1=8, v₂(4!)=2+1=3, and v₂(6!)=3+1=4.
Subtract: v₂(C(10,4))=8−3−4=1.
Indeed C(10,4)=210, divisible by 2 but not by 4. The factor 2¹⁸ divides 20!, while 2¹⁹ does not.
Answer v₂(20!)=18; v₂(C(10,4))=1.
08 / UNDERSTAND & APPLY
8. Composite divisibility is limited by the scarcest required prime
A trailing zero in base ten corresponds to a factor 10=2·5. In n!, factors of 2 are at least as plentiful as factors of 5, so the number of trailing decimal zeros is v₅(n!). This counts factors of 5 in all their multiplicities, including the extra one in 25,125 and higher powers.
For a general base b=p₁^α₁⋯p_k^α_k, the largest e such that bᵉ divides M is minᵢ floor(v_(pᵢ)(M)/αᵢ). Each copy of b consumes αᵢ factors of pᵢ for every prime in its factorization. The least available complete group limits how many copies of b can be formed.
This is also the number of trailing zeros in the base-b representation of M. Decimal intuition alone is insufficient for a different base. For b=12=2²·3, two factors of 2 and one factor of 3 are required per zero; counting only factors of 12 among the integers misses contributions assembled across different factorial factors.
To find the smallest n for a factorial divisibility condition, use the monotonicity of prime exponents and check the first candidate and the previous integer. The exponent can jump by more than one when n is a higher prime power. A target exponent need not be attained at every integer value, so distinguish “at least” from “exactly.”
ORIGINAL WORKED EXAMPLE
Trailing zeros and a composite power
Find the number of decimal trailing zeros of 100!, and the largest k for which 12ᵏ divides 20!.
For 100!, v₅= floor(100/5)+floor(100/25)=20+4=24, so there are 24 decimal trailing zeros.
For 20!, the earlier calculation gives v₂=18. Also v₃=floor(20/3)+floor(20/9)=6+2=8.
Since 12=2²·3, each copy needs two twos and one three. Thus k=min(floor(18/2),8)=min(9,8)=8.
The limiting resource is the factor 3. The answer is not floor(20/12)=1, because factors contributing to 12 can come from different terms in 20!.
Answer 100! has 24 trailing decimal zeros; the largest k is 8.
09 / UNDERSTAND & APPLY
9. Original practice: build and classify the choices
Explain the admissible construction behind each count. If you divide by a symmetry factor, state why every final outcome has exactly that many labelled representations.
ORIGINAL PRACTICE · 1
How many three-digit numbers with distinct digits can be formed from 0,1,2,3,4?
Reveal answer & reasoning
48.
The hundreds digit has 4 nonzero choices. The tens digit then has 4 remaining choices, including zero if unused, and the units digit has 3. Product 4·4·3=48.
ORIGINAL PRACTICE · 2
Arrange six distinct people in a row with two specified people adjacent.
Reveal answer & reasoning
240.
Treat the pair as one block, creating five objects to arrange in 5! ways. The pair has two internal orders, giving 2·120=240.
ORIGINAL PRACTICE · 3
How many distinct arrangements of AABBC are there?
Reveal answer & reasoning
30.
Five letters have two identical A copies and two identical B copies. Divide 5! by 2!2! to obtain 30.
ORIGINAL PRACTICE · 4
Count circular arrangements of five distinct people when rotations are the same and reflections different.
Reveal answer & reasoning
24.
Fix one person as an anchor and arrange the other four, giving 4!=24. Labelled seats would instead give 5!.
ORIGINAL PRACTICE · 5
Count positive integer solutions of x+y+z=8.
Reveal answer & reasoning
21.
Subtract one from each variable to get a nonnegative sum of 5 in three labelled variables. The count is C(7,2)=21, equivalently C(8−1,3−1).
ORIGINAL PRACTICE · 6
Count nonnegative integer solutions of x+y+z=5.
Reveal answer & reasoning
21.
Stars and bars gives C(5+3−1,3−1)=C(7,2)=21. This happens to match the preceding different problem after its lower-bound shift.
ORIGINAL PRACTICE · 7
How many ways assign three distinct objects to two labelled boxes with no restriction on empty boxes?
Reveal answer & reasoning
8.
Each distinct object independently chooses one of two boxes, giving 2³. Stars and bars would count distributions of identical objects, a different experiment.
10 / UNDERSTAND & APPLY
10. Original practice: identify the prime resources
Factor a composite base first. Keep prime exponents separate until the final minimum, and check neighboring integers for a minimum-n question.
ORIGINAL PRACTICE · 1
Find v₃(30!).
Reveal answer & reasoning
14.
The layers are floor(30/3)+floor(30/9)+floor(30/27)=10+3+1=14.
ORIGINAL PRACTICE · 2
How many trailing decimal zeros does 50! have?
Reveal answer & reasoning
12.
Count fives: floor(50/5)+floor(50/25)=10+2=12.
ORIGINAL PRACTICE · 3
Find the largest k such that 8ᵏ divides 10!.
Reveal answer & reasoning
2.
Since 8=2³ and v₂(10!)=5+2+1=8, the number of complete groups of three twos is floor(8/3)=2.
ORIGINAL PRACTICE · 4
Find v₅(C(10,4)).
Reveal answer & reasoning
1.
The exponent is v₅(10!)−v₅(4!)−v₅(6!)=2−0−1=1. The exact coefficient 210 has one factor 5.
ORIGINAL PRACTICE · 5
Find the smallest n such that 2⁸ divides n!.
Reveal answer & reasoning
10.
v₂(9!)=4+2+1=7, while v₂(10!)=5+2+1=8. Monotonicity proves 10 is the first qualifying value.
ORIGINAL PRACTICE · 6
Find the largest k such that 18ᵏ divides 10!.
Reveal answer & reasoning
2.
Factor 18=2·3². We have v₂(10!)=8 and v₃(10!)=3+1=4. Thus k=min(8,floor(4/2))=2.
ORIGINAL PRACTICE · 7
Why is floor(n/p) alone insufficient for v_p(n!)?
Reveal answer & reasoning
Multiples of p²,p³,… contribute additional copies of p.
For example, 8 contributes three factors of 2 to a factorial. Counting it once among the even numbers misses two of those factors; the higher-power layers supply them.
11 / UNDERSTAND & APPLY
11. Every count needs a one-to-one accounting argument
A restricted count is complete when every valid outcome is produced and no invalid outcome is produced, with any multiple representations corrected by a justified factor. Case splits must be disjoint and exhaustive. Blocks and gaps must reconstruct the final arrangement uniquely. Stars and bars must match identical objects and labelled groups.
The typical errors are treating order as irrelevant when roles or positions are labelled, allowing a leading zero, using row gaps for a circle, dividing by a symmetry factor in a repeated-object problem without checking stabilizers, and subtracting overlapping forbidden cases without adding their intersections back.
For factorial divisibility, the typical errors are counting only multiples of the prime, using the prime-exponent floor sum with a composite base, forgetting the exponent of a prime in that base, and assuming an “exactly k zeros” condition behaves like an “at least k zeros” condition. Prime-factor resource accounting resolves all of them.
A useful final check compares the restricted count with the unrestricted total, enumerates a small instance, or verifies a factorial valuation by factoring a smaller analogue. These checks do not replace the argument, but they are excellent at exposing a missing case or a false independence assumption.
KEEP THE BIG IDEAS
Quick revision
Decide when outcomes are different before choosing a counting formula.
Use blocks for adjacency, gaps for separation and inclusion-exclusion for overlapping exclusions.
Stars and bars concerns identical objects in labelled groups.
Prime factors in a factorial are counted in layers of p,p²,p³,… .
Composite divisibility is the minimum of the available complete prime-factor groups.
The teaching notes, worked explanations and original practice are written for this lesson. Separately labeled selected exam questions identify their exam, year, source and whether wording is paraphrased or an exact excerpt. Educational references do not certify current exam coverage.
Original theorem/proof reference inspected for the prime-exponent floor sum. The lesson derives it independently by multiplicity layers; all examples and counting cases are original.