-
Notifications
You must be signed in to change notification settings - Fork 0
multinomial
Subhajit Sahu edited this page Aug 9, 2022
·
2 revisions
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 xnumber = require('extra-number');
xnumber.multinomial(1, 2);
// → 3
xnumber.multinomial(1, 2, 3);
// → 60
xnumber.multinomial(1, 2, 3, 4);
// → 12600