#i need help with homework
14 messages · Page 1 of 1 (latest)
Apply Stars and bars
just give me result i beg you
!nosols
As a helper, please do not give out answers that could be copied as a homework solution. Have the student work through the problem themselves and guide them along the way.
I didnt study this in my country
Give me a more matematica approach if you want me to solve it
I'll give you an example:
If you have three numbers greater than 0 and you want the sum to be 5.
you assume a row of 5 stars
* * * * *
If you put two separators, | |
you would have something like:
*| * *| * * -> 1-2-2
* * *| *| * -> 3-1-1
which is just what you are looking for, so how many separators do you need?
3 numbers -1 = 2
And in how many places can you put the dividers:
*_*_*_*_* -> 4
On the edges not because they have to be greater than 0
So the sum you are looking for -1
5-1 = 4 places
So the calculation boils down to: How many ways can we place 2 objects in 4 places?
4C2 = 6
I get what you're saying but that doesn't match my brute force method. Which solutions did I miss?
For example when the first number is 1 or 2.
Ah now I understand what you did.
Letme find one
3331
ty
.solved