## mathmath333 one year ago A teacher has to distribute 15 pens among 5 of his students such that student A gets at least 3 and at most 6 pens and each remaining student gets at least one pen.In how many ways can this be done ?

1. mathmath333

A teacher has to distribute $$15$$ pens among $$5$$ of his students such that student A gets at least $$3$$ and at most $$6$$ pens and each remaining student gets at least one pen.In how many ways can this be done ?

2. freckles

so A can get 3,4,5, or 6 pens if A gets 3 pens then there are 12 pens left to distribute if A gets 4 pens then there are 11 pens left to distribute if A gets 5 pens then there are 10 pens left to distribute if A gets 6 pens then there are 9 pens left to distribute

3. freckles

if A gets 3 B can have between 1 pen and (12-3)=9 pens if A gets 4 B can have between 1 pen and (11-3)=8 pens if A gets 5 B can have between 1 pen and (10-3)=7 pens if A gets 6 B can have between 1 pen and (9-3)=6 pens

4. mathmath333

u mean B=remaining 4 students

5. freckles

as an students A,B,C,D,E

6. mathmath333

hey but this listing all ABCDE method is time taking

7. freckles

so is this right 9!+8!+7!+6! ? or aka 408960 ?

8. mathmath333

425 is given

9. freckles

err I'm bad at counting sometimes let me rethink

10. mathmath333

are u considering all pens are distinct or equal

11. Zarkon

${12\choose4}-{8\choose 4}$

12. freckles

@zarkon this might be a dumb question can you tell me how you got that

13. freckles

like your thinking and stuff so i can have your counting wisdom

14. freckles

or do you understand @mathmath333 ?

15. Zarkon

stars and bars twice

16. mathmath333

i did'nt understand his logic

17. mathmath333

first he ignored the condition that A has 3 to 6 pens then he subtracted something

18. freckles

*-hmmm... so we have b+c+d+e=9 and b+c+d+e=8 and b+c+d+e=7 and b+c+d+e=6 so stars and bars 4 times? $4(8 C 3 +7 C3 + 6 C 3+5 C3)$ hmmm but we want to subtract out any solutions having 0 in it ... lol

19. Zarkon

I ignored "at most 6 pens" then I subtracted the ones where there were 7 or more

20. mathmath333

r u still typong

21. freckles

b+c+d=4 2 bars 4 stars no bars at end or touching... these count as zeros... *|*|** *|**|* **|*|* so I think there are 3 ways here... b+c+d=5 *|***|* *|**|** *|*|*** **|**|* ***|*|* **|*|** 6 ways? b+c+d=6 *|****|* *|***|** **|***|* ***|**|* *|**|*** **|**|** *|*|**** **|*|*** ***|*|** ****|*|* 10 ways? -- 3 ways=(3 choose 2) 6 ways=(4 choose 2) 10 ways=(5 choose 2) ... hmm we want oh... thanks to @ganeshie8 I think I have this using also the stars and bars.. By the way the earlier things I wrote on this post was for me. Thought maybe you would want to see the thinking or whatever... so we have the equations: b+c+d+e=12 b+c+d+e=11 b+c+d+e=10 b+c+d+e=9 so finding the number of positive solutions to each of those gives us: $11C3+10C3+9C3+8C3=425$ this does give us the right answer

22. freckles

The thing we used was this theorem: $\text{ For any pair of positive integers }n \text{ and } k, \text{ the number of distinct } \\ k-\text{tuples of positive integers whose sum is } n \text{ is given by } \left(\begin{matrix}n-1 \\ k-1\end{matrix}\right)$

23. freckles

I used this theorem for each of those 4 equations I wrote

24. freckles

Thanks @zarkon for bringing up the stars and bars method.

25. mathmath333

thnks

26. Zarkon

give 3 pens to student A and 1 pen to the other students that leaves 8 pens. use stars and bars on 8 pens and 5 students ${8+4\choose 4}={12\choose 4}$ now give 7 pens to A then we have ${4+4\choose 4}={8\choose 4}$ (we don't want these in our total count so we subtract) ${12\choose 4}-{8\choose4}=425$