stirling.matrix {matrixcalc} | R Documentation |
Stirling Matrix
Description
This function constructs and returns a Stirling matrix which is a lower triangular matrix containing the Stirling numbers of the second kind.
Usage
stirling.matrix(n)
Arguments
n |
A positive integer value |
Details
The Stirling numbers of the second kind, , are used
in combinatorics to compute the number of ways a set of
objects
can be partitioned into
non-empty subsets
. The numbers are also
denoted by
. Stirling numbers of
the second kind can be computed recursively with the equation
.
The initial conditions for the recursion are
and
. The resultant numbers are organized
in an order
matrix
.
Value
An order lower triangular matrix.
Note
If the argument n is not a positive integer, the function presents an error message and stops.
Author(s)
Frederick Novomestky fnovomes@poly.edu
References
Aceto, L. and D. Trigiante (2001). Matrices of Pascal and Other Greats, American Mathematical Monthly, March 2001, 108(3), 232-245.
Examples
S <- stirling.matrix( 10 )
print( S )