Quantcast

Documentation Center

  • Trial Software
  • Product Updates

combinat::stirling1

Stirling numbers of the first kind

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

combinat::stirling1(n, k)

Description

combinat::stirling1(n,k) computes the Stirling numbers of the first kind.

Let S(n, k) be the number of permutations of n symbols that have exactly k cycles. Then combinat::stirling1(n,k) computes (- 1)(n + k)S(n, k).

Let S1(n, k) be the Stirling number of the first kind, then we have:

.

Examples

Example 1

Let us have a look what's the result of x (x - 1) (x - 2) (x - 3) (x - 4) (x - 5) written as a sum.

expand(x*(x-1)*(x-2)*(x-3)*(x-4)*(x-5))

Now let us "prove" the formula mentioned in the "Details" section by calculating the proper Stirling numbers:

combinat::stirling1(6,1); 
combinat::stirling1(6,2); 
combinat::stirling1(6,3); 
combinat::stirling1(6,4); 
combinat::stirling1(6,5); 
combinat::stirling1(6,6)

Example 2

combinat::stirling1(3,-1)
Error: Nonnegative integers are expected. [combinat::stirling1]

Parameters

n, k

Nonnegative integers

Return Values

Integer.

References

J.J. Rotman, An Introduction to the Theory of Groups, 3rd Edition, Wm. C. Brown Publishers, Dubuque, 1988

Was this topic helpful?