Question: Help.. For this, you will solve problems related to efficiency, and the Big O asymptotic notation. SHOW YOUR WORK. The definition of Big O Let

Help.. For this, you will solve problems related to efficiency, and the Big O asymptotic notation. SHOW YOUR WORK.

The definition of Big O

Let f(n) and g(n) be functions mapping positive integers to positive real numbers. We say that f(n) is O(g(n)) if there is a real constant c > 0 and an integer constant N ? 1 such that:

f(n) ? c * g(n), for n ? N

Note that the constants c and n0 are not unique. You just have to find a c and an N that satisfies the definition of Big O

3.1 Given a time function, T(n) = 3x2 + 5x + 2, find constants c and N that prove that the big O of the growth function T(n) is n2

3.2 Find the Big O of T(n) = 4x3 + 12x2 + 2x + 12. Justify your answer by finding constants c and N

3.3 Find the Big O of the following code:

for(int i = 0; i < n; i++) {

for(int j = 0; j < n; j++) {

System.out.println(Hello!);

}

}

You do not have to find a T(n), or c and N. Just give the Big O, and informally justify your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!