ICS 253: Discrete Structures I

Slides:



Advertisements
Similar presentations
Chapter Recurrence Relations
Advertisements

Fall 2002CMSC Discrete Structures1 Now it’s Time for… RecurrenceRelations.
Chapter 6 Advanced Counting 6.1 Recurrence Relations.
BCT 2083 DISCRETE STRUCTURE AND APPLICATIONS
CS 2210 (22C:19) Discrete Structures Advanced Counting
Chapter Recurrence Relations
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 04/21/11 Ming-Hsuan Yang UC Merced 1.
1 Section 6.1 Recurrence Relations. 2 Recursive definition of a sequence Specify one or more initial terms Specify rule for obtaining subsequent terms.
6.Advanced Counting Techniques 1 Copyright M.R.K. Krishna Rao 2003 Ch 6. Recurrence Relations A recurrence relation for the sequence {a n } is an equation.
Applied Discrete Mathematics Week 9: Relations
Advanced Counting Techniques
Jessie Zhao Course page: 1.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Chap. 7 (c) , Michael P. Frank1 Chapter 7: Advanced Counting Techniques.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Recurrence Relation. Outline  What is a recurrence relation ?  Solving linear recurrence relations  Divide-and-conquer algorithms and recurrence relations.
CSE 2813 Discrete Structures Recurrence Relations Section 6.1.
15.1 CompSci 102© Michael Frank Today’s topics Recurrence relationsRecurrence relations –Stating recurrences –LiHoReCoCo Reading: Sections Reading:
Solving Second-Order Recursive Relations Lecture 36 ½ Section 8.3 Wed, Apr 19, 2006.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
Sequences and Summations
Chapter 7 Advance Counting Techniques. Content Recurrence relations Generating function The principle of inclusion-exclusion.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Module #1 - Logic 1 Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank and Modified By Mingwu Chen Recurrence.
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”
Sequences and Summations Section 2.4. Section Summary Sequences. – Examples: Geometric Progression, Arithmetic Progression Recurrence Relations – Example:
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
CHAPTER TWO RECURRENCE RELATION
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.
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.
Discrete Mathematics Chapter 6 Advanced Counting Techniques.
Recurrence Relations. Outline Recurrence relationsSolving recurrence relationsRecurrence and Divide-and-conquer algorithmsGenerating functions
Mathematical Analysis of Recursive Algorithm CSG3F3 Lecture 7.
Solving Linear Homogeneous Recurrence Relations ICS 6D Sandy Irani.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Advanced Counting Techniques
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
CMSC Discrete Structures
Advanced Counting Techniques
ICS 253: Discrete Structures I
ICS 253: Discrete Structures I
Modeling with Recurrence Relations
Applied Discrete Mathematics Week 11: Relations
A0=0 a1=2 an a2=6 an-1 a3=12 a4=20 a2 a1 a0.
UNIT-6 Recurrence Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Module #17: Recurrence Relations
ICS 353: Design and Analysis of Algorithms
Module #17: Recurrence Relations
Recursion and Recurrence Relations
CS 2210 Discrete Structures Advanced Counting
CMSC Discrete Structures
Solving Recurrence Relations
Applied Discrete Mathematics Week 7: Computation
CMSC Discrete Structures
Recurrence Relations Discrete Structures.
Chapter 7 Advanced Counting Techniques
Recurrence Relations (RRs)
Recurrence Relations.
Recurrence Relations Rosen 5th ed., §6.2 5/22/2019
ICS 353: Design and Analysis of Algorithms
Presentation transcript:

ICS 253: Discrete Structures I King Fahd University of Petroleum & Minerals Information & Computer Science Department ICS 253: Discrete Structures I Advanced Counting Techniques

Reading Assignment K. H. Rosen, Discrete Mathematics and Its Applications, 6th Ed., McGraw-Hill, 2006. Chapter 7 (Sections 7.1 and 7.2 up to the end of page 464)

Section 7.1: Recurrence Relations A recurrence relation for the sequence {an} is an equation that expresses an in terms of one or more of the previous terms of the sequence, namely, a0, a1, . . . , an – 1, for all integers n with n  n0, where n0 is a nonnegative integer. A sequence is called a solution of a recurrence relation if its terms satisfy the recurrence relation.

Examples Q1 pp456: Find the first five terms of the sequence defined by each of these recurrence relations and initial conditions. a) an = 6an – 1, a0 = 2 c) an = an – 1 + 3an – 2, a0 = 1, al = 2 e) an = an – 1 + an – 3, a0 = 1, al = 2, a2 = 0

Examples Q4 pp 456: Show that the sequence {an} is a solution of the recurrence relation an = – 3an – 1 + 4an – 2 if a) an = 0. b) an = 1. c) an = (– 4)n. d) an = 2(– 4)n + 3.

Examples Suppose that a person deposits $10,000 in a savings account at a bank yielding 11% per year with interest compounded annually. How much will be in the account after 30 years?

Examples Find a recurrence relation and give initial conditions for the number of bit strings of length n that do not have two consecutive 0s. How many such bit strings are there of length five?

Examples Q23, pp458: Find a recurrence relation for the number of bit strings of length n that contain a pair of consecutive 0s. What are the initial conditions? How many bit strings of length seven contain two consecutive 0s?

Examples A computer system considers a string of decimal digits a valid codeword if it contains an even number of 0 digits. For instance, 1230407869 is valid, whereas 120987045608 is not valid. Let an be the number of valid n-digit codewords. Find a recurrence relation for an.

Examples Find a recurrence relation for Cn, the number of ways to parenthesize the product of n + 1 numbers, x0 . xl . x2 . . . . . xn , to specify the order of multiplication. What is C2? C3? This sequence is called the Catalan Numbers.

Section 7.2:Solving Linear Recurrence Equations We will only consider solving linear homogeneous recurrence equations with constant coefficients. Linear nonhomogeneous recurrence relations with constant coefficients are ommitted. It will be enough for us, especially those related to estimating the complexity of recursive algorithms.

Solving Linear Homogeneous Recurrence Relations with Constant Coefficients A linear homogeneous recurrence relation of degree k with constant coefficients is a recurrence relation of the form where c1, c2, . . . , ck are real numbers, and ck  0.

Solving Linear Homogeneous Recurrence Relations with Constant Coefficients Theorem: Let c1, c2, . . . , ck be real numbers. Suppose that the characteristic equation has k distinct roots r1, r2, . . . , rk. Then a sequence {an} is a solution of the recurrence relation if and only if for n=0,1, 2, … where 1, 2, . . . , k are constants.

Example 1 Q3, pp 471: Solve these recurrence relations together with the initial conditions given. (d) an = 4an – 1 – 4an – 2 for n  2, a0 = 6, a1 = 8.

Example 2 Q3, pp 471: Solve these recurrence relations together with the initial conditions given. (f) an = 4an – 2 for n  2, a0 = 0, a1 = 4.