0% found this document useful (0 votes)
36 views

Discrete Assignment

The document is an assignment on discrete mathematics from Mizan-Tepi University discussing recurrence relations. It defines recurrence relations and sequences, provides examples of solving homogeneous and non-homogeneous recurrence relations recursively and iteratively, and describes the method of undetermined coefficients for solving non-homogeneous recurrence relations. The assignment is submitted by a group of 4 students with their names and ID numbers listed.

Uploaded by

abduwasi ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Discrete Assignment

The document is an assignment on discrete mathematics from Mizan-Tepi University discussing recurrence relations. It defines recurrence relations and sequences, provides examples of solving homogeneous and non-homogeneous recurrence relations recursively and iteratively, and describes the method of undetermined coefficients for solving non-homogeneous recurrence relations. The assignment is submitted by a group of 4 students with their names and ID numbers listed.

Uploaded by

abduwasi ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

MIZAN-TEPI UNIVERSITY

TEPI CAMPUS
College of Computing and Informatics
Department of Information Systems
Assignment of Discrete Mathematics

Group Name ID Numbers


1. Muaz Abdii………………………………………….2372/14
2. Abduwasi Ahmed……………………………………0116/14
3. Alamudin Mohamed………………………………...0312/14
4. Bariso Abrahim……………………………………...0645/14

Submitted to:

Submission Date:
Discrete Mathematics Assignment 2023

RECURRENCE RELATIONS

A sequence is an ordered list of objects or events. The number of elements (terms,


members) is called the length of the sequence. A sequence can be finite (e.g.,
alphabet letters) or infinite (e.g., positive integers). In a sequence, an element can
appear multiple times in different positions. Elements of a sequence are usually
identified by their position (the first, the third, the 6th, etc.). The easiest way to
create an ordered list of objects or events is by using a function defined on the set
of natural numbers with values in the set, say A, of given objects or events. Then a
sequence is the image of this function and we denote it by {ai}i∈N

f : N → A such that i 7→ ai , ai ∈ A

Any equation involving several terms of a sequence is called a recurrence relation.


Because sequences are ordered, a recurrence relation for a given sequence {ai}i≥m
is an equation that expresses each 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 ≥ m. The first
few elements (a0, a1, . . . , am−1) in the sequence that can not be related to each
other by the recurrence relation are often determined by the initial conditions. A
recurrence relation is sometimes also called a difference equation. Formally, a
recurrence relation is an equation of the type

F(n, an, an+1, . . . , an+m) = 0

where m ∈ N is fixed. To solve a recurrence relation means to eliminate recursion


from the function definition. The order of a recurrence relation is the difference
between the greatest and the lowest subscripts of the terms of the sequence in the
equation. For example, in the above equation, the order is

1
Discrete Mathematics Assignment 2023

(n + m) − (n) = m. A sequence is called a solution of a recurrence relation if its


terms satisfy the recurrence relation. A recurrence relation can have multiple
solutions but a recurrence relation with initial conditions has an unique solution.

Examples

1. For the sequence {ai}i∈N, the following formula an = 7an−1 − 5an−2 is a


recurrence relation valid for

n ≥ 2. The elements in the sequence that are not related by the above formula are
a0 and a1. Hence a0 and a1 can be determined by the initial conditions. Once the
values of a0 and a1 are specified, the whole sequence {ai}i≥0 is completely
specified by the recurrence relation.

2. Let a sequence {ai}i∈N be determined by the recurrence relation

an = 3an−1 + 2an−2 (∗)

and the initial conditions

a0 = 1, a1 = 2 . (∗∗)

Calculate a4 recursively first. Then calculate a4 again iteratively

Solution.

Recursively, we use (*) repeatedly (“topdown”) to decrease the indices involved


until they all reach the initial ones. Hence

2
Discrete Mathematics Assignment 2023

a4 = 3a3 + 2a2 used (∗) for n = 4

= 3(3a2 + 2a1) + 2a2 used (∗) for n = 3

= 11a2 + 6a1

= 11(3a1 + 2a0) + 6a1 used (∗) for n = 2

= 39a1 + 22a0

= 39 × 2 + 22 × 1 = 100 . used (∗∗)

Iteratively, we use (*) repeatedly (“building-up”) to derive more and more known
elements until the desired index is reached. Hence

a0 = 1 ,

a1 = 2 ,

a2 = 3a1 + 2a0 = 8 , used (∗) for n = 2

a3 = 3a2 + 2a1 = 28 , used (∗) for n = 3

a4 = 3a3 + 2a2 = 100 . used (∗) for n = 4

3. Let f(n) for n ∈ N be given by the recurrence relation

f(n) = n f(n − 1), n ∈ N, n ≥ 1

f(0) = 1 (initial condition)

3
Discrete Mathematics Assignment 2023

Find the solution f(n).

Solution. We first derive

f(n) = n f(n − 1) if n ≥ 1

= n(n − 1)f(n − 2) if n ≥ 2

= n(n − 1)(n − 2)f(n − 3) if n ≥ 3

=...

= n(n − 1)(n − 2) · · · 2 · 1 f(0)

= n!f(0) = n! · 1 = n!

Then we can show inductively f(n) = n! for n ≥ 0.

Non Homogeneous Recurrence Relations

A non-homogeneous recurrence function is a function that involves a term that


does not depend on the previous values of the function. The solution of a non-
homogeneous recurrence function can be found by adding the solution of the
corresponding homogeneous recurrence function and a particular solution of the
non-homogeneous term.

The homogeneous recurrence function is obtained by setting the non-homogeneous


term to zero. The solution of the homogeneous recurrence function is given by a
linear combination of its characteristic roots. The characteristic roots are obtained
by solving the equation obtained by replacing the recurrence relation with a
polynomial equation.

4
Discrete Mathematics Assignment 2023

The particular solution of the non-homogeneous term is found by assuming a form


for the solution and substituting it into the recurrence relation. The form of the
particular solution depends on the form of the non-homogeneous term.

In other words, the equation has a "non-homogeneous" structure. The general form
of a non-homogeneous recurrence relation is:

c0an+c1 an-1 + c2 an-2 + ... + ck an-k = f(n),

To find non-homogeneous recurrence relation we use below formula:

an=an(h)+anp

Method of Undetermined Coefficients

1. Find the homogeneous solution of the recurrence relation.

2. Identify the form of the particular solution based on the non-homogeneous term.

3. Determine the coefficients of the particular solution by substituting it into the


recurrence relation and solving for the unknown coefficients.

4. Add the homogeneous and particular solutions to get the general solution.

5
Discrete Mathematics Assignment 2023

6
Discrete Mathematics Assignment 2023

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy