0% found this document useful (0 votes)
9 views74 pages

Combinatorics 2008

Uploaded by

abdigeleta20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views74 pages

Combinatorics 2008

Uploaded by

abdigeleta20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

Subsets of given size

Let A be a set of size |A| = n.


Recall: 2A = P(A) = powerset of A
= set of all subsets X ⊂ A. We have
proved that |2A| = 2|A| = 2n.

Define Sk to be the set of all subsets of


size k in A, ie:
Sk := {X ⊆ A | |X| = k}.
What is |Sk |?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 = {{1}, {2}, {3}, {4}} and |S1| = 4.
S2 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 = {{1}, {2}, {3}, {4}} and |S1| = 4.
S2 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
and |S2| = 6.
S3 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 = {{1}, {2}, {3}, {4}} and |S1| = 4.
S2 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
and |S2| = 6.
S3 = {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}
and |S3| = |S1| = 4.
S4 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 = {{1}, {2}, {3}, {4}} and |S1| = 4.
S2 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
and |S2| = 6.
S3 = {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}
and |S3| = |S1| = 4.
S4 = {A} and |S4| = |S0| = 1.
S5 =?
Example
Let A = 4 := {1, 2, 3, 4}, then

S0 = {∅} and |S0| = 1.


S1 = {{1}, {2}, {3}, {4}} and |S1| = 4.
S2 = {{1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}}
and |S2| = 6.
S3 = {{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}
and |S3| = |S1| = 4.
S4 = {A} and |S4| = |S0| = 1.
S5 = ∅ and |S5| = 0.
Example
Let A = 4 := {1, 2, 3, 4}, then

|S0| = 1.
|S1| = 4.
|S2| = 6.
|S3| = |S1| = 4.
|S4| = |S0| = 1.
|S5| = 0.
1 + 4 + 6 + 4 + 1 = 24
Properties
Let A be a finite set of size n and k ∈ N.
Let c(n, k) denote the number of subsets
of A of size k.
1. c(n, k) = 0 ∀k > n and ∀k < 0;
c(n, 0) = 1 = c(n, n).
2. c(n, 1) = n = c(n, n − 1);
c(n, k) = c(n, n − k).
3. c(n + 1, k) = c(n, k) + c(n, k − 1).
Properties
Definition: Let n, k ∈ N. The bino-
mial coefficient ”n choose k” is
 
n n!
:= .
k k!(n − k)!

n n!

Theorem: c(n, k) = k = k!(n−k)! .
In other words, the number of subsets
of size k of an n-set is nk .

Property 3 says that binomial coefficients
can be calculated recursively, using Pas-
cal’s triangle, where each entry is the
sum of the two adjacent ones in the up-
per row.
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
Binomial Theorem:
Let X, Y be any ‘variables’ such that
XY = Y X. Then
n  
X n
(X + Y )n = X n−k Y k
k
k=0
   
n n
= X n+ X n−1Y +· · ·+ XY n−1+Y n
1 n−1
Setting X = Y = 1, we get:
n  
n
X n
2 = .
k
k=0
Examples:

• (X + Y )2 = X 2 + 2XY + Y 2.
• (X + Y )3 = X 3 + 3X 2Y + 3XY 2 +
Y 3.
• (X + Y )4 = X 4 + 4X 3Y + 6X 2Y 2 +
4XY 3 + Y 4.
• ···
Permutations with Identical Ob-
jects
Consider the word ‘abracadabra’

Question: In how many ways can we


rearrange the letters of this words with-
out changing their multiplicity?
Permutations with Identical Ob-
jects
Consider the word ‘abracadabra’

Question: In how many ways can we


rearrange the letters of this words with-
out changing their multiplicity?

Solution:
11!
.
5! × 2! × 2!
Permutations with Identical Ob-
jects
Theorem: Let aa · · · a bb · · · b cc · · · c · · ·
be an arrangement of n - objects among
which there are n1,n2,· · · nk identical
ones (so n = n1 + n2 + · · · + nk ).

Then the number of rearrangements with-


out changing the multiplicities is
 
n n!
:= ,
n 1 , n 2 , · · · , nk n1 ! × n2 ! × · · · × nk !
Multinomial coefficient
 
n n!
:=
n 1 , n 2 , · · · , nk n1 ! × n2 ! × · · · × nk !
is called a multinomial coefficient.

Notice: If k= 2 we get the binomial


coefficient nn1 .
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
(X + Y + Z)7 ?
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
(X + Y + Z)7 ?

Solution:
 
7 7!
= .
2, 3, 2 2! · 3! · 2!
Multinomial Theorem
General formula:

(X1 + X2 + · · · + Xk )n
X n

n
= X1n1 X2n2 · · · Xk k
n 1 , n 2 , · · · , nk

where the sum is over all k - tuples


(n1, n2, · · · , nk ) ∈ Nk0 with
n1 + n2 + · · · + nk = n.
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
F := (X + Y + Z)7 ?
G := (X + Y + Z)8 ?
H := (X + Y + Z 2)6 ?
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
F := (X + Y + Z)7 ?
G := (X + Y + Z)8 ?
H := (X + Y + Z 2)6 ?
7 7!

Solution: in F: 2,3,2 = 2!·3!·2! .
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
F := (X + Y + Z)7 ?
G := (X + Y + Z)8 ?
H := (X + Y + Z 2)6 ?
7 7!

Solution: in F: 2,3,2 = 2!·3!·2! .
in G: 0.
Multinomial Theorem
What is the coeffcient of X 2Y 3Z 2
the expansion of
F := (X + Y + Z)7 ?
G := (X + Y + Z)8 ?
H := (X + Y + Z 2)6 ?
7 7!

Solution: in F: 2,3,2 = 2!·3!·2! .
in G: 0.
in H: 60.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

1) Setup a committee of 3 persons.


Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

1) Setup a committee of 3 persons.


# = 73 = 7·6·5

3! = 35.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

1) Setup a committee of 3 persons.


# = 73 = 7·6·5

3! = 35.
unordered 3 - selection out of 7 without
repetition
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

2) Give 3 identical candies to the 7 per-


sons. Each one should receive 0 − 3 can-
dies.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

2) Give 3 identical candies to the 7 per-


sons. Each one should receive 0 − 3 can-
dies.
7+3−1
 9·8·7
#= 3 = 3! = 84.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

2) Give 3 identical candies to the 7 per-


sons. Each one should receive 0 − 3 can-
dies. 7+3−1
9·8·7
#= 3 = 3! = 84.
unordered 3 - selection out of 7 with rep-
etition
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

3) Allocate 3 different hard jobs to the


7 persons. No person can do more than
one job.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

3) Allocate 3 different hard jobs to the


7 persons. No person can do more than
one job.
# = 7 × 6 × 5 = 7!/(7 − 3)! = 210.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

3) Allocate 3 different hard jobs to the


7 persons. No person can do more than
one job.
# = 7 × 6 × 5 = 7!/(7 − 3)! = 210.
ordered 3 - selection out of 7 without
repetition
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

4) Allocate 3 easy jobs to the 7 persons.


One person could possibly do all three
jobs.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

4) Allocate 3 easy jobs to the 7 persons.


One person could possibly do all three
jobs.
# = 7 × 7 × 7 = 73 = 343.
Four Main Selection Models

Given 7 persons. How many solutions


for the following task?

4) Allocate 3 easy jobs to the 7 persons.


One person could possibly do all three
jobs.
# = 7 × 7 × 7 = 73 = 343.
ordered 3 - selection out of 7 with repe-
tition
Unordered Combinations
Definition: Let A be a finite set with
|A| = n;
1) A k - combination out of A with-
out repetitions is an unordered se-
lection of k different elements of A with-
out repetitions, hence a subset X ⊆
A of size k.
The total number
  of such k - combina-
n
tions of A is .
k
2) a k - combination out of A with rep-
etitions is an unordered selection of
k elements of A with possible repe-
titions.
The total number of such k - combina-
tions of n is
 
n+k−1
.
k
Example
Let n = 3, k = 2 and A := 3 :=
{1, 2, 3}, then the k - combinations of
A with repetitions are given as follows:
↔ ∗ ∗ ||
1, 1
↔ ∗| ∗ |
1, 2
↔ | ∗ ∗|
2, 2
↔ ∗||∗
1, 3
↔ | ∗ |∗
2, 3
↔ || ∗ ∗
3, 3
   
3+2−1 4
= = 6.
2 2
Ordered selection
Definition: Let A be a finite set with
|A| = n. An ordered k - selection with-
out repetitions of elements of A is an
element
(a1, a2, · · · , ak ) ∈ Ak := A×A×· · ·×A
such that i 6= j ⇒ ai 6= aj .
The total number of such k - selections
is
n!
nk := = n·(n−1)·(n−2) · · · (n−k+1).
(n − k)!
Ordered selection
Definition: If k = n, then such an
ordered n - selection is called a permu-
tation of A. The total number or per-
mutations of A is
n! := 1 · 2 · 3 · · · (n − 1) · n.
Ordered selections
Definition: Let A be a finite set with
|A| = n. An ordered k - selection with
repetitions of elements of A is an ele-
ment
(a1, a2, · · · , ak ) ∈ Ak := A×A×· · ·×A.
The total number of such k - selections
is nk .
Ordered / Unordered Partitions
Given 12 people.
1) There are three different jobs to be
done in three teams, each containing 4
persons. Every person should belong to
exactly one team. How many distribu-
tions exist?
Ordered / Unordered Partitions
Given 12 people.
1) There are three different jobs to be
done in three teams, each containing 4
persons. Every person should belong to
exactly one team. How many distribu-
tions exist?

ordered partitions into 3 blocks of size


4
Ordered / Unordered Partitions
Given 12 people.
1) There are three different jobs to be
done in three teams, each containing 4
persons. Every person should belong to
exactly one team. How many distribu-
tions exist?
ordered partitions into 3 blocks of size
4
12 8 4 12
    12!
# = 4 × 4 × 4 = 4,4,4 = 4!3 =
34650.
Ordered / Unordered Partitions
Given 12 people.
2) The twelve people like to play a game
which needs four people in a team. How
many divisions into three disjoint teams
exist?
Ordered / Unordered Partitions
Given 12 people.
2) The twelve people like to play a game
which needs four people in a team. How
many divisions into three disjoint teams
exist?
unordered partitions into 3 blocks of size
4
Ordered / Unordered Partitions
Given 12 people.
2) The twelve people like to play a game
which needs four people in a team. How
many divisions into three disjoint teams
exist?
unordered partitions into 3 blocks of size
4
12!
#= 4!3 ·3!
= 5775.
Partitions
Let A be a set with |A| = n.
An ordered partition of A of type (n1, · · · , nk )
is an ordered sequence
(B1, B2, · · · , Bk )
of subsets of size n1, n2, · · · , nk
such that Bi ∩ Bj = ∅ for any i 6= j and
A = B1 ] B2 ] · · · Bk .
(It follows that n1 + n2 + · · · + nk = n):
The number of those partitions is given
by the multinomial coefficient.
 
n n!
:=
n 1 , n2 , · · · , nk n1 ! · n2 ! · · · nk !
Partitions
Let A be a set with |A| = n.
An unordered partition of A of type 1c1 · · · ici · · ·
is a set
{B1, B2, · · · , Bk }
of subsets with c1 many of size 1, c2
many of size 2 etc.,
such that Bi ∩ Bj = ∅ for any i 6= j and
A = B1 ] B2 ] · · · Bk .
(It follows that c1 +2c2 +· · ·+ici +· · · =
n):
The number of those unordered parti-
tions is given by the formula
n!
Qn c
.
i=1 (i!) ci !
i
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Bi ∩ Bj = ∅ ∀i 6= j
Sk
i=1 Bi = A
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Bi ∩ Bj = ∅ ∀i 6= j
Sk
i=1 Bi = A

type := (n1 , · · · , nk ) type := 1c1 2c2 · · · ici · · ·


Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Bi ∩ Bj = ∅ ∀i 6= j
Sk
i=1 Bi = A

type := (n1 , · · · , nk ) type := 1c1 2c2 · · · ici · · ·


with ni := |Bi |. ci blocks of size i.
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Bi ∩ Bj = ∅ ∀i 6= j
Sk
i=1 Bi = A

type := (n1 , · · · , nk ) type := 1c1 2c2 · · · ici · · ·


P ni := |Bi |.
with cP
i blocks of size i.
i ni = n i ici = n
Ordered / Unordered Partitions
ordered partition:= unordered partition :=
sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Bi ’s are called ”blocks”.


Bi ∩ Bj = ∅ ∀i 6= j
Sk
i=1 Bi = A, |A| = n

type := (n1 , · · · , nk ) type := 1c1 2c2 · · · ici · · ·


with ni := |Bi |. ci blocks of size i.
Pk P k
i=1 ni = n i=1 ici = n

n! Q n!c
# for that type: n1 !·n2 !···nk ! # for that type: .
i (i!) ci !
i
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Example: A = {1, 2, 3, 4, 5}
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Example: A = {1, 2, 3, 4, 5}

({2, 5}, {1, 3}, {4}) 6= {{2, 5}, {1, 3}, {4}} =

({1, 3}, {2, 5}, {4}) {{1, 3}, {2, 5}, {4}}.
Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Example: A = {1, 2, 3, 4, 5}

({2, 5}, {1, 3}, {4}) 6= {{2, 5}, {1, 3}, {4}} =
({1, 3}, {2, 5}, {4}) {{1, 3}, {2, 5}, {4}}.

type := (2, 2, 1) type := 1 22 .


Ordered / Unordered Partitions
Let A be a set with |A| = n.

ordered partition:= unordered partition :=


sequence of subsets set of subsets
(B1 , B2 , · · · , Bk ) {B1 , B2 , · · · , Bk }

Example: A = {1, 2, 3, 4, 5}

({2, 5}, {1, 3}, {4}) 6= {{2, 5}, {1, 3}, {4}} =
({1, 3}, {2, 5}, {4}) {{1, 3}, {2, 5}, {4}}.

type := (2, 2, 1) type := 1 22 .


5!
total # = 2!×2!×1! = 30 total # for that type:
5!
1!1 1!×2!2 2! = 15.
Unordered Partitions

Example

All unordered partitions of the set 4 :=


{1, 2, 3, 4}:
P artition type number

4!
|1234| 41 4!1 ·1! =1

4!
1|234 2|134 3|124 4|123 11 31 1!1 1!·3!1 1! = 4
4!
12|34 13|24 23|14 22 2!2 2! = 3

4!
1|2|34 1|3|24 1|4|23 12 21 1!2 2!·2!1 1 =6
2|3|14 2|4|13 3|4|12

4!
1|2|3|4 14 1!4 4! =1

T otal 15
Unordered Partitions
How many unordered partitions of 8 with
block sizes ≥ 2?
Solution
types #
8 1

8!
26 2!6! = 28
8!
35 3!5! = 56
8!
42 (4!)2 ·2! = 35

8!
22 4 (2!)2 4!·2! = 210
8!
2 32 (3!)2 2!2! = 280

8!
24 (2!)4 4! = 3 · 7 · 5 = 105

Total: 715

You might also like