❗ Factorial
n! = n × (n−1) × (n−2) × ... × 2 × 1. Yeh "n items ko arrange karne ke ways" hain.
0! = 1 (by definition)
1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120
n! = n × (n−1)!
🎯 Fundamental Counting Principle
Multiplication Principle: Agar kaam A ko m tarike se aur kaam B ko n tarike se kar sakte hain, toh dono ko milake m×n tarike se kar sakte hain.
Addition Principle: Agar A ya B karna hai (not both), toh m+n tarike hain.
Example: 3 shirts aur 4 pants — outfits?
Multiplication: 3 × 4 =
12 outfits
🔄 Permutations — Order Matters!
n different objects mein se r ko arrange karna (order matter karta hai).
ⁿPᵣ = n! / (n−r)! [selection + arrangement]
Special cases:
n objects ko n positions: n!
Repetition allowed: nʳ ways
Identical objects: n! / (n₁! × n₂! × ...)
Example 1: 5 books mein se 3 ki shelf arrangement?
⁵P₃ = 5!/(5−3)! = 120/2 =
60 arrangements
Example 2: MISSISSIPPI mein letters arrange karna
Letters: M(1), I(4), S(4), P(2) — total 11
Ways = 11! / (1! × 4! × 4! × 2!) = 39916800/1152 =
34,650
🎲 Combinations — Order Doesn't Matter!
n different objects mein se r ko select karna (sirf selection, arrangement nahi).
ⁿCᵣ = n! / (r! × (n−r)!)
Properties:
ⁿC₀ = ⁿCₙ = 1
ⁿCᵣ = ⁿCₙ₋ᵣ (symmetry)
ⁿCᵣ + ⁿCᵣ₋₁ = ⁿ⁺¹Cᵣ (Pascal's Rule)
Relation: ⁿPᵣ = r! × ⁿCᵣ
Example 1: 10 log mein se committee of 4 — kitne tarike?
¹⁰C₄ = 10!/(4!×6!) = 10×9×8×7/(4×3×2×1) = 5040/24 =
210 committees
Example 2: Perm vs Comb
5 logo mein se 2 choose karna (committee): ⁵C₂ = 10
5 logo mein se 2 select karke rank dena (President, VP): ⁵P₂ = 20
Difference: ⁵P₂ = 2! × ⁵C₂ (arrangement factor)
Example 3: Practical — Card Problems
52 cards mein se 5-card hand: ⁵²C₅ = 2,598,960
4 aces chances: ⁴C₄ × ⁴⁸C₁ = 1 × 48 =
48