Re: [algogeeks] Is log n = O(n)? Is log n = omega (n)? Is log n = theta(n)?

2010-02-02 Thread Sieu Truc
differentiate:f'= (cn-logn)'=c-1/n. With n>n0=1/c ->f'>0->increasing function. Therefore, n>n0 ,lognn0'. because logn<>omega(n)->logn<>theta(n) On Tue, Feb 2, 2010 at 12:51 PM, Banoo wrote: > hi all, > can you help me solve the following question. > > Is log n = O(n)? Is log n = omega(n)? Is log

Re: [algogeeks] recursive algorithm

2010-02-01 Thread Sieu Truc
initial assignmnet: g()={n1,..,nd) inter(i) { if(i<0) return; for(int j=0;j wrote: > Can you please help me with this one. > > write two algorithms that iterate over every index from (0,0,..,0) > to (n1,n2,..,nd).Make one algorithm recursive and the other > iterative. > > Th