[Math] the number of 7 digit numbers that can be formed using the digits 1 , 2 , 3 , 4 , 5 using every digit at least once.

combinations

I am using two method to solve the problem. Both the methods seem correct to me but are giving different answers.

METHOD 1-
We have 7 places and it is necessary to use each digits of 1,2,3,4,5 once so first selected 5 places of 7 by 5C2 ways and arrange them in 5! ways. Now we have two places left and we can place any 5 numbers in them by 5^2 ways. Therefore total number of ways become
5C2*5!*5^2 ways

METHOD 2-
We get 2 kind of situations –

Case 1-When 3 digits are alike and 4 different (eg-1112345)

This is possible in 5C1*(7!/3!) ways

Case 2-When 2 digits are alike two times and 4 different (eg- 1122345)

This is possible in 5C2*(7!/2!^2)

For total no. of ways we can add them.

Answers from two method are different! Please tell which method is correct (or whether either is wrong)?

Best Answer

Your Method 1 is incorrect.

For example, the number $1122345$ is counted multiple times, by selecting the first five places differently.