Internet Engineering Czesław Smutnicki Discrete Mathematics – Recursive Equations.

Slides:



Advertisements
Similar presentations
Section 9.1 – Sequences.
Advertisements

Choi 2012 Arithmetic Sequence A sequence like 2, 5, 8, 11,…, where the difference between consecutive terms is a constant, is called an arithmetic sequence.
Geometric Sequences.
Introduction Geometric sequences are exponential functions that have a domain of consecutive positive integers. Geometric sequences can be represented.
Discrete Mathematics Lecture 8 Alexander Bukharovich New York University.
Geometric Sequences A geometric sequence (or geometric progression) is a sequence in which each term after the first is obtained by multiplying the preceding.
CS 2210 (22C:19) Discrete Structures Advanced Counting
Geometric Sequences and Series
Section 5.7 Arithmetic and Geometric Sequences
Discrete Structures Chapter 6 Recurrence Relations
Objectives Find terms of a geometric sequence, including geometric means. Find the sums of geometric series.
A geometric sequence is a list of terms separated by a constant ratio, the number multiplied by each consecutive term in a geometric sequence. A geometric.
Notes Over 11.3 Geometric Sequences
Choi Geometric Sequence A sequence like 3, 9, 27, 81,…, where the ratio between consecutive terms is a constant, is called a geometric sequence. In a.
11.3 – Geometric Sequences.
Geometric Sequences and Series
Advanced Counting Techniques
Sullivan Algebra and Trigonometry: Section 13.2 Objectives of this Section Determine If a Sequence Is Arithmetic Find a Formula for an Arithmetic Sequence.
Arithmetic Sequences. A mathematical model for the average annual salaries of major league baseball players generates the following data. 1,438,0001,347,0001,256,0001,165,0001,074,000983,000892,000801,000.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 5.7 Arithmetic and Geometric Sequences.
Unit 6: Modeling Mathematics 3 Ms. C. Taylor. Warm-Up.
Discrete Mathematics, 1st Edition Kevin Ferland
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
1 Section 5.5 Solving Recurrences Any recursively defined function ƒ with domain N that computes numbers is called a recurrence or recurrence relation.
RECURRENCE Sequence Recursively defined sequence
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
The Quadratic Formula. What does the Quadratic Formula Do ? The Quadratic formula allows you to find the roots of a quadratic equation (if they exist)
Section 2.4. Section Summary Sequences. Examples: Geometric Progression, Arithmetic Progression Recurrence Relations Example: Fibonacci Sequence Summations.
Chapter 8 With Question/Answer Animations. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Infinities 1 sequences and series. Sequence – an ordered set of numbers or other objects.
13.4 Geometric Sequences and Series Example:3, 6, 12, 24, … This sequence is geometric. r is the common ratio r = 2.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Geometric Sequences.
Arithmetic and Geometric Sequences Finding the nth Term 2,4,6,8,10,…
Geometric Sequences & Series This chapter focuses on how to use find terms of a geometric sequence or series, find the sum of finite and infinite geometric.
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.
Essential Questions Introduction to Sequences
Daily Check 1)Find the first 3 terms of the following sequence: 2)Write the formula for the following arithmetic sequence. -2, 1, 4, 7, 10.
Discrete Mathematics Lecture # 22 Recursion.  First of all instead of giving the definition of Recursion we give you an example, you already know the.
Algebra II Honors POD Find the first six terms of the sequence defined as follows: Homework: p odds.
11.3 Geometric Sequences & Series. What is a geometric sequence? What is the rule for a geometric sequence? How do you find the nth term given 2 terms?
+ 8.4 – Geometric Sequences. + Geometric Sequences A sequence is a sequence in which each term after the first is found by the previous term by a constant.
Homogeneous Linear Recurrences To solve such recurrences we must first know how to solve an easier type of recurrence relation: DEF: A linear recurrence.
{1, 1, 2, 3, 5, 8, 13, 21,...} What is this? Fibonacci Sequence.
Discrete Math For Computing II. Contact Information B. Prabhakaran Department of Computer Science University of Texas at Dallas Mail Station EC 31, PO.
Given an arithmetic sequence with
Using Number Sense to Solve One-Step Equations
Geometric Sequences.
Geometric Sequences and Series
11.2 Arithmetic Sequences.
Using Number Sense to Solve One-Step Equations
Introduction to Recurrence Relations
Opracowanie językowe dr inż. J. Jarnicki
Algebra substitution.
11.3 Geometric sequences; Geometric Series
Series & Sequences.
Patterns & Sequences Algebra I, 9/13/17.
11.3 – Geometric Sequences.
Finite Geometric Series
Geometric Sequences.
Section 5.7 Arithmetic and Geometric Sequences
Coordinate Algebra Day 54
Number Patterns.
10.2 Arithmetic Sequences and Series
Geometric Sequences and Series
Geometric Sequences and series
Sequence.
Warm-Up Honors Algebra 2 9/7/18
Presentation transcript:

Internet Engineering Czesław Smutnicki Discrete Mathematics – Recursive Equations

CONTENT S Recursive equations Generating functions

HANOI TOWERS ABC

HANOI TOWERS cont. lr(n) – the number of moves (for n discs). n=0, lr(0)=0 n=1 ALG(1) K1: move disc on C.lr(1)=1 n=2 ALG(2) K1: small on B; K2: large on C K3: small on C;lr(2)=3 n=3 ALG(3) K1: small on C; K2: medium on B K3: small on B K4: large on C K5: small on A K6: medium on C K7: small on C lr(3)=7 n=4 ALG(4) KROK 1: 3 upper discs from A on B (alg. ALG(3))lr(3) KROK 2: large na C1 move KROK 3: 3 upper discs from B on C (alg. ALG(3))lr(3) lr(4)=2lr(3)+1

HANOI TOWERS cont. n lr(n) Generally lr(n)=2lr(n-1)+1=2n-1 with initial condition lr(0)=0.

FIBONACCI NUMBERS Fibonacci numbers a)Recursive formula F 1 = 1;F 2 = 1; F n = F n-1 + F n-2, dla n > 2 b) Analytically

RABBITS M M M M M M M R RARA RARA RARA RARA RARA RARA RARA RARA RARA RARA M RARA pary okresy

CIRCLES 1 = = 2 = = 4 = Similarly for n=3 we have: = 8 = 2 3 for n=4 we have: = 16 = 2 4

SOLUTION METHOD. CASE STUDY I Given recursive sequence: (1) a n = 2 a n-1 + 1, n > 1 with initial value a 1 =1 The sequence starts from: 1, 3, 7, 15, 31, Find algebraic formula for the n-th element of the sequence. For n-1 we have: a n-1 =2 a n-2 + 1, which we substitute into equation (1). Such substitution we continue until we obtain a 1, so a n = 2·a n = 2·(2·a n-2 + 1) + 1 = 2 2 ·a n = = 2 2 ·(2·a n-3 + 1) = 2 3 ·a n =... = 2 k a n-k + 2 k k = = 2 n n = 2 n – 1

SOLUTION METHOD. CASE STUDY I. cont This is the sum of a geometric sequence with the ratio q=a i+1 /a i =2 and a 1 =1; so S= (1-2 n )/(1-2) = - (1-2 n ) = 2 n –1. Therefore a n =2 n –1. We can check this below. n a n =2a n-1 + 1a n = 2 n *1 + 1 = 3 2*3 + 3 = 7 2*7 + 1 = 15 2* = – 1=3 2 3 –1 =7 2 4 – 1= – 1=31

SOLUTION METHOD. CASE STUDY II. Consider the equation: s n = as n-1 + bs n-2 where values s 0 and s 1 are known, and a,b - are certain constants Case a) either a = 0 or b = 0 If b=0 then s n = as n-1 for n  1. Therefore s 1 = as 0, s 2 = as 1 = a 2 s 0,... and finally s n = a n s 0. If a = 0 then s n = bs n-2 for n  2. Therefore s 2 =bs 0, s 4 =bs 2 =b 2 s 0 and finally … s 2n =b n s 0 n  N Similarly s 3 = bs 1, s 5 = bs 3 = b 2 s 1 and finally s 2n+1 = b n s 1 n  N

SOLUTION METHOD. CASE STUDY II. cont Case b) a ≠ 0 or b ≠ 0 has characteristics equation x 2 - ax - b = 0 This equation follows from the suppositionfor the given constant c. Hence dividing by C we obtain then r is the root of the equation x 2 - ax - b = 0

Thank you for your attention DISCRETE MATHEMATICS Czesław Smutnicki