mathjs/docs/reference/functions/multinomial.md
2018-06-16 15:39:07 +02:00

1.3 KiB

layout
default

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.

Examples #

math.multinomial([1,2,1]) // returns 12

See also #

combinations, factorial