06 Induction and Recusion 2019.pdf - Induction and Recursion 1 Sequences in mathematics Sequences A sequence is a function whose domain is either all

# 06 Induction and Recusion 2019.pdf - Induction and...

• 62

This preview shows page 1 - 14 out of 62 pages.

Induction and Recursion 1 2 Sequences A sequence is a function whose domain is either all integers greater than or equal to a given integer, or all integers between two given integers. , … 1, 2, 4, 8, 16 0,5,8,17,24,37… s 1 , s 2 , s 3 s 0 , s 1 , s 2 s 1 , s 2 , s 3 , …, s n 1 , s n 1/2,1/3,1/4,1/5,1/6,… i 2 + ( 1) i Sequences in mathematics 3 Summation Notation the index the lower limit the upper limit n k = m a k = a m + a m +1 + … + a n k m n 4 i =0 2 i = 2 0 + 2 1 + 2 2 + 2 3 + 2 4 = 1 + 2 + 4 + 8 + 16 = 31 Summation Notation 4 Summation Properties Exercise: (once we define summation recursively) Prove these. n k = m a k + n k = m b k = n k = m ( a k + b k ) n k = m c a k = c n k = m a k Summation Properties 5 Recursive Definition of Summation and Pay attention! We will use this identity a lot. Exercise: write recursive and non recursive code to compute the summation. a i = a s i = s a n i = a s i = n 1 k = m s i + s n Recursive Definition of Summation 6 Change of Variables From Change variable to where . 5 k =1 ( k 1) j j = k 1 4 j =0 j . Manipulation of Variables 7 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut 8 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 9 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 The second and second last sum to n + 1 10 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 The second and second last sum to n + 1 The third and third last sum to n + 1 11 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 The second and second last sum to n + 1 The third and third last sum to n + 1 The fourth and fourth last sum to n + 1 12 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 The second and second last sum to n + 1 The third and third last sum to n + 1 The fourth and fourth last sum to n + 1 If is even, you can do this times, giving a sum of n n /2 n ( n + 1) 2 13 The sum of the numbers from 1 to n Write out the first few and last few terms of the summation as follows 1 + 2 + 3 + 4 + … + ( n 3) + ( n 2) + ( n 1) + n An old chestnut The first and last sum to n + 1 The second and second last sum to n + 1 The third and third last sum to n + 1 The fourth and fourth last sum to n + 1 If is even, you can do this times, giving a sum of n n /2 n ( n + 1) 2 If is odd, you can do this times, and the number remaining in the middle  #### You've reached the end of your free preview.

Want to read all 62 pages?

• Spring '14

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern  