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