Even number set { 0, 2, 4, 6, 8 } Odd number set { 1, 3, 5, 7, 9 }
The answer can be achieved by considering 2 cases
1. 3 digits are even and 1 digit is odd
2. 3 digits are odd and 1 digit is even
1st case:
3 digits are even and 1 digit is odd
here 2 cases are possible
- 2 non-zero even digits and 1 digit = 0 and 1 odd digit
OR
- 3 non-zero even digit and 1 odd digits
---------------------------------------------------------------
- 2 non-zero even digits and 1 digit = 0 and 1 odd digit
Choosing 2 non-zero even digit = 4C2 = 6
Choosing 1 odd digit = 5C1 = 5
Arranging all 4 digits = 3 × 3 × 2 × 1 = 18
The no. of ways will be = 18 * 6 * 5 = 540 [the numbers can't be started with 0]
- 3 non-zero even digit and 1 odd digits
Choosing 3 non-zero even digit = 4C3 = 4
Choosing 1 odd digit = 5C1 = 5
Arranging all 4 digits = 4! = 24
The no. of ways will be = 24 * 5 * 4 = 480
The total no. of ways of 1st case = 540 + 480 = 1020
Now the 2nd case
3 digits are odd and 1 digit is even
- 1 digit = 0 and 3 odd digits
OR
- 1 non-zero even digit and 3 odd digits
-----------------------------------------------------
- 1 digit = 0 and 3 odd digits
Choosing 3 odd digits = 5C3 = 10
Arranging all 4 digits = 3 × 3 × 2 × 1 = 18
The no. of ways will be = 18 * 10 = 180
- 1 non-zero even digit and 3 odd digits
Choosing 1 non-zero even digit = 4C1 = 4
Choosing 3 odd digit = 5C3 = 10
Arranging all 4 digits = 4! = 24
The no. of ways will be = 24 * 4 * 10 = 960
The total no. of ways of 2nd case = 180 + 960 = 1140
The total no. of ways of 1st case + The total no. of ways of 2nd case = 1020 + 1140 = 2160 ways