(Solved) : Find Big O Run Times Recursive Functions Using Recurrence Relations General Characteristic Q44149401 . . .
Find the big O run times of these recursive functionsusing Recurrence relations and general characteristic equationswith respect to n
void strass(int n){
if( n<=18 )
time++;
else {
strass(n/2);
strass(n/2);
strass(n/2);
for(inti=0; i<n; i++)
for(intj=i; j<n; j++)
time++;
strass(n/2);
for(inti=n/2; i<n; i++);
time++;
strass(n/2);
strass(n/2);
strass(n/2);
}
}
void jedi(int n){
if( n <= 147 )
time+= 54;
else{
for(inti=0; i<n/2; i++)
time++;
jedi(n/3);
for(inti=0; i<13*n; i++)
time++;
jedi((2*n)/3);
}
}
void sithLord(int n)
{
if( n <= 200 )
time+= 700;
else
{
sithLord((7*n)/10);
for(inti=0; i<n; i++)
time++;
sithLord(n/5);
for(inti=0; i<130*n; i+=10)
time++;
}
}
void hanoi(int n)
{
if( n==1 )
time++;
else
{
hanoi(n-1);
time++;
hanoi(n-1);
}
}
Expert Answer
Answer to Find the big O run times of these recursive functions using Recurrence relations and general characteristic equations wi…
OR