1 |
|
2 |
|
3 | # Function multinomial
|
4 |
|
5 | Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities.
|
6 |
|
7 | multinomial takes one array of integers as an argument.
|
8 | The following condition must be enforced: every ai <= 0
|
9 |
|
10 |
|
11 | ## Syntax
|
12 |
|
13 | ```js
|
14 | math.multinomial(a) // a is an array type
|
15 | ```
|
16 |
|
17 | ### Parameters
|
18 |
|
19 | Parameter | Type | Description
|
20 | --------- | ---- | -----------
|
21 | `a` | number[] | BigNumber[] | Integer numbers of objects in the subset
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | Number | BigNumber | Multinomial coefficient.
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | math.multinomial([1,2,1]) // returns 12
|
34 | ```
|
35 |
|
36 |
|
37 | ## See also
|
38 |
|
39 | [combinations](combinations.md),
|
40 | [factorial](factorial.md)
|
41 |
|
\ | No newline at end of file |