1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
patriot [66]
3 years ago
11

Assume that passwords are selected from four-character combinations of 26 alphabeticcharacters. Assume that an adversary is able

to attempt passwords at a rate ofone per second.
a. Assuming no feedback to the adversary until each attempt has been completed,what is the expected time to discover the correct password?
b. Assuming feedback to the adversary flagging an error as each incorrect character is entered, what is the expected time to discover the correct password?
Computers and Technology
1 answer:
tigry1 [53]3 years ago
6 0

Answer:

for a) the time required is 228488.5 seconds= 63.469 hours

for b) the time required is 54 seconds

Explanation:

for a) since each combination is equally probable , then the number of possible combinations is

CT=Combinations = number of characters^length of password = 26⁴

then the number of combinations at time t will be the total , less the ones already tried:

Ct = CT - (n-1) , since n=α*t  → Ct=CT-α*t  

since each combination is equally probable , then the probability to succeed  

pt = 1/Ct = 1/ (CT- α*t +1)

but the probability of having a success in time t , means also not succeeding in the previous trials , then

Pt = pt*П(1-pk), for k=1 to t-1

Pt = 1/ (CT- α*t +1) П[1-1/ (CT- α*k +1)] = 1/ (CT- α*t +1) П[(CT- α*k )] /(CT- α*k +1)]  

since α=1 ,  

Pt = 1/ (CT- t +1) П[(CT- k )] /(CT- k +1)] = 1/ (CT- t +1)  * [CT- (t-1) ]/CT  =  1/CT

then the expected value of the random variable t= time to discover the correct password is

E(t) = ∑ t* Pt = ∑ t *1/CT , for t=1 until t=CT/α =CT

E(t) = ∑ t *(1/CT) = (1/CT) ∑ t = (1/CT) * CT*(CT+1)/2 = (CT+1)/2

therefore

E(t) = (CT+1)/2 = (26⁴ +1)/2 = 228488.5 seconds = 63.469 hours

for b)

time required = time to find character 1 + time to find character 2 +time to find character 3 +time to find character 4 = 4*time to find character

since the time to find a character is the same case as before but with CT2=Combinations = 26 ,then

t= 4*tc

E(t) = 4*E(tc) = 4*(CT2+1)/2 = 4*(26+1)/2 = 54 seconds

You might be interested in
1) Put the following in order from smallest to largest A) 1,500,000 bytes B) 2,000 kilobytes C) 0.01 petabytes D) 1 Terabyte E)
Lyrx [107]

Answer:

A, B, E, D, F, C

3 0
2 years ago
Write a program that allows the user to continuously input the value n until a negative number is entered
Paul [167]

Answer:

Written in C++

Explanation:

#include <iostream>

using namespace std;

int main()

{

int n;

while(true)

{

cin>>n;

if(n>=0)

continue;

break;

}

return 0;

}

3 0
2 years ago
C++ a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome). Test your program on the followinn
Whitepunk [10]

Answer:

#include <iostream>

#include <array>

using namespace std;

bool isPalindrome(string str)  

{  

int length = str.length();  

for (int i = 0; i < length / 2; i++)  

 if (toupper(str[i]) != toupper(str[length - 1 - i]))

  return false;  

return true;  

}

int main()

{

array<string, 6> tests = { "madam", "abba", "22", "67876", "444244", "trymEuemYRT" };

for (auto test : tests) {

 cout << test << " is " << (isPalindrome(test) ? "" : "NOT ") << "a palindrome.\n";

}

}

Explanation:

The toupper() addition forces characters to uppercase, thereby making the comparison case insensitive.

5 0
3 years ago
A presentation on the history of the Internet would mostlikely use the ____ pattern of organizationSpatialproblem-solutionchrono
m_a_m_a [10]

Answer:

topical

Explanation:

A presentation on the history of the Internet would mostlikely use the topical  pattern of organization.

3 0
3 years ago
"Players The files SomePlayers.txt initially contains the names of 30 football play- ers. Write a program that deletes those pla
kumpel [21]

Answer:

I am writing a Python program that deletes players from the file whose names whose names do not begin with a vowel which means their names begin with a consonant instead. Since the SomePlayers.txt is not provided so i am creating this file. You can simply use this program on your own file.

fileobj= open('SomePlayers.txt', 'r')  

player_names=[name.rstrip() for name in fileobj]  

fileobj.close()  

vowels = ('a', 'e', 'i', 'o', 'u','A','E','I','O','U')

player_names=[name for name in player_names  

                     if name[0] in vowels]

fileobj.close()

print(player_names)

Explanation:

I will explain the program line by line.

First SomePlayers.txt is opened in r mode which is read mode using open() method. fileobj is the name of the file object created to access or manipulate the SomePlayers.txt file. Next a for loop is used to move through each string in the text file and rstrip() method is used to remove white spaces from the text file and stores the names in player_names. Next the file is closed using close() method. Next vowels holds the list of characters which are vowels including both the upper and lower case vowels.

player_names=[name for name in player_names  

                     if name[0] in vowels]

This is the main line of the code. The for loop traverses through every name string in the text file SomePlayers.txt which was first stored in player_names when rstrip() method was used. Now the IF condition checks the first character of each name string. [0] is the index position of the first character of each players name. So the if condition checks if the first character of the name is a vowel or not. in keyword is used here to check if the vowel is included in the first character of every name in the file. This will separate all the names that begins with a vowel and stores in the list player_names. At the end the print statement print(player_names) displays all the names included in the player_names which begin with a vowel hence removing all those names do not begin with a vowel.

8 0
3 years ago
Other questions:
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • Describe a strategy for avoiding nested conditionals. Give your own example of a nested conditional that can be modified to beco
    11·1 answer
  • Which type of network cover a large geographical area and usually consists of several smaller networks, which might use differen
    5·1 answer
  • What protects original and creative expression of an idea?
    6·2 answers
  • If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
    7·2 answers
  • The Circle of Growth
    10·1 answer
  • Enter the number 2568 into the box below
    14·1 answer
  • When storing used oil, it needs to be kept in ___________ containers.
    12·1 answer
  • What keyboard functions lets you delete words
    9·2 answers
  • Dunbar's number, 150, refers to the number of:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!