0
$\begingroup$

Just doing some preparation for an exam,

A computer system uses passwords that are $6$ characters and each character is one of the $26$ letters (a-z) or $10$ integers (0-9). Uppercase letters are not used.

Let $A$ be the event that a password begins with a vowel (either a, e, i, o or u) and let $B$ denote the event that a password ends with an even number (either 0, 2, 4, 6 or 8). Suppose a hacker selects a password at random. What are the probabilities $P(A)$, $P(B)$, $P(A \cap B)$ and $P(A \cup B)$ ?

With $P(A)$ the way I've thought about it (though I think it's wrong) is:

Passwords have 6 characters: __ __ __ __ __ __

The total number of passwords is therefore (26 Letters + 10 numbers)$^6$ or $36^6$ by the multiplicative law of probability

36 36 36 36 36 36

But a password which begins with a vowel (5 letters to choose) would be

5 36 36 36 36 36

therefore being $(5*36^5)/36^6 = 5/36$

but that doesn't feel right.. I think what that gives me is the probability of there being at least one vowel, not necessarily being at the start?

  • 2
    The counting approach you used is fine. However, it can be done more simply. The probability that the first symbol of the password is simply $5/36$, since there are $36$ possibilities for the first symbol, all equally likely, and only $5$ of them "work." Finding $P(B)$ is also straightforward. Finding $P(A \cap B)$ is harder. There your counting approach will work nicely. So will conditional probability, if you have been introduced to it.2011-10-25

1 Answers 1

1

Your answer is indeed the probability that there is one vowel. However, this is the same as the probability that the first character is a vowel. Think of it this way: the event A only depends on the first character: the rest can be ignored. This means that the probability you want is the probability that this character is a vowel, which can occur in 5 out of the 36 possibilties, yielding the 5/36 you have calculated another way.

The tricky thing about this question is the part where the hacker generates passwords at random. This implies that the characters in the generated password are all independent, which is why it doesn't matter to your calculation that the event A refers to the first character. It could refer to the fifth character; as worded, your answer would come out the same.

  • 0
    Ilmari is correct, I would have gotten that wrong had it been the question. Like the comment indicates, this is a different probability from that of finding exactly one vowel. **If** I understand correctly now, the probability of finding a vowel in the first location is the same as the probability of finding a vowel in any location, but the location must be fixed, or else you get the probability that there is _exactly_ one vowel in Any location calculated above.2011-10-25