SOLUTION: how many 4 digit number divisible by 5 can be formed with digits 0,1,2,3,4,5,6,6

Algebra ->  Permutations -> SOLUTION: how many 4 digit number divisible by 5 can be formed with digits 0,1,2,3,4,5,6,6      Log On


   



Question 937632: how many 4 digit number divisible by 5 can be formed with digits 0,1,2,3,4,5,6,6
Answer by Edwin McCravy(20055) About Me  (Show Source):
You can put this solution on YOUR website!
I'm assuming you meant to have 6 twice, which means that 
the 4-digit number can contain 2 6's but no more than 1 of 
these: 0,1,2,3,4,5.  [If that's not what you meant, then 
tell me in the thank-you form below.  But I think that's
what you meant].

To be divisible by 5, the last digit must either be 0 or 5. 

1. First we will count all the ones allowing the first 
   digit to be 0, but with no more than 1 6. 
2. Then we'll count and then subtract all those with first digit 0.
3. Then we'll enumerate and add all with 2 6's, including 0665
4. Then we'll subtract 1 for that single case 0665, the only one with
   2 6's and first digit 0.
-----------------------------------------------
1. First we will count all those allowing the first 
digit to be 0, but with no more than 1 6. 

We choose the 4th digit 2 ways. {0,5}
We choose the 1st digit 6 ways.
We choose the 2nd digit 5 ways. 
We choose the 3rd digit 4 ways.

That's 2*6*5*4 = 240 ways

2. Now we'll count (and then subtract) all those with first digit 0.

We choose the last digit 1 way, 5.
We choose the 1st digit 1 way, 0.
We choose the 2nd digit 5 ways.
We choose the 3rd digit 4 ways.

That's 1*1*5*4 = 20 ways.

Subtracting those 20 from the 240, 240-20 = 220.

3. Now we'll enumerate and add all those with 2 6's, including 0665.

There are (3 positions, choose 2 or 3C2) ways to place the 2 6's.
That's 3 ways.  They are 66XY, 6X6Y, X66Y, 

We can choose Y 2 ways, either 0 or 5, and then choose X 5 ways.

That's 3*2*5 = 30 ways

So we add those: 220+30 = 250

4. Now we subtract the 1 case 0665.

250-1 = 249

Answer: 249.

Edwin