Results 1 to 2 of 2

Thread: Please help me with this problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    1

    Unhappy Please help me with this problem

    I have this problem and I have no Idea how to solve it.

    Q-" solve the following recurrence relation. (Assume n=2k ")


    F(n)= { 1 n=2 ;
    2 f(n/2) + (n-1) n>2 ;

    please help me with anything

  2. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Please help me with this problem

    Unroll the sum for a few terms. I've written it suggestively for the first few:

    f(n) = 2 f(n/2) + (n-1) = 2 2 f(n/4) + 2(n/2-1) + n-1 = 2^2 f(n/2^2) + 2n - 2-1 ...

    From there you should be able to guess an answer, eventually. Just make sure you check it since there are a lot of places to mess up and drop a term.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width