stirling2 {ConsRank}R Documentation

Stirling numbers of the second kind

Description

Denote the number of ways to partition a set of n objects into k non-empty subsets

Usage

stirling2(n, k)

Arguments

n

(integer): the number of the objects

k

(integer <=n): the number of the non-empty subsets (buckets)

Value

a "list" containing the following components:

S the stirling number of the second kind
SM a matrix showing, for each k (on the columns) in how many ways the n objects (on the rows) can be partitioned

Author(s)

Antonio D'Ambrosio antdambr@unina.it

References

Comtet, L. (1974). Advanced Combinatorics: The art of finite and infinite expansions. D. Reidel, Dordrecth, The Netherlands.

Examples

parts<-stirling2(4,2)


[Package ConsRank version 2.1.4 Index]