{"id":1026,"date":"2020-11-19T17:19:08","date_gmt":"2020-11-19T21:19:08","guid":{"rendered":"http:\/\/mathfun4kids.com\/mlog\/?p=1026"},"modified":"2024-10-25T03:01:26","modified_gmt":"2024-10-25T07:01:26","slug":"cheat-sheet-for-distributing-k-balls-into-n-boxes","status":"publish","type":"post","link":"https:\/\/mathfun4kids.com\/mlog\/?p=1026","title":{"rendered":"Cheat Sheet for Distributing $k$ Balls into $n$ Boxes"},"content":{"rendered":"\n<p>\n<!--\n$$\\begin{array}{|c|c||c|c|c|c|}\n\\hline\nk\\text{ Balls} &amp; n\\ \\text{Boxes} &amp; \\text{None} &amp; \\le 1 &amp; \\ge 1 &amp; =1 \\\\\n\\hline\ndistinct &amp; distinct &amp; n^k &amp; (n)_k &amp; n!S(k,n) &amp; n!\\text{ or } 0 \\\\\n\\hline\nidentical &amp; distinct &amp; {n+k-1}\\choose{k} &amp; {n}\\choose{k} &amp; {k-1}\\choose{n-1} &amp; 1\\text{ or }0\\\\\n\\hline\ndistinct &amp; identical &amp; \\sum_{i=1}^{n}S(k,i) &amp;1\\text{ or }0 &amp; S(k,n)&amp;1\\text{ or }0\\\\\n\\hline\nidentical &amp; identical &amp; \\sum_{i=1}^{n}P(k,i) &amp;1\\text{ or }0 &amp; P(k,n)&amp;1\\text{ or }0\\\\\n\\hline\n\\end{array} \n$$\n-->\n<table border=\"1\">\n<tr>\n<td colspan=\"2\"><b>Distribution of<\/b><\/td>\n<td colspan=\"4\"><b>Restriction<\/b><\/td>\n<\/tr>\n<tr>\n<td>$k\\text{ Balls}$<\/td>\n<td>$n\\text{ Boxes}$<\/td>\n<td>None<\/td>\n<td>$\\le 1$<\/td>\n<td>$\\ge 1$<\/td>\n<td>$=1$<\/td>\n<\/tr>\n<tr>\n<td>$distinct$<\/td>\n<td>$distinct$<\/td>\n<td>$$n^k$$<\/td>\n<td>$$(n)_k$$<\/td>\n<td>$$n!S(k,n)$$<\/td>\n<td>$$n!\\text{ or }0$$<\/td>\n<\/tr>\n<tr>\n<td>$identical$<\/td>\n<td>$distinct$<\/td>\n<td>$${n+k-1}\\choose k$$<\/td>\n<td>$$n\\choose k$$<\/td>\n<td>$${k-1}\\choose{n-1}$$<\/td>\n<td>$$1\\text{ or }0$$<\/td>\n<\/tr>\n<tr>\n<td>$distinct$<\/td>\n<td>$identical$<\/td>\n<td>$$\\sum_{i=1}^{n}S(k,i)$$<\/td>\n<td>$$1\\text{ or }0$$<\/td>\n<td>$$S(k,n)$$<\/td>\n<td>$$1\\text{ or }0$$<\/td>\n<\/tr>\n<tr>\n<td>$identical$<\/td>\n<td>$identical$<\/td>\n<td>$$\\sum_{i=1}^{n}P(k,i)$$<\/td>\n<td>$$1\\text{ or }0$$<\/td>\n<td>$$P(k,n)$$<\/td>\n<td>$$1\\text{ or }0$$<\/td>\n<\/tr>\n<\/table>\n<\/p>\n\n\n\n<p>$(n)_k=n(n-1)(n-2)&#8230;(n-k+1)=k!{n\\choose k}$<\/p>\n\n\n\n<p>$S(k, n)$ is a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Stirling_numbers_of_the_second_kind\">Stirling number of the second kind<\/a>:<\/p>\n\n\n\n<p>$$S(k,n)=\\dfrac{1}{n!}\\sum_{i=0}^{n}(-1)^{i}{{n}\\choose{i}}(n-i)^k$$<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>$P(k, n)$ is the number of partitions of $k$ into $n$ parts<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Distribution of Restriction $k\\text{ Balls}$ $n\\text{ Boxes}$ None $\\le 1$ $\\ge 1$ $=1$ $distinct$ $distinct$ $$n^k$$ $$(n)_k$$ $$n!S(k,n)$$ $$n!\\text{ or }0$$ $identical$ $distinct$ $${n+k-1}\\choose k$$ $$n\\choose k$$ $${k-1}\\choose{n-1}$$ $$1\\text{ or }0$$ $distinct$ $identical$ $$\\sum_{i=1}^{n}S(k,i)$$ $$1\\text{ or }0$$ $$S(k,n)$$ $$1\\text{ or &hellip; <a href=\"https:\/\/mathfun4kids.com\/mlog\/?p=1026\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[10],"tags":[],"_links":{"self":[{"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/posts\/1026"}],"collection":[{"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1026"}],"version-history":[{"count":59,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/posts\/1026\/revisions"}],"predecessor-version":[{"id":4925,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=\/wp\/v2\/posts\/1026\/revisions\/4925"}],"wp:attachment":[{"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathfun4kids.com\/mlog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}