gmihir
How many four-digit positive integers can be formed by using the digits from 1 to 9 so that two digits are equal to each other and the remaining two are also equal to each other but different from the other two ?
A. 400
B. 1728
C. 108
D. 216
E. 432
Let’s first find the number of ways we can form a number AABB where A and B denote distinct digits.
For the first digit, we have 9 possible options. If the second digit matches that of the first, then we have 1 option. Then for digit 3, we have 8 possible options. Since digit 4 matches digit 3, we have 1 option.
So, for this scenario, we have 9 x 1 x 8 x 1 = 72 options.
Since we are essentially being asked how many ways we can arrange As and Bs in A-A-B-B, where A and B are numbers 1 through 9, we see that A-A-B-B can be arranged in 4!/(2! x 2!) = 24/4 = 6 ways.
Finally, we should take into account that we counted each number twice when we made this calculation (for instance, when A = 1 and B = 2, AABB = 1122, but when A = 2 and B = 1, BBAA = 1122); therefore, we should divide the result by 2.
Thus, the total number of ways to create a 4-digit number with 2 unique digits is (6 x 72)/2 = 216.
Answer: D