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...

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

Induction and Recursion 1
Image of page 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
Image of page 2
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
Image of page 3
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
Image of page 4
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
Image of page 5
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
Image of page 6
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
Image of page 7
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
Image of page 8
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
Image of page 9
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
Image of page 10
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
Image of page 11
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
Image of page 12
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
Image of page 13
Image of page 14

You've reached the end of your free preview.

Want to read all 62 pages?

  • Spring '14

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors