Number of three digit numbers where exactly two of the digits are the same and the third digit is different

Difficulty: Medium

Correct Answer: 243

Explanation:


Introduction / Context:
This problem tests your ability to count three digit numbers under a digit pattern restriction. You must count numbers where exactly two digits are equal and the third digit is different, while still ensuring the number is a valid three digit number.


Given Data / Assumptions:

  • We consider only three digit numbers from 100 to 999.
  • Digits are taken from 0 to 9, but the first digit cannot be zero.
  • The pattern required is that exactly two digits are the same and the remaining digit is different.
  • All three digits equal, such as 111, are not allowed.


Concept / Approach:
We must count numbers with exactly one repeated digit. So we choose the digit that repeats, choose the digit that is different, and then decide which two positions get the repeated digit. Each case must respect the condition that the first digit cannot be zero.


Step-by-Step Solution:
Step 1: Count cases by position pattern: x x y, x y x, and y x x where x is the repeated digit and y is the different digit.Step 2: For pattern x x y, the first digit is x and must be non zero. So x can be 1 to 9 giving 9 choices.Step 3: For each x, y can be any digit from 0 to 9 except x, giving 9 choices.Step 4: So pattern x x y contributes 9 * 9 = 81 numbers.Step 5: For pattern x y x, first digit is x and must again be non zero, so there are 9 choices for x, and 9 choices for y not equal to x, giving another 81 numbers.Step 6: For pattern y x x, the repeated digit is x in positions two and three, and the first digit y must be non zero and different from x.Step 7: If x is zero, then y can be any of 1 to 9, giving 9 numbers.Step 8: If x is from 1 to 9, there are 9 choices for x and then 8 possible non zero digits for y that are different from x, giving 9 * 8 = 72 numbers.Step 9: So pattern y x x contributes 9 + 72 = 81 numbers.Step 10: Total numbers with exactly two equal digits = 81 + 81 + 81 = 243.


Verification / Alternative check:
You can also programmatically generate all three digit numbers and count how many fit the pattern, which will again yield 243. This confirms that the manual counting is consistent.


Why Other Options Are Wrong:

  • 252 and 648 are incorrect counts that may come from double counting or from allowing all three digits to be equal.
  • 900 is the total number of three digit numbers and ignores any restriction.


Common Pitfalls:
Some learners accidentally include numbers where all three digits are the same. Others forget the leading digit restriction and treat the first digit as if it could be zero. It is crucial to treat patterns by position and carefully enforce the restriction on the first digit.


Final Answer:
The number of three digit numbers with exactly two equal digits is 243, so the correct answer is 243.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion