Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2. (a) Write the following (jumbled) functions in order of increasing computational complexity: n, n, 2n, logn, n, n logn, 3n, log logn, n2 [11

image text in transcribed

Q2. (a) Write the following (jumbled) functions in order of increasing computational complexity: n, n, 2n, logn, n, n logn, 3n, log logn, n2" [11 marks] (b) If f(n)(g(n)) and g(n) (h(n), use the definition of "big notation to prove [10 marks] c) Suppose that algorithms Al and A2 have computational complexities of O(n log(n)) and O(n) respectively. Both algorithms take approximately 100 seconds to run on data input of size n- 10,000. Determine (to the nearest second) the time it will take each algorithm that f(n) 2g(n) + h(n) -O(h(n) to run on data input of size i. n 1,000 11. n= 100.000 [12 marks

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

More Books

Students also viewed these Databases questions

Question

What matrix has this one for its θ inverse? (2

Answered: 1 week ago

Question

1. Who will you assemble on the team?

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago