Question

1 question) Arrange the following in the order of their growth rates, from least to greatest:...

1 question) Arrange the following in the order of their growth rates, from least to greatest: (5 pts)

n3                     n2         nn        lg n     n!       n lg n              2n                     n

2 question)Show that 3n3 + n2 is big-Oh of n3. You can use either the definition of big-Oh (formal) or the limit approach. Show your work! (5 pts.)

3 question)Show that 6n2 + 20n is big-Oh of n3, but not big-Omega of n3. You can use either the definition of big-Omega (formal) or the limit approach. Show your work! (10 pts.)

4 question)Show that n3 is big-Omega of n2. You can use either the definition of big-Omega (formal) or the limit approach. Show your work! (5 pts.)

5 question) Consider the following algorithm:

            int j = 1;

            int k = 1;

            for (i = 1; i <= 10; i++)

                        j = j * 100;      

            for (i = 1; i <= 20; i++)

                        k = k * 2;          

            What is the running time, T(n)? Give both the exact function T(n), and then give a big-    Theta estimate of T(n). Show your work. For example, if T(n) is exactly n2 + 3n, then T(n) is big-Theta of n2. Show your work! (10 pts.)

6 question)Consider the following algorithm:

            int k = 0;

            for (i = 2; i <= n; i++)

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

                                    k = i + j;    

            What is the running time, T(n)? Give both the exact function T(n), and then give a big-    Theta estimate of T(n). Show your work! (10 pts.)

7 question)

If the worst case time of algorithm A is big-oh of that of B, then B is not faster than A for large problems. (True or False) Explain! Then consider if A is strictly big-oh, how about then? (5 pts.)

8 question)n4 is big-oh of n6. (True or False) Explain! (5 pts.)

9 question)Since 2(2n + 5) >= 3n for n >= 0, and 3n >= 2n + 5 for n >= 5, 2n + 5 is big-oh of 3n. (True or False) Explain or show work! (5 pts.)

10 question) If f(n) is big-theta of g(n), then the value of f may be infinitely away from that of g. (True or False) Explain! (5 pts.)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

HI, I have answered first two questions.

Please repost others in separate post.


1)

logn < n < nlogn < n^2 < n^3 < 2^n < n! < n^n

2)
Given
3n^3 + n^2 = O(n^3)

Proff:
   3n^3 + n^2 <= 3n^3 + n^3

   3n^3 + n^2 <= 4n^3

   So, 3n^3 + n^2 = O(n^3), c = 4, n0 = 1

Add a comment
Know the answer?
Add Answer to:
1 question) Arrange the following in the order of their growth rates, from least to greatest:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 6 !! Thanks Order the following functions according to their order of growth (from the...

    Question 6 !! Thanks Order the following functions according to their order of growth (from the lowest to n!, n lg n, 8 lg (n + 10)^10, 2^3n, 3^2n, n^5 + 10 lg n Prove that a + lg(n^k + c) = Theta (lg n), for every fixed k > 0, a > 0 and c > 0. Determine the complexities of the following recursive functions, where c > 0 is the operations in the functions. (You may assume that...

  • a) Prove that running time T(n)=n3+30n+1 is O(n3) [1 mark] b) Prove that running time T(n)=(n+30)(n+5)...

    a) Prove that running time T(n)=n3+30n+1 is O(n3) [1 mark] b) Prove that running time T(n)=(n+30)(n+5) is O(n2) [1 mark] c) Count the number of primitive operation of algorithm unique1 on page 174 of textbook, give a big-Oh of this algorithm and prove it. [2 mark] d) Order the following function by asymptotic growth rate [2 mark] a. 4nlogn+2n b. 210 c. 3n+100logn d. n2+10n e. n3 f. nlogn

  • 1. [5 marks Show the following hold using the definition of Big Oh: a) 2 mark...

    1. [5 marks Show the following hold using the definition of Big Oh: a) 2 mark 1729 is O(1) b) 3 marks 2n2-4n -3 is O(n2) 2. [3 marks] Using the definition of Big-Oh, prove that 2n2(n 1) is not O(n2) 3. 6 marks Let f(n),g(n), h(n) be complexity functions. Using the definition of Big-Oh, prove the following two claims a) 3 marks Let k be a positive real constant and f(n) is O(g(n)), then k f(n) is O(g(n)) b)...

  • 1. (10 points) Write an efficient iterative (i.e., loop-based) function Fibonnaci(n) that returns the nth Fibonnaci...

    1. (10 points) Write an efficient iterative (i.e., loop-based) function Fibonnaci(n) that returns the nth Fibonnaci number. By definition Fibonnaci(0) is 1, Fibonnaci(1) is 1, Fibonnaci(2) is 2, Fibonnaci(3) is 3, Fibonnaci(4) is 5, and so on. Your function may only use a constant amount of memory (i.e. no auxiliary array). Argue that the running time of the function is Θ(n), i.e. the function is linear in n. 2. (10 points) Order the following functions by growth rate: N, \N,...

  • They NAME sc 162- lec. 18 (Big quiz 1. Arrange the following functions in order of...

    They NAME sc 162- lec. 18 (Big quiz 1. Arrange the following functions in order of increasing rate of growth. Also, identify any functions with the SAME rate of growth by putting then below the others. a) sn, 44log n, 10n log n, 500, 2n, 28, 3n b) n', n +2 nlog2 n, n! ne log, n, n n n'. 4", n, na, 2 2. Use the Big-o notation to estimate the time complexity for the following segments/methods. (Assume all...

  • 4. Big-Oh and Rune time Analysis: describe the worst case running time of the following pseudocode...

    4. Big-Oh and Rune time Analysis: describe the worst case running time of the following pseudocode functions in Big-Oh notation in terms of the variable n. howing your work is not required (although showing work may allow some partial t in the case your answer is wrong-don't spend a lot of time showing your work.). You MUST choose your answer from the following (not given in any particular order), each of which could be re-used (could be the answer for...

  • 8.         R-4.8 Order the following functions by asymptotic growth rate. 4nlogn + 2n 2^10    2^logn 3n...

    8.         R-4.8 Order the following functions by asymptotic growth rate. 4nlogn + 2n 2^10    2^logn 3n + 100logn      4n     2^n n^2 + 10n        n^3       nlogn 9.         R-4.9 Give a big-Oh characterization, in terms of n, of the running time of the example 1 method shown in Code Fragment 4.12. 10.       R-4.10 Give a big-Oh characterization, in terms of n, of the running time of the example 2 method shown in Code Fragment 4.12. 11.       R-4.11 Give a big-Oh characterization, in...

  • b) first 6 (nl) 33" Question # 6. (6 marks) (a) Use the limit comparison test...

    b) first 6 (nl) 33" Question # 6. (6 marks) (a) Use the limit comparison test to determine the convergence of the following: 2n + 5 m32n2 n2+1 3n+n +6 (11) n=1 2n + 5 n3+1 (iv) na + 2n² 3n7 +n +6 nel ni (b) Suppose I have polynomials f(x) and g(x) whose coefficients are all nonnegative. Determine when converges and wherrit dinerges. fin g(n) n=1 2

  • in my c++ class i need help with these question please Question 1. Indicate whether the...

    in my c++ class i need help with these question please Question 1. Indicate whether the first function of each of the following pairs has a smaller, same, or larger order of growth (to within a constant multiple) than the second function. Use the correct notation to indicate the order of growth (f(n) ∈O(g(n)), Ω(g(n)), or Θ(g(n)) as applicable). Prove your statement using limits. (a) (lnn)2 and lnn2 (b) 42n+1 and 42n Question 2. Use the formal definitions of O,...

  • Here are some common orders of growth, ranked from no growth to fastest growth: Θ(1) — constant time takes the same amount of time regardless of input size Θ(log n) — logarithmic time Θ(n) — linear t...

    Here are some common orders of growth, ranked from no growth to fastest growth: Θ(1) — constant time takes the same amount of time regardless of input size Θ(log n) — logarithmic time Θ(n) — linear time Θ(n log n) — linearithmic time Θ(n2 ) — quadratic time Θ(n3 ), etc. — polynomial time Θ(2n), Θ(3n), etc. — exponential time (considered “intractable”; these are really, really horrible) In addition, some programs will never terminate if they get stuck in an...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT