0

I have a $n$ elements $x_1,\dots,x_n$ that have to be assigned to $m$ containers $Y_1, \dots, Y_m$. The containers can be empty.

How many arrangements, say $c_{m,n}$ are there?

example

Let $m\triangleq 3$ and $n \triangleq 2$, then there are $c_{3,2}=9$ possible arrangements \begin{equation*}\begin{array}{lll} Y_1 =\{x_1,x_2\} &Y_2=\varnothing &Y_3=\varnothing \\ Y_1 =\varnothing &Y_2=\{x_1,x_2\} &Y_3=\varnothing \\ Y_1 =\varnothing &Y_2=\varnothing &Y_3=\{x_1,x_2\} \\ Y_1 =\{x_1\} &Y_2=\{x_2\} &Y_3=\varnothing \\ Y_1 =\varnothing &Y_2=\{x_1\} &Y_3=\{x_2\} \\ Y_1 =\{x_1\} &Y_2=\varnothing &Y_3=\{x_2\} \\ Y_1 =\{x_2\} &Y_2=\{x_1\} &Y_3=\varnothing \\ Y_1 =\varnothing &Y_2=\{x_2\} &Y_3=\{x_1\} \\ Y_1 =\{x_2\} &Y_2=\varnothing &Y_3=\{x_1\} \\ \end{array} \end{equation*}

  • 3
    $|{1,\dots,m}^{{1,\dots,n}}|=m^n.$ Related – Anne Bauval Oct 07 '23 at 06:00
  • 1
    In your example $n=2, m=3$, we have $3$ choices of containers for the first element, similarly $3$ choices for the second element, so in total you multiply them together to get $3^2=9$ choices. This is easily generalised to $m^n$. – Mengchun Zhang Oct 07 '23 at 06:08
  • 1
    Considering each element $x_i$, there are $m$ containers, so $m$ choices of where each element can go. Multiplying these together by the number of elements, $n$. yields $m^n$. – Aaa Lol_dude Oct 07 '23 at 06:33

0 Answers0