Find how many four digit numbers can be formed by seven digits 1,2,4,5,6,8 and 9 if any digit is selected with repetetion but without any digit repeat more than two times.
The total number of ways that can form 4-digit number with repetitions is `7^4 = 2401` .
To find the ways with any digit without repeating two times we must find how many digits can be formed with repeating more than two times. So there are two cases. One is the digits repeat three times and the other is digits repeat in all four.
We have 7 digits. If we need to repeat all four in form of a 4-digit number then we have only 7 ways to do that.
Such 4-digit number would be like 2222,4444 etc.
If we repeat digits 3 times then we have 7 ways to select one number but since other 3 is repeated we have to select one digit from the rest 6 (without the digit selected) and repeat in two more times to get digits with three time repetition.
Such 4-digit number would be like 2111,2422 etc.
So number of ways for this is `7xx6xx1xx1 = 42`
But we can rearrange these digits within the number and form several 4-digit numbers.
Such 4-digit number would be like 2111,1211 etc.
So 4-digit numbers with 3-digit repeat are `42xx(4!)/3! = 168`
4-digit numbers without more than two digit repeat
= (total 4-digit numbers)-(4-digit numbers with all 4 repeat)-(4-digit numbers with 3 digit repeat)
So the answer is 2226 four digit numbers.