Question: Question 1 ( 1 0 points ) : Give short but formal proofs of the following: ( a ) f ( n ) = 6

Question 1(10 points): Give short but formal proofs of the following:
(a)f(n)=6n-1014 is O(n), but f(n)=22n-2 is not O(2n)
(b)f(n)=O(g(n)), where f(n)=19n+15 and g(n)=n2-50n.
Question 2(10 points): Consider the following algorithm, which takes as input an array A :
What is the asymptotic running time of PrintThings(A) if the length of A is n?
We expect: an answer like "The running time of PrintThings(A) is O(dots)" with a short
explanation.
Question 3(10 points): Find an optimal parenthesization of the following matrix-chain product:
A32A28A81A15
Question 1 ( 1 0 points ) : Give short but formal

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 Finance Questions!