#i need help with homework

14 messages · Page 1 of 1 (latest)

spring vale
#

there might be a better way to do this but brute force is a reasonable approach

7111 (4 permutations)
6211 (12 permutations)
5311 (12 permutations)
5221 (12 permutations)
4411 (6 permutations)
4321 (24 permutations)
4222(4 permutations)
3322 (6 permutations)

queen drum
#

Apply Stars and bars

sick oak
#

just give me result i beg you

queen drum
idle isleBOT
# sick oak just give me result i beg you

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.

sick oak
#

I didnt study this in my country

#

Give me a more matematica approach if you want me to solve it

queen drum
#

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

spring vale
#

I get what you're saying but that doesn't match my brute force method. Which solutions did I miss?

queen drum
#

For example when the first number is 1 or 2.

#

Ah now I understand what you did.
Letme find one

#

3331

spring vale
#

ty

fresh oak
#

.solved