Given an integer $n >0$, how many ways can we express $n$ as the sum of three natural numbers $n_1,n_2,n_3$ ?
Given an integer $n >0$, how many ways can we express $n$ as the sum of three natural numbers $n_1,n_2,n_3$ ?
-
0That definition doesn't define a function. – 2012-02-12
-
1I do not really understand what you mean by "cardinality of $f(n)$" as this is just one element of $\mathbb{N}^3$. If you want to phrase your question with the help of a function then you are more likely asking for the cardinalities of the fibers of the map $g: \mathbb{N}^3 \rightarrow \mathbb{N}, (n_1,n_2,n_3) \mapsto n_1+n_2+n_3$. – 2012-02-12
-
0The function made things confusing, I have edited the question – 2012-02-12
2 Answers
Judging by the comments and other answer I think I might be missing out on something. yet- This might still be right, so I post this answer, please let me know if I'm horribly wrong :-)
I think we this question can be reformulated in the following manner:
Suppose we have $n+2$ balls, $n$ of which are white, and the other two are black. Now, each different way in which you order the $n+2$ balls gives you a different partition of $n$ in to $3$ natural numbers ($0$ included)- just count how many white balls are between any two black ones.
Moreover- any partition of $n$ to naturals $n_1+n_2+n_3=n$, can be visualized as an ordering of the above $n+2$ balls:
Just put the first $n_1$ white balls in a row, followed by a black one, then the next $n_2$ white balls, followed by a black one and then the last $n_3$ white ones.
So the question reduces to how many ways can you arrage $n$ white balls, and two black ones in a row-
This is easily seen to be $\binom{n+2}{2}$.
(once the positions for the two black ones has been set, the partition is determined)
-
0Clever! This is definitely correct. In my simplex answer, I mistakenly assumed that he wanted $n_1,n_2,n_3 > 0$, so it would give a different answer, but still, the answer would probably reduce to something quite simple, and would match a similar combinatorial formula. – 2012-02-12
-
0This is very enlightening, thanks for making the effort to make this understandable. – 2012-02-12
-
0@LHS: sure thing :) – 2012-02-12
-
0@LHS: This answer assumes that you find (1,2,3) different from (3,2,1)-that is, you are using ordered partitions. If you want ordered partitions and require all the numbers be >0, you just have $\binom {n-1}{2}$. The same argument holds, but you can't put black balls at the ends or next to each other. – 2012-02-13
I mistakenly assumed that you wanted $n_1,n_2,n_3 > 0$, so the following answer is not correct. I won't remove it, since I think it might still be interesting.
It's the number of lattice points in the interior of a dilation of the standard 2-simplex. Then, using a change of basis, this can be changed into the question of how many lattice points lie inside 2D triangle, which can be found using pick's theorem.
-
0Thank you for your contribution, this is still interesting like you say! – 2012-02-12