Hey everyone,

here is a little problem, I know that there are many ways of solving it and I'm interested to know how you would solve it:

there are k bags numbered from 1 to k ( you can tell the difference between the bags), and you have n balls ( you can't make the difference between the balls). also

a)how many possibilities you have of putting all the balls in the bags with each bag having at least 1 ball in it.

b)how many possibilities you have of putting all the balls in the bags.

My answers

a)

b)

tell me if you can prove me wrong and if you find the same thing, well in both case tell me how you found it.

Thank you so much in advance!!!