0

What is the no of ways to express $r$ as a sum of $n$ non-negative integers in which order counts?

My observation: should not it be infinitely many ways? Because if $n ≥ r$ then first we will write $r$ $1$'s and then write $(n-r) $ $0$'s and at last arrange them In this way, if $n$ takes values $r+1, r+2, ...., 2r, ... $ then we can put more $0$'s between the $1$'s

Am I right?

AK001
  • 113
  • $r$ and $n$ are both fixed ahead of time. Yes, you can write $r$ as the sum of some undecided possibly fluctuating number of non-negative integers... but writing $r$ as the sum of specifically $n$ non-negative integers... there are only finitely many possibilities. For example, writing $2$ as the sum of very specifically three non-negative integers could be done as $2+0+0, 0+2+0, 0+0+2, 1+1+0, 1+0+1,$ and $0+1+1$ for a total of $6$ different ways – JMoravitz Nov 09 '21 at 19:19
  • Now... as for how to proceed... see stars-and-bars on wikipedia. The punchline is that you can imagine arranging $r$ stars and $n-1$ bars and interpreting the result as one of your sums. The number of ways of arranging those stars and bars then is precisely the number of sums satisfying your conditions. Note, $\binom{2+3-1}{3-1}=\binom{4}{2}=6$ – JMoravitz Nov 09 '21 at 19:21

0 Answers0