Jump to content

Recurrence Tree


subaha

Recommended Posts

I'm not sure, I'm not good at this

 

Problem # 1

 

 

 

Assume: [math]T(X) = 0 \; FOR \; X < 1 \; AND \; X = 1[/math]

 

[math]T(n) = T(n/2) + c[/math]

 

[math]T(n) = ( T(n/4) + c ) + c[/math]

 

[math]T(n) = (( T(n/8) + c ) + c ) + c[/math]

 

...

 

[math]T(n) = T(n/n) + c + c + .. + c = T(1) + log_{2}{n} \; c = \; FLOOR(log_{2}{n}) c[/math]

 

 

 

Edited by khaled
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.