# How many odd integers from 1000 to 9999 have distint digits? will this method work?

1. Oct 21, 2006

### mr_coffee

Hello everyone!

I'm having troubles with the "multiplication rule" which states:
If an operation consist of k steps and
the first step can be performed in n_1 ways,
the second step can be performed in n_2 ways [regardless of how the first step was peformed],
.
.
.
the kth step can be performed in n_k ways [regardless of how the preceding seps were performed],

then the entire operation can be performed in (n_1)(n_2)...(n_k) ways.

The book does an example with a simliar problem, but small numbers, the book did the following:

10 to 99

They found out the following:
How many integers from 10 to 99?
answer: (number of ways to pick the first digit)(number of ways to pick the 2nd digit) = (9)(10) = 90.

How many odd integers from 10 to 99?
Well odd integers are: 1,3,5,7,9....a total of 5.
answer: (number of ways to pick the first digit)(number of ways to pick the 2nd digit) = (9)(5) = 45.

Number of integers with distinct digits:
answer: (number of ways to pick the first digit)(number of ways to pick the 2nd digit) = (9)(9) = 81.

Number of odd integers with distinct digits:
answer: (number of ways to pick the 2nd digit)((number of ways to pick the first digit)
= (5)(8) = 40.
First digit can't be 0, nor can it equal the 2nd digit.

Okay so i'm trying to apply that method to the bigger problem....
1000 to 9999

So for the number of odd integers with distinct digits...could i do the following:
(# of ways to pick 4th digit)(# of ways to pick 3rd digit)(# of ways to pick 2nd digit)(# of ways to pick 1st digit) = (5)(8)(7)(6) = 1680 ?

Thanks!

2. Oct 21, 2006

### mattmns

You have the right idea, but you forgot one little thing. You could have a 0 for one of the middle 2 positions. For example, 1003, 8017. This is only a small issue, and you should be able to easily change your answer to accomidate.

3. Oct 21, 2006

### mr_coffee

Thanks for the responce matt, but I dont really understand the process of breaking this problem down, i merely just guessed a pattern I saw happening from the smaller version of the problem 10 to 99 but I need to figure out the mindset you use for this.
I understand the smaller problem,
10 to 99,
they said there are (5)(8) = 40
(5)(8) = 40.
First digit can't be 0, nor can it equal the 2nd digit.
This makes sense to me....becuase there are 5 primes, and because the first digit can't equal the second digit your left with 9 chocies for the first digit, but it also can't be 0, so then you have 8 chocies.
But why did they start picking the last digit first then working up to the first digit?

If i apply this to the bigger problem, correct me if i'm wrong but i'm understanding it as:

So for the number of odd integers with distinct digits=
(# of ways to pick 4th digit)(# of ways to pick 3rd digit)(# of ways to pick 2nd digit)(# of ways to pick 1st digit) = ....

For a number to be odd, it has to be 1,3,5,7,9 so the (5) should take care of all of those cases but from here i'm lost.
I still have to figure out casees for the 3rd, 2nd, and 1st digit.

The thrid digit can have 9 choices becuase you can't use a digit you already used in the 4th digit.

For the 2nd digit, you can't choose a number u already chose in the 3rd digit or the 4th digit, so it would be 8.

Now for the first digit it would be 6, becuase it can't be 0 or a number you used in the 2nd digit, 3rd digit, or 4th digit, so my new answer would be:

(5)(9)(8)(6)

Is my reasoning though this correct or flawed? Thanks!!

Last edited: Oct 21, 2006
4. Oct 21, 2006

### mattmns

The reason they start backward is because it is usually a good idea to make the most restrictive choice first.

Let us look at the restrictions here.

1st position must be one of {1,2,3,4,5,6,7,8,9}
2nd position must be one of {0,1,2,3,4,5,6,7,8,9}
3rd position must be one of {0,1,2,3,4,5,6,7,8,9}
4th position must be one of {1,3,5,7,9}

If we start with the first position we have 9 choices, then for the second we have 9 choices, then for the third we have 8 choices, and now for the last we have ?? choices. Did we pick an odd number in one of the previous numbers? Because we do not know, it is better to start by picking the odd one first. Notice that the options for the 4th position is a subset of all the other options for the other positions. Likewise the options for the 1st position is a subset of the options for the 2nd and 3rd.

So if we pick the digit for the 4th position first we have 5 choices. Now if we pick the 3rd position next we have 9 choices, then we have 8 choices for the 2nd position, but for the 1st position we don't know. Because we do not know if we picked the 0 for the second or third position, and this will change what we can pick for the 1st position. For example, if the second or third position was filled by a 0, then we will have (5)(9)(8)(7), but if we did not place a 0 in either the 2nd or 3rd positions, then we have (5)(9)(8)(6). You might be able to work with these, but the following way is the easiest.

Let us pick the digit for the 4th position first, and there are 5 choices. Then let us pick the digit for the 1st position, there are 8 such choices. Then if we pick the digit for the 2nd position, we have 8 choices, and for the 3rd position we have 7 choices. Hence our total number is: (5)(8)(8)(7).

Hope that helps.

Last edited: Oct 21, 2006
5. Oct 21, 2006

### mr_coffee

matt,

Thanks so much that really was an excellent explanation I worked through it and it makes perfect sense, thanks again!