What is the probability of a password containing exactly 1 or 2 integers?

  • MHB
  • Thread starter iamlorde
  • Start date
  • Tags
    Probability
In summary, passwords with exactly one or two integers are statistically less likely than passwords without integers.
  • #1
iamlorde
6
0
Greetings! Can someone offer help?

A computer system uses passwords that contain exactly
eight characters, and each character is one of the 26 lowercase
letters (a–z) or 26 uppercase letters (A–Z) or 10 integers (0–9).
Assume all passwords are equally likely. Let A and B denote
the events that consist of passwords with only letters or only
integers, respectively. Determine the following probability:

P (Password contains exactly 1 or 2 integers)

I proceeded like so:

\(\displaystyle

\frac{{52}^{7}\cdot10}{{62}^{8}}\ + \frac{{52}^{6}\cdot{10}^{2}}{{62}^{8}}\ = 0.0561

\)

The answer is supposed to be: 0.630, but I have no idea how to reach it.
 
Mathematics news on Phys.org
  • #2
Hi iamlorde,

Welcome to MHB! :)

Is this the whole problem? I ask because the events A and B are introduced but not used in the question you pose.

Assuming that you can reuse any character or letter if need be, which is consistent with how real passwords work, then I agree with your answer and your method.
 
  • #3
Jameson, thank you for your reply. I hadn't given the rest because I had answered them already. Here is the entirety.

A computer system uses passwords that contain exactly
eight characters, and each character is one of the 26 lowercase
letters (a–z) or 26 uppercase letters (A–Z) or 10 integers (0–9).
Assume all passwords are equally likely. Let A and B denote
the events that consist of passwords with only letters or only
integers, respectively. Determine the following probabilities:
(a) P(A∪ B) (b) P(A′∪ B)
(c) P (Password contains exactly 1 or 2 integers)

(a) \(\displaystyle
P(A \cup B) =

\frac{{52}^{8}}{{62}^{8}}\ + \frac{{10}^{8}}{{62}^{8}}\ = 0.2448
\)

(b) \(\displaystyle
P(A' \cup B) = \frac{{62}^{8} - {52}^{8}}{{62}^{8}}\ = 0.7552
\)
 
  • #4
The following is my visualization of the problem (c).

8tII6IU.gif


At this point I'm acknowledging that set (Password contains exactly 1 or 2 integers) is exclusive from set A & B.

Yet I do not know how to quantitatively approach this problem.

Thank you.
 
  • #5
Hi,

I think you are missing the position where the integers appear, count it and then the result is 0.6302
 
  • #6
Fallen Angel said:
Hi,

I think you are missing the position where the integers appear, count it and then the result is 0.6302

I'm sorry but I still can't get the answer.
My logic is as follow:

P[(passwords with exactly 1 integer) OR (passwords with exactly 2 integer)]

Therefore:

[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[0-9]
or
[52]*[52]*[52]*[52]*[52]*[52]*[52]*[10] so: 52^7 * 10 over 62^8

then:

[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[A-Za-z]*[0-9]*[0-9]
or
[52]*[52]*[52]*[52]*[52]*[52]*[10]*[10] so: 52^6 * 10^2 over 62^8Then adding both results, would theoretically give the answer. But my logic is flawed and I can't seem to understand why.
 
  • #7
Hi,

The point of my previous answer is that the integer doesn't need to be in last position.You got that there are $\dfrac{52^7\times 10}{62^8}$ passwords with the last character being an integer, so in order to count passwords with exactly one integer we have to multiply it by $8$.

Now for counting passwords with exactly two integers we got $\dfrac{52^7\times 10^2}{62^8}$ where integers are in positions one and two. Now multyplying by $\dfrac{8\times 7}{2}$ we got all possible possitions for the two integers, adding it we reach that $P(...)=0.6302$.

Note:There is a two in the denominator because having integers in position one and two is the same as having integers in positions two and one.
 

FAQ: What is the probability of a password containing exactly 1 or 2 integers?

What is a password probability question?

A password probability question is a type of mathematical problem that involves calculating the likelihood of guessing or cracking a password using different methods. It is often used in the field of cryptography and cybersecurity to assess the strength of a password.

How do you calculate the probability of guessing a password?

The probability of guessing a password can be calculated by considering the length of the password, the characters used, and the number of possible combinations. For example, a 6-character password using only lowercase letters has a probability of 26^6 (308,915,776) possible combinations.

What are some factors that affect password probability?

The factors that affect password probability include the length of the password, the types of characters used (e.g. uppercase letters, numbers, special characters), and any patterns or predictability in the password. The longer and more complex the password, the lower the probability of guessing it correctly.

How can I increase the probability of my password being secure?

To increase the probability of your password being secure, you can use a longer password, include a mix of different types of characters, avoid using easily guessable information (such as your name or birthdate), and use a password manager to generate and store unique passwords for different accounts.

Why is it important to consider password probability?

Password probability is important because it helps us understand the vulnerability of our passwords and the potential risk of them being guessed or cracked. By considering password probability, we can make informed decisions about creating and managing strong passwords to protect our personal information and sensitive data.

Back
Top