Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

RECURSION

SOLVING RECURSION

1) AP : nth term
2) GP : nth term
3) x(n+1) = a.x(n)+b : nth term using
a) transforming x(i) to y(i) such that y(i)s in AP
b) transforming x(i) to y(i) such that y(i)s in GP
c) intuitively finding answer then proving by induction
4) Guess the category yourself and find nth term
a) x(n+1)=2*x(n)*sqrt(1-x(n)^2)
b) x(n+1)=2*x(n)/(1+x(n)^2)
c) x(n+1)=2*x(n)^2-1 for -1 <= x(0) <= 1
5) x(n+1) = ax(n)+bx(n-1) using ideas learnt in 3a,3b

6) using 5, find nth term of fibonacci. Also find a log time recursion for
fibonacci.(Log time fibonacci is a recursion that relates nth term of a recursion
to ground term in about log(n) depths eg. f(n) = 3*f(n/3)-2 is a log time recursion
for f(n) = n+1;)

7) PROBLEM : You are at the origin of an infinite 2D space. You have to reach the
point (a,b) both integers. You can only jump on lattice points (integer
coordinates) and that two along x or y direction only. Your ith jump must be of
length 2^(i-1). Lay conditions on a,b decribing total number of possible paths for
each a,b.

8) PROBLEM : Give the recursion for f(a,b,n,seq) where seq is a real number
sequence in increasing order, n is a real number, a,b are integers s.t. f gives 1
if n belongs to {seq(a),seq(a+1),.....seq(b)} and 0 otherwise. Try to make a log-
time recursion.

You might also like