
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Discrete Structures; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Fall 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

a.^ { an^ }, n^ =^1 ,^2 ,^3 ,Kif !
an = 4 n " 2. b. !
an = 1 + (" 1 ) n. c. !
an = n ( n + 1 ).
Recursive step: if !
( a , b ) " S , then !
( a + 2 , b + 3 ) " S and !
( a + 3 , b + 2 ) " S a. List the elements of recursive definition (including the basis step). S produced by the first five applications of the b. Use induction to show that !
5 a + b when !
remainder is zero when^ ( a , b )^ "^ S. (That is, the !
a + b is divided by 5.)
!
a 0 = 1 , !
(^) a 1 = 2 , !
(^) a 2 = 3 , and !
(^) an = an " 1 + an " 2 + an " 3 , for !
(^) n = 3 ,4, 5 K. b. Devise an iterative algorithm to find the part a. n th term of the sequence defined in c. Explain. Is the algorithm from part a or the algorithm from part b more efficient?