We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Find the number of ways to put n objects in m bins (n=sum(kᵢ)).
Similar: factorial, binomial, multinomial.
function multinomial(...ks) // ks: objects per bin (kᵢ)
const xmath = require('extra-math'); xmath.multinomial(1, 2); // → 3 xmath.multinomial(1, 2, 3); // → 60 xmath.multinomial(1, 2, 3, 4); // → 12600