UNPKG

882 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function combinations
4
5Compute the number of ways of picking `k` unordered outcomes from `n`
6possibilities.
7
8Combinations only takes integer arguments.
9The following condition must be enforced: k <= n.
10
11
12## Syntax
13
14```js
15math.combinations(n, k)
16```
17
18### Parameters
19
20Parameter | Type | Description
21--------- | ---- | -----------
22`n` | number &#124; BigNumber | Total number of objects in the set
23`k` | number &#124; BigNumber | Number of objects in the subset
24
25### Returns
26
27Type | Description
28---- | -----------
29number &#124; BigNumber | Number of possible combinations.
30
31
32## Examples
33
34```js
35math.combinations(7, 5) // returns 21
36```
37
38
39## See also
40
41[combinationsWithRep](combinationsWithRep.md),
42[permutations](permutations.md),
43[factorial](factorial.md)
44
\No newline at end of file