Question: COULD I PLEASE GET SOME HELP WITH THESE HOMEWORK QUESTIONS PLEASE, PROVIDE DETAILED ANSWERS (EXPLAINING YOU GOT THE ANSWERS) 1 . Suppose the variables X

COULD I PLEASE GET SOME HELP WITH THESE HOMEWORK QUESTIONS

PLEASE, PROVIDE DETAILED ANSWERS (EXPLAINING YOU GOT THE ANSWERS)

1. Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2, respectively, when execution begins. What will be the value of Z when the program terminates?

clear Z

while X not 0:

clear W

while Y not 0:

decr Y

incr W

while W not 0:

incr Z

incr Y

decr W

decr X

incr Z

A: Z == 6

B: Z == 2

C: Z == 9

D: None of the above

2. If an RSA public key encryption system were based on the primes p = 3 and q = 7, which of the following pairs of values would be suitable for the encryption and decryption keys e and d?

A. 2 and 6 B. 5 and 29 C. 4 and 9 D. 7 and 23

3. Which of the following statement(s) are true.

A: P is contained in NP.

B: All solvable problems are in P.

C: The traveling salesman problem is in NP.

D: The traveling salesman problem is not solvable.

-----------------------------------------------------------------------------------

A: a b c

B: a c

C: a c d

D: a, d

4. Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2, respectively, when execution begins.

clear Z

while X not 0:

while Y not 0:

decr Y

incr Z

incr Z

decr X

What will be the value of Z when the program terminates?

A. 0

B. 1

C. 5

D. 6

5. If xa mod n = c and xb mod n = d then xa+b mod equals

A. c + d mod n

B. c*d mod n

C. cd mod n

D. None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!