UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

41 lines (24 loc) 848 B
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> # 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 ```js math.multinomial(a) // a is an array type ``` ### Parameters Parameter | Type | Description --------- | ---- | ----------- `a` | number[] &#124; BigNumber[] | Integer numbers of objects in the subset ### Returns Type | Description ---- | ----------- Number &#124; BigNumber | Multinomial coefficient. ## Examples ```js math.multinomial([1,2,1]) // returns 12 ``` ## See also [combinations](combinations.md), [factorial](factorial.md)