---
title: "grouping"
source: https://www.jemoka.com/posts/kbhgrouping/
---

&ldquo;Stuffing some stuff into buckets&rdquo;
How many ways are there to sort \(n\) distinct objects to \(r\) buckets?
\begin{equation} r^{n} \end{equation}
grouping with entirely indistinct objects You can simply reframe the grouping problem as permutation of the objects with \(r-1\) dividers along with your old \(n\) objects.
i.e.: sort this thing &mdash;
So:
\begin{equation} \frac{(n+r-1)!}{n! (r-1)!} \end{equation}
