∑GATE DA Atlas

Counting — Permutations and Combinations

The sum and product rules, permutations (with and without repetition, of multisets, circular), combinations, stars and bars, the binomial and multinomial theorems, inclusion–exclusion, derangements and the pigeonhole principle — the toolkit for every "equally likely outcomes" probability question.

Section 110 practice questions

Almost every probability question on equally likely outcomes reduces to counting: P(E)=∣E∣/∣S∣P(E) = |E| / |S|. GATE uses counting both directly (NAT questions asking "how many ways") and inside probability problems (cards, balls in urns, committees, arrangements).

The two basic rules

  • Sum rule. If a task can be done in one of mm ways or one of nn ways, with no overlap, it can be done in m+nm + n ways.
  • Product rule. If a task is a sequence of two steps with mm choices for the first and nn for the second (for each first choice), it can be done in m⋅nm \cdot n ways.

Permutations — ordered selections

SituationCount
Arrange all nn distinct objectsn!n!
Arrange rr of nn distinct objects (no repetition)nPr=n!(n−r)!^nP_r = \dfrac{n!}{(n-r)!}
Sequences of length rr from nn symbols, repetition allowednrn^r
Arrange a multiset with n1,n2,…,nkn_1, n_2, \dots, n_k copies (∑ni=n\sum n_i = n)n!n1! n2!⋯nk!\dfrac{n!}{n_1!\,n_2!\cdots n_k!}
Circular arrangement of nn distinct objects(n−1)!(n-1)!
Circular, where clockwise = anticlockwise (necklace, garland)(n−1)!2\dfrac{(n-1)!}{2}

Why circular is (n−1)!(n-1)!: each circular seating corresponds to exactly nn linear seatings (its rotations), so n!/nn!/n.

Restrictions

  • "Together": glue the items into one block, arrange the blocks, then multiply by the internal arrangements of the block.
  • "Not together": total minus "together", or use the gap method — arrange the other items first, then choose gaps for the separated ones.

Combinations — unordered selections

(nr)=n!r! (n−r)!=nPrr!\binom{n}{r} = \frac{n!}{r!\,(n-r)!} = \frac{^nP_r}{r!}

Key properties:

  • (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r} (choosing who's in = choosing who's out).
  • Pascal's rule: (nr)=(n−1r−1)+(n−1r)\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r} (either a particular item is chosen or not).
  • ∑r=0n(nr)=2n\sum_{r=0}^n \binom{n}{r} = 2^n — the number of subsets of an nn-set.
  • Vandermonde: (m+nr)=∑k(mk)(nr−k)\binom{m+n}{r} = \sum_k \binom{m}{k}\binom{n}{r-k}.

Distributing objects into boxes

ObjectsBoxesConstraintCount
distinct (nn)distinct (kk)anyknk^n
distinctdistincteach box non-emptyk! S(n,k)k!\,S(n,k) (surjections) =∑j=0k(−1)j(kj)(k−j)n= \sum_{j=0}^{k} (-1)^j\binom{k}{j}(k-j)^n
identical (nn)distinct (kk)any(n+k−1k−1)\binom{n+k-1}{k-1} (stars and bars)
identicaldistincteach box ≥1\ge 1(n−1k−1)\binom{n-1}{k-1}

Stars and bars

The non-negative integer solutions of x1+⋯+xk=nx_1 + \dots + x_k = n correspond to arrangements of nn stars and k−1k-1 bars: (n+k−1k−1)\binom{n+k-1}{k-1}.

  • Lower bounds xi≥aix_i \ge a_i: substitute yi=xi−aiy_i = x_i - a_i and reduce nn.
  • Upper bounds xi≤bix_i \le b_i: use inclusion–exclusion on the violated bounds.

Binomial and multinomial theorems

(x+y)n=∑k=0n(nk)xkyn−k,(x1+⋯+xm)n=∑k1+⋯+km=nn!k1!⋯km! x1k1⋯xmkm.(x+y)^n = \sum_{k=0}^n \binom{n}{k} x^k y^{n-k}, \qquad (x_1 + \dots + x_m)^n = \sum_{k_1+\dots+k_m=n} \frac{n!}{k_1!\cdots k_m!}\, x_1^{k_1}\cdots x_m^{k_m}.

Useful consequences: ∑k(−1)k(nk)=0\sum_k (-1)^k \binom{n}{k} = 0, ∑kk(nk)=n2n−1\sum_k k\binom{n}{k} = n2^{n-1}, ∑k(nk)2=(2nn)\sum_k \binom{n}{k}^2 = \binom{2n}{n}.

Inclusion–exclusion

∣A1∪⋯∪An∣=∑i∣Ai∣−∑i<j∣Ai∩Aj∣+∑i<j<k∣Ai∩Aj∩Ak∣−⋯+(−1)n+1∣A1∩⋯∩An∣.|A_1 \cup \dots \cup A_n| = \sum_i |A_i| - \sum_{i<j} |A_i \cap A_j| + \sum_{i<j<k} |A_i\cap A_j\cap A_k| - \dots + (-1)^{n+1}|A_1\cap\dots\cap A_n|.

Use it whenever the question says "at least one", "none of", or "not divisible by any of".

Derangements

Permutations of nn items with no item in its original position:

Dn=n!∑k=0n(−1)kk!,Dn=(n−1)(Dn−1+Dn−2),D_n = n!\sum_{k=0}^{n} \frac{(-1)^k}{k!}, \qquad D_n = (n-1)(D_{n-1} + D_{n-2}),

with D1=0,D2=1,D3=2,D4=9,D5=44,D6=265D_1 = 0, D_2 = 1, D_3 = 2, D_4 = 9, D_5 = 44, D_6 = 265. The probability that a random permutation is a derangement tends to 1/e≈0.36791/e \approx 0.3679.

The pigeonhole principle

If NN objects go into kk boxes, some box holds at least ⌈N/k⌉\lceil N/k \rceil objects. It answers "minimum number needed to guarantee…" questions.

Counting in probability problems

Selecting with and without replacement

Draw rr items from nnOrderedUnordered
without replacementn!(n−r)!\dfrac{n!}{(n-r)!}(nr)\dbinom{n}{r}
with replacementnrn^r(n+r−1r)\dbinom{n+r-1}{r}

Quick revision

Practice questions

GATE-style questions: 5 one-mark and 5 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.

Q1MCQ1 mark

In how many ways can the letters of the word STATISTICS be arranged?

Q2NAT1 mark

The number of non-negative integer solutions of x1+x2+x3+x4=10x_1 + x_2 + x_3 + x_4 = 10 is ______.

Q3NAT2 marks

The number of integer solutions of x1+x2+x3=15x_1 + x_2 + x_3 = 15 with x1≥2,  x2≥3,  0≤x3≤5x_1 \ge 2,\; x_2 \ge 3,\; 0 \le x_3 \le 5 is ______.

Q4MCQ1 mark

Eight people sit around a circular table. In how many arrangements do two particular people, P and Q, sit next to each other? (Rotations of the same seating are considered identical.)

Q5NAT2 marks

Five letters are placed at random into five addressed envelopes, one letter per envelope. The number of ways in which no letter goes into its correct envelope is ______.

Q6MSQ2 marks

Which of the following identities are true for all integers n≥1n \ge 1?

One or more options are correct.

Q7NAT1 mark

A committee of 5 is chosen from 6 men and 4 women. The number of committees with at least 2 women is ______.

Q8MCQ1 mark

What is the minimum number of people needed in a room to guarantee that at least 3 of them have their birthday in the same month?

Q9NAT2 marks

How many integers between 1 and 1000 (inclusive) are divisible by none of 2, 3 and 5?

Q10NAT2 marks

The coefficient of x3y2zx^3 y^2 z in the expansion of (x+2y+z)6(x + 2y + z)^6 is ______.