Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Passwords. Passwords are used by many computer systems to authenticate iden-

ID: 3121589 • Letter: 1

Question

1. Passwords. Passwords are used by many computer systems to authenticate iden- tity. Users are always advised to choose passwords that are easy to remember but hard to guess. But how?

Make it long and mix it up. That is, use a password that is long enough and makes full use of the characters of a keyboard so that it is computationally infeasible for someone to try all possibilities to get into the system.

a1. There are 94 different characters in a typical keyboard: 52 case- sensitive letters, 10 numbers and 32 other characters. How many different passwords can be formed if a password has to be 8 characters long?

a2. What if it has to be between 8 to 12 characters long?

a3. Suppose a system insists that a password cannot consist of just letters like SesameStreet nor just numbers like 123456789. If a password has to be 8 characters long, how many different passwords are acceptable to the system?

a4. What if it has to be between 8 to 12 characters long?

Salt it. Another strategy is to start with a word or phrase that is easy to remember and then add some random changes to it. Bob starts with Superman and then applies one modification to it where a modification consists of inserting a number at some position. This process can produce a string like Super5man.

b1. How many different strings can Bob create starting with Superman?

Suppose Bob wants to apply two modifications to produce a string like 9Super5man or a string like Super95man. We want to determine the dif- ferent strings Bob can create. He does this in two steps:

Step 1. Choose the first number (say 5) and insert it in Superman. (It produces Super5man, etc.)
Step 2. Choose the second number (say 9) and insert it in the string obtained after Step 1. (If the string from step 1 was Super5man, then the result can be 9Super5man or Super95man, etc.)

b2. To determine the number of different strings Bob can create, we can just apply the Product Rule (Handout 8, page 3). Explain why the product

rule will result in overcounting. In particular, what strings will be counted more than once?

b3. How would you solve the problem? Explain why you think it is correct.

Explanation / Answer

a1)
There are total 94 charaters are available to form an 8 character password.
Here we consider repetation of character is allowed.
Total number of 8 character passwords are (94)^8 = 6.09569E+15

a2)
If it has to be 8 to 12 character long, then total number of possible passwords are
(94)^8 + (94)^9 + (94)^10 + (94)^11 + (94)^12 = 4.81038E+23

a3)
In order to find the possible password we need to substract the passwords that can be made by using all characters or numbers from the total number of passwords computed in part (a1)

Number of passwords which are not allowed under this condition are (52)^8 + (10)^8 = 5.34598E+13

6.09569E+15 - 5.34598E+13 = 6.04223E+15

a4)
In order to find the possible password we need to substract the passwords that can be made by using all characters or numbers from the total number of passwords computed in part (a2)

Number of passwords which are not allowed under this condition are (52)^8 + (52)^9 + (52)^10 + (52)^11 + (52)^12 + (10)^8 + (10)^9 + (10)^10 + (10)^11 + (10)^12 =3.98541E+20

Substract this from the number computed in part (a2)

4.81038E+23 - 3.98541E+20 = 4.80639E+23