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

(+5) Suppose the variables X and Y in the following Bare Bones program have the

ID: 3709433 • Letter: #

Question

(+5) 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

Z == 6            b. Z == 2              c. Z == 9                d. None of these

(+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

(+5) 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          E. None of these

(+5) 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:

         decr X

         incr Z

     while Y not 0:

         decr Y

         incr Z

Z == 6                           
Z == 5
Z == 4
None of the above

(+5) Suppose the variable X in the following Bare Bones program has value 3 when execution begins

   clear Y

   decr X

   while X not 0:

       decr X

       incr Y

What will be the values of X and Y when the program terminates?

A   X == 1 Y == 2                        B. X == 1 Y == 0

C X == 0 Y == 2                         D. None of these

(+5) An unsolvable problem is a problem for which

no solution exists.
no one knows the solution.
no algorithm exists for finding the solution.
no one wants to known the solution.

(+5) Which of the following sets of values constitutes a valid RSA public key encryption system?

p = 5, q = 11, n = 55, e = 7, d = 23
p = 5, q = 11, n = 55, e = 17, d = 13
p = 5, q = 11, n = 55, e = 10, d = 13
p = 5, q = 11, n = 55, e = 11, d = 23

Explanation / Answer

A)Z==6

A)c+d mod n (never be a multiple take any values for x,a,b,c,d and check)

B )5 and 29

Z==5 (loop of X increment z three time and second loop of Y increments Z two times i.e total 5 times)

X=0 and Y=2 since X is decremented before loop and loop runs for 2,1,0

An unsolvable problem is a problem for which no algorithm exists for finding the solution

p=5,q=11,n=55,e=7,d=23 first option is correct