5
$\begingroup$

I faced this problem on one test. I wrote my solution but then I found out that my solution is wrong, I still cannot find where my mistake is.

The problem says: How many three-digits numbers are there such that they are odd and their digits are all different.

Here is my approach:

We have three digits. Since the number should be odd, the last digit should be one of those numbers $1, 3, 5, 7, 9$. Now the second digits can be one of the digits: $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$ There are 10 different digits for the second digits, but since the digits should be different we cannot place 10 digits, but we can place 9 digits. And for the first digits we can place digits in the range $1...9$ but we cannot place the digits that are used in the two other digits and we can place only 7 digits.

So my result is $7\cdot9\cdot5 = 315$

However the result is not correct, because there are $320$ odd three-digits numbers with different digits.

Can you point me where is my mistake, thanks in advance.

$\endgroup$
4
  • 1
    $\begingroup$ The mistake is you might have used 0 for the middle digit. So there are two cases. $\endgroup$
    – quasi
    Commented Jul 9, 2017 at 8:36
  • $\begingroup$ I don't see why we cant use the 0 for the middle digit, number 503, 305, 307 are all valid for counting. $\endgroup$ Commented Jul 9, 2017 at 8:39
  • 2
    $\begingroup$ @someone123123 if you use 0 for the middle digit, you have 8 options available for the first digit. This gives 5 additional cases. $\endgroup$
    – IanF1
    Commented Jul 9, 2017 at 15:34
  • $\begingroup$ To really pinpoint the problem: "For the first digits we can place digits in the range 1...9 [good so far] but we cannot place the digits that are used in the two other digits [still good] and we can place only 7 digits [this is not correct!].". $\endgroup$ Commented Jul 9, 2017 at 23:19

5 Answers 5

14
$\begingroup$

Problems of this type are often solved more simply if we place the digits in a suitable order, instead of necessarily left to right.

Here we'll place the digits in the order last-first-second, i.e. in the order $Units-Hundreds-Tens$

  • $5$ choices for the last digit (to make the number odd)

  • $8$ choices left for the first digit (since $0$ can't be used)

  • $8$ choices still left for the second digit (since $0$ is now available for use)

Thus, without breaking up into cases, we get $5\cdot8\cdot8 = 320$

$\endgroup$
11
$\begingroup$

The mistake is you might have used $0$ for the middle digit. So there are two cases.

Case ($1$): Using $0$ for the middle digit:

$\qquad$The count is $5\,{\times}\,1\,{\times}\,8=40$.

Case ($2$): Not using $0$ for the middle digit:

$\qquad$The count is $5\,{\times}\,8\,{\times}\,7=280$.

So you get a total count of $40+280=320$.

$\endgroup$
2
  • $\begingroup$ Thanks for the answer, but can you explain why having 0 for middle digits makes difference. $\endgroup$ Commented Jul 9, 2017 at 8:44
  • 6
    $\begingroup$ Because if you use $0$ for the middle digit, the leading digit has only two exclusions, not three. $\endgroup$
    – quasi
    Commented Jul 9, 2017 at 8:46
2
$\begingroup$

Since this problem is only created by one single digit i.e. zero as you can't put zero on hundred's place like 013 which is not 3 digit number so when you put zero on the ten's place i.e. in the middle you will get 8 remaining digits for hundred place. Therefore we have two cases which are: Case (1): Using 0 for the middle digit.

The count is 5×1×8=40.

Case (2): Not using 0 for the middle digit.

The count is 5×8×7=280.

So you get a total count of 40+280=320.

$\endgroup$
1
  • $\begingroup$ Welcome to MSE. Your answer adds nothing new to the already existing answers. $\endgroup$ Commented Jan 17, 2019 at 17:54
0
$\begingroup$

Let the integer is abc.

Here, $c ∈ {1,3,....,9}$

We can insert any of the $5$ digits into c.

Again, $a ∈ {1,2,........9}$

$b ∈ {0,1,2,........9}$

Then we can insert $(9-1) = 8$ into $a$. And again $(10-2) = 8$ values into $b$.

So, Number of possible values under the mentioned circumstances will be $= 5 * 8 * 8 = 320$

$\endgroup$
-1
$\begingroup$

Three digit odd numbers implies the numbers would only be made of digits 1 , 3 , 5 , 7 , 9

With repetition of digits we would have had 5 * 5 * 5 = 125

But for every hundreds, maximum of 4 tens is possible (avoiding the duplicate of digit used in hundreds)

And each of these 4 tens, maximum of 3 units is possible (avoiding the duplicate of digits used in tens)


5 * 4 * 3 = 60 is my answer

$\endgroup$
1
  • 1
    $\begingroup$ I think you didn't understand the question, the question says how many three-digits numbers are there such that they are odd and they have three different digits. The first two digits don't have to be odd. $\endgroup$ Commented Jul 12, 2017 at 10:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .