The twelvefold way f:N→M n balls are put into m bins balls per bin: unrestricted ≤1 ≥1 n distinct balls, m distinct bins mn (m)n n identical balls, m distinct bins () m n distinct balls, 1 fn≤m m identical bins if n>m k=1 n identical balls, 1ifn≤m m identical bins if n>mballs per bin: unrestricted ≤ 1 ≥ 1 n distinct balls, m distinct bins n identical balls, m distinct bins n distinct balls, m identical bins n identical balls, m identical bins f n balls are put into m bins : N M mn (m)n m n ⇥ 1 if n m 0 if n>m 1 if n m 0 if n>m ! m k=1 "n k # ! n m " The twelvefold way m n ⇥⇥ n 1 m 1 ⇥