question archive Assume you want to design an algorithm that auto-generates a 5 character password
Subject:StatisticsPrice:3.87 Bought7
Assume you want to design an algorithm that auto-generates a 5 character password. You determine that the algorithm will only choose from the following characters:
. 5 uppercase vowels: A, E, I, O, U
• 5 lowercase vowels: a, e, i, o, u
• 5 special symbols:!,@, #,$, %
• 10 integers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Remember that the algorithm will only choose from the characters listed above.
(a) Assume the algorithm chooses randomly from the entire list of possibilities listed above for each character (with the possibility of repeating a character). How many unique 5 character passwords are possible?
(b) Find the probability that the algorithm generates a 5 character password with only two integers where the first and the fifth characters are integers and are not the same. (i.e, the 5 character password begins and ends with two different integers and the other characters are non-integers)
(c) Find the probability that the algorithm generates a 5 character password with exactly two special symbols (with repeat characters allowed).
(d) Find the probability that at least one of the characters in the 5 characters password is either an upper or lowercase vowel.
Answer:
(a)
There is a total of 25 characters. Each of the 5 positions may have any of the 25 characters. By the fundamental principle of counting, the required number is 25^5=x (say).
(b)
The first character can have 10 integers. The fifth can have 9 integers since one is already taken up in the first place. There are 15 other characters to be placed in 3 remaining places. Thus, by the fundamental principle of counting, the total number = 10*(15^3)*9
Thus the required probability = 10*(15^3)*9/(25^5)
(c)
Two places may have 5 special characters each. The other 3 places may have 20 other characters. Thus, by the fundamental principle of counting, the total number of combinations = (5^2)*20^3
The required probability = ((5^2)*20^3)/(25^5)
(d)
Suppose, none is a lower case vowel. Combinations = 20^5
Suppose, none is an upper case vowel. Combinations = 20^5.
Thus, the probability that none is a lower case vowel or none is an upper case vowel = (20^5 + 20^5)/25^5
Thus, the probability that at least one is either an upper case or a lower case variable is = 1 - (20^5 + 20^5)/25^5