combinat::stirling2
--
Stirling numbers of the second kind
combinat::stirling2
(n,k) computes the Stirling numbers of the second kind.
combinat::stirling2(n,k)
n,k | - | nonnegative integers |
a nonnegative integer.
combinat::stirling2
(n,k) computes the number of ways of partitioning
a set of n
elements into k
non-empty subsets.combinat::stirling2
(n,k) is calculated using the formula
stirling2(n,k) = 1/k! * sum((-1)^(k-j)*binomial(k,j)*j^n,j=0...k) .
One can partition the set 1,2,3 into 1,2,3 = 1,2 union 3 = 1,3 union 2 = 2,3 union 1
>> combinat::stirling2(3,2)
3
>> combinat::stirling2(3)
Error: Two arguments expected. [combinat::stirling2]
MuPAD Combinat, an open source algebraic combinatorics package