Topics to be Covered - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Topics to be Covered

Description:

2. Given any term, add 3 to get the. next term. If we list the terms we get. 5, 8, 11, 14, 17, ... an = an-1 3 where n 2. OR. an = 1 n=1. an-1 3 n 2. This ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 13
Provided by: mona1
Category:
Tags: covered | dmcs | topics

less

Transcript and Presenter's Notes

Title: Topics to be Covered


1
Topics to be Covered
  • Generating Functions
  • Recurrence Functions

2
Recurrence Relations
  • Consider the following
  • 1. start with 5
  • 2. Given any term, add 3 to get the next
    term
  • If we list the terms we get
  • 5, 8, 11, 14, 17,

3
Recurrence Relations
  • If we write the terms in this list as a1, a2,
    an, we get
  • a1 5
  • an an-1 3 where n 2
  • OR
  • an 1 n1
  • an-1 3 n 2
  • This is an example of a recurrence relation

4
Recurrence Relations
  • A recurrence relation for the sequence a0, a1,
    a2, is an equation that relates an to certain
    of its predecessors a0, a1, ,an-1
  • Initial conditions for the sequence a0, a1,
    ,an-1 are explicitly given values for a finite
    number of terms of the sequence

5
Example
  • Write down the first five terms of the sequence
    defined by a1 1, ak1 3ak1 for k 1
  • a1 1
  • a2 3a11 3(1)1 4
  • a3 3a21 3(4)1 13
  • a4 40
  • a5 121
  • .
  • .
  • .
  • an ?

6
Example
  • In this case a formula for the nth term is as
    follows
  • an (1/2)(3n -1)
  • This is what is called a solution to the
    recurrence relation a0 1, ak1 3ak1 for k 1
  • Generating functions may be used to solve
    recurrence relations

7
Example
  • Solve the recurrence relation
  • a0 1
  • an 3an-1 , n1
  • Solution,
  • Consider the generating function
  • f(x) a0a1x a2x2 anxn
  • 3xf(x) 3a0x3a1x23an-1xn
  • Subtracting

8
Example
  • Subtracting
  • f(x)-3xf(x) a0 (a1- 3a0)x (a2- 3a1)x2
    (an- 3an-1)xn
  • Now Substituting a0 1, a1 3a2 ,, an
    3an-1
  • (1-3x)f(x) 1
  • f(x) 1 / (1-3x)
  • Recall 1 1xx2xn
  • 1-x
  • So 1 13x(3x)2(3x)n
  • 1-3x
  • 13x9x23nxn

9
Example
  • an is the coefficient of the xn term in f(x)
  • an 3n
  • is the solution of the recurrence relation
  • 1 , n0
  • an
  • 3a , n1

10
Example
  • Solve the recurrence relation an 2an-1 an-2,
    ngt1, given a0 3 and a1 -2
  • Solution
  • f(x) a0a1x a2x2 anxn
  • 2xf(x) 2a0x2a1x2 2an-1xn
  • x2f(x) a0x2 an-2xn
  • Therefore,

11
Example
  • f(x)-2xf(x)x2 f(x)
  • a0(a1-2a0)x(a2-2a1a0)x2(an-2an-1an-2)xn
  • 3-8x
  • Since a0 3
  • a1 -2
  • an 2an-1an-2 0 for n gt1
  • Now, f(x)-2xf(x)x2 f(x) f(x)(1-x)2 3-8x
  • Therefore, f(x) 3-8x
  • (1-x)2

12
Example
  • Now recall
  • 1 12x3x24x3(n1)xn
  • (1-x)2
  • So, f(x) (12x3x2(n1)xn)(3-8x)
  • 32x7x212x33(n1) 8nxn
  • 32x7x212x3-5n 3xn
  • And so an 3- 5n is the solution to the
    recurrence relation.
Write a Comment
User Comments (0)
About PowerShow.com