1. Give an asymptotically tight bound to each of the following expressions:
3n^2 + 2n^3
3n log n + 2n^2
2^n + 3^n
2. Arrange the following asymptotic family from lower order to higher order. The first has been done for you.
O(n log n)
O(n^3)
O(log n)
O(n^2 log n)
O(n)
O(3^n)
O(2^n)
3. At work, Peter needs to solve a problem of different sizes. He has two algorithms available to solve the problem. Algorithm A can solve the problem with size n in time T(n) = n^3 +3n^2+507 milliseconds while Algorithm B can solve the same problem in time T(n)= 100n^2+300n+507 milliseconds. Find the minimum problem size n where Algorithm B runs faster than Algorithm A.
n=
4. True or False:
3n+n^2=O(n)
3n+n^2=O(n^2)
3n+n^2=O(n^3)
1. Give an asymptotically tight bound to each of the following expressions: 3n^2 + 2n^3 => O(n^3) 3n log n + 2n^2 => O(n^2) 2^n + 3^n => O(3^n) 2. Arrange the following asymptotic family from lower order to higher order. The first has been done for you. O(n log n) O(n^3) O(log n) O(n^2 log n) O(n) O(3^n) O(2^n) Answer: --------- O(log n) O(n) O(n log n) O(n^2 log n) O(n^3) O(2^n) O(3^n) 3. At work, Peter needs to solve a problem of different sizes. He has two algorithms available to solve the problem. Algorithm A can solve the problem with size n in time T(n) = n^3 +3n^2+507 milliseconds while Algorithm B can solve the same problem in time T(n)= 100n^2+300n+507 milliseconds. Find the minimum problem size n where Algorithm B runs faster than Algorithm A. n=100 4. True or False: 3n+n^2=O(n) -> False 3n+n^2=O(n^2) -> True 3n+n^2=O(n^3) -> True
1. Give an asymptotically tight bound to each of the following expressions: 3n^2 + 2n^3 3n...
Order the following functions by asymptotic growth rate: 4n, 2^log(n), 4nlog(n)+2n, 2^10, 3n+100log(n), 2^n, n^2+10n, n^3, nlog(n) You should state the asymptotic growth rate for each function in terms of Big-Oh and also explicitly order those functions that have the same asymptotic growth rate among themselves.
Problem 1 Use the master method to give tight asymptotic bounds for the following recurrences. a) T(n) = T(2n/3) +1 b) T(n) = 2T("/2) +n4 c) T(n) = T(71/10) +n d) T(n) = 57(n/2) + n2 e) T(n) = 7T(1/2) + 12 f) T(n) = 27(1/4) + Vn g) T(n) = T(n − 2) +n h) T(n) = 27T(n/3) + n° lgn
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...
3. Evaluate the product lin=1(4k/2). Prove your answer. 4. Give an asymptotically tight bound for Ση=1 kr where r > 0 is a constant.
4.5-2 Professor Caesar wishes to develop a matrix-multiplication algorithm that is asymptotically faster than Strassen’s algorithm. His algorithm will use the divide- and-conquer method, dividing each matrix into pieces of size n/4 x n/4, and the divide and combine steps together will take O(n) time. He needs to determine how many subproblems his algorithm has to create in order to beat Strassen’s algo- rithm. If his algorithm creates a subproblems, then the recurrence for the running time T(n) becomes T(n)...
Using the Master Theorem discussed in class, solve the following recurrence relations asymptotically. Assume T(1) = 1 in all cases. (a) T(n) = T(9n/10) + n (b) T(n) = 16T(n/4) + n^2 (c) T(n) = 7T(n/3) + n^2 (d) T(n) = 7T(n/2) + n^2 (e) T(n) = 2T(n/4) + √n log^2n.
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
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...
Suppose the following is a divide-and-conquer algorithm for some problem. "Make the input of size n into 3 subproblems of sizes n/2 , n/4 , n/8 , respectively with O(n) time; Recursively call on these subproblems; and then combine the results in O(n) time. The recursive call returns when the problems become of size 1 and the time in this case is constant." (a) Let T(n) denote the worst-case running time of this approach on the problem of size n....
3. (20 pts.) You are given two sorted lists of numbers with size m and n. Give an O(logn+ logm) time algorithm for computing the k-th smallest element in the union of the two lists. 4. (20 pts.) Solve the following recurrence relations and give a bound for each of them. CMPSC 465, Fall 2019, HW 2 (a) T(n) = 117(n/5)+13n!.3 (b) T(n) = 2T (n/4)+nlogn (c) T(n) = 5T (n/3) +log-n (d) T(n) = T(n/2) +1.5" (e) T(n) =...