SOLUTION: How many permutations of the digits 0, 1, 2, . . . , 9 either start with a 3 or end with a 7?

Algebra ->  Permutations -> SOLUTION: How many permutations of the digits 0, 1, 2, . . . , 9 either start with a 3 or end with a 7?      Log On


   



Question 772472: How many permutations of the digits 0, 1, 2, . . . , 9 either
start with a 3 or end with a 7?

Answer by Edwin McCravy(20056) About Me  (Show Source):
You can put this solution on YOUR website!
N(A or B) = N(A) + N(B) - N(A and B)

A = starts with a 3
B = ends with a 7
A and B = starts with a 3 and ends with a 7

N(A):
Choose the 1st digit in 1 way, as a 3.
Choose 2nd digit 9 ways
Choose 3rd digit 8 ways
Choose 4th digit 7 ways
Choose 5th digit 6 ways
Choose 6th digit 5 ways
Choose 7th digit 4 ways
Choose 8th digit 3 ways
Choose 9th digit 2 ways
Choose 10th digit 1 way.

N(A) = 1*9*8*7*6*5*4*3*2*1 = 9! = 362880

N(B):
Choose the 10th digit in 1 way, as a 7.
Choose 1st digit 9 ways
Choose 2nd digit 8 ways
Choose 3rd digit 7 ways
Choose 4th digit 6 ways
Choose 5th digit 5 ways
Choose 6th digit 4 ways
Choose 7th digit 3 ways
Choose 8th digit 2 ways
Choose 9th digit 1 way.
 
N(B) = 1*9*8*7*6*5*4*3*2*1 = 9! = 362880

N(A and B):
Choose the 1st digit in 1 way, as a 3.
Choose the 10th digit in 1 way, as a 7.
Choose 2nd digit 8 ways
Choose 3rd digit 7 ways
Choose 4th digit 6 ways
Choose 5th digit 5 ways
Choose 6th digit 4 ways
Choose 7th digit 3 ways
Choose 8th digit 2 ways
Choose 9th digit 1 way.

N(A and B) = 1*1*8*7*6*5*4*3*2*1 = 8! = 40320.


N(A or B) = N(A) + N(B) - N(A and B)

N(A or B) = 362880 + 362880 - 40320 = 685440

Or you can write it 2×9!-8!

Or you can factor out 8! and write it as 8!(2×9-1) = 8!(18-1) = 8!×17

or 17×8!.  All those equal 685440.

Edwin