# $n$ distinct objects in $k$ boxes, and methods for solving combinatorics problems

I am a beginner in the subject of combinatorics and would like to know a few things. A) Someone please explain me how we get the K to the nth number of ways of distributing n distinct objects in k boxes.

B) When do we use the following methods: a+b+c+..+n = x ; and (1 + x + x^2 + x^3+...) to the power something

-

1
I don't understand part (B). The first is rather specific, in the second are you asking about virtually the entire theory of generating functions or...? – anon Apr 29 '12 at 10:03
Maybe a book like Path to Combinatorics for Undergraduates will help? – Eisen Apr 29 '12 at 12:28

## 1 Answer

About 1: You get $k^n$ since for each of the $n$ elements you have $k$ choices (you choose the box), so you have $k\cdot k\cdots k$ exactly $n$ times (this is "the product principle" of combinatorics in action).

In 2 I think you're confusing the notation. The basic idea here is this: suppose you have the equation $a+b=n$ where $a,b$ can get every nonnegative integer value. One way to find the number of solutions is to compute the coefficient of $x^n$ in $(x^0+x^1+x^2+x^3+\dots)(x^0+x^1+x^2+x^3+\dots)$.

Here the first parenthesis represents the values that can $a$ can get, in the exponent of $x$; the second parenthesis represents values $b$ can get.

Now, to generalize this, all you need to do is add more parenthesis - one for each variable in the original equation - and maybe remove some elements from specific parenthesis. For example, if we have the equation $a+b+c=n$ and we demand that $a$ is odd and $b$ is even (and $c$ whatever), this is described by $$(x^1+x^3+x^5+\dots)(x^0+x^2+x^4+\dots)(x^0+x^1+x^2+x^3+\dots)$$

(Note the exponents).

-

## protected by Zev Chonoles♦Apr 20 at 0:47

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 18, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9187430739402771, "perplexity_flag": "head"}