multinomial.md (900B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 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 ### Throws 31 32 Type | Description 33 ---- | ----------- 34 35 36 ## Examples 37 38 ```js 39 math.multinomial([1,2,1]) // returns 12 40 ``` 41 42 43 ## See also 44 45 [combinations](combinations.md), 46 [factorial](factorial.md)