Discrete Mathematics Lecture 8 Alexander Bukharovich New York University.

Slides:



Advertisements
Similar presentations
Week 6 - Wednesday CS322.
Advertisements

1 Recursive Algorithm Analysis Dr. Ying Lu RAIK 283: Data Structures & Algorithms September 13, 2012.
Appendix B Solving Recurrence Equations : With Applications to Analysis of Recursive Algorithms.
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
Discrete Structures Chapter 6 Recurrence Relations
Chapter 9 Recurrence Relations and Generating Functions.
1 CSE 20 Lecture 12: Analysis of Homogeneous Linear Recursion CK Cheng May 5, 2011.
1 Linear Recurrence Relations Part I Jorge Cobb The University of Texas at Dallas.
Applied Discrete Mathematics Week 9: Relations
7.2 Solving Recurrence Relations. Definition 1 (p. 460)- LHRR-K Def: A linear homogeneous recurrence relations of degree k with constant coefficients.
Advanced Counting Techniques
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Equality and Inequality Meeting 4. Equations An equation is a statement that two mathematical expressions are equal. The values of the unknown that make.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Solving Recurrence Lecture 19: Nov 25. Some Recursive Programming (Optional?)
Lecture#16 Discrete Mathematics. Recursion Now, 1 is an odd positive integer by the definition base. With k = 1, = 3, so 3 is an odd positive integer.
Recurrence Relation. Outline  What is a recurrence relation ?  Solving linear recurrence relations  Divide-and-conquer algorithms and recurrence relations.
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
RECURRENCE Sequence Recursively defined sequence
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Recurrence.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
after UCI ICS/Math 6A, Summer AdvancedCounting -1 Recurrence Relations (RRs) A “Recurrence Relation”
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Recursion. The Fibonacci sequence presented in 1201 by Leonardo Fibonacci is one of the most famous. It looks like this 1, 1, 2, 3, 5, 8, 13, 21, 34,
1 Topics Recursion sections 8.1 – Recursion A recursively defined sequence –First, certain initial values are specified –Later terms of the sequence.
Discrete Mathematics Recurrence Relations Chapter 5 R. Johnsonbaugh
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Chapter 8 Recursion. 8.3 More Recurrence Second-Order Recurrence Definition – A second-order linear homogeneous recurrence relation with constant coefficients.
CHAPTER TWO RECURRENCE RELATION
Foundations of Discrete Mathematics Chapters 5 By Dr. Dalia M. Gil, Ph.D.
7.2 Solving Linear Recurrence Relations Some of these recurrence relations can be solved using iteration or some other ad hoc technique. However, one important.
Asymptotics and Recurrence Equations Prepared by John Reif, Ph.D. Analysis of Algorithms.
CSE 2813 Discrete Structures Solving Recurrence Relations Section 6.2.
Agenda Lecture Content:  Recurrence Relations  Solving Recurrence Relations  Iteration  Linear homogenous recurrence relation of order k with constant.
Infinite Geometric Series Recursion & Special Sequences Definitions & Equations Writing & Solving Geometric Series Practice Problems.
Internet Engineering Czesław Smutnicki Discrete Mathematics – Recursive Equations.
RECURRENCE Sequence Recursively defined sequence
PreCalculus Section 1.6 Solve quadratic equations by: a. Factoring b. Completing the square c. Quadratic formula d. Programmed calculator Any equation.
1 RECURRENCE 1. Sequence 2. Recursively defined sequence 3. Finding an explicit formula for recurrence relation.
Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence.
Mathematical Analysis of Recursive Algorithm CSG3F3 Lecture 7.
(Unit 5) Formulas and Definitions:. Arithmetic Sequence. A sequence of numbers in which the difference between any two consecutive terms is the same.
Chapter 2 Fundamentals of the Analysis of Algorithm Efficiency Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Solving Linear Homogeneous Recurrence Relations ICS 6D Sandy Irani.
Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar Dr Nazir A. Zafar Advanced Algorithms Analysis and Design.
1 Lecture Outline for Recurrences Already Covered: Recursive definition of sequences Recursive definition of sets Recursive definition of operations Recursive.
Discrete Math For Computing II. Contact Information B. Prabhakaran Department of Computer Science University of Texas at Dallas Mail Station EC 31, PO.
CSG523/ Desain dan Analisis Algoritma
CSG523/ Desain dan Analisis Algoritma
PreCalculus Section 1. 6 Solve quadratic equations by: a. Factoring b
CMSC Discrete Structures
Recursion and Recurrence Relations
Aim: What are the properties of a quadratic equation?
Modeling with Recurrence Relations
3.5 Recurrence Relations.
Introduction to Recurrence Relations
Opracowanie językowe dr inż. J. Jarnicki
SEQUENCES AND SERIES.
What comes Next? Lesson 3.11.
Module 1 Quiz Review.
Comparing and Contrasting Functions
CMSC Discrete Structures
Solving Recurrence Relations
CMSC Discrete Structures
Recurrence Relations Discrete Structures.
Module 3 Arithmetic and Geometric Sequences
Recurrence Relations Rosen 5th ed., §6.2 5/22/2019
Presentation transcript:

Discrete Mathematics Lecture 8 Alexander Bukharovich New York University

Recursive Sequences A recurrence relation for a sequence a 0, a 1, a 2, … is a formula that relates each term a k to certain collection of its predecessors. Each recurrence sequence needs initial conditions that make it well-defined Famous recurrences: algebraic and geometric sequences, factorial, Fibonacci numbers Tower of Hanoi problem Compound interest

Exercises A row in a classroom has n seats. Let s n be the number of ways nonempty sets of students can sit in a row so that no two students occupy adjacent seats. Find recurrence for s n. In how many ways can one climb n stairs if one is allowed to move to the next stair or jump through one stair? Show that F n < 2 n Prove that gcd(F n+1, F n ) = 1

Solving Recurrences Iteration method Telescoping Range transformation Domain transformation Recurrences involving sum

Exercises Find an explicit formula for: x k = 3x k-1 + k with x 1 = 1 w k = w k-2 + k with w 1 = 1, w 2 = 2 u k = u k-2 * u k-1 with u 0 = u 1 = 2

Second-Order Homogenous Recurrences Second-order homogeneous relation with constant coefficients is a relation of the form: a k = A * a k-1 + B * a k-2, where A and B are constants Characteristics equation Distinct roots case: Fibonacci numbers Single root case: gambler’s ruin

Classes of Functions Constants Polynoms: linear, quadratic Exponents Logarithms Functions in between Relationship between different classes

O-notation Function f(n) is of order g(n), written f = O(g), when there exists number M such that there exists number n 0 so that for all n > n 0 we have f(n) <= M * g(n) If f is O(g), then g is  (f), or in other words, when for all numbers M and for all numbers no, there exists n > n 0 such that f(n) > M * g(n) If f is O(g) and g is O(f), then we say that f is  (g) or that f and g are of the same order