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

Sheryl needs to choose a 12-character password made up only of lower-case and up

ID: 3340100 • Letter: S

Question

Sheryl needs to choose a 12-character password made up only of lower-case and upper- case letters and digits. (Assume a lower-case letter is different from the corresponding upper-case one.) For the system to allow a password to be used, it must contain at least one lower-case letter, at least one upper-case letter, and at least one digit. If Sheryl writes a program to randomly generate 12-character passwords made up of the possible characters, what is the probability that the first password her program generates is allowable? Assume all 12-character passwords made up of the possible characters are equally likely to be generated by Sheryl's program.

Explanation / Answer

Must have at least one number (0-9)

Must have at least one lower letter (a-z)

Must have at least one upper letter (A-Z)

Since there are 26 lower case letters, 26 upper case letters and 10 digits, we could fill the 12 positions in (26+26+10)12 = 6212 passwords. However, we must exclude those passwords with no digits, no upper case letters, or both.

The number of passwords with no digits is (6210)12=5212

The number of passwords with no upper case letters is (6226)12=3612

The number of passwords with neither an upper case letter nor a digit is 2612

Hence, by the Inclusion-Exclusion Principle, the number of permissible passwords is:

6212 - [5212 + 3612 + 2612] = 2,830,555,945,616,670,000,000

The probability that first password is allowable = 2,830,555,945,616,670,000,000/6212 = 0.877347

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote