158,719 views
35 votes
35 votes
Imagine that a school recently issued requests that all students change their login passwords to improve security and prevent unauthorized access to student accounts.

One of your friends claims that the best password (from a purely probabilistic perspective) is one that is short but highly complex. They decide to create a randomly generated 7-character password that contains both upper- and lower-case letters (A – Z and a – z) and numbers (0 to 9). What is the probability of guessing their password based on these conditions?

User Brooks Moses
by
2.9k points

2 Answers

13 votes
13 votes

Answer: 1/(3,521,614,606,208)

Step-by-step explanation:

There are 26 letters in the English alphabet. This doubles to 52 when considering upper and lowercase letters. Then add on 10 more because of the digits 0 through 9.

In total, there are 2*26+10 = 52+10 = 62 different characters to pick from for any given slot of the 7-character password.

Assuming repeated characters are allowed, this then gives us

62^7 = 3,521,614,606,208

different passwords possible. This massive number is a little over 3.5 trillion. In scientific notation, it is approximately equal to 3.522 * 10^12

The probability of randomly guessing the correct password is 1 over that massive number, since there's only one way to get the correct password. We get the fraction 1/(3,521,614,606,208)

We can say the odds of guessing the correct password are roughly 1 in 3.5 trillion.

User Moraltox
by
3.1k points
25 votes
25 votes

Answer:

The probability of guessing this password is 1 in 62^7, or approximately 1 in 5.4 trillion.

Step-by-step explanation:

Based on the information you provided, your friend's password is a randomly generated 7-character password that contains both upper- and lower-case letters and numbers. This means that the password could be any combination of the 62 possible characters (26 upper-case letters, 26 lower-case letters, and 10 digits).The probability of guessing this password is 1 in 62^7, or approximately 1 in 5.4 trillion. This means that, in theory, it would take someone a very long time to guess your friend's password by randomly trying different combinations of characters.However, it's important to note that there are other factors that can affect the security of a password, such as whether the password is easy to guess or has been used before by the user or someone else. It's generally recommended to use a long, complex password that is unique and not easily guessable to maximize security.

User Anis
by
3.2k points