A tight bound for <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>T</mi> <mo stretchy="false">(</mo> <mi>n</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msup> <mn>2</mn> <mi>n</mi> </msup> <mi>T</mi> <mo stretchy="false">(</mo> <mfrac> <mi>n</mi> <mn>2</mn> </mfrac> <mo stretchy="false">)</mo> <mo>+</mo> <msup> <mi>n</mi> <mi>n</mi> </msup> </math>

Jimena Hatfield

Jimena Hatfield

Answered question

2022-09-07

A tight bound for T ( n ) = 2 n T ( n 2 ) + n n
Given recurrence
T ( n ) = 2 n T ( n 2 ) + n n
How we can show that T ( n ) n n ?
I show that T ( n ) n n because of existence the term n n in T(n).

Answer & Explanation

Caiden Li

Caiden Li

Beginner2022-09-08Added 17 answers

Step 1
As T ( 2 log 2 n ) = 2 n T ( 2 log 2 n 1 ) + n n
Calling T ( ) = T ( 2 ( ) ) and z = log 2 n we have the "equivalent" recurrence
T ( z ) = 2 2 z T ( z 1 ) + ( 2 z ) 2 z
now as the recurrence is linear
T h ( z ) = 2 2 z T h ( z 1 )
has the solution
T h ( z ) = 4 2 z c 0
so choosing T p ( z ) = 4 2 z c 0 ( z ) after substituting in the complete recurrence we get
c 0 ( z ) c 0 ( z 1 ) = ( 2 z ) 2 z 4 2 z
Step 2
with solution
c 0 ( z ) = k = 0 z 1 ( 2 k + 1 ) 2 k + 1 2 2 k + 2
and then
T ( z ) = 4 2 z ( c 0 + ( k = 0 z 1 ( 2 k + 1 ) 2 k + 1 2 2 k + 2 ) )
and to recover T(n) is sufficient to substitute z = log 2 n

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?