powered by
The total number of rows is choose(n = k + n - 1, k = k - 1). This function uses recursion, so is not the most efficient.
choose(n = k + n - 1, k = k - 1)
all_multinom(n, k)
A matrix, rows index different possible multinomial counts, the columns index the bins.
Number of indistinguishable balls.
Number of distinguishable bins.
David Gerard
n <- 5 k <- 3 all_multinom(n = n, k = k) choose(n = n + k - 1, k = k - 1)
Run the code above in your browser using DataLab