1. r^n
2. (r+n-1)Cn
3.its quite tricky,the fact that balls are distinguisable makes problem difficulty.
problem is that {{b1,b2,b5},{b3,b4},{b6}} is one arrangement of these balls.so here the relative order of balls need to be preserved. i.e a bijection of <3,2,2> doesnt work
here there are 3 baskets (partitions ) and 6 balls(elements) now the job is partitioning a set of size n into r partitions. but here the partions will be mutually exclusive and exhaustive but maybe empty.
so a trick to use is sum rule,where you calculate the number of ways of partitioning n balls in r non empty partions,then (r-1) non empty partions,(r-2),....2,1.
so total ways=s(n,r)+s(n,r-1)+.......s(n,1)
4.a simple bijective mapting of sample space to <> 0001000101000...000010. where 0 represents balls and two 1's represnts a box. only job is to calculate diffrent number of such numbers where there are n zeros and (r-1) ones given by ((n+r-1)Cr)/r! .
its simply extension of 2nd questions,assume 3 boxes which are distigusibale so a arrangemnt <3,2,4> represnts box 1 has 3 balls,box 2 has 2 balss and box 3 has 4 balls.now <4,2,3> represents another arrangment since boxes are distingusibale but if there are indistinguabale then both above sequneces represnets same arrangement,so <4,2,3><4,3,2><2,3,4><2,4,3><3,2,4><3,4,2> maps to {4,2,3} thus there is divide by 6(3! or r!(general)) .