Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A computer system uses passwords that contain exactly eight characters, and each

ID: 3864626 • 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 are 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 Possible Chars = ['a': 'z'; 'A': '0': '9'] passwordsSample = [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) K=1 for pw in passwordssample])/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 results

Explanation / Answer

There are 62 permissible characters in a password, so there are
62^8 = 218,340,105,584,896 possible passwords in
because we are requiring all passwords to be 8 characters.

Of these, there are
52^8 = 53,459,728,531,456 passwords consisting only of letters (set A)
and
10^8 = 100,000,000 consisting only of integers (set B).


A) P( A | B' )
= 52^8 / (62^8 - 10^8)
= 53,459,728,531,456 / (218,340,105,584,896 - 100,000,000)
= about 24.9%


B) P( A' B )
= P(A') [because every password in B is in A', so A' B = A']
= (62^8 - 52^8) / 62^8
= (218,340,105,584,896 - 53,459,728,531,456) / 218,340,105,584,896
= 164,880,377,053,440 / 218,340,105,584,896
= about 75.5%

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote