Professional Documents
Culture Documents
Problem 2.
Give a recursive definition of the sequence {a n}, n=1,2,3 if
a) an = 6n
a0=0 ; an+1 = 6(n+1)=6n + 6 = an + 6
b) an = 2n +1
a0 = 1; an+1 = 2(n+1) + 1 = (2n +1) + 2 = an + 2
c) an = 10n
a0 = 1 ; an+1 = 10n+1 = 10n10 = 10an
d) an = 5
Problem 3.
Assuming that fn is the nth Fibonacci number [f0=f1=1; fn+1= fn+ fn-1],
prove that f02 + f12 + + fn2 = fnfn+1
when n is a positive integer.
Problem 5.
Give a recursive definition of each of these sets of ordered pairs of positive integers.
Use structural induction to prove that the recursive definition you found is correct.
[Hint: To find a recursive definition, plot the points in the set in the plane and look for
paterns]
a) S={(a,b): aZ+, bZ+, and a+b is even}
(1,1) S, (2,2) S,
(p,q) S (p, q+2) S, (p+2,q) S
b) S={(a,b): aZ+, bZ+, and a or b is odd}
(1,1) S, (1,2) S, (2,1) S
(p,q) S (p, q+2) S, (p+2,q) S
c) S={(a,b): aZ+, bZ+, a+b is odd, 3 b}
(2,3) S , (1,6) S
(p,q) S (p,q+6) S, (p+2,q) S
Problem 6.
Give a recursive algorithm for finding the sum of the first n positive integers
Problem 7.
Give a recursive algorithm for finding the minimum of a finite set of integers, making use
of the fact that the minimum of n integers is the smaller of the last integer in the list and
the minimum of the first n-1 integers in the list.
Problem 9.
Device a recursive algorithm to find the nth term of the sequence defined by a0=1, a1=2,
an = an-1an-2, for n=2,3,4,.