Question: a . ( 5 points ) Prove the correctness of Alg 1 using induction. ( Hint: ( 1 ) does it work for n =

a.(5 points) Prove the correctness of Alg1 using induction. (Hint: (1) does it work for n=0?
assuming it works for n=i, can you show that it will work for n=i+1?)
b.(15 points) Let A(n),B(n), and C(n) be the running time of the three algorithms, respectively, as a
function of n. Write down the recurrences for A(n),B(n), and C(n).
c.(Extra credit: 15 points) Analyze and compare the running time of the three algorithms above. You
can use either recursion tree or master method to solve the recurrences.
 a.(5 points) Prove the correctness of Alg1 using induction. (Hint: (1)

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!