# How many 7-digit phone numbers are possible, assuming that the first digit can’t be a 0 or a 1

I use the multiplication rule. For the first digit I have 8 choices. For the last 6 digits I have 10 choices for each. So answer is $$8 \cdot 10 ^6$$.

Is there any other way to solve this problems. I usually gain a lot of insight from solving the problems in different ways. Please write which theorems etc. you have used.

Another way to look at it is to take the highest possible $$7$$-digit number and subtract the lowest possible: $$9,999,999-2,000,000+1=8,000,000$$ (we need to add $$1$$ as we count $$2000000$$ as a valid number)

• How does this work. I do not understand. But it works :-) – Xenusi Feb 4 at 22:02
• True, but this only happens to work because all of the valid numbers are adjacent. – Don Thousand Feb 4 at 22:02
• @Xenusi: this is just counting all whole numbers between two given numbers. – Vasya Feb 4 at 22:05
• Somewhat related: Why numbering should start at zero, Dijkstra 1982 – ilkkachu Feb 5 at 9:39

What you have said is basically correct, but perhaps a more "formal" way (which is where the multiplication rule comes from) is to construct the set of all possibilities, and find its cardinality.

Let $$A = \{0,1,2,3,4,5,6,7,8,9\}$$, and $$B = A \smallsetminus \{0,1\}$$. Then the set of all possible phone numbers is $$B \times A^6$$, and therefore the number of possible phone numbers is $$|B\times A^6| = |B||A^6|=|B||A|^6 = 8\cdot10^6.$$

number of 7 digit numbers ( including leading 0): 10,000,000

number of 7 digit numbers including lead 0 or 1 : - 2,000,000

number of 7 digit numbers not lead by 0 or 1 : 8,000,000

This more just taking a complement of a set. ( so an interior form of inclusion-exclusion)

You could realize all 7 have at least 8, get $$8^7$$ then realize each of 6 have 2 more with the seventh having $$8=2^3$$, for $$2^9$$ and have fun adding up all $$64=2^6$$ combinations all together. More a property of a powerset which relates to combinations, as the total number of combinations of all sizes, is the number of distinguishable states which in includes all subsets, (Also tedious)

• That's immediately what I thought when reading the title. Simple answer to a simple question. This should be the accepted answer as anything more complicated is will be of no benefit to this particular question. – Robert Tausig Feb 5 at 10:08