Passwords are composed from lower and uppercase letters of the English alphabet, digits and 34 special characters.

52 Views Asked by At

What is the exponential generating function of the sequence $a_n$ = number of passwords with at least one capital letter, one number and one special character.

I know that if I were to restrict specific letters, such as "must have at least 1 a", I can merely change the function for a with the remaining having a function of $e^x$ but I'm not sure how to do at least one letter or one digit etc with exponential generating functions

1

There are 1 best solutions below

0
On

There are $26$ lower case letters, $26$ upper case, $10$ digits, $34$ special characters, making $96$ in all. So $$a_n=96^n-70^n-86^n-62^n+60^n+36^n+52^n-26^n$$ by application of the inclusion-exclusion principle. Then the exponential generating function is $$\sum_0^{\infty}{a_nx^n\over n!}=e^{96x}-e^{70x}-e^{86x}-e^{62x}+e^{60x}+e^{36x}+e^{52x}-e^{26x}$$ This factors as $$e^{96x}(1-e^{-26x})(1-e^{-10x})(1-e^{-34x})$$