Clarification for a' counting' problem.

1. In how many ways can you wear 4 **different** rings on 5 fingers of your hand, such that you should be wearing all the rings on your hand. You can wear as many rings as you want you want on a finger.

2. In how many ways can you wear 4 **identical** rings on 5 fingers of your hand, such that you should be wearing all the rings on your hand. You can wear as many rings as you want you want on a finger.

Please check if my solution is correct.

First divide for into sum of positive integers. The possibilities are:

4

3,1

2,2

1,1,2

1,1,1,1

Number of ways of choosing one finger for placing all rings= 5C1 = 5

Number of ways of choosing two fingers for placing rings in '3,1 way'= 5C2 = 10

Number of ways of choosing two fingers for placing rings in '2,2 way'= 5C2 = 10

Number of ways of choosing three fingers for placing rings in '1,1,2 way '= 5C3 = 10

Number of ways of choosing four fingers for placing rings in '1,1,1,1, way'= 5C4 = 5

Once the fingers for placing rings have been chosen, determine the order of number of rings on a particular finger

For 4 rings on one finger, number of ways = 1!

For "1,3 way" on two fingers, number of ways = 2!

For "2,2 way" on two fingers, number of ways = 2!/2! = 1

For "1,1,2 way" on three fingers, number of ways = 3!/(1!2!) = 3

For "1,1,1,1 way" on four fingers, number of ways = (4!/4!) = 1

*We will stop our calculations here if the rings are identical*

Now we have chosen particular combination (ex "2 +2 +1"), also we have chosen the fingers to put them on, and also the order (ex: which two fingers will have 2 rings and which one will have 1). Once having done that, you have have to arrange the rings. Which will be in 4! ways for each and every combination.

Answer for problem 1 (identical rings) = 1*5 + 2*10 + 1*10 + 3*10 + 1*5 = 70

Answer for problem 2 (all rings are different) = 70*4! = 1680

Is this solution correct. I know the solution of second part is correct. Because answer can be found using a formula for distributing 'n' identical things amongst 'r' people, every person can get any number of things.

The formula is (n+r-1)C(r-1)

Here, n=4, r=5

8C4 =70.

Query : How has this general formula been derived?