Hey Guys, I have this question but my friend and I are getting different answers, and I don't have the answer booklet with me. Could you guys help ?
So, here's the question.
Find the number of all possible k-tuples of non - negative integers (n(1),n(2),n(3).... n(k)) such that
sum_{i=1}^k n(i) = 100
So, this is the question. Now here's my solution.
Let there be 100 stars placed in a line. We have to divide these 100 stars into k groups such that no group equals 0 . So, let me do the division between stars by placing a bar between the stars. By this way, there are 99 possible ways in which I can set a bar (between any two stars) . But as I only have to create k groups, I need only place k-1 bars..
So I have 99 places and I need to choose any (k-1) places.. SO, I get the answer as
99 C (k-1)
Is it correct guys ? Because I have a friend who says the answer is (99+k)C(k-1).
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
Your friend is correct.
If the problem asked about positive integers, then your answer of (k−199) would be correct. But the ni are nonnegative, which means they can be 0. Your approach does not account for this.
Instead, consider any arrangement of 100 stars and k−1 bars. (In particular, there could be two or more bars between consecutive stars.) Then you take n1 as the number of stars before the first bar, n2 as the number of stars between the first bar and second bar, and so on. This gives you solutions where the ni can be 0. Hence, the number of solutions is the number of ways of arranging 100 stars and k−1 bars, which is (100100+(k−1))=(100k+99)=(k−1k+99).
Log in to reply
Thanks.
Use the Stars and Bars formula, it's the same thing. A standard result !