1. 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?  2.

3. 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)  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   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement