Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 ( ) : For each of the following functions, give the tightest upper bound chosen from among the usual simple functions listed in

Question 1():
For each of the following functions, give the tightest upper bound chosen from among the usual
simple functions listed in Section 3.5 of the course readings. Answers should be expressed in big-O
notation.
(a)(1 point)f2(n)=42n+9n2+log2n
(b)(1 point)f3(n)=4n0.7+6nlog2n+280
(c)(1 point)f1(n)=nlog2n+log2n2+280n
Question 2():
Suppose the exact time required for an algorithm A in both the best and worst cases is given by the
function
TA(n)=1280n2+42logn+12n3+280n2
(a)(2 points) For each of the following statements, indicate whether the statement is true or false.
Algorithm A is O(logn)
Algoirthm A is O(n2)
Algoirthm A is O(n3)
Algoirthm A is O(2n)
(b)(1 point) Can the time complexity of this algorithm be expressed using big- notation? If so,
what is it?
Question 3():
If possible, simplify the following expressions. Hint: See slide 11 of topic 3 of the lecture slides!
(a)(1 point)O(n2)+O(logn)+O(nlogn)
(b)(1 point)O(2n)*O(n2)
(c)(1 point)42O(nlogn)+18O(n)
(d)(1 point)O(n)+O(m),(yes, that's an 'm', not a typo; note that m is independent of n)
image text in transcribed

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

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions