Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

ITMS-01 Discrete Structures

UNIT II. RECURSION AND OTHER SEQUENCES

Overview

Recursive sequences such as Fibonacci numbers, Lucas numbers, Tribonacci


numbers, Bernoulli numbers and the Collatz sequence aim to provide a more sophisticated
understanding of numbers arranged in patterns. These patterns are reflected in nature.

Learning Objectives

At the end of the unit, I am able to:


1. understand recursion; and
2. apply the concept of recursion in dealing with things and experiences around me.

Setting Up
Have you ever wondered how numbers arranged in sequence can represent patterns in
nature?

Lesson Proper

Recursion

A recursive sequence is a sequence of the form

and satisfies the following two conditions;

1) A number of terms of the sequence

are given. These are the initial values.

2) A rule called recursion is given, which explains how is to be computed in terms

of previous terms in the sequence, if .

The terms of a recursive sequence can be numbers, graphs and other objects.

26
ITMS-01 Discrete Structures

Lesson 1 Fibonacci Numbers

- named after Leonardo Fibonacci or Leonardo of Pisa.

The Fibonacci numbers has the following initial values

and the recursion of the sequence of numbers as

whenever .

Example

Compute the Fibonacci numbers when .

Thus, the first 9 numbers of the Fibonacci sequence are { }.

Therefore, the Fibonacci numbers when are { }

27
ITMS-01 Discrete Structures

Lesson 2 Lucas Numbers

The Lucas numbers has the following initial values

and the recursion of the sequence of numbers as

whenever .

Example

Compute the Lucas numbers when .

Thus, the first 9 numbers of the Lucas sequence are

{ }.

Therefore, the Lucas numbers when are

{ }.

28
ITMS-01 Discrete Structures

Lesson 3 Tribonnacci Numbers

The Tribonacci numbers has the following initial values

and the recursion of the sequence of numbers as

whenever .

Example

Compute the Tribonacci numbers when .

Thus, the first 9 numbers of the Tribonacci sequence are

{ }.

Therefore, the Tribonacci numbers when are

{ }.

29
ITMS-01 Discrete Structures

Lesson 4 Bernoulli Numbers

The BERNOULLI numbers were named after its creator Jakob Bernoulli.

The initial value of the Bernoulli numbers is and the recursion of the
sequence of numbers is

( ) ( ) ( )

When , then

( ) ( )

When , then

( ) ( ) ( )

When , then

( ) ( ) ( ) ( )

Continuous computation in this manner, we will arrive at some sort of Pascal’s


triangle as seen in the following figure:

30
ITMS-01 Discrete Structures

Example

Find the Bernoulli numbers .

When , then

(We can also refer to the figure above and get the equation in the second row.)

By substituting in our equation, we have,

corresponds to the first Bernoulli number.

Let us consider the equation in the third row of the figure:

( )

( )

( )

( )

( )

corresponds to the second Bernoulli number.

31
ITMS-01 Discrete Structures

Let us consider the equation in the fourth row of the figure:

( ) ( )

corresponds to the third Bernoulli number.

Let us consider the equation in the fifth row of the figure:

( ) ( )

( ) ( )

( )

( )

( )

( )

( ) corresponds to the fourth Bernoulli number.

32
ITMS-01 Discrete Structures

Lesson 5 Collatz Sequence

The Collatz sequence was created by the German mathematician named Lothar
Collatz. It is also known as the sequence.

We need to first assume a positive integer for the initial value denoted by
Then the Collatz sequence is recursively defined by:

{ }

Note that computing terms will stop whenever the value of is reached.

Example

Find the Collatz sequence when .

Solution:

, odd

, even

, even

, even

, even

, STOP!!!

Thus, the Collatz sequence is { }.

33
ITMS-01 Discrete Structures

Example

Find the Collatz sequence when .

Solution:

, odd

, even

, even

, even

, odd

, even

, even

, even

, even

, STOP!!!

Thus, the Collatz sequence is { }.

But there is one question we must address before we can move further with the Collatz
sequence, and that is;

“Does the Collatz sequence always reach 1 after a finite number of steps?”

Before we answer this question, let us first define the sequence.

We need to set a positive integer for the initial value . Then we can solve for the
succeeding numbers of the sequence recursively defined by:

{ }

34
ITMS-01 Discrete Structures

Example

Let’s take .

Solution:

, odd

, even

, odd

, even

, even

even

, even

, even

, odd

, even

The sequence will repeat itself on the 10th term, thus the Collatz sequence is:

{ }.

Using the , can you verify what would happen if we set ?

Will it be the same Collatz sequence as that of the last example?

Can you now answer our question:


“Does the Collatz sequence always reach 1 after a finite number of steps?”

35
ITMS-01 Discrete Structures

References

Cargal, J.M., Discrete Mathematics for Neophytes: Number Theory, Probability,


Algorithms, and Other Stuff

http://www.math.northwestern.edu

Lipschutz, Seymour Ph.D., Lipson, Marc Ph.D., Schaum’s Outlines DISCRETE


MATHEMATICS, Third Edition 2007.

Cruz, Rebecca J. and Tandingan, Glenda R., Simplified Discrete Mathematics, 2012 Edition.

Ymas, Sergio Jr E., Lopez, Joseph P., DISCRETE MATHEMATICS, 2009 Edition.

36
ITMS-01 Discrete Structures

Assessing Learning

Activity 1
Name: __________________________________________________ Score: ________________
Course/Year/Section: _______________________________ Date: _________________

Directions: Show complete solution. Encircle your final answer.

1) Compute the Fibonacci sequence where .

2) What is the position of the Fibonacci number equal to 2,584?

37
ITMS-01 Discrete Structures

Activity 2
Name: __________________________________________________ Score: ________________
Course/Year/Section: _______________________________ Date: _________________

Directions: Show complete solution. Encircle your final answer.

1) Compute the Lucas sequence where .

2) What is the position of the Lucas number equal to 5,778?

38
ITMS-01 Discrete Structures

Activity 3
Name: __________________________________________________ Score: ________________
Course/Year/Section: _______________________________ Date: _________________

Directions: Show complete solution. Encircle your final answer.

1) Compute the Tribonacci sequence where .

2) What is the position of the Tribonacci number equal to 10,609?

39
ITMS-01 Discrete Structures

Activity 4
Name: __________________________________________________ Score: ________________
Course/Year/Section: _______________________________ Date: _________________

Directions: Show complete solution. Encircle your final answer.

1) Solve for the seventh Bernoulli number.

40
ITMS-01 Discrete Structures

2) Solve for the ninth Bernoulli number.

41
ITMS-01 Discrete Structures

Activity 5
Name: __________________________________________________ Score: ________________
Course/Year/Section: _______________________________ Date: _________________

Directions: Show complete solution. Encircle your final answer.

1) Solve for the Collatz sequence when using the .

42
ITMS-01 Discrete Structures

2) Solve for the Collatz sequence when using the .

43

You might also like