Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is what I have up to now clc clear all symbols = ['a':'z']; numbers = [26,4,26^4] letters = symbols(numbers) true=symbols(4) N = 100000; m
This is what I have up to now
clc
clear all
symbols = ['a':'z'];
numbers = [26,4,26^4]
letters = symbols(numbers)
true=symbols(4)
N = 100000;
m = 10^5;
hacker=symbols(randi(26,4,1))
sum = 0;
for i = 1:N
for j = 1:m
hacker = randi(m,4);
if hacker == true
sum = sum+1
break;
end
end
end
sum
Can someone help me with my code
4. The 'asw'ortl Hacking Problem Your computer system uses a 4-letter password for login. For our purposes the password is restricted to lower case letters of the alphabet. [t is easy to calculate that the total number of passwords which can be produced is n : 264. O A hacker creates a list of m :105 random 4-letter words, as candidates for matching the password. Note that it is possible that some ofthe m :105 words could be duplicates. You are given your own 4-letter password and you need to check if the hackers list contains at least one word that matches you password. This is considered one experiment. If a word in the list matches your password, the experiment is considered a success. Repeat the experiment for N : 1000 times and calculate the probability that at least one of the words in the hacker's list will match your password. If the hacker creates a list of m :106 random 4-letter words. repeat the previous experiment for N : 1000 times and find the probability that at least one of the words in the hacker's list will match the password. Repeat the previous experiment for N : 1000 times to find the approximate number (m) of the words that must be contained in the hacker's list so that the probability of at least one word matching your password is p = 0.5 SUBMIT the calculated answers and the MATLAB code in a Word le. Use the box below to type in your answers. \"1:105 Prob. that at least one ofthe words matches the password P = m:106 Prob. that at least one ofthe words matches the password I\" = p : 0.5 Approximate number of words in the list to =Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started