discrete mathematics mathematical reasoning sequences and
play

Discrete Mathematics & Mathematical Reasoning Sequences and Sums - PowerPoint PPT Presentation

Discrete Mathematics & Mathematical Reasoning Sequences and Sums Colin Stirling Informatics Slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 1 / 14 Sequences Sequences are


  1. Discrete Mathematics & Mathematical Reasoning Sequences and Sums Colin Stirling Informatics Slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 1 / 14

  2. Sequences Sequences are ordered lists of elements 2, 3, 5, 7, 11, 13, 17, 19, . . . or a , b , c , d , . . . , y , z Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 2 / 14

  3. Sequences Sequences are ordered lists of elements 2, 3, 5, 7, 11, 13, 17, 19, . . . or a , b , c , d , . . . , y , z Definition A sequence over a set S is a function f from a subset of the integers (typically N or Z + ) to the set S . If the domain of f is finite then the sequence is finite Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 2 / 14

  4. Examples f : Z + → Q is f ( n ) = 1 / n defines the sequence Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 3 / 14

  5. Examples f : Z + → Q is f ( n ) = 1 / n defines the sequence 1 , 1 / 2 , 1 / 3 , 1 / 4 , . . . Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 3 / 14

  6. Examples f : Z + → Q is f ( n ) = 1 / n defines the sequence 1 , 1 / 2 , 1 / 3 , 1 / 4 , . . . Assuming a n = f ( n ) , the sequence is also written a 1 , a 2 , a 3 , . . . or as { a n } n ∈ Z + Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 3 / 14

  7. Examples f : Z + → Q is f ( n ) = 1 / n defines the sequence 1 , 1 / 2 , 1 / 3 , 1 / 4 , . . . Assuming a n = f ( n ) , the sequence is also written a 1 , a 2 , a 3 , . . . or as { a n } n ∈ Z + g : N → N is g ( n ) = n 2 defines the sequence 0 , 1 , 4 , 9 , . . . Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 3 / 14

  8. Examples f : Z + → Q is f ( n ) = 1 / n defines the sequence 1 , 1 / 2 , 1 / 3 , 1 / 4 , . . . Assuming a n = f ( n ) , the sequence is also written a 1 , a 2 , a 3 , . . . or as { a n } n ∈ Z + g : N → N is g ( n ) = n 2 defines the sequence 0 , 1 , 4 , 9 , . . . Assuming b n = g ( n ) , also written b 0 , b 1 , b 2 , . . . or as { b n } n ∈ N Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 3 / 14

  9. Geometric and arithmetic progressions A geometric progression is a sequence of the form a , ar , ar 2 , ar 3 , . . . , ar n , . . . Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 4 / 14

  10. Geometric and arithmetic progressions A geometric progression is a sequence of the form a , ar , ar 2 , ar 3 , . . . , ar n , . . . Example { b n } n ∈ N with b n = ( − 1 ) n Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 4 / 14

  11. Geometric and arithmetic progressions A geometric progression is a sequence of the form a , ar , ar 2 , ar 3 , . . . , ar n , . . . Example { b n } n ∈ N with b n = ( − 1 ) n An arithmetic progression is a sequence of the form a , a + d , a + 2 d , a + 3 d , . . . , a + nd , . . . Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 4 / 14

  12. Geometric and arithmetic progressions A geometric progression is a sequence of the form a , ar , ar 2 , ar 3 , . . . , ar n , . . . Example { b n } n ∈ N with b n = ( − 1 ) n An arithmetic progression is a sequence of the form a , a + d , a + 2 d , a + 3 d , . . . , a + nd , . . . Example { c n } n ∈ N with c n = 7 − 3 n Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 4 / 14

  13. Geometric and arithmetic progressions A geometric progression is a sequence of the form a , ar , ar 2 , ar 3 , . . . , ar n , . . . Example { b n } n ∈ N with b n = ( − 1 ) n An arithmetic progression is a sequence of the form a , a + d , a + 2 d , a + 3 d , . . . , a + nd , . . . Example { c n } n ∈ N with c n = 7 − 3 n where the initial elements a , the common ratio r and the common difference d are real numbers Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 4 / 14

  14. Recurrence relations Definition A recurrence relation for { a n } n ∈ N is an equation that expresses a n in terms of one or more of the elements a 0 , a 1 , . . . , a n − 1 Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 5 / 14

  15. Recurrence relations Definition A recurrence relation for { a n } n ∈ N is an equation that expresses a n in terms of one or more of the elements a 0 , a 1 , . . . , a n − 1 Typically the recurrence relation expresses a n in terms of just a fixed number of previous elements (such as a n = g ( a n − 1 , a n − 2 ) ) Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 5 / 14

  16. Recurrence relations Definition A recurrence relation for { a n } n ∈ N is an equation that expresses a n in terms of one or more of the elements a 0 , a 1 , . . . , a n − 1 Typically the recurrence relation expresses a n in terms of just a fixed number of previous elements (such as a n = g ( a n − 1 , a n − 2 ) ) The initial conditions specify the first elements of the sequence, before the recurrence relation applies Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 5 / 14

  17. Recurrence relations Definition A recurrence relation for { a n } n ∈ N is an equation that expresses a n in terms of one or more of the elements a 0 , a 1 , . . . , a n − 1 Typically the recurrence relation expresses a n in terms of just a fixed number of previous elements (such as a n = g ( a n − 1 , a n − 2 ) ) The initial conditions specify the first elements of the sequence, before the recurrence relation applies A sequence is called a solution of a recurrence relation iff its terms satisfy the recurrence relation Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 5 / 14

  18. Rabbits and Fibonacci sequence A young pair of rabbits (one of each sex) is placed on an island Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 6 / 14

  19. Rabbits and Fibonacci sequence A young pair of rabbits (one of each sex) is placed on an island A pair of rabbits does not breed until they are 2 months old. After they are 2 months old each pair produces another pair each month Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 6 / 14

  20. Rabbits and Fibonacci sequence A young pair of rabbits (one of each sex) is placed on an island A pair of rabbits does not breed until they are 2 months old. After they are 2 months old each pair produces another pair each month Find a recurrence relation for number of rabbits after n months assuming no rabbits die Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 6 / 14

  21. Rabbits and Fibonacci sequence A young pair of rabbits (one of each sex) is placed on an island A pair of rabbits does not breed until they are 2 months old. After they are 2 months old each pair produces another pair each month Find a recurrence relation for number of rabbits after n months assuming no rabbits die Answer is the Fibonacci sequence  f ( 0 ) = 0  f ( 1 ) = 1 f ( n ) = f ( n − 1 ) + f ( n − 2 ) for n ≥ 2  Yields the sequence 0, 1, 1, 2, 3, 5, 8, 13, . . . Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 6 / 14

  22. Solving recurrence relations Finding a formula for the n th term of the sequence generated by a recurrence relation is called solving the recurrence relation Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 7 / 14

  23. Solving recurrence relations Finding a formula for the n th term of the sequence generated by a recurrence relation is called solving the recurrence relation Such a formula is called a closed formula Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 7 / 14

  24. Solving recurrence relations Finding a formula for the n th term of the sequence generated by a recurrence relation is called solving the recurrence relation Such a formula is called a closed formula Various more advanced methods for solving recurrence relations are covered in Chapter 8 of the book (not part of this course) Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 7 / 14

  25. Solving recurrence relations Finding a formula for the n th term of the sequence generated by a recurrence relation is called solving the recurrence relation Such a formula is called a closed formula Various more advanced methods for solving recurrence relations are covered in Chapter 8 of the book (not part of this course) Here we illustrate by example the method of iteration in which we need to guess the formula Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 7 / 14

  26. Solving recurrence relations Finding a formula for the n th term of the sequence generated by a recurrence relation is called solving the recurrence relation Such a formula is called a closed formula Various more advanced methods for solving recurrence relations are covered in Chapter 8 of the book (not part of this course) Here we illustrate by example the method of iteration in which we need to guess the formula The guess can be proved correct by the method of induction (to be covered) Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 7 / 14

  27. Iterative solution - working upwards Forward substitution Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 8 / 14

  28. Iterative solution - working upwards Forward substitution a n = a n − 1 + 3 for n ≥ 2 with a 1 = 2 Colin Stirling (Informatics) Discrete Mathematics (Section 2.4) Today 8 / 14

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend