Class 1
Class 1
Combinatorial Analysis-Examples
Dr Prashant Gupta
Examples
Example Revisited
A communication system consists of four antennas.
How many possibilities are there for exactly two antennas to be defective?
How many possibilities for exactly two consecutive antennas to be defective?
Naive way: List all the possiblities — 0110, 0101, 1010, 0011, 1001, 1100
Chapter 1 is all about how to count e↵ectively and systematically; the mathe-
matical theory of counting is formally known as combinatorial analysis.
Outline
4
Basic Principle of Counting
Solution: 10 ⇥ 3 = 30
5
Generalization
Example: How many di↵erent 7-place license plates are possible if the first 3
places are to be occupied by letters and the final 4 by numbers?
6
Outline
7
Permutations
n · (n 1) · (n 2) · · · 2 · 1 = n!
di↵erent permutations.
8
Permutations
Example: Suppose we want to put 10 books on the bookshelf. Of these 10
books, 4 are math, 3 are chemistry, 2 are history, 1 is language. The books of
the same subject should be put together. How many di↵erent arrangements are
possible?
Example: A class consists of 6 men and 4 women. An exam is given and no two
students obtain the same score.
(a): How many di↵erent rankings are possible? Solution: 10! = 3, 628, 800
(b): What if men and women are ranked separately? Solution: 4! ⇥ 6! = 17, 280
9
Permutations
Example: How many di↵erent letter arrangements can be formed using the let-
ters PEPPER?
6!
Solution: 3!2! = 60.
Example: How many di↵erent signals are possible, by hanging 9 flags in a line,
of which 4 are white, 3 red and 2 blue?
9!
Solution: 4!3!2! = 1260.
10
Outline
11
Combinations
Example: How many di↵erent groups of 3 can be selected from the 5 items
A, B, C, D, E?
5⇥4⇥3
Solution: 3! = 10. (Hint: ABC, ACB, BAC, . . . are the same group.)
In general, if we select r items from n items, then the number of di↵erent groups
is given by
✓ ◆
n(n 1)(n 2) · · · (n r + 1) n! n
= , .
r! (n r)!r! r
Quick facts: ✓ ◆ ✓ ◆
n n n!
= =
r n r (n r)!r!
For example,
✓ ◆ ✓ ◆ ✓ ◆ ✓ ◆
n n n n n!
= =n and = =1=
1 n 1 n 0 n!0!
where 0! = 1 by convention.
12
Combinations
Example: From 5 women and 7 men, how many di↵erent committees of 2 women
and 3 men can be formed?
Solution: ✓ ◆✓ ◆
5 7 5⇥4 7⇥6⇥5
= ⇥ = 350.
2 3 2⇥1 3⇥2⇥1
Solution: Suppose the 2 men are A and B. Then there are situations:
1) both A and B are in: 52 51
2) A in, B out: 52 52
3) A out, B in: 52 52
4) neither is in: 52 53
Therefore, the are
✓ ◆✓ ◆ ✓ ◆✓ ◆ ✓ ◆✓ ◆
5 5 5 5 5 5
350 , or alternatively, ⇥2+
2 1 2 2 2 3
di↵erent committees.
13
Combinations
Solution:
n
1) The total number of possibilities: m
2) The number of cases where no two consecutive antennas are defective:
✓ ◆
n m+1
t1 t 1 t 1 · · · t 1t )
m
Therefore, the probability of being functional is
n m+1
m
n ,
m
14
A Combinatorial Identity
✓ ◆ ✓ ◆ ✓ ◆
n n 1 n 1
= +
r r 1 r
Proof:
✓ ◆ ✓ ◆
n 1 n 1 (n 1)! (n 1)! (n 1)!r (n 1)!(n r)
+ = + = +
r 1 r (r 1)!(n r)! r!(n 1 r)! r!(n r)! r!(n r)!
✓ ◆
(n 1)!(r + n r) (n 1)!n n! n
= = = = .
r!(n r)! r!(n r)! r!(n r)! r
15
The Binomial Theorem
n ✓ ◆
X n
(x + y)n = xk y n k
k
k=0
Example: How many subsets are there of a set consisting of n items {1, 2, . . . , n}?
Solution:
n ✓ ◆
X n ✓ ◆
X
n n
= 1k 1n k
= 2n .
k k
k=1 k=1
16
Outline
17
Multinomial Coefficient
Example: Suppose that n distinct items are to be divided into r distinct groups
of respective sizes n1 , n2 , . . . , nr . How many di↵erent divisions are possible?
Solution: We fill the r groups one by one. There are nn1 possible choices
for the first group, n n2n1 possible choices for the second group, ......, and
n n1 n2 ··· nr 1
nr choices for the rth group. By the basic principle of counting,
the number of di↵erent divisions is
✓ ◆✓ ◆✓ ◆ ✓ ◆
n n n1 n n1 n 2 n n1 n2 · · · nr 1
···
n1 n2 n3 nr
n! (n n1 )! (n n1 n2 )! (n n1 n2 · · · nr 1 )!
= ···
(n n1 )!n1 ! (n n1 n2 )!n2 ! (n n1 n2 n3 )!n3 ! 0!nr !
n!
=
n !n !n ! · · · nr !
✓1 2 3 ◆
n
, ,
n1 , n2 , . . . , nr
n
where n1 ,n2 ,...,nr is known as multinomial coefficient.
Example: Suppose that n distinct items are to be divided into r distinct groups
of respective sizes n1 , n2 , . . . , nr . How many di↵erent divisions are possible?
t
| tt
{z· · · t} t
| tt
{z· · · t} . . . . . . t
| tt
{z· · · t}
n1 n2 nr
19
Multinomial Coefficient
68! 68
Solution: 21!22!25! = 21,22,25 .
10!
Solution: 5!5! ⇥ 12 .
20
The Multinomial Theorem
21