Let there be n balls and m urns.

1). If all balls are distinct and all urns are also distinct then number of ways in which the balls can be put in the urns is

2). If balls are all alike but urns are distinct then the number of ways are

3). If balls are distinct but urns are not then????

4) If both are alike then????

what is the solution to the last two?(Sleepy)