A password consists of $3$ capital letters followed by $3$ digits. What is the probability that a randomly generated password would contain the letters $R, P, O$ if repetitions are not allowed and if repetitions are allowed.
I'm not sure how to solve this question as I don't know what it means for there to be repetitions and no repetitions in the password and how to determine the probability of the password.
Let me clarify the question for you.
If the randomly generated password does not follow rules, the problem is not well defined. However if it does, this is the deal.
You have some number of possible passwords allowed with the rule. In you case this is all different passwords with three capital letters followed by 3 digits.
Out of those passwords there are some following the condition for probability. In your case - passwords with letter R O P.
To find the probability you have to find both numbers and divide second result by the first one, i. e. probability is
$$ \frac{number \space of \space all \space passwords \space following \space the \space condition}{number \space of \space all \space passwords \space following \space the \space rule} $$
Now let's speak about details for condition and rule. Any password has this form:
XYZ123
Where XYZ can be replaced with any capital letters from A to Z, while 123 can be replaced with any digits from 0 to 9.
Total number of all passwords starting from
AAA000
to
ZZZ999
is
S = 26 * 26 * 26 * 10 * 10 * 10
since it contains all possible cases for each letter and each digit.
You can do the math and calculate the number.
Out of those passwords from AAA000 to ZZZ999 there are passwords containing R P O.
It's not clear from the problem whether all letters must be there or not, but if so, there are only 6 cases:
RPO ROP OPR ORP POR PRO
Each case has 1000 possibilities with digits from 000 to 999
So the total number of passwords will be P = 6000.
The probability is the number of good passwords divided by the number of all passwords:
P/S = 6000 / (26 * 26 * 26 * 10 * 10 * 10)
Do the math.
In case of any letter from R P O, there are more possibilities such as
APA BFO RRZ etc.
Each one has 1000 cases with digits as well.
You have to calculate all possible triplets of letters, multiply by 1000 and divide by total number of possible passwords in order to get probability.
If repetitions are not allowed, passwords like
AAA000
or
BPB123
or
CDR787
are not allowed because they have repeated letters or numbers.
In order to get probability, you have to:
Find / calculate the number of possible allowed passwords such as ABC123 or GQE637 - without repetitions.
Out of those passwords find / calculate number of passwords containing R O P (also can be all of them or any of them depending on the problem details)
Divide the result from 2 by the result for 1.
As a bonus: think if the probability will change if you ignore digits and solve it for passwords like ABC, i.e. 3 capital letter passwords.