168k views
1 vote
*problem 13.28. a us social security number (ssn) has 9 digits. the first digit may be zero. (a) how many ssns are there? how many are even? how many have only even digits? (b) how many are palindromes (e.g., 342151243)? (c) how many have no 8? how many have at least one 8? how many have exactly one 8?

User Adenike
by
7.7k points

1 Answer

3 votes

Final answer:

There are 1,000,000,000 possible SSNs, 62,500,000,000 have only even digits, 10,000 are palindromes. There are 387,420,489 SSNs with no 8, 612,579,511 with at least one 8, and 43,046,721 with exactly one 8.

Step-by-step explanation:

a) There are 10^9 = 1,000,000,000 possible SSNs. Out of these, half will be even (since the last digit is even), so there will be 500,000,000 even SSNs. To have only even digits, we need to consider that the second, fourth, sixth, and eighth digits can only be even numbers (0, 2, 4, 6, or 8).

Each of these digits has 5 possible choices, and the remaining digits can be any of the 10 choices, so the total number of SSNs with only even digits is 5^4 * 10^5 = 62,500,000,000.

b) A palindrome reads the same forwards and backwards. In an SSN, the first and ninth digits need to be the same, the second and eighth digits need to be the same, and so on. For each pair of digits, there are 10 choices, so there are 10^4 = 10,000 possible palindromic SSNs.

c) To have no 8, we need to consider that each digit can be any of the 9 choices (excluding 8). So the total number of SSNs with no 8 is 9^9 = 387,420,489. To have at least one 8, we subtract the number of SSNs with no 8 from the total number of SSNs, which gives us 1,000,000,000 - 387,420,489 = 612,579,511.

To have exactly one 8, we can treat the 8 as a distinct digit and the remaining 8 digits can be any of the 9 choices, so the total number of SSNs with exactly one 8 is 9^8 = 43,046,721.

User Jason Bourne
by
8.2k points