Function multinomial #
Multinomial Coefficients compute the number of ways of picking a1, a2, …, ai unordered outcomes from n
possibilities.
multinomial takes one array of integers as an argument. The following condition must be enforced: every ai <= 0
Syntax #
math.multinomial(a) // a is an array type
Parameters #
Parameter | Type | Description |
---|---|---|
a |
number[] | BigNumber[] | Integer numbers of objects in the subset |
Returns #
Type | Description |
---|---|
Number | BigNumber | Multinomial coefficient. |
Throws #
Type | Description —- | ———–
Examples #
math.multinomial([1,2,1]) // returns 12