Solve the recurrence: t(n) = t(n/2) + n + 2 (Solution included).

  • Thread starter Thread starter s3a
  • Start date Start date
  • Tags Tags
    Recurrence
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 3K views
s3a
Messages
828
Reaction score
8

Homework Statement


The problem along with its solution is attached as Problem.jpg.

Homework Equations


Recurrence relation.

The Attempt at a Solution


I am confused as to what the solution is stating. I get up to and including (3) but I am stuck at (4). After (4), I get that k = log2(n) because n = 2^k = 2^(log2(n)) = n.

I would greatly appreciate it if someone could help me get unstuck!
Thanks in advance!
 

Attachments

  • Problem.jpg
    Problem.jpg
    20.2 KB · Views: 535
Last edited:
Physics news on Phys.org
s3a said:

Homework Statement


The problem along with its solution is attached as Problem.jpg.

Homework Equations


Recurrence relation.

The Attempt at a Solution


I am confused as to what the solution is stating. I get up to and including (3) but I am stuck at (4). After (4), I get that k = log2(n) because n = 2^k = 2^(log2(n)) = n.

I would greatly appreciate it if someone could help me get unstuck!
Thanks in advance!

You forgot to attach Problem.jpg.
 
Lol. Thanks for telling me.