Week #10 – 28/30 October and 1 November 2002 Prof. Marie desJardins

Slides:



Advertisements
Similar presentations
Chapter Recurrence Relations
Advertisements

Fall 2002CMSC Discrete Structures1 Now it’s Time for… RecurrenceRelations.
Recursive Definitions and Structural Induction
CS 2210 (22C:19) Discrete Structures Advanced Counting
April 9, 2015Applied Discrete Mathematics Week 9: Relations 1 Solving Recurrence Relations Another Example: Give an explicit formula for the Fibonacci.
Chapter Recurrence Relations
Part 5. Computational Complexity (3)
CSE115/ENGR160 Discrete Mathematics 04/19/12 Ming-Hsuan Yang UC Merced 1.
Transparency No. 5-1 Discrete Mathematics Chapter 5 Advanced Counting Techniques.
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.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Analysis of Recursive Algorithms October 29, 2014
Applied Discrete Mathematics Week 9: Relations
Advanced Counting Techniques
September1999 CMSC 203 / 0201 Fall 2002 Week #11 – 4/6/8 November 2002 Prof. Marie desJardins.
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.
Week #7 – 7/9/11 October 2002 Prof. Marie desJardins
Ch. 7: Advanced Counting Techniques
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.
R. Johnsonbaugh Discrete Mathematics 7 th edition, 2009 Chapter 7 Recurrence Relations Instructor Tianping Shuai.
Module #17: Recurrence Relations Rosen 5 th ed., §
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/18 Module.
September1999 CMSC 203 / 0201 Fall 2002 Week #8 – 14/16 October 2002 Prof. Marie desJardins.
Sequences and Summations
Chapter 7 Advance Counting Techniques. Content Recurrence relations Generating function The principle of inclusion-exclusion.
Recurrence Relations: Selected Exercises
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
September1999 CMSC 203 / 0201 Fall 2002 Week #9 – 21/23/25 October 2002 Prof. Marie desJardins.
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:
September1999 CMSC 203 / 0201 Fall 2002 Week #1 – 28/30 August 2002 Prof. Marie desJardins.
Discrete Mathematics Recurrence Relations Chapter 5 R. Johnsonbaugh
September1999 CMSC 203 / 0201 Fall 2002 Week #13 – 18/20/22 November 2002 Prof. Marie desJardins.
7.3 Divide-and-Conquer Algorithms and Recurrence Relations If f(n) represents the number of operations required to solve the problem of size n, it follow.
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.
Agenda Lecture Content:  Recurrence Relations  Solving Recurrence Relations  Iteration  Linear homogenous recurrence relation of order k with constant.
ADVANCED ALGORITHMS REVIEW OF ANALYSIS TECHNIQUES (UNIT-1)
Recurrence Relations. Outline Recurrence relationsSolving recurrence relationsRecurrence and Divide-and-conquer algorithmsGenerating functions
September1999 CMSC 203 / 0201 Fall 2002 Week #15 – 2/4/6 December 2002 Prof. Marie desJardins.
September1999 CMSC 203 / 0201 Fall 2002 Week #14 – 25/27 November 2002 Prof. Marie desJardins clip art courtesy of
Discrete Mathematics Lecture # 22 Recursion.  First of all instead of giving the definition of Recursion we give you an example, you already know the.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Mathematical Induction And Recursion Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
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.
CMSC Discrete Structures
Advanced Counting Techniques
Modeling with Recurrence Relations
Applied Discrete Mathematics Week 11: Relations
Discrete Math (2) Haiming Chen Associate Professor, PhD
Week #5 – 23/25/27 September 2002 Prof. Marie desJardins
Week #3 – 9/11/13 September 2002 Prof. Marie desJardins
Week #6 – 30 September / 2/4 October 2002 Prof. Marie desJardins
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.
ICS 253: Discrete Structures I
Presentation transcript:

Week #10 – 28/30 October and 1 November 2002 Prof. Marie desJardins CMSC 203 / 0201 Fall 2002 Week #10 – 28/30 October and 1 November 2002 Prof. Marie desJardins

TOPICS Recurrence relations and solutions Divide-and-conquer recurrences

MON 10/28 RECURRENCE RELATIONS (5.1)

Concepts/Vocabulary Recurrence relations Solution / solution sequence Initial conditions Useful examples: compound interest, bunny rabbits / Fibonacci, Tower of Hanoi, Catalan numbers

Examples Exercise 5.1.4: For each of the following sequences, find a recurrence relation satisfied by this sequence: (b) an = 2n (d) an = 5n (f) an = n2 + n (g) an = n + (-1)n

Examples II Save early and often: Exercise 5.1.6: A person deposits $1000 in an account that yields 9% interest compounded yearly. (a) Set up a recurrence relation for the amount in the acount at the end of n years. (b) Find an explicit formula for the amount in the account at the end of n years. (c) How much money will the account contain after 100 years?

Examples III Exercise 5.1.11: Use mathematical induction to verify the formula derived in Example 5 for the number of moves required to complete the Tower of Hanoi puzzle: Hn = 2n - 1 Catalan numbers: Example 5.1.8 (p. 315): Find a recurrence relation for Cn, the number of ways to parenthesize the product of n+1 numbers, x0x1…xn. Cn = k=0n-1 Ck Cn-k-1 C0 = C1 = 1

Examples IV Exercise 5.23: A ternary string contains only 0s, 1s, and 2s. (a) Find a recurrence relation for the number of ternary strings that do not contain two consecutive 0s. (b) What are the initial conditions? (c) How many ternary strings of length six do not contain two consecutive 0s? Exercise 5.25: (a) Find a recurrence relation for the number of ternary strings that do not contain two consecutive 0s or two consecutive 1s. (c) How many ternary strings of length six do not contain two consecutive 0s or two consecutive ones?

WED 10/30 - FRI 11/1 DIVIDE-AND-CONQUER (5.3) ** HOMEWORK #7 DUE ** ** FEEDBACK SESSION TODAY **

Concepts / Vocabulary Divide-and-conquer recurrence relations f(n) = a f(n/b) + g(n)

Examples Exercise 5.3.7: Suppose that f(n) = f(n/3) + 1 when n is divisible by 3, and f(1) = 1. Find (a) f(3) (b) f(27) (c) f(729) = f(36) Fast multiplication (Example 5.3.3, p. 333) ab = (22n + 2n) A1B1 + 2n(A1-A0)(B0-B1) + (2n+1)A0B0 Exercise 5.3.3: Multiply (1110)2 and (1010)2 using the fast multiplication algorithm. Exercise 5.3.4: Express the fast multiplication algorithm in pseudocode.

Examples II Exercises 5.3.14-16: Suppose that there are n = 2k teams in an elimination tournament, where there are n/2 games in the first round, with the n/2 = 2k-1 winners playing in the second round, and so on. Develop a recurrence relation for the number of rounds in the tournament. How many rounds are there when there are 32 teams? Solve the recurrence relation for the number of rounds in the tournament.

Examples III Theorem 1: for a recurrence relation f(n) = a f(n/b) + c whenever b|n, a1, integer b>1, and real c>0, f(n) = O(nlogba) if a > 1 and f(n) = O(log n) if a=1.