Notices
Results 1 to 2 of 2

Thread: i need help writing an algorithm please

  1. #1 i need help writing an algorithm please 
    New Member
    Join Date
    Nov 2009
    Location
    816
    Posts
    2
    hi this is my question:

    Consider the folowing relation:

    cn= 5 + 2c[n/3], n=2,3,4..............

    where it's given c1=1

    i) write an iterate algorithm to find cn
    ii) write an recursive algorithm to find cn

    _______________________________________

    i have this so far for iterative:

    For n=1 c1=5+(2/3)c, hence 1=5+(2/3)c
    c=-4*3/2=-6, so that cn=5-12(n/3)=5-4n

    c_n+1 -c_n=-4



    is this correct?
    can you guys PLEASE help me with the recursive one?

    THANKS YOU IN ADVANCE


    i love angie
    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Freshman DrNesbit's Avatar
    Join Date
    Nov 2009
    Location
    Supermegatopian Labs
    Posts
    98
    It seems that you didn't understand the question. You may want to look up "algorithm", "iterative" and "recursive", and for each word you look up, if you meet a word you don't understand in the explanation, look it up too (This is what they call recursion).

    (Hint: c isn't a constant)

    (By the way, the internet does not exist to do your homework for you)


    Reply With Quote  
     

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