in Algorithms retagged by
1,134 views
0 votes
0 votes

T(n) = 2n T $(\frac{n}{2})$ + nn

in Algorithms retagged by
1.1k views

4 Comments

is answer o(nn) ....?

1
1
I  beg you mam please post your answer.
0
0

firstly..pls dun say like this..please.

and secondly i guessed nn because evrytime nn work is done,and nn has the highest asymptotic complxeity.

so thats why i thot so,i might be incorrect.i have not solved it.

what is the answer ??

1
1
Mam please solve using any method and just tell answer and post whatever your answer is coming either iteration or recursion tree will only work in this question.because master fails and there is no other option than these two methods
0
0

3 Answers

1 vote
1 vote

Here r d steps though I m getting a different answer. 

I've solved dis equation using d Master's Theorem. You can verify d descp. Yeah. :)

Give equation is of d form:

aT(n/b)+f(n)

Here given equation is:

2n(n/2)+nn.

So a=2n, b=2, f(n)=nn

Now a=2n, b=2

Keeping it in logba, we have log22,

So we get nlog22 which equals n, since(log22=1). 

Now nthru d form nlogba

So nlogba  is equal to d case II of Master's Theorem. 

So T(n) time complexity is given by 

T(n)=θ(nlog2n)

is d final answer. :)

3 Comments

i don't think masters theorem is applicable for this one as 'a' has to be a constant it has to greater than or equal to 1
2
2

Give equation is of d form:

aT(n/b)+f(n)

Here a should be constant value and it should be greater than equal to 1. 

T(n) = 2T $(\frac{n}{2})$ + nn

Here a is 2n and this is not a contant value hence Master Thoerem cannot be applied at all .

0
0
T(n)=O(nlogn)

is the complexity
0
0
0 votes
0 votes
Is it O(2^(n^(log2(n)-1)) ?? Or it is near to the answer ??
edited by

4 Comments

dear sir you please take snapshot through mobile and please kindly post that over here please
0
0
@Arjun Sir,Kindly intervene here.D solution is causing a lil bit confusion.
1
1

hey @LavTheRawkstar I thought of the problem using recursion tree and it is coming O(n^n)

1
1
0 votes
0 votes
Solve it by using recursive tree method.. You will get n^n cost at each level and tree grows upto logn therefore O(n^n logn)