Possible Duplicate:
How many ways can $b$ balls be distributed in $c$ containers with no more than $n$ balls in any given container?
There are $k$ balls and $d$ bowls. In how many ways the balls can be put in the bowls? Capacity of bowls is limited, each bowl can contain $\{0,1,2,\dots,M\}$ balls.