document.write( "Question 772472: How many permutations of the digits 0, 1, 2, . . . , 9 either
\n" ); document.write( "start with a 3 or end with a 7?
\n" ); document.write( "

Algebra.Com's Answer #470914 by Edwin McCravy(20055)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "N(A or B) = N(A) + N(B) - N(A and B)\r\n" );
document.write( "\r\n" );
document.write( "A = starts with a 3\r\n" );
document.write( "B = ends with a 7\r\n" );
document.write( "A and B = starts with a 3 and ends with a 7\r\n" );
document.write( "\r\n" );
document.write( "N(A):\r\n" );
document.write( "Choose the 1st digit in 1 way, as a 3.\r\n" );
document.write( "Choose 2nd digit 9 ways\r\n" );
document.write( "Choose 3rd digit 8 ways\r\n" );
document.write( "Choose 4th digit 7 ways\r\n" );
document.write( "Choose 5th digit 6 ways\r\n" );
document.write( "Choose 6th digit 5 ways\r\n" );
document.write( "Choose 7th digit 4 ways\r\n" );
document.write( "Choose 8th digit 3 ways\r\n" );
document.write( "Choose 9th digit 2 ways\r\n" );
document.write( "Choose 10th digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "N(A) = 1*9*8*7*6*5*4*3*2*1 = 9! = 362880\r\n" );
document.write( "\r\n" );
document.write( "N(B):\r\n" );
document.write( "Choose the 10th digit in 1 way, as a 7.\r\n" );
document.write( "Choose 1st digit 9 ways\r\n" );
document.write( "Choose 2nd digit 8 ways\r\n" );
document.write( "Choose 3rd digit 7 ways\r\n" );
document.write( "Choose 4th digit 6 ways\r\n" );
document.write( "Choose 5th digit 5 ways\r\n" );
document.write( "Choose 6th digit 4 ways\r\n" );
document.write( "Choose 7th digit 3 ways\r\n" );
document.write( "Choose 8th digit 2 ways\r\n" );
document.write( "Choose 9th digit 1 way.\r\n" );
document.write( " \r\n" );
document.write( "N(B) = 1*9*8*7*6*5*4*3*2*1 = 9! = 362880\r\n" );
document.write( "\r\n" );
document.write( "N(A and B):\r\n" );
document.write( "Choose the 1st digit in 1 way, as a 3.\r\n" );
document.write( "Choose the 10th digit in 1 way, as a 7.\r\n" );
document.write( "Choose 2nd digit 8 ways\r\n" );
document.write( "Choose 3rd digit 7 ways\r\n" );
document.write( "Choose 4th digit 6 ways\r\n" );
document.write( "Choose 5th digit 5 ways\r\n" );
document.write( "Choose 6th digit 4 ways\r\n" );
document.write( "Choose 7th digit 3 ways\r\n" );
document.write( "Choose 8th digit 2 ways\r\n" );
document.write( "Choose 9th digit 1 way.\r\n" );
document.write( "\r\n" );
document.write( "N(A and B) = 1*1*8*7*6*5*4*3*2*1 = 8! = 40320.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "N(A or B) = N(A) + N(B) - N(A and B)\r\n" );
document.write( "\r\n" );
document.write( "N(A or B) = 362880 + 362880 - 40320 = 685440\r\n" );
document.write( "\r\n" );
document.write( "Or you can write it 2×9!-8!\r\n" );
document.write( "\r\n" );
document.write( "Or you can factor out 8! and write it as 8!(2×9-1) = 8!(18-1) = 8!×17\r\n" );
document.write( "\r\n" );
document.write( "or 17×8!.  All those equal 685440.\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );