UNPKG

866 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function stirlingS2
4
5The Stirling numbers of the second kind, counts the number of ways to partition
6a set of n labelled objects into k nonempty unlabelled subsets.
7stirlingS2 only takes integer arguments.
8The following condition must be enforced: k <= n.
9
10 If n = k or k = 1, then s(n,k) = 1
11
12
13## Syntax
14
15```js
16math.stirlingS2(n, k)
17```
18
19### Parameters
20
21Parameter | Type | Description
22--------- | ---- | -----------
23`n` | Number &#124; BigNumber | Total number of objects in the set
24`k` | Number &#124; BigNumber | Number of objects in the subset
25
26### Returns
27
28Type | Description
29---- | -----------
30Number &#124; BigNumber | S(n,k)
31
32
33## Examples
34
35```js
36math.stirlingS2(5, 3) //returns 25
37```
38
39
40## See also
41
42[bellNumbers](bellNumbers.md)
43
\No newline at end of file