-1

I need some help. I do not understand how to get the answer (solution) to this question. I could not solve it, neither did it help when I saw the answer. This is a question from the chapter combinatorics from my textbook. Should be noted that my textbook has not be explaining anything that resembles this kinds of questions. So I am stuck. I would appreciate some insights. Thanks.

The question:

Let $n \in \mathbb{Z^+}$. How many solutions are there to the equation: $$x+y+z=n$$ such that $x,y,z \in \mathbb{N}$?

The answer:

$\frac{1}{2}(n^{2} + 3n + 2)$

How did they arrive at this answer?

  • 8
    You may want to check Stars and bars. You could also check this post. – StubbornAtom Oct 07 '16 at 10:10
  • 2
    This has been asked many times, please perform a search of stars and bars. – Jack D'Aurizio Oct 07 '16 at 10:11
  • I am not supposed to solve this using Stars and bars because my textbook has not talked about that. – notmyrealname Oct 07 '16 at 10:19
  • @notmyrealname What kind of crappy textbook asks you to do exercises without explaining them? – Jam Oct 07 '16 at 10:20
  • @StubbornAtom Is it possible to solve without using Stars and bars, because my textbook has not talked about that technique at all? So how do you solve it without it? – notmyrealname Oct 07 '16 at 10:20
  • @Jam It is actually a quite good book. – notmyrealname Oct 07 '16 at 10:22
  • Maybe your book has not used the term explicitly, but has used the combinatorial technique. – StubbornAtom Oct 07 '16 at 10:22
  • 1
    @notmyrealname It's not some advanced tecnhique. All you need is some basic logic and combinatorics. – Stefan4024 Oct 07 '16 at 10:24
  • @StubbornAtom Nope the only things it has brought up are the definitions of permutation, combination and the binomial theorem. Then you are asked this question.... – notmyrealname Oct 07 '16 at 10:24
  • Well the problem is concerned with permutation and combination. If no example was shown in the book then it probably wants you to have this knowledge beforehand (don't know why). – StubbornAtom Oct 07 '16 at 10:29
  • @StubbornAtom I look at the Bars and stars but I could not use that to arrive at $\frac{1}{2}(n^{2} + 3n + 2)$ – notmyrealname Oct 07 '16 at 10:39
  • Anyone who can solve this using the bars and stars technique? It seems that all the answers are given as the number of possible configurations, say $250$ or $4824$ et cetera. Not as an expression like $\frac{1}{2}(n^{2} + 3n + 2)$ I tried but got $\frac{1}{2}(n^3-6n^2 + 11n - 6)$ which is wrong. – notmyrealname Oct 07 '16 at 10:45
  • 2
    Applying the formula we get $\binom{n+2}{2}=\frac{n^2+3n+2}{2}$ – StubbornAtom Oct 07 '16 at 10:45
  • @StubbornAtom Thank you. I used $\binom{n-1}{k-1}$. I should instead use $\binom{n+1}{k-1}$? – notmyrealname Oct 07 '16 at 10:50
  • 1
    The answer you have provided is for non-negative $x,y,z$. For just finding out the answer remember that $\binom{n+k-1}{k-1}$ is the number of non-negative integral solutions of $x_1+x_2+...+x_k=n$, and $\binom{n-1}{k-1}$ is the number of positive integral solutions of the same equation. – StubbornAtom Oct 07 '16 at 10:56

1 Answers1

0

Note that zero should be included

Considering $$z(x,y) = n-x-y$$

where $x,y\in \mathbb{N}\cup \{ 0 \}$ and $x+y\leq n$

The number of elements in the domain:

\begin{align*} \sum_{x=0}^{n} \sum_{y=0}^{n-x} 1 &= \sum_{x=0}^{n} (n-x+1) \\ &= (n+1)\times \frac{(n+1)+1}{2} \\ &= \frac{(n+1)(n+2)}{2} \end{align*}

Ng Chung Tak
  • 18,990