[Math] Combinatorics: How many 6 digit numbers have AT LEAST one ‘9’ among them

combinatorics

The Question is pretty simple and straight forward when we try to find the count of numbers without 9 and Subtracting that with Total arrangement of numbers
[9*10^5] – [8*9^5].

But how do you calculate without using a method like above?

This is what I thought, which is terribly awful.

(Sum of {Number of 6 digit nums with one '9' with 9 at each of the digits})
+
(Sum of {Number of 6 digit nums with two '9' with 2 '9's at different positions} )
+
so on…

Best Answer

I like to suggest to see the problem as an extension of a simpler problem.

How many two-digit numbers do not have a $9$ in them? Fill in any number from $1$ to $8$ in the tens place, followed by any number from $0$ to $8$ in the ones place. How many possible numbers are there?

How many three-digit numbers do not have a $9$ in them? Fill in any number from $1$ to $8$ in the hundreds place, followed by any number from $0$ to $8$ in the tens place, and ones place. How many possible numbers are there?

How many four-digit numbers do not have a $9$ in them? Fill in any number from $1$ to $8$ in the thousands place, followed by any number from $0$ to $8$ in the hundreds place, the tens place, and ones place. How many possible numbers are there?

Get the drill? Extend this to six digit numbers.