Let S be the set of all passwords which are six to eight characters long, where each character is either an alphabet from {A,B,C,D,E} or a number from {1,2,3,4,5}, with repetition allowed. If the number of passwords in S whose at least one character is a number from {1,2,3,4,5} is α×56, then α is equal to \_\_\_\_\_\_\_.
Answer: 7073
Solutions · 1
Official solution
For length 6: total 106, all-alphabet-only 56, so at-least-one-number count =106−56.
For length 7: 107−57. For length 8: 108−58.
\[\text{Total} = (10^6+10^7+10^8) - (5^6+5^7+5^8)\]
\[= 5^6\left[(2^6+5\cdot2^7+25\cdot2^8) - (1+5+25)\right] = 5^6(64+640+6400-31) = 5^6\times7073\]
\[\alpha = 7073\]