Question

3- What is the growth of the below function: (What is the most accurate answer?) ?(?)...

  1. 3- What is the growth of the below function: (What is the most accurate answer?)

    ?(?) = 2^(????^3) + ?√? + 7???^6 ? + ?^2????
    options: a) Θ(n) b) Θ (n3) c) Θ (n2logn) d) Θ (n√?) e) Θ (log6n)

  2. What is the growth of the below function: (What is the most accurate answer?) ?(?) = ??????? + 4???^2? + ????^2 options: a) O (logn) b) O (loglogn) c) O (log2n) d) O(logn2) e) Neither

  3. 5- Assume you want to write a code to calculate the multiplication of two numbers. Provide the running time for your algorithm, assuming the inputs are two n-digit numbers. Explain your answer.

  4. 6- Suppose a machine on average takes 10-6 seconds to execute a single algorithm step. What should be the largest input size to finish in 1s ?

    for(i=1; i <= n*n; i++)
    linear_search(a , key); //size(a) = n, and key is the last element in a

  5. 7- What is the largest value of n such that an algorithm whose running time is 5nlog2n runs faster than an algorithm whose running time is 35log2n on the same machine?

  6. Prove that ?(?) = 2????^2? + 2????^3 + 2^(????) is O(n^2logn), provide the appropriate C and k constants.

  7. 9- Compare the growth of f(n) = ???? + 2^???? and g(n) = ?????

  8. 10- Prove transitivity of big-O: if f(n) = O(g(n)), then g(n) = Ω(f(n)).

  9. 11- Prove that if ??? (?→∞) ?(?)/?(?) = 4, then f(n)= Θ(g(n)).

  10. 12- What is the growth of n^2 + 2n^2 + 3n^2 + · · · + n^4?

  11. Prove that if f(n) is monotonically decreasing, then

    ?
    ∑ ?(?) = ?(∫(1 to n) ?(?)??)

    ?=1

  12. 14- Suppose g(n) ≥ 1 for all n, and that f(n) ≤ g(n) + L, for some constant L and all n. Prove that f(n) = O(g(n)).

  13. 15- Given a sorted array with n integers, provide an algorithm with the running time of O(logn) that checks if there is an i for which a[i]= 5i. (e.g. a = [1 4 10 12 17 21] >> true because a[2] = 2*5 = 10) (Explain your answer)

  14. 16- Prove or disprove:
    (√?)! = ?((√????)^?^2)

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

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

3) It is theta(n^3) So, option B s correct

4) f=O(log^2(n)). So, OPTION C IS CORRECT

5) We can use kasturba algorithm to multiply 2 numbers

Algorithm is

Using Divide and Conquer, we can multiply two integers in less time complexity. We divide the given numbers in two halves. Let the given numbers be X and Y.

X =  Xl*2n/2 + Xr    [Xl and Xr contain leftmost and rightmost n/2 bits of X]
Y =  Yl*2n/2 + Yr    [Yl and Yr contain leftmost and rightmost n/2 bits of Y]
 
XlYr + XrYl = (Xl + Xr)(Yl + Yr) - XlYl- XrYr

So the final value of XY becomes

XY = 2n XlYl + 2n/2 * [(Xl + Xr)(Yl + Yr) - XlYl - XrYr] + XrYr

With above trick, the recurrence becomes T(n) = 3T(n/2) + O(n) and solution of this recurrence is O(n1.59).

Note: Brother according to HomeworkLib's policy we are only allowed to answer first 3 part if there are many. So, I request you to post other as separate posts.

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
3- What is the growth of the below function: (What is the most accurate answer?) ?(?)...
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
  • What is the smallest integer value of n > 3 such that an algorithm whose running...

    What is the smallest integer value of n > 3 such that an algorithm whose running time is 7n runs slower than an algorithm whose running time is 7(log2n)4 on the same machine? Justify your answer. You may provide a plot or/and proof.

  • 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,...

  • Need help with 1,2,3 thank you. 1. Order of growth (20 points) Order the following functions...

    Need help with 1,2,3 thank you. 1. Order of growth (20 points) Order the following functions according to their order of growth from the lowest to the highest. If you think that two functions are of the same order (Le f(n) E Θ(g(n))), put then in the same group. log(n!), n., log log n, logn, n log(n), n2 V, (1)!, 2", n!, 3", 21 2. Asymptotic Notation (20 points) For each pair of functions in the table below, deternme whether...

  • 6. Consider the following basic problem. You're given an array A consisting of n integers A[1],...

    6. Consider the following basic problem. You're given an array A consisting of n integers A[1], A[2], , Aln]. You'd like to output a two-dimensional n-by-n array B in which B[i, j] (for i <j) contains the sum of array entries Ali] through Aj]-that is, the sum A[i] Ai 1]+ .. +Alj]. (The value of array entry B[i. Λ is left unspecified whenever i >j, so it doesn't matter what is output for these values.) Here's a simple algorithm to...

  • 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

  • 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,...

  • An array A of n integers is called semi-sorted if it is increasing until some index...

    An array A of n integers is called semi-sorted if it is increasing until some index and then decreasing afterwards. In other words, there is some index 1 ≤ p ≤ n such that: • A[i] < A[i + 1] for 1 ≤ i < p, and • A[i] > A[i + 1] for p ≤ i < n. Note that in this case, A[p] is the maximum element of A. Give an algorithm with running time O(logn) that finds...

  • (f) True False Comparison-based sorting methods h e Comparison-based sorting methods have a lower bound of...

    (f) True False Comparison-based sorting methods h e Comparison-based sorting methods have a lower bound of O(n logn) on their running time. (8) True False A vertex cover of a graph is a set of edges that touch every verte (h) True False We can find the largest independent set of a graph in polynomial time. (i) True False We can prove that P PSPACE. (j) True False We can reduce SAT to 3-SAT, and 3-SAT to SAT. (k) True...

  • I need help for the order of growth for functions in Python 3. Q1: What is...

    I need help for the order of growth for functions in Python 3. Q1: What is the order of growth for the following functions? Kinds of Growth Here are some common orders of growth, ranked from no growth to fastest growth: 1. Θ(1) — constant time takes the same amount of time regardless of input size 2. Θ(log n) — logarithmic time 3. Θ(n) — linear time 4. Θ(n log n) — linearithmic time 5. Θ(n2 ) 6. Θ(n3 ),...

  • Subject: Algorithm solve only part 4 and 5 please. need urgent. 1 Part I Mathematical Tools and Definitions- 20 points, 4 points each 1. Compare f(n) 4n log n + n and g(n)-n-n. Is f E Ω(g),fe 0(g)...

    Subject: Algorithm solve only part 4 and 5 please. need urgent. 1 Part I Mathematical Tools and Definitions- 20 points, 4 points each 1. Compare f(n) 4n log n + n and g(n)-n-n. Is f E Ω(g),fe 0(g), or f E (9)? Prove your answer. 2. Draw the first 3 levels of a recursion tree for the recurrence T(n) 4T(+ n. How many levels does it have? Find a summation for the running time. (Extra Credit: Solve it) 3. Use...

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