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

  • Thread starter Thread starter s3a
  • Start date Start date
  • Tags Tags
    Recurrence
Click For Summary

Discussion Overview

The discussion revolves around solving the recurrence relation t(n) = t(n/2) + n + 2. Participants are attempting to clarify their understanding of the solution process, particularly focusing on specific steps in the derivation and any potential errors in the provided solution.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Some participants express confusion regarding the solution, particularly at step (4) of the derivation.
  • One participant notes that they derive k = log2(n) from the equation n = 2^k, indicating a potential understanding of the logarithmic relationship.
  • Another participant points out a possible omission of a "+" sign in step (4), suggesting that the expression should include additional terms.
  • A later reply proposes a transformation of terms from step (5) to (6), using the relationship between k and n to simplify the expression.

Areas of Agreement / Disagreement

Participants generally express confusion and seek clarification on specific steps, indicating that multiple interpretations or understandings of the solution exist. There is no consensus on the correctness of the solution as presented.

Contextual Notes

Participants have noted missing attachments and potential errors in the problem statement, which may affect their ability to follow the solution process accurately.

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: 525
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.
 
Seems there is a "+" sign missing in (4).
koZTB.gif


It should be t(n/2k) +[/color] n + n/2 + ...

Then in going from (5) to (6), make use of the fact that
n/2k-1 ≡ n/(2k/2)
   ≡ 2n/2k, but k=log2n
   ≡ 2n/n
   ≡ 2 
 

Similar threads

Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
6
Views
4K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K