Number of ways I can create positive 5-number integers (which are multiples of 5)

55 Views Asked by At

I've been unable to grasp how the following problem can solved:

Imagine all the positive integers you can create with 5 numbers (each of these 5 numbers has to be different), like 53486 or 91670. How many of these 5-number integers are multiples of 5?

So, essentially, I have to pick a number for 5 positions. The only numbers that can exist on position #5 are 0 and 5 (since it has to be a multiple of 5), and the number on position #1 can be anything but a 0 (or else I'd get a 4-number integer).

My real problem is, if I pick a 0 for position #5, then I still have 9 possible choices for position #1, but if I pick 5 for position #5, I only have 8 choices for position #1 (since the 5 was chosen and the 0 can never be on position #1). Regardless of what I choose for positions #1 and #5, I will have 8 choices remaining for position #2, 7 choices for position #3 and 6 choices for position #4 (which I can calculate through 8 * 7 * 6).

But how do I handle the fact that position #1 can either have 9 or 8 possibilities, depending on what I pick for position #5? I apologize if this is a bit basic, but I'm being largely self-taught here, and no one I know is able to give me an answer.

1

There are 1 best solutions below

1
On BEST ANSWER

Do two cases:

Case 1: Position $5= 0$.

then there are $9$ options for position $1$. And $8,7,6$ for positions $2-4$.

So there are $9*8*7*6$ ways to do this.

Case 2: Position $5=5$.

There are $8$ options for position $1$ (it can't be $5$ or $0$). And there are $8,7,6$ for position 2-4$.

So there are $8*8*7*6$ ways to do this.

So the total number of ways is $9*8*7*6 + 8*8*7*6$.

=====

Another way of putting it.

There are $9$ ways to choose position 1, if position 5 is $0$ and $8$ ways to choose position 1, if position 5 is $5$ and position 5 must be either $5$ or $0$.

So.... there are $17$ ways to choose position 1 and 5 and to think of them as a single unit with $17$ options.

So the ways to do it is $$\text{# of options for positions 1 and 5}\times \text{# of options for position 2}\times \text{# of options for position 3}\times \text{# of options for position 4} = 17*8*7*6$$.