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

Algebra.Com
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(20054)   (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

RELATED QUESTIONS

How many permutations of the digits 0, 1, 2, . . . , 9 either start with a 3 or end... (answered by lynnlo)
How many 12-bit strings (that is, bit strings of length 12) are there which: have weight (answered by ikleyn)
how many bit string of length eight either start with a 1 bit or end with the two bits... (answered by Alan3354,Jk22)
How many bit strings of length 9 either begin with 2 bit(s) equal to 0 or end with 3... (answered by edjones)
digits:1,2,3,4,5,6,7,8,9 a)how many 5 digit numbers are there that exclude 0 and 7 b)... (answered by Edwin McCravy)
Hello, having issues with this question, please help. Using the digits 0 – 9, find... (answered by fcabanski)
Most ATMs require that you enter a four-digit code, using the digits 0 to 9. How many... (answered by solver91311)
How many 11-bit strings (that is, bit strings of length 11) are there which: a)Start... (answered by ikleyn)
A password must be 8 characters in length, composed of any uppercase letters the digits... (answered by Fombitz)