SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2)...
Transcript of SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2)...
![Page 1: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/1.jpg)
Combinatorial analysis
Samy Tindel
Purdue University
Introduction to Probability Theory - MA 519
Mostly taken from A first course in probabilityby S. Ross
Samy T. Combinatorial analysis Probability Theory 1 / 37
![Page 2: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/2.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 2 / 37
![Page 3: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/3.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 3 / 37
![Page 4: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/4.jpg)
A simple example of counting
A communication system:Setup: n antennas lined upFunctional system:↪→ when no 2 consecutive defective antennasWe know that m antennas are defective
Problem: computeP (functional system)
Samy T. Combinatorial analysis Probability Theory 4 / 37
![Page 5: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/5.jpg)
A simple example of counting (2)Particular instance of the previous situation:
Take n = 4 and m = 2Possible configurations:
0011 0101 01101001 1010 1100
We get 3 working configurations among 6, and thus
P (functional system) = 12
Conclusion: need an effective way to count, that is
Combinatorial analysis
Samy T. Combinatorial analysis Probability Theory 5 / 37
![Page 6: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/6.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 6 / 37
![Page 7: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/7.jpg)
Basic principle of counting
Suppose 2 experiments to be performed andFor Experiment 1, we have m possible outcomesFor each outcome of Experiment 1↪→ We have n outcomes for Experiment 2
Then
Total number of possible outcomes is m × n
Theorem 1.
Samy T. Combinatorial analysis Probability Theory 7 / 37
![Page 8: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/8.jpg)
Proof
Sketch of the proof: Set
(i , j) ≡ Outcome i for Experiment 1 & Outcome j for Experiment 2
Then enumerate possibilities
Samy T. Combinatorial analysis Probability Theory 8 / 37
![Page 9: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/9.jpg)
Application of basic principle of counting
Example: Small community with10 womenEach woman has 3 chidren
We have to pick one pair as mother & child of the year
Question:
How many possibilities?
Samy T. Combinatorial analysis Probability Theory 9 / 37
![Page 10: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/10.jpg)
Generalized principle of counting
Suppose r experiments to be performed andFor Experiment 1, we have n1 possible outcomesFor each outcome of Experiment i↪→ We have ni+1 outcomes for Experiment i + 1
Then total number of possible outcomes isr∏
i=1ni = n1 × n2 × · · · × nr
Theorem 2.
Samy T. Combinatorial analysis Probability Theory 10 / 37
![Page 11: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/11.jpg)
Application of basic principle of counting
Example 1: Find # possible 7 place license plates ifFirst 3 places are lettersFinal 4 places are numbers
Answer: 175,760,000
Example 2: Find # possible 7 place license plates ifFirst 3 places are lettersFinal 4 places are numbersNo repetition among letters or numbers
Answer: 78,624,000
Samy T. Combinatorial analysis Probability Theory 11 / 37
![Page 12: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/12.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 12 / 37
![Page 13: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/13.jpg)
Permutations
Definition:A permutation of n objects is an ordered sequence of those n objects.
Property:Two permutations only differ according to the order of the objects
Counting:Let Pn be the number of permutations for n objects. Then
Pn = n! = n × (n − 1) · · · × 2 =n∏
j=1j
Samy T. Combinatorial analysis Probability Theory 13 / 37
![Page 14: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/14.jpg)
Example of permutation
Example: 3 balls, Red, Black, Green
Permutations: RBG, RGB, BRG, BGR, GBN, GBR↪→ 6 possibilities
Formula: P3 = 3! = 6
Samy T. Combinatorial analysis Probability Theory 14 / 37
![Page 15: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/15.jpg)
Proof for the counting number Pn
Sketch of the proof:Direct application of Theorem 2
Samy T. Combinatorial analysis Probability Theory 15 / 37
![Page 16: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/16.jpg)
Example of permutation (1)
Problem:Count possible arrangements of letters in PEPPER
Samy T. Combinatorial analysis Probability Theory 16 / 37
![Page 17: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/17.jpg)
Example of permutation (2)
Solution 1:Consider all letters as distinct objects
P1 E1 P2 P3 E2 R
ThenP6 = 6! = 720 possibilities
Samy T. Combinatorial analysis Probability Theory 17 / 37
![Page 18: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/18.jpg)
Example of permutation (3)
Solution 2:Do not distinguish P’s and E’s.
ThenP6
P3 P2= 6!
3! 2! = 60 possibilities
Samy T. Combinatorial analysis Probability Theory 18 / 37
![Page 19: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/19.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 19 / 37
![Page 20: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/20.jpg)
Combinations
Definition:A combination of p objects among n objects is non ordered subset ofp objects.
Property:Two combinations only differ according to nature of their objects
Counting:The number of combinations of p objects among n objects is(
np
)= n!
p! (n − p)!
Samy T. Combinatorial analysis Probability Theory 20 / 37
![Page 21: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/21.jpg)
Proof of counting
Combination when order is relevant:Number of possibilities is
n × (n − 1) · · · × (n − p + 1) = n!(n − p)!
Combination when order is irrelevant:We divide by # permutations of p objectsNumber of possibilities is
n × (n − 1) · · · × (n − p + 1)p! = n!
p!(n − p)! =(np
)
Samy T. Combinatorial analysis Probability Theory 21 / 37
![Page 22: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/22.jpg)
Example of combination (1)
Situation:We have a group of 5 women and 7 menWe wish to form a committee with 2 women and 3 men
Problem:Find the number of possibilities
Samy T. Combinatorial analysis Probability Theory 22 / 37
![Page 23: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/23.jpg)
Example of combination (2)
Number of possibilities: (52
)(73
)= 350
Samy T. Combinatorial analysis Probability Theory 23 / 37
![Page 24: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/24.jpg)
Example of combination (3)
Situation 2:We have a group of 5 women and 7 menWe wish to form a committee with 2 women and 3 men2 men refuse to serve together
Problem:Find the number of possibilities
Samy T. Combinatorial analysis Probability Theory 24 / 37
![Page 25: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/25.jpg)
Example of combination (4)
New number of possibilities:(52
) {(73
)−(22
)(51
)}= 300
Samy T. Combinatorial analysis Probability Theory 25 / 37
![Page 26: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/26.jpg)
Binomial theorem
Letx1, x2 ∈ Rn ≥ 1
Then
(x1 + x2)n =n∑
k=0
(nk
)x k
1 xn−k2
Theorem 3.
Samy T. Combinatorial analysis Probability Theory 26 / 37
![Page 27: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/27.jpg)
Combinatorial proofFirst expansion:
(x1 + x2)n =∑
(i1,...,in)∈{1,2}nxi1 xi2 · · · xin
Definition of a family of sets:
Ak = {(i1, . . . , in) ∈ {1, 2}n; there are k j ’s such that ij = 1} .
New expansion: we have (convention: |Ak | ≡ Card(Ak))
(x1 + x2)n =n∑
k=0|Ak | x k
1 xn−k2
=n∑
k=0
(nk
)x k
1 xn−k2
Samy T. Combinatorial analysis Probability Theory 27 / 37
![Page 28: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/28.jpg)
Application of the binomial theorem
LetA a set with |A| = nPn ≡ collection of all subsets of A
Then|Pn| = 2n
Proposition 4.
Samy T. Combinatorial analysis Probability Theory 28 / 37
![Page 29: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/29.jpg)
Proof
Decomposition of |Pn|: Write
|Pn| =n∑
k=0|Subsets of A with k elements|
=n∑
k=0
(nk
)
Application of the binomial theorem:
|Pn| = (1 + 1)n
= 2n
Samy T. Combinatorial analysis Probability Theory 29 / 37
![Page 30: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/30.jpg)
Outline
1 Introduction
2 The basic principle of counting
3 Permutations
4 Combinations
5 Multinomial coefficients
Samy T. Combinatorial analysis Probability Theory 30 / 37
![Page 31: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/31.jpg)
Multinomial coefficientsDivisions of n objects into r groups with size n1, . . . , nr : We have
n objects and r groupsWe want nj objects in group j and ∑r
j=1 nj = n
Notation: Set (n
n1, . . . , nr
)= n!∏r
j=1 (nj !)
Counting: We have
# Divisions of n objects into r groups with size n1, . . . , nr=(n
n1, . . . , nr
)
Samy T. Combinatorial analysis Probability Theory 31 / 37
![Page 32: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/32.jpg)
Proof of counting
Number of choices for the ith group:(n −∑i−1
j=1 nj
ni
)
Number of divisions: We have
# Divisions of n objects into r groups with size n1, . . . , nr
=r∏
i=1
(n −∑i−1
j=1 nj
ni
)
=(
nn1, . . . , nr
)
Samy T. Combinatorial analysis Probability Theory 32 / 37
![Page 33: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/33.jpg)
Example of multinomial coefficient (1)
Situation: Police department with 10 officers and5 have to patrol the streets2 are permanently working at the station3 are on reserve at the station
Problem:How many divisions do we get?
Samy T. Combinatorial analysis Probability Theory 33 / 37
![Page 34: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/34.jpg)
Example of multinomial coefficient (2)
Answer:10!
5! 2! 3! = 2520
Samy T. Combinatorial analysis Probability Theory 34 / 37
![Page 35: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/35.jpg)
Tournament example
Situation: Tournament with n = 2m players↪→ How many outcomes?
Particular case:Take m = 3, thus n = 8
Number of rounds: 3
Samy T. Combinatorial analysis Probability Theory 35 / 37
![Page 36: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/36.jpg)
Tournament example (2)Counting number of outcomes for the first round:
# pairings with order︷ ︸︸ ︷(8
2, 2, 2, 2
) No ordering︷︸︸︷14!
Possible outcomes︷︸︸︷24 = 8!
4!
Counting number of outcomes for second and third round:
4!2! and 2!
1!
Conclusion:
8!4!
4!2!
2!1! = 8! = 40, 320 possible outcomes
Samy T. Combinatorial analysis Probability Theory 36 / 37
![Page 37: SamyTindel - math.purdue.edustindel/teaching/ma... · Asimpleexampleofcounting(2) Particularinstanceoftheprevioussituation: Taken= 4andm= 2 Possibleconfigurations: 0011 0101 0110](https://reader033.fdocuments.us/reader033/viewer/2022060909/60a3f01c90e3f60bcb558c44/html5/thumbnails/37.jpg)
Multinomial theorem
Letx1, x2, . . . , xr ∈ Rn ≥ 1
Then
(x1 + x2 + . . . + xr)n =∑
(n1,...,nr )∈An,r
(n
n1, . . . , nr
)xn1
1 xn22 · · · xnr
r
where
An,r = {(n1, . . . , nr) ∈ Nr ; n1 + n2 + · · ·+ nr = n}
Theorem 5.
Samy T. Combinatorial analysis Probability Theory 37 / 37