Problem:
Call a 7-digit telephone number d1β d2β d3ββd4β d5β d6β d7β memorable if the prefix sequence d1βd2βd3β is exactly the same as either of the sequences d4βd5βd6β or d5βd6βd7β (possibly both). Assuming that each diβ can be any of the ten decimal digits 0,1,2,β¦9, the number of different memorable telephone numbers is
Answer Choices:
A. 19810
B. 19910
C. 19990
D. 20000
E. 20100
Solution:
There are 10,000 ways to write the last four digits d4β d5β d6β d7β, and among these there are 10000β10=9990 for which not all the digits are the same. For each of these, there are exactly two ways to adjoin the three digits d1βd2βd3β to obtain a memorable number. There are ten memorable numbers for which the last four digits are the same, for a total of 2β
9990+10=19990.
OR
Let A denote the set of telephone numbers for which d1β d2β d3β and d4β d5β d6β are identical and B the set for which d1βd2βd3β is the same as d5βd6βd7β. A number d1β d2β d3ββd4β d5β d6β d7β belongs to Aβ©B if and only if d1β=d4β=d5β=d2β=d6β=d3β= d7β. Hence, n(Aβ©B)=10. Thus, by the Inclusion-Exclusion Principle.
n(AβͺB)=n(A)+n(B)βn(Aβ©B)=103β
1β
10+103β
10β
1β10=19990