Islamic University of Gaza
Faculty of Engineering
Department of Computer Engineering
Fall 2011
ECOM 2311: Discrete Mathematics
Eng. Ahmed Abumarasa
Discrete Mathematics
Chapter 7
Sec 7.1-7.2
Advanced Counting Techniques
7.1: Recurrence Relations:
Exercises
1) 7.1.3 C Let an = 2n + 5.3n for n = 0, 1, 2,….
a) Show that an = 5an -1 - 6an -2 for all integers n with n > 2.
Solution:
an-1 = 2n-1 + 5.3n-1.
an-2 = 2n-2 + 5.3n-2.
5an -1 - 6an -2 = 5(2n-1 + 5.3n-1) – 6(2n-2 + 5.3n-2)
5an -1 - 6an -2 = 5(2.2n-2 + 3*5. 3n-2) – 6(2n-2 + 5.3n-2)
5an -1 - 6an -2 = 10.2n-2 + 15*5.3n-2 – 6.2n-2 + 6*5.3n-2
5an -1 - 6an -2 = 4.2n-2 + 9*5.3n-2
5an -1 - 6an -2 = 2n + 5.3n
5an -1 - 6an -2 = an
2) 7.1.5 Is the sequence {an} a solution of the recurrence relation an = 8an -1 - 16an -2 if
e) an = n4n ?
Solution:
8an -1 - 16an -2 = 8(n-1)4n-1- 16(n-2)4n-2
8an -1 - 16an -2 = 2*4(n-1)4n-1- 42(n-2)4n-2
8an -1 - 16an -2 = 2 (n-1)4n - (n-2)4n
8an -1 - 16an -2 = 4n (2 (n-1) - (n-2))
8an -1 - 16an -2 = 4n (n)
8an -1 - 16an -2 = an
So an = n4n is solution
3) 7.1.19 A vending machine dispensing books of stamps accepts only dollar coins, $1 bills, and
$5 bills.
a. Find a recurrence relation for the number of ways to deposit n dollars in the
vending machine, where the order in which the coins and bills are deposited
matters.
Solution:
a. An = 2*an-1 + an-5
7.2: Solving Linear Recurrence Relations:
Definition: A linear homogeneous recurrence relation of degree k with constant
coefficients is a recurrence relation of the form
an = C1an -1 + C2 an-2 + . . . + Ck an-k,
Where C1, C2….Ck are real numbers, and Ck≠0.
7.2.3 Solve these recurrence relations together with the initial
conditions given.
c. an = 5a n -1 - 6an -2 for n > 2, a0 = 1, a1 = 0
Solution:
This is a linear homogeneous recurrence relation of degree 2, according to theorem 1
o r2 – 5r +6 = 0
r1 = 3 and r2 = 2
So
o an = ɑ1*3n + ɑ2*2n
a0 = 1 = ɑ1 + ɑ2
a1= 0 = ɑ1*3 + ɑ2*2
ɑ1 = -2 and ɑ2 = 3
So the solution is:
o an = -2*3n + 3*2n = 3*2n - 2*3n
7.2.3 Solve these recurrence relations together with the initial
conditions given.
d. an = 2an-1 - an-2 for n > 2, a0 = 4, a1 = 1
Solution:
This is a linear homogeneous recurrence relation of degree 2, according to theorem 2
o r2 – 2r +1 = 0
r1 = 1 and r2 = 1
So
o an = ɑ1*1n + ɑ2*n*1n
an = ɑ1 + ɑ2*n
a0 = 4 = ɑ1 + 0
a1= 1 = ɑ1 + ɑ2
ɑ1 = 4 and ɑ2 = -3
So the solution is:
o an = 4 – 3n
7.2.18 Solve the recurrence relation an = 6an -1 - 12an-2 + 8an-3 with a0 = 5, a1 = 4, and a2 = 88.
Solution:
This is a linear homogeneous recurrence relation of degree 3, according to theorem 4
o r3 - 6r2 - 12r - 8 = 0
r3 - 6r2 - 12r - 8 = (r - 2)3. r1 =r2 =r3 = 2.
an = ɑ12n + ɑ2n2n + ɑ3 n22n.
Using the initial condition we construct three equations with three variables, to solve ɑ1, ɑ2, ɑ3
ɑ1 =- 5, ɑ2 = 1/2, and ɑ3 = 13/2.
So
an = -5.2n + (n/2).2n + (13n2/2).2n
7.2.23 Consider the non-homogeneous linear recurrence relation an =
3an-1 + 2n.
a. Show that an = -2n+1 is a solution of this recurrence relation.
b. Use Theorem 5 to find all solutions of this recurrence relation.
Solution:
a.
an = 3an-1 + 2n.
an = 3(-2n) + 2n = -2*2n= -2n+1
so an = -2n+1 is a solution.
b. The general solution is combine from part a, and solution to the
corresponding homogeneous recurrence relation an = 3an-1
Using theorem 1
an = ɑ3n
So the general solution = ɑ3n - 2n+1.
© Copyright 2026 Paperzz