Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Answer the following and show how to do 7. The worst-case complexity of Euclid's algorithm for ged(a,b) occurs when a and b are: a) Relatively

Answer the following and show how to do
image text in transcribed
7. The worst-case complexity of Euclid's algorithm for ged(a,b) occurs when a and b are: a) Relatively prime b) Different by one c) Consecutive prime numbers d) Consecutive Exponential numbers e) Consecutive Fibonacci numbers 8. The smallest worst-case complexity for computing the maximum and minimum elements in a list of even size n is: a) - 1 b) 3n/2-2 c) 2n - 2 d) 5n/2-1 e) 9. Horner's Rule for the polynomial 2x + 6x-44r +x+5 is based on which parenthesizing a) ((2x+ + 6x) -(44x + x)) +5 b) (((2x+6)x - 44)+1)+ 5 c) (2x + 6x) - 44x) + x) + 5 d) x(2x + 6r)+ x(44x + 1).+ 5 e) none of the above 10. If Euclid's GCD algorithm is initially called with a = 100019 and b = 100 after one iteration a) a = 100, b = 100019 b) a=100019, b=19 c) a = 100,b=19 d) a = 99919, b = 19 e) b= 19, a = 100 11. An algorithm with worst-case complexity Win) is said to be polynomial-time if a) Win) is a polynomial b) Win) E O(n) for some constant k c) Win) E 2(n) for some constant k d) Win) e (n) for some constant k e) Win) has sub-exponential order 12. An algorithm with worst-case complexity Win) is to be exponential if a) Win) is a super-polynomial b) W(n) 0(2) c) Win) E S2(2") d) Wine (e) e) Win) E 210") and Win) e Ob") for real numbers a and b, 1 Sasb 13. Binary Search assumes as a precondition that: a) The search element is on the list b) The list consists of integers or floating-point numbers c) The list satisfies a uniform distribution d) The list is sorted once the search element is added e) The list is sorted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions