stirling2: Stirling numbers of the second kind

Description Usage Arguments Value Author(s) References Examples

View source: R/stirling2.R

Description

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

Usage

1
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

1
parts<-stirling2(4,2)

ConsRank documentation built on Sept. 28, 2021, 5:07 p.m.