Discrete Mathematics with Applications MATH236 Dr. Hung P. - - PowerPoint PPT Presentation

discrete mathematics with applications math236
SMART_READER_LITE
LIVE PREVIEW

Discrete Mathematics with Applications MATH236 Dr. Hung P. - - PowerPoint PPT Presentation

Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 /


slide-1
SLIDE 1

Discrete Mathematics with Applications MATH236

  • Dr. Hung P. Tong-Viet

School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus

Semester 1, 2013

Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 16

slide-2
SLIDE 2

Table of contents

1

Recursion

2

Solving linear recurrence relations

Tong-Viet (UKZN) MATH236 Semester 1, 2013 2 / 16

slide-3
SLIDE 3

Recursion

Recursion

Sometimes, it is difficult to define an object explicitly. It may be easy to define this object in terms of itself

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 16

slide-4
SLIDE 4

Recursion

Recursion

Sometimes, it is difficult to define an object explicitly. It may be easy to define this object in terms of itself This process is called recursion

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 16

slide-5
SLIDE 5

Recursion

Recursion

Sometimes, it is difficult to define an object explicitly. It may be easy to define this object in terms of itself This process is called recursion We can use resursion to define sequences, functions and sets

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 16

slide-6
SLIDE 6

Recursion

Recursion

Sometimes, it is difficult to define an object explicitly. It may be easy to define this object in terms of itself This process is called recursion We can use resursion to define sequences, functions and sets When define a set recursively, we specify some initial elements in a basis step and provide a rule for constructing new elements from those we already have in the recursive step

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 16

slide-7
SLIDE 7

Recursion

Recursion

Sometimes, it is difficult to define an object explicitly. It may be easy to define this object in terms of itself This process is called recursion We can use resursion to define sequences, functions and sets When define a set recursively, we specify some initial elements in a basis step and provide a rule for constructing new elements from those we already have in the recursive step

Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 16

slide-8
SLIDE 8

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-9
SLIDE 9

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-10
SLIDE 10

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Such a definition is called a recursive or inductive definition

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-11
SLIDE 11

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Such a definition is called a recursive or inductive definition For example, the function f is defined recursively by f (0) = 3 and f (n + 1) = 2f (n) + 2

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-12
SLIDE 12

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Such a definition is called a recursive or inductive definition For example, the function f is defined recursively by f (0) = 3 and f (n + 1) = 2f (n) + 2 The Fibonacci numbers, f0, f1, · · · , are defined by the equations f0 = f1 = 1 and fn = fn−1 + fn−2

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-13
SLIDE 13

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Such a definition is called a recursive or inductive definition For example, the function f is defined recursively by f (0) = 3 and f (n + 1) = 2f (n) + 2 The Fibonacci numbers, f0, f1, · · · , are defined by the equations f0 = f1 = 1 and fn = fn−1 + fn−2 n! is defined recursively.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-14
SLIDE 14

Recursion

Recursively defined functions

We use two steps to define a function with the set of nonnegative integers as its domain:

1

Basis Step: Specify the value of the function at zero

2

Recursive Step: Give a rule for finding its value at an integer from its values at smaller integers

Such a definition is called a recursive or inductive definition For example, the function f is defined recursively by f (0) = 3 and f (n + 1) = 2f (n) + 2 The Fibonacci numbers, f0, f1, · · · , are defined by the equations f0 = f1 = 1 and fn = fn−1 + fn−2 n! is defined recursively.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 16

slide-15
SLIDE 15

Recursion

Modeling with recurrence relation

Example Suppose that a newly-born pair of rabbits, (one male and one female), are put in a field. Rabbits are able to mate at the age of one month so that at the end

  • f the second month, a female can produce another pair of rabbits.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 16

slide-16
SLIDE 16

Recursion

Modeling with recurrence relation

Example Suppose that a newly-born pair of rabbits, (one male and one female), are put in a field. Rabbits are able to mate at the age of one month so that at the end

  • f the second month, a female can produce another pair of rabbits.

Suppose that our rabbits never die and that the female always produces one new pair (one male, one female) every month from the second month on.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 16

slide-17
SLIDE 17

Recursion

Modeling with recurrence relation

Example Suppose that a newly-born pair of rabbits, (one male and one female), are put in a field. Rabbits are able to mate at the age of one month so that at the end

  • f the second month, a female can produce another pair of rabbits.

Suppose that our rabbits never die and that the female always produces one new pair (one male, one female) every month from the second month on. How many pairs will there be in one year?

Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 16

slide-18
SLIDE 18

Recursion

Modeling with recurrence relation

Example Suppose that a newly-born pair of rabbits, (one male and one female), are put in a field. Rabbits are able to mate at the age of one month so that at the end

  • f the second month, a female can produce another pair of rabbits.

Suppose that our rabbits never die and that the female always produces one new pair (one male, one female) every month from the second month on. How many pairs will there be in one year?

Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 16

slide-19
SLIDE 19

Recursion

Fibonacci numbers

1 At the end of the first month, they mate, but there is still one only

pair

2 At the end of the second month, the female produces a new pair, so

now there are 2 pairs of rabbits in the field

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 16

slide-20
SLIDE 20

Recursion

Fibonacci numbers

1 At the end of the first month, they mate, but there is still one only

pair

2 At the end of the second month, the female produces a new pair, so

now there are 2 pairs of rabbits in the field

3 At the end of the third month, the original female produces a second

pair, making 3 pairs in all in the field.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 16

slide-21
SLIDE 21

Recursion

Fibonacci numbers

1 At the end of the first month, they mate, but there is still one only

pair

2 At the end of the second month, the female produces a new pair, so

now there are 2 pairs of rabbits in the field

3 At the end of the third month, the original female produces a second

pair, making 3 pairs in all in the field.

4 At the end of the fourth month, the original female has produced yet

another new pair, the female born two months ago produces her first pair also, making 5 pairs

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 16

slide-22
SLIDE 22

Recursion

Fibonacci numbers

1 At the end of the first month, they mate, but there is still one only

pair

2 At the end of the second month, the female produces a new pair, so

now there are 2 pairs of rabbits in the field

3 At the end of the third month, the original female produces a second

pair, making 3 pairs in all in the field.

4 At the end of the fourth month, the original female has produced yet

another new pair, the female born two months ago produces her first pair also, making 5 pairs

5 The number of pairs of rabbits in the field at the start of each month

is 1, 1, 2, 3, 5, 8, 13, 21, 34, ...

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 16

slide-23
SLIDE 23

Recursion

Fibonacci numbers

1 At the end of the first month, they mate, but there is still one only

pair

2 At the end of the second month, the female produces a new pair, so

now there are 2 pairs of rabbits in the field

3 At the end of the third month, the original female produces a second

pair, making 3 pairs in all in the field.

4 At the end of the fourth month, the original female has produced yet

another new pair, the female born two months ago produces her first pair also, making 5 pairs

5 The number of pairs of rabbits in the field at the start of each month

is 1, 1, 2, 3, 5, 8, 13, 21, 34, ...

Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 16

slide-24
SLIDE 24

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-25
SLIDE 25

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-26
SLIDE 26

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1 At the end of the second month, the female produces a new pair, so there are two pairs of rabbits in the field f2 = 2

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-27
SLIDE 27

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1 At the end of the second month, the female produces a new pair, so there are two pairs of rabbits in the field f2 = 2 To find the number of pairs after n months, add the number on the island the previous month, fn−1, and the number of newborn pairs, which equals fn−2, because each newborn pair comes from a pair at least 2 months old

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-28
SLIDE 28

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1 At the end of the second month, the female produces a new pair, so there are two pairs of rabbits in the field f2 = 2 To find the number of pairs after n months, add the number on the island the previous month, fn−1, and the number of newborn pairs, which equals fn−2, because each newborn pair comes from a pair at least 2 months old Consequently, the sequence {fn} satisfies the recurrence relation fn = fn−1 + fn−2 for n ≥ 3

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-29
SLIDE 29

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1 At the end of the second month, the female produces a new pair, so there are two pairs of rabbits in the field f2 = 2 To find the number of pairs after n months, add the number on the island the previous month, fn−1, and the number of newborn pairs, which equals fn−2, because each newborn pair comes from a pair at least 2 months old Consequently, the sequence {fn} satisfies the recurrence relation fn = fn−1 + fn−2 for n ≥ 3 together with the conditions f0 = 1 and f1 = 1.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-30
SLIDE 30

Recursion

Fibonacci numbers

Let fn denote the number of pairs of rabbits after n months The rabbit population can be modeled using a recurrence relation At the end of the first month, the number of pair of rabbits is f1 = 1 At the end of the second month, the female produces a new pair, so there are two pairs of rabbits in the field f2 = 2 To find the number of pairs after n months, add the number on the island the previous month, fn−1, and the number of newborn pairs, which equals fn−2, because each newborn pair comes from a pair at least 2 months old Consequently, the sequence {fn} satisfies the recurrence relation fn = fn−1 + fn−2 for n ≥ 3 together with the conditions f0 = 1 and f1 = 1.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 16

slide-31
SLIDE 31

Recursion

Suppose that when a plant puts out a new shoot, that shoot has to grow two months before it is strong enough to support branching If it branches every month after that at the growing point, we get the picture shown below

Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 16

slide-32
SLIDE 32

Recursion

Suppose that when a plant puts out a new shoot, that shoot has to grow two months before it is strong enough to support branching If it branches every month after that at the growing point, we get the picture shown below

Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 16

slide-33
SLIDE 33

Solving linear recurrence relations

Introduction

Definition A linear homogeneous recurrence relation of degree k with constant coefficients is a recurrence relation of the form an = c1an−1 + c2an−2 + · · · ckan−k, where c1, c2, · · · , ck are real numbers, and ck = 0.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 9 / 16

slide-34
SLIDE 34

Solving linear recurrence relations

Introduction

The recurrence relation in the definition is linear because the right-hand side is a sum of previous terms of the sequence each multiplied by a constant. The recurrence relation is homogeneous because no terms occur that are not multiples of the ajs

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 16

slide-35
SLIDE 35

Solving linear recurrence relations

Introduction

The recurrence relation in the definition is linear because the right-hand side is a sum of previous terms of the sequence each multiplied by a constant. The recurrence relation is homogeneous because no terms occur that are not multiples of the ajs The coefficients of the terms of the sequence are all constants, rather than functions that depend on n.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 16

slide-36
SLIDE 36

Solving linear recurrence relations

Introduction

The recurrence relation in the definition is linear because the right-hand side is a sum of previous terms of the sequence each multiplied by a constant. The recurrence relation is homogeneous because no terms occur that are not multiples of the ajs The coefficients of the terms of the sequence are all constants, rather than functions that depend on n. The degree is k because an is expressed in terms of the previous k terms of the sequence

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 16

slide-37
SLIDE 37

Solving linear recurrence relations

Introduction

The recurrence relation in the definition is linear because the right-hand side is a sum of previous terms of the sequence each multiplied by a constant. The recurrence relation is homogeneous because no terms occur that are not multiples of the ajs The coefficients of the terms of the sequence are all constants, rather than functions that depend on n. The degree is k because an is expressed in terms of the previous k terms of the sequence By the principle of mathematical induction, the recurrence relation in the definition is uniquely determined by this recurrence relation and the k initial conditions a0 = C0, a1 = C1, · · · , ak−1 = Ck−1.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 16

slide-38
SLIDE 38

Solving linear recurrence relations

Introduction

The recurrence relation in the definition is linear because the right-hand side is a sum of previous terms of the sequence each multiplied by a constant. The recurrence relation is homogeneous because no terms occur that are not multiples of the ajs The coefficients of the terms of the sequence are all constants, rather than functions that depend on n. The degree is k because an is expressed in terms of the previous k terms of the sequence By the principle of mathematical induction, the recurrence relation in the definition is uniquely determined by this recurrence relation and the k initial conditions a0 = C0, a1 = C1, · · · , ak−1 = Ck−1.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 16

slide-39
SLIDE 39

Solving linear recurrence relations

Examples of linear homogeneous recurrence relations

The recurrence relation Pn = 1.11Pn−1 is a linear homogeneous recurrence relation of degree one. The recurrence relation fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of degree five

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 16

slide-40
SLIDE 40

Solving linear recurrence relations

Examples of linear homogeneous recurrence relations

The recurrence relation Pn = 1.11Pn−1 is a linear homogeneous recurrence relation of degree one. The recurrence relation fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of degree five The recurrence relation an = an−1 + a2

n−2 is not linear

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 16

slide-41
SLIDE 41

Solving linear recurrence relations

Examples of linear homogeneous recurrence relations

The recurrence relation Pn = 1.11Pn−1 is a linear homogeneous recurrence relation of degree one. The recurrence relation fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of degree five The recurrence relation an = an−1 + a2

n−2 is not linear

The recurrence relation Hn = 2Hn−1 + 1 is not homogeneous

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 16

slide-42
SLIDE 42

Solving linear recurrence relations

Examples of linear homogeneous recurrence relations

The recurrence relation Pn = 1.11Pn−1 is a linear homogeneous recurrence relation of degree one. The recurrence relation fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of degree five The recurrence relation an = an−1 + a2

n−2 is not linear

The recurrence relation Hn = 2Hn−1 + 1 is not homogeneous The recurrence relation Bn = nBn−1 is not linear homogeneous as it does not have constant coefficients.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 16

slide-43
SLIDE 43

Solving linear recurrence relations

Examples of linear homogeneous recurrence relations

The recurrence relation Pn = 1.11Pn−1 is a linear homogeneous recurrence relation of degree one. The recurrence relation fn = fn−1 + fn−2 is a linear homogeneous recurrence relation of degree five The recurrence relation an = an−1 + a2

n−2 is not linear

The recurrence relation Hn = 2Hn−1 + 1 is not homogeneous The recurrence relation Bn = nBn−1 is not linear homogeneous as it does not have constant coefficients.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 16

slide-44
SLIDE 44

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations with constant coefficients

Linear homogeneous recurrence relations are studied for two reasons First, they often occur in doodling of problems

Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 16

slide-45
SLIDE 45

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations with constant coefficients

Linear homogeneous recurrence relations are studied for two reasons First, they often occur in doodling of problems Second, they can be systematically solved.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 16

slide-46
SLIDE 46

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations with constant coefficients

Linear homogeneous recurrence relations are studied for two reasons First, they often occur in doodling of problems Second, they can be systematically solved.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 16

slide-47
SLIDE 47

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations with constant coefficients

Linear homogeneous recurrence relations are studied for two reasons First, they often occur in doodling of problems Second, they can be systematically solved.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 16

slide-48
SLIDE 48

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The basic approach for solving linear homogeneous recurrence relations is to look for solutions of the form an = rn, where r is a constant Notice that an is a solution of the recurrence relation an = c1an−1 + c2an−2 + · · · ckan−k if and only if rn = c1rn−1 + c2rn−2 + · · · + ckrn−k

Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 16

slide-49
SLIDE 49

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The basic approach for solving linear homogeneous recurrence relations is to look for solutions of the form an = rn, where r is a constant Notice that an is a solution of the recurrence relation an = c1an−1 + c2an−2 + · · · ckan−k if and only if rn = c1rn−1 + c2rn−2 + · · · + ckrn−k Dividing both sides by rn−k, and the right-hand side is subtracted from the left, we obtain

Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 16

slide-50
SLIDE 50

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The basic approach for solving linear homogeneous recurrence relations is to look for solutions of the form an = rn, where r is a constant Notice that an is a solution of the recurrence relation an = c1an−1 + c2an−2 + · · · ckan−k if and only if rn = c1rn−1 + c2rn−2 + · · · + ckrn−k Dividing both sides by rn−k, and the right-hand side is subtracted from the left, we obtain rk − c1rk−1 − c2rk−2 − · · · − ck = 0.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 16

slide-51
SLIDE 51

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The basic approach for solving linear homogeneous recurrence relations is to look for solutions of the form an = rn, where r is a constant Notice that an is a solution of the recurrence relation an = c1an−1 + c2an−2 + · · · ckan−k if and only if rn = c1rn−1 + c2rn−2 + · · · + ckrn−k Dividing both sides by rn−k, and the right-hand side is subtracted from the left, we obtain rk − c1rk−1 − c2rk−2 − · · · − ck = 0.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 16

slide-52
SLIDE 52

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The sequence {an} with an = rn is a solution if and only if r is a solution of this last equation. We call this the characteristic equation of the recurrence relation.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 16

slide-53
SLIDE 53

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The sequence {an} with an = rn is a solution if and only if r is a solution of this last equation. We call this the characteristic equation of the recurrence relation. The solutions of this equation are called the characteristic roots of the recurrence relation.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 16

slide-54
SLIDE 54

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The sequence {an} with an = rn is a solution if and only if r is a solution of this last equation. We call this the characteristic equation of the recurrence relation. The solutions of this equation are called the characteristic roots of the recurrence relation. As we will see that characteristic roots can be used to give an explicit formula for all the solutions of the recurrence relation

Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 16

slide-55
SLIDE 55

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The sequence {an} with an = rn is a solution if and only if r is a solution of this last equation. We call this the characteristic equation of the recurrence relation. The solutions of this equation are called the characteristic roots of the recurrence relation. As we will see that characteristic roots can be used to give an explicit formula for all the solutions of the recurrence relation We will consider the linear homogeneous recurrence relations of degree two.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 16

slide-56
SLIDE 56

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

The sequence {an} with an = rn is a solution if and only if r is a solution of this last equation. We call this the characteristic equation of the recurrence relation. The solutions of this equation are called the characteristic roots of the recurrence relation. As we will see that characteristic roots can be used to give an explicit formula for all the solutions of the recurrence relation We will consider the linear homogeneous recurrence relations of degree two.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 16

slide-57
SLIDE 57

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

Theorem (Theorem 1) Let c1 and c2 be real numbers. Suppose that r2 − c1r − c2 = 0 has two distinct roots r1 and r2.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 16

slide-58
SLIDE 58

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

Theorem (Theorem 1) Let c1 and c2 be real numbers. Suppose that r2 − c1r − c2 = 0 has two distinct roots r1 and r2. Then the sequence {an} is a solution of the recurrence relation an = c1an−1 + c2an−2 if and only if

Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 16

slide-59
SLIDE 59

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

Theorem (Theorem 1) Let c1 and c2 be real numbers. Suppose that r2 − c1r − c2 = 0 has two distinct roots r1 and r2. Then the sequence {an} is a solution of the recurrence relation an = c1an−1 + c2an−2 if and only if an = α1rn

1 + α2rn 2

for n = 0, 1, · · · , where α1 and α2 are constants.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 16

slide-60
SLIDE 60

Solving linear recurrence relations

Soving Linear Homogeneous recurrence relations

Theorem (Theorem 1) Let c1 and c2 be real numbers. Suppose that r2 − c1r − c2 = 0 has two distinct roots r1 and r2. Then the sequence {an} is a solution of the recurrence relation an = c1an−1 + c2an−2 if and only if an = α1rn

1 + α2rn 2

for n = 0, 1, · · · , where α1 and α2 are constants.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 16

slide-61
SLIDE 61

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16

slide-62
SLIDE 62

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1 Hence the sequence {an} is a solution to the recurrence relation if and only if an = α12n + α2(−1)n for some constants α1 and α2.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16

slide-63
SLIDE 63

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1 Hence the sequence {an} is a solution to the recurrence relation if and only if an = α12n + α2(−1)n for some constants α1 and α2. From the initial conditions, it follows that a0 = 2 = α1 + α2 and a1 = 7 = α1 · 2 + α2 · (−1)

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16

slide-64
SLIDE 64

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1 Hence the sequence {an} is a solution to the recurrence relation if and only if an = α12n + α2(−1)n for some constants α1 and α2. From the initial conditions, it follows that a0 = 2 = α1 + α2 and a1 = 7 = α1 · 2 + α2 · (−1) Solving these equations, we have α1 = 3 and α2 = −1

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16

slide-65
SLIDE 65

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1 Hence the sequence {an} is a solution to the recurrence relation if and only if an = α12n + α2(−1)n for some constants α1 and α2. From the initial conditions, it follows that a0 = 2 = α1 + α2 and a1 = 7 = α1 · 2 + α2 · (−1) Solving these equations, we have α1 = 3 and α2 = −1 So the solution is an = 3 · 2n − (−1)n.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16

slide-66
SLIDE 66

Solving linear recurrence relations

Example

Example What is the solution of the recurrence relation an = an−1 + 2an−2 with a0 = 2 and a1 = 7. Proof. The characteristic equation of the recurrence relation is r2 − r − 2 = 0 Its roots are r1 = 2 and r2 = −1 Hence the sequence {an} is a solution to the recurrence relation if and only if an = α12n + α2(−1)n for some constants α1 and α2. From the initial conditions, it follows that a0 = 2 = α1 + α2 and a1 = 7 = α1 · 2 + α2 · (−1) Solving these equations, we have α1 = 3 and α2 = −1 So the solution is an = 3 · 2n − (−1)n.

Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 16