A computer system uses passwords that contain exactly eight characters, and each
ID: 3179085 • Letter: A
Question
A computer system uses passwords that contain exactly eight characters, and each character is one of 26 lower-case letters (a-z) or 26 upper-case letters (A-Z) or 10 integers (0-9). Let Ohm denote the set of all possible passwords, and let A and B denote the events that consist of passwords with only letters or only integers, respectively. Suppose that all passwords Ohm are equally likely. Determine the probability of each of the following (a) A (b) B (c) A password contains at least 1 integer. (d) A password contains exactly 2 integers. The following Julia, code generates 100 random passwords and counts how many of them contain 1 or less lower case letters. all PossibleCharspasswords = ['a': 'z': '0': '9'] passwordSample = sum [string (rand (allPossibleChars,8)) for - in 1:100] ash Returns the number of lower case characters in the string str function numLowerCasechars (str) sum ([contains (str string (ch)) for ch in 'a' 'z,]) end ash This is the proportion of passwords with 1 or less lower case characters proportion = sum ([numLowerCaseChars (pw) Lessthanorequalto 1 for pw in passwords sample])/100 (e) In your view, are 100 passwords sufficient for obtaining a sensible estimate for the event of having 4 or less lower case characters? Modify the code to obtain a more accurate estimate. (f) Modify the code to obtain estimates for the probabilities of the events in (a)-(d). Compare with your theoretical resultsExplanation / Answer
a) Probability(only letters)=52^8/62^8
b)Probability(only integers)=10^8/62^8
c)Probabilty (Atleast one iteger)=1-P(No integers)=1-(52^8/62^8)
d)Probility(Exactly two integers)=(52^6*10^2)/62^8
e)In my view sample size of 100 random passwords is not enough to obtain the sensible estimate of event having 4 or less lower case characters.Number of generated random passwords size should be increased to appx. 10000 to get estimate with better confidence level( appx. 99 %) and confidence interval(appx 1.29),as the population size is very large(62^8).
f) Change the passwordsSample from 100 to 10000 and run the code.It will give better estimates of above probabilities(a-d),but not exactly as theoretical results.It will give some error margin.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.