Recurrence Relation - Discrete Mathematics - Exam Key, Exams of Discrete Mathematics

This is the Exam Key of Discrete Mathematics which includes Standard Deck, Cards Contains, Cards Numbered, Numbered Card Appears, Spades, Hearts, Diamonds, Clubs,, Probability etc. Key important points are: Recurrence Relation, Space Is Available, Answer, Number of Ways, Sum of Odd Integers, By Hand, Solution, Various Walks, Provided, Respectively

Typology: Exams

2012/2013

Uploaded on 02/21/2013

radhatanaya
radhatanaya 🇮🇳

5

(1)

39 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SIMON FRASER UNIVERSITY
DEPARTMENT OF MATHEMATICS
Midterm 2 Solutions
MACM 201 Spring 2007
Instructor: Robert ˇ
amal
March 7, 2007, 12:30 13:20
[2] 1. Solve the following recurrence relation
an= 10an1(n1), a2= 5 .
We know that an=A·10nfor some parameter A. By putting n= 2 we get a2= 5 = A·102,
hence A= 1/20, and
an=1
2010n(n0) .
[5] 2. (a) Solve the following recurrence relation. (More space is available on the next page.)
an+2 + 4an+1 + 4an= 0 (n0), a0= 1, a1= 4 .
The characteristic equation is t2+ 4t+ 4 = 0 and as t2+ 4t+ 4 = (t+ 2)2, we have repeated
root t=2. So, the general solution is of form an=A(2)n+Bn(2)n. We plug in n= 0,1:
1 = a0=A·1 + B·0,hence A= 1
4 = a1=A·(2) + B·(2),hence B=3
It follows that
an= (2)n3n(2)n(n0) .
[2] (b) Check the answer for n= 2.
Using the recurrence, we have a2=4a14a0=4·44·1 = 20.
Using the formula we derived, we see a2= (2)23·2(2)2= 4 24 = 20.
pf3
pf4

Partial preview of the text

Download Recurrence Relation - Discrete Mathematics - Exam Key and more Exams Discrete Mathematics in PDF only on Docsity!

SIMON FRASER UNIVERSITY

DEPARTMENT OF MATHEMATICS

Midterm 2 – Solutions

MACM 201 Spring 2007 Instructor: Robert ˇS´amal March 7, 2007, 12:30 – 13:

[2] 1. Solve the following recurrence relation

an = 10an− 1 (n ≥ 1), a 2 = 5. We know that an = A · 10 n^ for some parameter A. By putting n = 2 we get a 2 = 5 = A · 102 , hence A = 1/ 20 , and

an = 20110 n^ (n ≥ 0).

[5] 2. (a) Solve the following recurrence relation. (More space is available on the next page.)

an+2 + 4an+1 + 4an = 0 (n ≥ 0), a 0 = 1, a 1 = 4.

The characteristic equation is t^2 + 4t + 4 = 0 and as t^2 + 4t + 4 = (t + 2)^2 , we have repeated root t = − 2. So, the general solution is of form an = A(−2)n^ + Bn(−2)n. We plug in n = 0, 1 :

1 = a 0 = A · 1 + B · 0 , hence A = 1 4 = a 1 = A · (−2) + B · (−2), hence B = − 3

It follows that an = (−2)n^ − 3 n(−2)n^ (n ≥ 0).

[2] (b) Check the answer for n = 2. Using the recurrence, we have a 2 = − 4 a 1 − 4 a 0 = − 4 · 4 − 4 · 1 = − 20. Using the formula we derived, we see a 2 = (−2)^2 − 3 · 2(−2)^2 = 4 − 24 = − 20.

[10] 3. For n ≥ 0 let an be the number of ways n can be expressed as a sum of odd integers,

if order matters. For example, a 4 = 3, as 4 = 3 + 1 = 1 + 3 = 1 + 1 + 1 + 1.

Find a recurrence relation for an (do not solve it). We group all expressions for n according to the last term.

  1. n = (... ) + 1 (the last term is 1). These expressions correspond precisely to expressions n − 1 = (... ), that is to different ways to write n − 1 as a sum of odd integers. There are an− 1 ways to do this.
  2. n = (... ) + k where k > 1 (the last term is not 1). These expressions precisely correspond to expressions n − 2 = (... ) + (k − 2), that is to different ways to write n − 2 as a sum of odd integers. There are an− 2 ways to do this.

So, we have an = an− 1 + an− 2 , (n ≥ 2). We still need the initial conditions: 1 = 1 is the only expression for 1, 2 = 1+1 the only expression for 2. Thus, a 1 = a 2 = 1.

For n = 0 it is not easy to make one’s mind if there is 0 or 1 way, but the recurrence relation gives a 0 = 0. From this we can come with a short solution (this was not asked for in the exam): an satisfies the same recurrence relation and the same initial conditions as the Fibonacci numbers, so an = Fn. Consequently,

an = √^1 5

)n −

)n^ ) (n ≥ 0).

5. Consider various walks in the graph on the figure. In parts (b), (c), (e) explain why the

walk you provided is not a path, a trail, and a cycle, respectively.

a

b

c

d

e

f

g

h

i

j

k

[2] (a) Write down an a-f path. Using various notations, we can write one such path as:

  • a − d − e − f
  • a, {a, d}, d, {d, e}, e, {e, f }, f
  • a, ad, d, de, e, ef, f
  • {a, d}, {d, e}, {e, f }
  • ad, de, ef

In the next parts, we will only use the first notation.

[2] (b) Write down an a-f trail that is not a path. a − b − e − h − g − d − e − f (this is not a path, as the vertex e is used twice).

[2] (c) Write down an a-f walk that is not a trail. a − d − g − h − e − d − g − h − f (this is not a trail, as the edge {d, g} is used twice).

[2] (d) Write down an a-a cycle. a − b − e − d − a

[2] (e) Write down an a-a circuit (closed trail) that is not a cycle. a − b − e − h − f − e − d − a (this is not a cycle, as the vertex e is used twice).