Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions