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


<pre>
Let P be the set of permutations of the digits 0, 1, 2, . . . , 9 that start with a 3. 

This set has 9! permutations.



Let Q be the set of permutations of the digits 0, 1, 2, . . . , 9 that end with a 7. 

This set has 9! permutations.



The sets P and Q have non-empty intersection set: it consist of all permutations that
start with a 3 and end with a 7.

This set (P ∩ Q) has 8! permutations.


So, the answer to the problem's question is this number

    9! + 9! - 8! = 2*1*2*3*4*5*6*7*8*9 - 1*2*3*4*5*6*7*8 = 685440.
</pre>

Solved.