The Gateway to Computer Science Excellence
+3 votes
What will be the time complexity for the following recurrence relation?

$T(n) = 8\sqrt{n} T(\sqrt{n})+(log n)^{2}$

According to me it is $\Theta (n(logn)^{3})$ . Please confirm.
in Algorithms by (341 points) | 484 views

1 Answer

+3 votes

Correct me if i am wrong

by Active (4.8k points)

Thanks for the answer. I am having a little difficulty in understanding. Please have a look at my answer using Master Theorem.

we cannot apply master's theorem here because the no of subproblems should be >=1 or (a>=1).

when you reduce size of subproblem by log in s function why you have not taken log of m^2.

it should be ,P(m)=8P(m/2)+2logm/m

@arnab ...could you please elaborate last step ...

n(1/2+1/4+1/8+1/8....1/2^k) < n(1/2+1/4+1/8+...) = n(0.5/0.5)= n

T(n) <= 8k*n

T(n) = O(n(logn)3)
I hope that you have understood now

@Arnab please elaborate 3rd step

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,317 answers
105,107 users