Skip to main content

Combinatorics — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for combinatorics.

UT-1: Permutations vs Combinations (Order Matters)

Question:

A committee of 4 is to be selected from 10 people. In how many ways can this be done if:

(a) There are no restrictions. (b) Two specific people must both be on the committee. (c) Two specific people refuse to serve together.

Solution:

(a) (104)=10!4!×6!=10×9×8×74×3×2×1=210\dbinom{10}{4} = \dfrac{10!}{4! \times 6!} = \dfrac{10 \times 9 \times 8 \times 7}{4 \times 3 \times 2 \times 1} = 210.

(b) If both specific people are included, choose 2 more from the remaining 8:

(82)=28\dbinom{8}{2} = 28.

(c) Total ways minus ways where both are together:

210(82)=21028=182210 - \dbinom{8}{2} = 210 - 28 = 182.


UT-2: People Sitting Together Restriction

Question:

In how many ways can 5 boys and 3 girls be arranged in a row if:

(a) All 3 girls must sit together. (b) No two girls sit together.

Solution:

(a) Treat the 3 girls as a single block. Then we have 5 boys + 1 block = 6 entities.

6!×3!=720×6=43206! \times 3! = 720 \times 6 = 4320.

(b) First arrange the 5 boys: 5!=1205! = 120 ways.

This creates 6 gaps (including ends): _B_B_B_B_B_\_B\_B\_B\_B\_B\_

Choose 3 of the 6 gaps for the girls: (63)=20\dbinom{6}{3} = 20.

Arrange the 3 girls in those gaps: 3!=63! = 6.

Total: 120×20×6=14400120 \times 20 \times 6 = 14400.


UT-3: Binomial Theorem Coefficient Extraction

Question:

Find the coefficient of x5x^5 in the expansion of (2x3)8(2x - 3)^8.

Solution:

The general term in (a+b)n(a + b)^n is (nr)anrbr\dbinom{n}{r} a^{n-r} b^r.

Here, a=2xa = 2x, b=3b = -3, n=8n = 8:

Tr+1=(8r)(2x)8r(3)rT_{r+1} = \dbinom{8}{r}(2x)^{8-r}(-3)^r

For the x5x^5 term: 8r=5    r=38 - r = 5 \implies r = 3.

T4=(83)(2x)5(3)3=56×32x5×(27)=56×32×(27)×x5T_4 = \dbinom{8}{3}(2x)^5(-3)^3 = 56 \times 32x^5 \times (-27) = 56 \times 32 \times (-27) \times x^5

=48384x5= -48384x^5

Coefficient: 48384-48384.


UT-4: Circular Permutations

Question:

In how many ways can 6 people sit around a circular table?

Solution:

For circular arrangements, we fix one person to eliminate rotational symmetry.

Number of arrangements =(61)!=5!=120= (6 - 1)! = 5! = 120.

A common mistake is using 6!=7206! = 720, which counts the same arrangement multiple times (one for each rotation).


UT-5: Binomial Theorem with Rational Exponent

Question:

Find the first three terms in the expansion of (1+2x)3(1 + 2x)^{-3} in ascending powers of xx, up to and including the term in x2x^2.

Solution:

Using the generalised binomial theorem:

(1+2x)3=1+(3)(2x)+(3)(4)2!(2x)2+(1 + 2x)^{-3} = 1 + (-3)(2x) + \frac{(-3)(-4)}{2!}(2x)^2 + \cdots

=16x+122×4x2+= 1 - 6x + \frac{12}{2} \times 4x^2 + \cdots

=16x+24x2+= 1 - 6x + 24x^2 + \cdots


Integration Tests

Tests synthesis of combinatorics with other topics.

IT-1: Combinatorics and Probability (with Probability)

Question:

A bag contains 4 red and 6 blue balls. Three balls are drawn without replacement. Find the probability that exactly 2 are red.

Solution:

Total ways: (103)=120\dbinom{10}{3} = 120.

Ways with exactly 2 red: (42)×(61)=6×6=36\dbinom{4}{2} \times \dbinom{6}{1} = 6 \times 6 = 36.

P=36120=310P = \frac{36}{120} = \frac{3}{10}


IT-2: Combinatorics and Sequences (with Sequences and Series)

Question:

The binomial expansion of (1+x)n(1 + x)^n has its coefficients in arithmetic progression. Find nn.

Solution:

The coefficients are C0,C1,C2,,CnC_0, C_1, C_2, \ldots, C_n where Cr=(nr)C_r = \dbinom{n}{r}.

If three consecutive coefficients are in AP: 2Cr=Cr1+Cr+12C_r = C_{r-1} + C_{r+1}.

2(nr)=(nr1)+(nr+1)2\dbinom{n}{r} = \dbinom{n}{r-1} + \dbinom{n}{r+1}

Using (nr)=n!r!(nr)!\dbinom{n}{r} = \dfrac{n!}{r!(n-r)!}:

2r!(nr)!=1(r1)!(nr+1)!+1(r+1)!(nr1)!\frac{2}{r!(n-r)!} = \frac{1}{(r-1)!(n-r+1)!} + \frac{1}{(r+1)!(n-r-1)!}

Multiply through by (r+1)!(nr+1)!(r+1)!(n-r+1)!:

2(r+1)(nr+1)=(r+1)r+(nr)(nr+1)2(r+1)(n-r+1) = (r+1)r + (n-r)(n-r+1)

This is complex. For ALL coefficients to be in AP (not just three consecutive), there is no such n>2n > 2. The question likely means: find nn such that three specific consecutive coefficients form an AP. For C1,C2,C3C_1, C_2, C_3:

2(n2)=(n1)+(n3)2\dbinom{n}{2} = \dbinom{n}{1} + \dbinom{n}{3}

n(n1)=n+n(n1)(n2)6n(n-1) = n + \dfrac{n(n-1)(n-2)}{6}

If n0n \neq 0: n1=1+(n1)(n2)6n - 1 = 1 + \dfrac{(n-1)(n-2)}{6}

6(n2)=(n1)(n2)6(n - 2) = (n-1)(n-2)

If n2n \neq 2: 6=n1    n=76 = n - 1 \implies n = 7.

Check n=7n = 7: (71)=7\dbinom{7}{1} = 7, (72)=21\dbinom{7}{2} = 21, (73)=35\dbinom{7}{3} = 35.

2(21)=42=7+35=422(21) = 42 = 7 + 35 = 42. Yes.

Therefore n=7n = 7.


IT-3: Combinatorics and Algebra (with Polynomials)

Question:

If (n2)=55\dbinom{n}{2} = 55, find nn and evaluate (n4)\dbinom{n}{4}.

Solution:

(n2)=n(n1)2=55\dbinom{n}{2} = \frac{n(n-1)}{2} = 55

n(n1)=110n(n-1) = 110

n2n110=0n^2 - n - 110 = 0

(n11)(n+10)=0(n - 11)(n + 10) = 0

n=11n = 11 (since n0n \geq 0).

(114)=11×10×9×84×3×2×1=330\dbinom{11}{4} = \frac{11 \times 10 \times 9 \times 8}{4 \times 3 \times 2 \times 1} = 330


Worked Examples

WE-1: Arrangement with Restrictions

Question:

In how many ways can the letters of the word "ARRANGE" be arranged such that the two R's are not adjacent?

Solution:

Total letters: A, R, R, A, N, G, E (7 letters, with two A's and two R's identical).

Total arrangements: 7!2!×2!=50404=1260\dfrac{7!}{2! \times 2!} = \dfrac{5040}{4} = 1260.

Treat the two R's as one block: 6 entities with two A's identical.

Arrangements with R's together: 6!2!=360\dfrac{6!}{2!} = 360.

Arrangements with R's not adjacent: 1260360=9001260 - 360 = 900.


WE-2: Selecting with Conditions

Question:

From 6 men and 4 women, a committee of 5 is to be formed with at least 2 women. In how many ways can this be done?

Solution:

Total ways without restriction: (105)=252\dbinom{10}{5} = 252.

Ways with fewer than 2 women (0 or 1 woman):

  • 0 women, 5 men: (40)(65)=6\dbinom{4}{0}\dbinom{6}{5} = 6.
  • 1 woman, 4 men: (41)(64)=4×15=60\dbinom{4}{1}\dbinom{6}{4} = 4 \times 15 = 60.

Ways with at least 2 women: 252660=186252 - 6 - 60 = 186.

Alternatively, direct counting:

  • 2 women, 3 men: (42)(63)=6×20=120\dbinom{4}{2}\dbinom{6}{3} = 6 \times 20 = 120.
  • 3 women, 2 men: (43)(62)=4×15=60\dbinom{4}{3}\dbinom{6}{2} = 4 \times 15 = 60.
  • 4 women, 1 man: (44)(61)=6\dbinom{4}{4}\dbinom{6}{1} = 6.

Total: 120+60+6=186120 + 60 + 6 = 186.


WE-3: Binomial Expansion Finding Constant Term

Question:

Find the constant term in the expansion of (x2+2x)6\left(x^2 + \dfrac{2}{x}\right)^6.

Solution:

General term: Tr+1=(6r)(x2)6r(2x)r=(6r)2rx122rxr=(6r)2rx123rT_{r+1} = \dbinom{6}{r}(x^2)^{6-r}\left(\dfrac{2}{x}\right)^r = \dbinom{6}{r} \cdot 2^r \cdot x^{12-2r} \cdot x^{-r} = \dbinom{6}{r} \cdot 2^r \cdot x^{12-3r}.

For the constant term: 123r=0    r=412 - 3r = 0 \implies r = 4.

T5=(64)24x0=15×16=240T_5 = \dbinom{6}{4} \cdot 2^4 \cdot x^0 = 15 \times 16 = 240


WE-4: Permutation with Identical Objects

Question:

How many distinct arrangements can be made from the letters of "MISSISSIPPI"?

Solution:

Total letters: 11 (M:1, I:4, S:4, P:2).

11!4!×4!×2!=3991680024×24×2=399168001152=34650\frac{11!}{4! \times 4! \times 2!} = \frac{39916800}{24 \times 24 \times 2} = \frac{39916800}{1152} = 34650


WE-5: Binomial Theorem Middle Term

Question:

Find the middle term in the expansion of (2x1x)10\left(2x - \dfrac{1}{x}\right)^{10}.

Solution:

n=10n = 10, so there are 11 terms. The middle term is the 6th term (r=5r = 5).

T6=(105)(2x)5(1x)5=252×32x5×(1x5)=252×32×(1)=8064T_6 = \dbinom{10}{5}(2x)^5\left(-\frac{1}{x}\right)^5 = 252 \times 32x^5 \times \left(-\frac{1}{x^5}\right) = 252 \times 32 \times (-1) = -8064


WE-6: Number of Ways to Distribute Objects

Question:

In how many ways can 8 different books be distributed among 3 students such that each student gets at least one book?

Solution:

This is equivalent to counting surjective (onto) functions from an 8-element set to a 3-element set.

By the inclusion-exclusion principle:

38(31)28+(32)18=65613×256+3=6561768+3=57963^8 - \dbinom{3}{1} \cdot 2^8 + \dbinom{3}{2} \cdot 1^8 = 6561 - 3 \times 256 + 3 = 6561 - 768 + 3 = 5796


WE-7: Seating Arrangement with Gender Alternation

Question:

In how many ways can 4 men and 4 women be seated in a row if men and women must alternate?

Solution:

Two possible patterns: MWMWMWMW or WMWMWMWM.

For each pattern: 4!×4!=24×24=5764! \times 4! = 24 \times 24 = 576 ways.

Total: 2×576=11522 \times 576 = 1152 ways.


WE-8: Paths on a Grid

Question:

How many shortest paths are there from point A(0,0)A(0, 0) to point B(5,3)B(5, 3) on a grid, moving only right or up?

Solution:

Each shortest path consists of 5 right moves (R) and 3 up moves (U), for a total of 8 moves.

The number of distinct arrangements of 5 R's and 3 U's:

(85)=(83)=8×7×63×2×1=56\dbinom{8}{5} = \dbinom{8}{3} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56


Common Pitfalls

  1. Confusing permutations with combinations. Use permutations (nPr{}_nP_r) when order matters (e.g. arranging people in a line) and combinations ((nr)\dbinom{n}{r}) when order does not matter (e.g. selecting a committee). Ask yourself: does swapping two selected items create a new outcome?

  2. Double counting in "at least" problems. When counting arrangements with conditions like "at least 2 women," either count each case separately (2 women, 3 women, 4 women) or use the complement method (total minus cases with 0 or 1 woman). Mixing these approaches leads to double counting.

  3. Forgetting to divide by factorials for identical objects. When arranging letters or objects with identical elements, always divide by the factorial of the count of each set of identical objects. Failing to do so inflates the count.

  4. Incorrect binomial coefficient in expansion. In (a+b)n(a + b)^n, the general term is (nr)anrbr\dbinom{n}{r} a^{n-r} b^r. A common error is swapping the exponents: writing arbnra^r b^{n-r}. Always identify which term is "aa" and which is "bb" at the start.

  5. Not considering all valid patterns in arrangement problems. For gender alternation problems, remember that both M-W-M-W and W-M-W-M patterns are valid. Missing one pattern halves the answer.


DSE Exam-Style Questions

DSE-1

(a) Find the coefficient of x3x^3 in the expansion of (1+2x)7(1 + 2x)^7. (3 marks) (b) Find the coefficient of x3x^3 in the expansion of (1x)(1+2x)7(1 - x)(1 + 2x)^7. (3 marks) (c) Using your answers, find the coefficient of x3x^3 in (1+x)(1+2x)7(1 + x)(1 + 2x)^7. (1 mark)

Solution:

(a) Tr+1=(7r)(2x)rT_{r+1} = \dbinom{7}{r}(2x)^r. For x3x^3: r=3r = 3.

Coefficient =(73)23=35×8=280= \dbinom{7}{3} \cdot 2^3 = 35 \times 8 = 280.

(b) (1x)(1+2x)7=(1+2x)7x(1+2x)7(1 - x)(1 + 2x)^7 = (1 + 2x)^7 - x(1 + 2x)^7.

Coefficient of x3x^3: coefficient from (1+2x)7(1+2x)^7 minus coefficient of x2x^2 from (1+2x)7(1+2x)^7.

Coefficient of x2x^2: (72)22=21×4=84\dbinom{7}{2} \cdot 2^2 = 21 \times 4 = 84.

Coefficient of x3x^3: 28084=196280 - 84 = 196.

(c) (1+x)(1+2x)7=(1+2x)7+x(1+2x)7(1 + x)(1 + 2x)^7 = (1 + 2x)^7 + x(1 + 2x)^7.

Coefficient of x3x^3: 280+84=364280 + 84 = 364.


DSE-2

A debating team of 4 is to be selected from 7 boys and 5 girls.

(a) In how many ways can the team be selected if there are no restrictions? (1 mark) (b) In how many ways can the team be selected if it must include at least 1 girl? (3 marks) (c) In how many ways can the team be selected if two particular boys refuse to be on the same team? (3 marks)

Solution:

(a) (124)=495\dbinom{12}{4} = 495.

(b) Complement: total minus all boys.

495(74)=49535=460495 - \dbinom{7}{4} = 495 - 35 = 460.

(c) Total minus ways where both particular boys are together.

Ways with both: choose 2 more from remaining 10: (102)=45\dbinom{10}{2} = 45.

49545=450495 - 45 = 450.


DSE-3

Find the first four terms in the expansion of (13x)1/2(1 - 3x)^{1/2} in ascending powers of xx. State the range of values of xx for which the expansion is valid. (5 marks)

Solution:

Using the generalised binomial theorem with n=12n = \dfrac{1}{2}, a=1a = 1, b=3xb = -3x:

(13x)1/2=1+12(3x)+12×(12)2!(3x)2+12(12)(32)3!(3x)3+(1 - 3x)^{1/2} = 1 + \frac{1}{2}(-3x) + \frac{\frac{1}{2} \times \left(-\frac{1}{2}\right)}{2!}(-3x)^2 + \frac{\frac{1}{2}\left(-\frac{1}{2}\right)\left(-\frac{3}{2}\right)}{3!}(-3x)^3 + \cdots

=13x2+1429x2+386(27x3)+= 1 - \frac{3x}{2} + \frac{-\frac{1}{4}}{2} \cdot 9x^2 + \frac{\frac{3}{8}}{6} \cdot (-27x^3) + \cdots

=13x29x2827x316+= 1 - \frac{3x}{2} - \frac{9x^2}{8} - \frac{27x^3}{16} + \cdots

The expansion is valid when 3x<1|-3x| < 1, i.e. x<13|x| < \dfrac{1}{3}.


DSE-4

5 couples (10 people) are to be seated around a circular table.

(a) In how many ways can they be seated if there are no restrictions? (2 marks) (b) In how many ways can they be seated if each couple must sit together? (3 marks) (c) In how many ways can they be seated if no couple sits together? (3 marks)

Solution:

(a) Circular arrangement: (101)!=9!=362880(10 - 1)! = 9! = 362880.

(b) Treat each couple as a block: 5 blocks.

(51)!=4!=24(5 - 1)! = 4! = 24 arrangements of blocks.

Each block has 2!=22! = 2 internal arrangements.

Total: 24×25=24×32=76824 \times 2^5 = 24 \times 32 = 768.

(c) Total minus couples together: 9!768=362880768=3621129! - 768 = 362880 - 768 = 362112.


DSE-5

The expansion of (1+ax)n(1 + ax)^n has coefficients of x2x^2 and x3x^3 in the ratio 1:21 : 2. Find aa and nn. (4 marks)

Solution:

Coefficient of x2x^2: (n2)a2=n(n1)2a2\dbinom{n}{2}a^2 = \dfrac{n(n-1)}{2}a^2.

Coefficient of x3x^3: (n3)a3=n(n1)(n2)6a3\dbinom{n}{3}a^3 = \dfrac{n(n-1)(n-2)}{6}a^3.

Ratio:

n(n1)2a2n(n1)(n2)6a3=12\frac{\frac{n(n-1)}{2}a^2}{\frac{n(n-1)(n-2)}{6}a^3} = \frac{1}{2}

3(n2)a=12\frac{3}{(n-2)a} = \frac{1}{2}

(n2)a=6(n-2)a = 6

Since aa and nn are positive integers: possible pairs (a,n)(a, n) are (1,8),(2,5),(3,4),(6,3)(1, 8), (2, 5), (3, 4), (6, 3).

All satisfy (n2)a=6(n-2)a = 6. The problem has multiple solutions unless additional constraints are given. If we assume n3n \geq 3 (needed for x3x^3 term to exist), all four are valid.