Case 1 : When all digits are same :
9C1 (excluding
0)
Case 2: When digits are different and 0 excluded.
(a) Selecting 2 numbers in 9C2 ways
(b) Each digit can be filled in 2 ways hence 2222=24 way
(c) Undesirable case : when a particular digit is same (21=2 ways)
(case 1)
∴9C2(24−2) ways
Case 3: When digits are different and 0 is included
(a) other digit can be chosen in 9C1 ways
(b) 0 can't be placed at ten thousand's place, hence the selected digit should be fixed at this place remaining 3 digits can be filled with 222=23 ways.
(c) Undesirable case: When all the 4 digits gets filled with selected digit only (0 not included)= 1 way hence no. of ways will be: 9C1(23−1)
∴ Total desired ways :- 9C1+9C2(24−2)+9C1(23−1)=576 ways