Computer Science

Table 1. First O chosen bits in key 8 bit 16 bit 24 bit 32 bit Effective key length 48 bits 40 bits 32 bits 24 bits Bruteforce time 7244 days 20hours 19minutes 20 days 19 hours 4minutes 4hours 46 minutes 17 seconds Task 1 (1%): Encrypt an example text with Cryptool. For the key lengths of 56 bits, enter the input key of 64 bits to obtain the encrypted output. Each time, the leftmost bytes will be chosen as 0 as shown in Table 1. Then run the bruteforce analysis in Cryptool and report the shown time for cracking the key. Show the screenshots in your report. Table 1. Bruteforce time First O chosen bits in key 8 bit 16 bit 24 bit 32 bit Effective key length 48 bits 40 bits 32 bits 24 bits Task 2 (1%): a) For the effective key length of 32 bits (first 24 bits of input key entered as 0, and assumed to be known to the attacker) run the full bruteforce DES analysis in Cryptool and report all the found plaintexts and choose the one with correct language and report the decrypted text. Show the screenshots in your report. b) Repeat the same task with an effective key length of 24 bits. Compare the results of this experiment with what you got in part (a).

EXPERT ANSWER Ans(a) There are several ways of classifying cryptographic algorithms. For purposes of this paper, they will be categorized based on the number of keys that are employed for encryption and decryption, and further defined by their application and use. The three types of algorithms that will be discussed are: Secret Key Cryptography (SKC): …

Table 1. First O chosen bits in key 8 bit 16 bit 24 bit 32 bit Effective key length 48 bits 40 bits 32 bits 24 bits Bruteforce time 7244 days 20hours 19minutes 20 days 19 hours 4minutes 4hours 46 minutes 17 seconds Task 1 (1%): Encrypt an example text with Cryptool. For the key lengths of 56 bits, enter the input key of 64 bits to obtain the encrypted output. Each time, the leftmost bytes will be chosen as 0 as shown in Table 1. Then run the bruteforce analysis in Cryptool and report the shown time for cracking the key. Show the screenshots in your report. Table 1. Bruteforce time First O chosen bits in key 8 bit 16 bit 24 bit 32 bit Effective key length 48 bits 40 bits 32 bits 24 bits Task 2 (1%): a) For the effective key length of 32 bits (first 24 bits of input key entered as 0, and assumed to be known to the attacker) run the full bruteforce DES analysis in Cryptool and report all the found plaintexts and choose the one with correct language and report the decrypted text. Show the screenshots in your report. b) Repeat the same task with an effective key length of 24 bits. Compare the results of this experiment with what you got in part (a). Read More »

Q# 3(a): What will be the value of accumulator register if PC=900, PC=901, PC=902, PC=903, PC=904, PC=905, PC=906 and PC=907? [3.0 Marks] Memory Partial list of operation codes 900 7999 0111 Load AC from memory 901 3997 0011_Store AC to memory 902 6998 903 9999 0110_Add to AC from memory 904 3997 1001 _ Sub to AC from memory 905 6997 906 9996 907 9998 996 0001 997 0003 998 0004 999 0005 (b) A user program starts execution at t=0sec, a scanner interrupt is call at t=16 sec during interrupt handling another camera interrupt has been call at t=21 sec and returns at t=35 sec, at a same time another printer interrupt is call and return at=43sec to scanner interrupt handler. Scanner interrupt returns at t=53 sec. Calculate the total time required to process interrupt. [2.0 Marks)

EXPERT ANSWER a) PC Instruction OpCode Action Value of AC Comments 900 7999 0111 AC = M[999] = 0005 5 901 3997 0011 M[997] <- AC 5 M[997] becomes 5 902 6998 0110 AC = AC + M[998] 5+4 = 9 903 9999 1001 AC = AC – M[999] 9-5 = 4 904 3997 0011 …

Q# 3(a): What will be the value of accumulator register if PC=900, PC=901, PC=902, PC=903, PC=904, PC=905, PC=906 and PC=907? [3.0 Marks] Memory Partial list of operation codes 900 7999 0111 Load AC from memory 901 3997 0011_Store AC to memory 902 6998 903 9999 0110_Add to AC from memory 904 3997 1001 _ Sub to AC from memory 905 6997 906 9996 907 9998 996 0001 997 0003 998 0004 999 0005 (b) A user program starts execution at t=0sec, a scanner interrupt is call at t=16 sec during interrupt handling another camera interrupt has been call at t=21 sec and returns at t=35 sec, at a same time another printer interrupt is call and return at=43sec to scanner interrupt handler. Scanner interrupt returns at t=53 sec. Calculate the total time required to process interrupt. [2.0 Marks) Read More »

A majority circuit is a combinational circuit whose output is equal to 1 if the input variables have more 1’s than 0’s. The output is 0 otherwise.

A majority circuit is a combinational circuit whose output is equal to 1 if the input variables have more 1’s than 0’s. The output is 0 otherwise. Design a 3-input majority circuit by finding the circuit’s truth table, Boolean equation, and a logic diagram. 1) [1]write down the truth table 2) [2] what is the …

A majority circuit is a combinational circuit whose output is equal to 1 if the input variables have more 1’s than 0’s. The output is 0 otherwise. Read More »

The power function f(a, b) can be defined recursively 1 if b=0 f(a,b) = a.f(a, (b − 1)/2)2 if b>0 is odd f(a, b/2)2 if b>0 is even Recalls the recursive function, algorithm for power calculation of above function and compute the time complexity of the above power function Consider the given function: 1 if b = 0 f(a,b) = a.f(a, (b − 1)/2)2 if b>0 is odd f(a, b/2)2 if b > 0 is even) (1) Consider the case of b>0 and “b” is even ,in that case we all f(a,b/2),since the b/2 is even when bis even will also give the even number so at each recursive call the b is halved. (2)Consider the case of b>0 and b us odd ,in that case we all f(a,(6-1)/2),since the (6-1)/2 is even when b is odd will also give the even number, so at each recursive call the bis halved. 1 (3)At each recursive call we call b/2 until we reach b=0 so the time complxity is oſb log2 b) here either we are calling iſ a,(6-1)/2) or f(a, b/2) thus recurrence relation is T(n) = T(n/2)+theta (k) so solving it we get n, n/2,n/4…1 so total terms are logn so total work = k+k+k+k….logn times = k*logn O(logn)

EXPERT ANSWER At each recursive call, we perform a recursion and some operation for current call. We can represent the recurrence as T(n) = 2T(n/2) + O(1) = 2(2T(n/4)+O(1)) + O(1) = 2(2(2T(n/8)+O(1))+O(1)) + O(1) . . . = 2kT(n/2k) + k.O(1) For base case, n/2k = 1 n = 2k k = log2n Thus, the …

The power function f(a, b) can be defined recursively 1 if b=0 f(a,b) = a.f(a, (b − 1)/2)2 if b>0 is odd f(a, b/2)2 if b>0 is even Recalls the recursive function, algorithm for power calculation of above function and compute the time complexity of the above power function Consider the given function: 1 if b = 0 f(a,b) = a.f(a, (b − 1)/2)2 if b>0 is odd f(a, b/2)2 if b > 0 is even) (1) Consider the case of b>0 and “b” is even ,in that case we all f(a,b/2),since the b/2 is even when bis even will also give the even number so at each recursive call the b is halved. (2)Consider the case of b>0 and b us odd ,in that case we all f(a,(6-1)/2),since the (6-1)/2 is even when b is odd will also give the even number, so at each recursive call the bis halved. 1 (3)At each recursive call we call b/2 until we reach b=0 so the time complxity is oſb log2 b) here either we are calling iſ a,(6-1)/2) or f(a, b/2) thus recurrence relation is T(n) = T(n/2)+theta (k) so solving it we get n, n/2,n/4…1 so total terms are logn so total work = k+k+k+k….logn times = k*logn O(logn) Read More »

Chapter 13 – According to Franks and Smallwood (2013), information has become the lifeblood of every business organization, and that an increasing volume of information today has increased and exchanged through the use of social networks and Web2.0 tools like blogs, micro blogs, and wikis. When looking at social media in the enterprise, there is a notable difference in functionality between e-mail and social media, and has been documented by research – “…that social media differ greatly from e-mail use due to its maturity and stability.” (Franks & Smallwood, 2013)

Chapter 13 – According to Franks and Smallwood (2013), information has become the lifeblood of every business organization, and that an increasing volume of information today has increased and exchanged through the use of social networks and Web2.0 tools like blogs, micro blogs, and wikis. When looking at social media in the enterprise, there is a …

Chapter 13 – According to Franks and Smallwood (2013), information has become the lifeblood of every business organization, and that an increasing volume of information today has increased and exchanged through the use of social networks and Web2.0 tools like blogs, micro blogs, and wikis. When looking at social media in the enterprise, there is a notable difference in functionality between e-mail and social media, and has been documented by research – “…that social media differ greatly from e-mail use due to its maturity and stability.” (Franks & Smallwood, 2013) Read More »

In multivariable calculus and in statistics courses it is shown that Loover –e-(1/2)(0/0)2 dx = 1, -20 o 25 for any positive o. The function 1 f(x) ,-(1/2)6/0)2 021 is the normal density function with mean y = 0 and standard deviation o. The probability that a randomly chosen value described by this distribution lies in [a, b] is given by so f (x) dx. Approximate to within 10-5 the probability that a randomly chosen value described by this distribution will lie in a. (-0, 0] b. [-20, 20] c. [-30, 30]

EXPERT ANSWER

Write a C program to compute the value of the mathematical constant e to the power of x (ex) using the following infinite series: e* = 1 + x/1! + x2/2! + x3/3! + x4/4! + . Your program should include at least one function called compute_ex that receives any value of x as a parameter and returns the value of ex for the given value x. The computation should stop when the new term added (term = xw/n! where n=0,1,2,3,…) is less than 0.0001 Your program should also NOT use the already predefined system function pow. Items that should be submitted: 1. The C-program (main.c). 2. A softcopy of one program run showing the value your program calculates for ex in a word document. Example of a Sample Run: Enter the value of x: 2.5 e to the power 2.5 = 12.18

EXPERT ANSWER #include <stdio.h> int main(){int n = 10;printf(“Enter the value of x”);float x = scanf(“%f”,&x);printf(“e^x = %f”, compute_ex(n, x));return 0;} float compute_ex(int n, float x){ //The function potentially has a singular point at zero as 𝑒0=1 float sum = 1.0; // initialize sum of series for (int i = n – 1; i > …

Write a C program to compute the value of the mathematical constant e to the power of x (ex) using the following infinite series: e* = 1 + x/1! + x2/2! + x3/3! + x4/4! + . Your program should include at least one function called compute_ex that receives any value of x as a parameter and returns the value of ex for the given value x. The computation should stop when the new term added (term = xw/n! where n=0,1,2,3,…) is less than 0.0001 Your program should also NOT use the already predefined system function pow. Items that should be submitted: 1. The C-program (main.c). 2. A softcopy of one program run showing the value your program calculates for ex in a word document. Example of a Sample Run: Enter the value of x: 2.5 e to the power 2.5 = 12.18 Read More »

Exercises . For the following, which could be considered to be technical writing, nontechnical writing, or both? An email to a friend about your new computer. A complaint letter to the manufacturer of a robot vacuum cleaner. A letter to your insurance company explaining how a disease affects you. A letter to a government taxing agency in response to their inquiry about your tax return. A written request to your work supervisor for a salary increase. A letter to your local government authority requesting a zoning variance for a new pool. . . .

EXPERT ANSWER Technical and Non-technical writing Introduction: 1. Technical writing is a formal writing where set of predefined standards and rules are to be followed and the writer will remain technical toward the issue to be addressed in the writing. The writer uses the suitable contents that are official purpose oriented and used in official communications. Example of …

Exercises . For the following, which could be considered to be technical writing, nontechnical writing, or both? An email to a friend about your new computer. A complaint letter to the manufacturer of a robot vacuum cleaner. A letter to your insurance company explaining how a disease affects you. A letter to a government taxing agency in response to their inquiry about your tax return. A written request to your work supervisor for a salary increase. A letter to your local government authority requesting a zoning variance for a new pool. . . . Read More »

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value).

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value). For each of the search strategies listed below,(a) indicate which goal state is …

Assume you have the following search graph, where S is the start node and G1 and G2 are goal nodes. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes (i.e. h-value). Read More »

a) Given the following search graph, how many states will be visited until reaching the goal state using breadth-first search? Trace the states inside the search agenda until reaching the goal state assume the goal state is 30. S 2. 6 6 V 8 10 11 12 13 1415161718 303732333435 b) If we assumed depth-first search what will be the change in the number of visited states and the states inside the search agenda? c) Comment on the result from a) and b)

EXPERT ANSWER answered this Ans a. Traversal of the graph to reach goal state using Breadth first search 1 5 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 so as per traversal 29 states are visited until …

a) Given the following search graph, how many states will be visited until reaching the goal state using breadth-first search? Trace the states inside the search agenda until reaching the goal state assume the goal state is 30. S 2. 6 6 V 8 10 11 12 13 1415161718 303732333435 b) If we assumed depth-first search what will be the change in the number of visited states and the states inside the search agenda? c) Comment on the result from a) and b) Read More »