1 / 8

Discrete Mathematics Lecture 8

Discrete Mathematics Lecture 8. Alexander Bukharovich New York University. Recursive Sequences.

guy
Télécharger la présentation

Discrete Mathematics Lecture 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete MathematicsLecture 8 Alexander Bukharovich New York University

  2. Recursive Sequences • A recurrence relation for a sequence a0, a1, a2, … is a formula that relates each term ak 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

  3. Exercises • A row in a classroom has n seats. Let sn 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 sn. • 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 Fn < 2n • Prove that gcd(Fn+1, Fn) = 1

  4. Solving Recurrences • Iteration method • Telescoping • Range transformation • Domain transformation • Recurrences involving sum

  5. Exercises • Find an explicit formula for: xk = 3xk-1 + k with x1 = 1 wk = wk-2 + k with w1 = 1, w2 = 2 uk = uk-2 * uk-1with u0 = u1 = 2

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

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

  8. O-notation • Function f(n) is of order g(n), written f = O(g), when there exists number M such that there exists number n0 so that for all n > n0 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 > n0 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

More Related