Question: Consider the recurrence: T ( n ) = { 9 T ( n 3 ) + O ( n 2 ) f o r n

Consider the recurrence:
T(n)={9T(n3)+O(n2)forn>11forn=1
Solve the recurrence to find a tight upper bound using the substitution method.
Consider the following divide-and-conquer algorithm:
float myFunc(X){
n = X.length;
if (n ==1){
return X[0];
}
// let X1, X2 be arrays of size n/2
for (i =0; i !=(n/2)-1; i++){
X1[i]= X[i];
X2[i]= X[n/2+ i];
}
for (i =0; i !=(n/2)-1; i++){
for (j =0; j !=(n/2)-1; j++){
if (X1[i]== X2[j]){
X2[j]=0;
}
}
}
r1= myFunc(X1);
r2= myFunc(X2);
return max(r1, r2);
}
(a) Obtain a recurrence relation for the algorithm's basic operation count.
(b) Solve the recurrence relation found in part (a) to find a tight bound. Please use the proper
asymptotic notation to state the tight bound.
Note: You don't need to consider what the algorithm computes; just focus on the basic
operations.
Consider the recurrence: T ( n ) = { 9 T ( n 3 )

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