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

MATH 108

DISCRETE MATHEMATICS
LECTURE 5

DR. ŞENİZ DEMİR


SEQUENCES

¡ a discrete structure used to represent an ordered list


¡ 1, 2, 3, 5, 8 à a finite sequence with five terms
¡ 1, 3, 9, 27, 81 , . . . , 3n, . . . à an infinite sequence
¡ a function from a subset of the set of integers (usually either the set {0, 1, 2, . . .} or the set {1, 2, 3, . . .}) to a set S
¡ the notation {an} is used to describe a sequence:
!
an=
"
! ! !
a1, a2, a3, a4, . . . à1, , , , ....
# $ %
SEQUENCES

¡ The sequence {bn}, where bn = (−1)n with initial term and common ratio equal to 1 and −1
b0, b1, b2, b3, b4, . . . à 1,−1, 1,−1, 1, . . .
¡ The sequence {cn}, where cn = 2 5n, with initial term and common ratio equal to 2 and 5
c0, c1, c2, c3, c4, . . . à 2, 10, 50, 250, 1250, . . .
¡ The sequence {dn}, where dn = 6 (1/3)n ,with initial term and common ratio equal to 6 and 1/3
d0, d1, d2, d3, d4, . . . à 6, 2, 2/3, 2/9, 2/27, . . .
SEQUENCES

¡ The sequence {sn} where sn = −1 + 4n, with initial terms and common differences equal to −1 and 4
s0, s1, s2, s3, . . . à −1, 3, 7, 11, . . .

¡ The sequence {tn} where tn = 7 − 3n, with initial terms and common differences equal to 7 and −3
t0, t1, t2, t3, . . . à 7, 4, 1,−2, . . . .
RECURRENCE RELATION

¡ {an}: a sequence that satisfies the recurrence relation an = an−1 + 3 for n = 1, 2, 3, . . . ,


¡ If a0 = 2; (Initial condition)
¡ a1 = a0 + 3 = 2 + 3 = 5
¡ a2 = 5 + 3 = 8
¡ a3 = 8 + 3 = 11
RECURRENCE RELATION

¡ {an}: a sequence that satisfies the recurrence relation an = an−1 − an−2 for n =2, 3, 4, . . .
¡ If a0 = 3 and a1 = 5; (Initial conditions)
¡ a2 = a1 − a0 = 5 − 3 = 2
¡ a3 = a2 −a1 = 2 − 5 = −3
RECURRENCE RELATION

¡ {an} is the sequence of integers defined by an = n! (the factorial function)


¡ n! = n((n − 1)(n − 2) . . . 2 1)
¡ n(n − 1)! = nan−1

¡ the recurrence relation an = nan−1 together with the initial condition a1 = 1 (the
closed formula)
RECURRENCE RELATIONS

Solve the following recurrence relation (Iteration)

¡ an= an -1+ 3, a0 = 2
¡ a1 = 2 + 3
¡ a2= (2 + 3) + 3 = 2 + 3 X 2
¡ a3 = (2 + 2 X 3) + 3 = 2 + 3 X 3
¡ an = an -1+ 3 = (2 + 3 X (n − 1)) + 3 = 2 + 3n
RECURRENCE RELATION

an = an−1 + 3 for n = 1, 2, 3, . . . ,
Initial condition: a1=2

Iterations: To obtain a closed formula


RECURRENCE RELATION
RECURRENCE RELATION

¡ Formula for the sequence with the following first terms:


¡ 1, 1/2, 1/4, 1/8, 1/16
¡ an = 1/2n, n = 0, 1, 2,...
¡ 1, 3, 5, 7, 9
¡ an = 2n + 1, n = 0, 1, 2, . .
¡ 1, −1, 1, −1, 1
¡ an = (−1)n, n = 0, 1, 2
¡ Recurrence relation:
¡ 1, 3, 4, 7, 11, 18, 29, 47, 76, 123
¡ Ln is the nth term of this sequence
¡ Ln = Ln−1 + Ln−2 with initial conditions L1 = 1 and L2 = 3
LINEAR HOMOGENEOUS RECURRENCE RELATION

¡ 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 function of n
¡ The recurrence relation is homogeneous because no terms occur that are not multiples of the aj s
¡ 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
LINEAR HOMOGENEOUS RECURRENCE RELATION

¡ The recurrence relation Pn = (1.11)Pn−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 two
¡ The recurrence relation an = an−5 is a linear homogeneous recurrence relation of degree five

¡ The recurrence relation an = an−1 + a2n−2 is not linear


¡ The recurrence relation Hn = 2Hn−1 +1 is not homogeneous
¡ The recurrence relation Bn = nBn−1 does not have constant coefficients
CHARACTERISTIC EQUATION & ROOTS

¡ The basic approach for solving linear homogeneous recurrence relations is to look for solutions of the
form
¡ an = rn, where r is a constant
¡ an = rn 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
rk − c1rk-1 − c2 rk-2 −· · ·− ck-1 r-ck = 0
¡ Consequently,
¡ the sequence {an} with an = rn is a solution if and only if r is a solution of the above equation (characteristic
equation of the recurrence relation)
¡ characteristic roots: the solutions of the characteristic equation of the recurrence relation
RECURRENCE RELATIONS

The solution of the recurrence relation an = an-1 + 2 an-2 with a0 = 2 and a1 = 7?

¡ The characteristic equation of the recurrence relation is r2 − r − 2 = 0


¡ Its roots are r = 2 and r = −1
¡ Hence, the sequence {an} is a solution to the recurrence relation if and only if
¡ an = α12n + α2(−1)n

¡ α1 = 3 and α2 = −1 and an = 3 X 2n − (−1)n


RECURRENCE RELATIONS

The solution of the recurrence relation an = 6an−1 − 9an−2 with initial conditions a0 = 1 and a1 = 6?
SUMMATION

¡ the addition of the terms of a sequence


am, am+1, . . . , an from the sequence {an}

¡ is read as the sum from j = m to j = n of aj


¡ represents
am + am+1 + +an
SUMMATION

¡ lower limit: m
¡ upper limit: n
SUMMATION
SUMMATION
Double summation

The sum of the values of a function

The sum of the elements of a set


SUMMATION
CARDINALITY OF SETS

¡ Of a finite set: the number of elements in the set


¡ The sets A and B have the same cardinality if and only if there is a one-to-one correspondence from A
to B
|A| = |B|
¡ The cardinality of A is less than or the same as the cardinality of B if there is a one-to-one function
from A to B
|A| ≤ |B|
¡ The cardinality of A is less than the cardinality of B
|A| < |B|
COUNTABLE SETS

¡ the set of odd positive integers is a countable set f(n) = 2n − 1


¡ f is a one-to-one correspondence à f is both one-to-one and onto
COUNTABLE SETS

¡ An infinite set is countable if and only if it is possible to list the elements of the set in a sequence
(indexed by the positive integers)

¡ A one-to-one correspondence f from the set of positive integers to a set S can be expressed in terms of
a sequence a1, a2, . . . , an, . . . , where
a1 = f (1), a2 = f (2), . . . , an = f (n), . . . .
COUNTABLE SETS

¡ The set of all integers is countable The set of positive rational numbers is countable

0, 1, -1, 2, -2, 3, -3, …


f(n) = n/2 when n is even
f(n) = −(n − 1)/2 when n is odd

You might also like