1. Fundamental Principles of Counting

Multiplication Principle (AND Rule)

If one task can be performed in m ways and, for each of these, a second task can be performed in n ways, then the two tasks together can be performed in m×n ways.

Example: A person has 4 shirts and 3 trousers. The number of different outfits = 4×3=12.

Addition Principle (OR Rule)

If one task can be performed in m ways and a second (mutually exclusive) task can be performed in n ways, then either task can be performed in m+n ways.

Example: A student can travel by bus in 3 ways or by train in 5 ways. Total ways to travel = 3+5=8.

Principle Keyword Operation
Multiplication Principle AND (both tasks done) Multiply
Addition Principle OR (either task done) Add

2. Factorial Notation

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n:

n!=n×(n−1)×(n−2)×⋯×2×1

Special cases: 0!=1 and 1!=1 (by definition).

Key Values

n 0 1 2 3 4 5 6 7
n! 1 1 2 6 24 120 720 5040

Useful identity: n!=n×(n−1)!   ⟹   (n+1)!=(n+1)×n!

Trailing zeros in n!: Determined by the number of times 5 divides n!:
Number of zeros =⌊n5⌋+⌊n25⌋+⌊n125⌋+⋯

3. Permutations

A permutation is an arrangement of objects in a definite order. The number of ways to arrange r objects chosen from n distinct objects (where 0≤r≤n) is:

nPr=P(n,r)=n!(n−r)!=n(n−1)(n−2)⋯(n−r+1)

Special cases:
nPn=n!    (all n objects arranged)
nP0=1    (arranging 0 objects — one way: do nothing)
nP1=n

Standard Permutation Problems

(i) Arrangements of n Distinct Objects

n distinct objects can be arranged among themselves in n! ways.

(ii) Permutations When Repetition is Allowed

When choosing r objects from n distinct objects and repetition is allowed, total arrangements =nr.

(iii) Permutations of Objects Not All Distinct (Multinomial)

The number of arrangements of n objects where p objects are of one type, q of another, r of another (and so on), with p+q+r+⋯=n:

Number of arrangements=n!p!q!r!⋯

Example: Number of arrangements of the letters of the word MISSISSIPPI:
Total letters = 11; M=1, I=4, S=4, P=2.
=11!1!⋅4!⋅4!⋅2!=399168001×24×24×2=34650.

(iv) Circular Permutations

When n distinct objects are arranged in a circle, one position is fixed to avoid counting rotations as different. The number of circular arrangements:

(n−1)!

  • For a necklace or garland (where clockwise and anticlockwise arrangements are identical):
    (n−1)!2
  • If objects are arranged around a circular table and there is a distinct top and bottom (e.g., a key ring that can be flipped): (n−1)!2.

(v) Permutations with Restrictions

  • Certain objects always together: Treat them as a single unit. If k objects are always together, treat them as 1 unit → (n−k+1)! arrangements of units × k! arrangements within the unit.
  • Certain objects never together: Total arrangements − arrangements where they are together.
  • Relative order fixed: Divide by the factorial of the number of objects whose relative order is fixed.
  • Objects at specific positions: Fix the required objects and arrange the rest.

4. Combinations

A combination is a selection of objects without regard to order. The number of ways to choose r objects from n distinct objects is:

nCr=C(n,r)=(nr)=n!r!(n−r)!=nPrr!

Key Properties of nCr

Property Formula Significance
Symmetry nCr=nCn−r Choosing r items = choosing the remaining n−r
Boundary values nC0=nCn=1 Select all or none — one way each
Unit selection nC1=n Select one item from n
Pascal's Rule nCr+nCr−1=n+1Cr Basis of Pascal's Triangle
Vandermonde's Identity ∑k=0rmCk⋅nCr−k=m+nCr Useful for JEE Advanced
Sum of all combinations ∑r=0nnCr=2n Total subsets of a set of n elements
Alternating sum ∑r=0n(−1)rnCr=0 Sum of even-position terms = sum of odd-position terms

Condition for nCr to be defined

nCr is defined only when n and r are non-negative integers and 0≤r≤n. If nCx=nCy and x≠y, then x+y=n.

5. Permutation vs. Combination — Decision Guide

Situation Order Matters? Use
Forming words from letters Yes Permutation (nPr)
Forming numbers from digits Yes Permutation (nPr)
Seating people in a row Yes Permutation (nPr)
Electing a president, VP, secretary Yes (different roles) Permutation (nPr)
Selecting a committee No Combination (nCr)
Choosing a team No Combination (nCr)
Selecting questions to answer No Combination (nCr)
Arranging people around a table Yes (circular) Circular permutation: (n−1)!
Handshakes between n people No (A-B = B-A) nC2
Diagonals of a polygon with n sides No nC2−n

6. Important Combinatorial Results

(i) Number of Ways to Divide into Groups

  • Dividing 2n objects into two equal groups of n each (groups distinguishable):
    (2n)!(n!)2=2nCn
  • Dividing 2n objects into two equal groups of n each (groups indistinguishable):
    (2n)!2!(n!)2=2nCn2
  • Dividing 3n objects into three equal groups of n each (groups indistinguishable):
    (3n)!3!(n!)3
  • Distributing n distinct objects into r distinct groups (empty groups allowed): rn
  • Distributing n distinct objects into r distinct groups (no group empty): Stirling numbers of the second kind × r!

(ii) Number of Rectangles and Squares in a Grid

In a grid with m horizontal lines and n vertical lines (m>n):

  • Number of rectangles =mC2×nC2=m(m−1)2×n(n−1)2
  • Number of squares in an m×n grid (m rows, n columns, m≤n):
    =∑k=1m(m−k+1)(n−k+1)

(iii) Selections from Groups

  • Selecting at least one from n distinct objects: 2n−1 (all subsets except the empty set).
  • Selecting at least one from p identical objects of one type and q of another: (p+1)(q+1)−1.
  • Total divisors of N=pa⋅qb⋅rc: (a+1)(b+1)(c+1).

(iv) Formation of Geometric Figures

  • Lines from n points (no 3 collinear): nC2
  • Triangles from n points (no 3 collinear): nC3
  • n points, m of which are collinear:
    Lines =nC2−mC2+1
    Triangles =nC3−mC3
  • Diagonals of a convex polygon with n sides: nC2−n=n(n−3)2

7. Rank of a Word in Dictionary Order

To find the rank (position) of a given word among all possible arrangements of its letters in alphabetical (dictionary) order:

  • Step 1: Arrange all letters of the word in alphabetical order.
  • Step 2: For each position, count how many letters come alphabetically before the actual letter at that position.
  • Step 3: Multiply that count by the number of arrangements of the remaining letters (factorial of remaining, adjusted for repetitions).
  • Step 4: Sum all such counts and add 1.

Example: Find the rank of the word MASTER among all arrangements of its letters.
Alphabetical order of letters: A, E, M, R, S, T.
Words starting with A: 5!=120
Words starting with E: 5!=120
Words starting with MA: remaining letters A, E, R, S, T → words starting with MAE: 3!=6, MAR: 3!=6
Words starting with MAS: remaining A, E, R, T → words starting with MASA: 2!=2, MASE: 2!=2
Words starting with MAST: remaining A, E, R → MASTA: 1!=1, MASTE: 1!=1
MASTER comes next. Rank =120+120+6+6+2+2+1+1+1=259.

8. Distribution of Objects

Distributing n Identical Objects into r Distinct Groups

This is the classic Stars and Bars problem:

  • Empty groups allowed (each group can get 0 or more):
    Number of ways =n+r−1Cr−1
  • No empty groups (each group gets at least 1):
    Number of ways =n−1Cr−1

Distributing n Distinct Objects into r Distinct Groups

  • Empty groups allowed: rn
  • No group empty: Inclusion-exclusion principle gives ∑k=0r(−1)k(rk)(r−k)n
Objects Groups Empty Allowed? Formula
n identical r distinct Yes n+r−1Cr−1
n identical r distinct No n−1Cr−1
n distinct r distinct Yes rn
n distinct r identical Yes Bell number Bn

9. Derangements

A derangement is a permutation of n objects in which no object appears in its original position. The number of derangements of n objects is denoted Dn or !n:

Dn=n!∑k=0n(−1)kk! =n!(1−11!+12!−13!+⋯+(−1)nn!)

Recurrence relation: Dn=(n−1)(Dn−1+Dn−2)

n 1 2 3 4 5
Dn 0 1 2 9 44

Classic example: 4 letters put into 4 envelopes at random. Probability all are wrong =D44!=924=38.