Professional Documents
Culture Documents
Special Number
Special Number
Special Number
Stirling Number
Comes from mathematician James Stirling
[ 𝑛
𝑘 ]
(ii) Stirling number of second kind
{ 𝑛
𝑘 }
Second Kind
-> Number of ways to partition n objects into k non-empty subset
-> n subset k
{1, 2, 3, 4} =?
So, = 7
for small k:
= 1 = 2-1
So, = 2n-1-1
=3 = 22-1
Last object itself
{ }
𝑛
𝑘
Last + (n-1) subset
=k+
=?
=?
First Kind
-> Count number of ways to arrange n objects into k cycles
-> n cycle k
[1, 2, 3, 4] =?
=n
=1
= =
Put the object into the cycle itself ->
[ ]
𝑛
𝑘
Insert that object into one of the cycle
arrangement of the first (n-1) objects.
= (n-1) +
Eulerian Number
-> Represented by
-> n ascent k
-> all numbers should be unique
Yes
-> Represented by
-> n ascent k
-> all numbers should be unique
Yes No
-> Represented by
-> n ascent k
-> all numbers should be unique
Yes
-> Represented by
-> n ascent k
-> all numbers should be unique
Yes
π1 π2 π3
1 2 3
1 3 2
2 1 3
2 3 1
3 1 2
3 2 1
Find and of {1, 2, 3}
π1 π2 π3
1 < 2 < 3
1 < 3 > 2
2 > 1 < 3
2 < 3 > 1
3 > 1 < 2
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2
2 > 1 < 3
2 < 3 > 1
3 > 1 < 2
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2 1
2 > 1 < 3
2 < 3 > 1
3 > 1 < 2
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2 1
2 > 1 < 3 1
2 < 3 > 1
3 > 1 < 2
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2 1
2 > 1 < 3 1
2 < 3 > 1 1
3 > 1 < 2
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2 1
2 > 1 < 3 1
2 < 3 > 1 1
3 > 1 < 2 1
3 > 2 > 1
Find and of {1, 2, 3}
π1 π2 π3 #Ascent
1 < 2 < 3 2
1 < 3 > 2 1
2 > 1 < 3 1
2 < 3 > 1 1
3 > 1 < 2 1
3 > 2 > 1 0
∴= 4& =1
n Sum
0 1
1 1 0
2 1 1 0
3 1 4 1 0
4 1 11 11 1 0
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0
2 1 1 0
3 1 4 1 0
4 1 11 11 1 0
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0 1=1!
2 1 1 0
3 1 4 1 0
4 1 11 11 1 0
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0 1=1!
2 1 1 0 2=2!
3 1 4 1 0
4 1 11 11 1 0
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0 1=1!
2 1 1 0 2=2!
3 1 4 1 0 6=3!
4 1 11 11 1 0
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0 1=1!
2 1 1 0 2=2!
3 1 4 1 0 6=3!
4 1 11 11 1 0 24=4!
5 1 26 26 26 11 0
n Sum
0 1 1=0!
1 1 0 1=1!
2 1 1 0 2=2!
3 1 4 1 0 6=3!
4 1 11 11 1 0 24=4!
5 1 26 66 26 1 0 120=5!
=
1 < 4 > 2 < 3
Ascent = 2
If k-1 ascents are present in the array, then we try to increase k-1 to k to calculate
⟨ ⟩
𝑛
𝑘
+k
So, = + k + + (n-1-k)
= (k+1) + (n-k)