# Basics of Counting - Total Number Of Passwords?

Hello so I'm doing a basics of counting. I need help determining wether my logic is flawed:

1. There are 94 characters in a keyboard. If a password is between 10 to 13 characters long. How many different passwords can you have?

So if a password was 10 characters long then I would have 94^10 combinations. So going off that I would just add:

My Answer: 94^10 + 94^11 + 94^12 + 94^13

1. A password CAN'T consist of just letters or numbers. EX: Turtles or 12345. It has to be 10 characters long, how many different passwords are there?

I did a complementation method: |A| = |U| - |A'|

So I came up with:

So 52^10 = passwords with just letters

So 10^10 = passwords with just numbers

My answer: (94^10) - (52^10) - (10^10)

Would you guy's say my answers are correct? I can't tell if my logic is flawed in any way.

• It seems exact to me too! – eti902 Mar 30 '17 at 21:24
• Correct, it would even be $94^{10} - {62}^{10}$ for the second if stuff like "a1b2c3AAA" would be disallowed. is it not just "letters and numbers", or "not just letters" and "not just numbers". Your answer corresponds to the latter interpretation. – Henno Brandsma Mar 30 '17 at 21:24
• Ah okay thank you. Yes that is correct. It's "not just letters" and "not just numbers" Thank you! – AndrewWallis Mar 30 '17 at 21:27
• @amWhy Imagine you had a 2 character keyboard. The number of 1 character passwords is 2, the number of three character passwords is 8, the number of 10 character passwords is $2^{10}=1024$. Same logic applies for 3 character keyboard and 94 character keyboards. – Χpẘ Mar 30 '17 at 21:34