Given g(0)=1,g(1)=-1and g(n)=g(n-1)+g(n-2),find(6).

Showing Answers 1 - 15 of 15 Answers

santosh

  • Oct 23rd, 2007
 

#  substitute n=6
    
     => g(6) = g(5)+g(4)----------------(1)
#  sub n=5
    => g(5) = g(4)+g(3)-----------------(2)

# sub n=4
    => g(4) = g(3)+g(2)------------------(3)
#sub n=3
   => g(3)= g(2)+g(1)--------------------(4)
# sub n=2
    => g(2)= g(1)+g(0)--------------------(5)
 
so ,
       g(2) = 0;
        g(3)= -1;
        g(4) = -1;
         g(5)= -2;
       

         g(6) = -3;


another method:

g(6) = 5*g(1)+g(0)


so generalised solution is    g(a) = (a-1)*g(1)  +  g(o)    where a is to find for the given equation g(n) = g(n-1)+g(n-2)

abhishek76

  • Feb 25th, 2008
 

we can write g(6) as g(5)+g(4) (since g(n)=g(n-1)+g(n-2))
again g(5)=g(4)+g(3),
          g(4)=g(3)+g(2)
          g(3)=g(2)+g(1)
          g(2)=g(1)+g(0)=1-1=0(as given above)
     therefore,g(3)= 0-1=-1
                     g(4)=-1+0=-1
                     g(5)=-1-1=-2
   therefore, g(6)=g(5)+g(4)=-2-1=-3(ans)

prathigreek

  • Jan 21st, 2010
 

We can write g(6) as g(5)+g(4) (since g(n)=g(n-1)+g(n-2))
again g(5)=g(4)+g(3),
          g(4)=g(3)+g(2)
          g(3)=g(2)+g(1)
          g(2)=g(1)+g(0)=1-1=0(as given above)
     therefore,g(3)= 0-1=-1
                     g(4)=-1+0=-1
                     g(5)=-1-1=-2
   therefore, g(6)=g(5)+g(4)=-2-1=-3(ans)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions