Using Operators - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Using Operators, Recurrences, Smallest Index, Characteristic Equation, Annihilating Operator, General Solution, Sequence Notation, Homogeneous Equation, Recurrence Relations, Discrete Derivative, Constant Coefficients

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atasi
atasi 🇮🇳

4.6

(32)

134 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 173:
Discrete Mathematical Structures
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Using Operators - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

CS 173:

Discrete Mathematical Structures

Recurrences

Example: solve an = 5an-1 - 6an-2 + 4

Rewrite: an - 5an-1 + 6an-2 = 4 Rewrite again so n is smallest index: an+2 - 5an+1 + 6an = 4 Rewrite again as a sequence: 〈an+2 - 5an+1 + 6an〉 = 〈 4 〉 Rewrite again using operators: (E 2 - 5E + 6)〈an〉 = 〈 4 〉 (E-1) “annihilates” 〈c〉

Recurrences

Example: solve an - 6an-1 + 11an-2 - 6an-3 = 0

Characteristic equation: (r^3 - 6r^2 + 11r - 6) = 0 (r-1)(r-2)(r-3) = 0

General solution: an = A 1 + A 22 n^ + A 33 n

Homogeneous!!!

Not a coincidence that characteristic equation looks the same as the annihilating operator: f(r)=0 corresponds exactly to g(E)〈an〉 = 〈 0 〉

Recurrences

Technique:

Rewrite recurrence in sequence notation. Rewrite left side as OP〈an〉. Find an annihilator for sequence on right side and apply to both sides Read characteristic equation off left side. Solve homogeneous equation as before.

How?

Recurrences

Linear NONhomogeneous recurrence relations with constant coefficients.

c 0 an + c 1 an-1 + c 2 an-2 + … + c (^) k an-k = f(n),

Where f(n) is constant polynomial in n cn^ for some constant c cn^ · polynomial(n)

Group challenge: find the annihilators for the remaining function types.

Use operator (E - 1) “Discrete derivative”

(E - 1)〈a (^) n〉 = E〈a (^) n〉 - 〈a (^) n〉 = 〈a (^) n+1〉 - 〈a (^) n〉 = 〈a (^) n+1 - a (^) n〉

Recurrences

Linear NONhomogeneous recurrence relations with constant coefficients.

c 0 an + c 1 an-1 + c 2 an-2 + … + c (^) k an-k = f(n),

Where f(n) is constant polynomial in n of degree k

Group challenge: find the annihilators for the remaining function types.

Use operator (E - 1) “Discrete derivative”

(E - 1)〈a (^) n〉 = E〈a (^) n〉 - 〈a (^) n〉 = 〈a (^) n+1〉 - 〈a (^) n〉 = 〈a (^) n+1 - a (^) n〉

Annihilator: (E - 1) k+

Recurrences

Table of handy annihilators:

〈c〉 E-

〈polynomial(n) of degree ≤ k〉 (E-1) k+

〈c n〉 E-c 〈c n·polynomial(n) of degree ≤ k〉 (E-c) k+

Sequence Annihilator

Recurrences

Another little helpful fact:

Suppose operator A annihilates 〈an〉

And B annihilates 〈b (^) n〉

Then AB annihilates 〈an + bn〉

Recurrences

Solve an = 2an-1 + 2n^ - 1, a 0 = 0.

General solution: an = (A 1 + A 2 n)2n^ + A 3

Need 3 initial values because we have 3 unknowns to solve for.

A 1 = 2(0) + 2^1 - 1 = 1, A 2 = 2(1) + 2 2 - 1 = 5

A 1 + A 3 = 0

2A 1 + 2A 2 + A 3 = 1

4A 1 + 8A 2 + A 3 = 1

A 1 = -1, A 2 = A 3 = 1

an = (n - 1)2 n^ + 1

Solve 3 equations in 3 unknowns (using the general solution):

Recurrences

Solve an = 2an/2 + n-1, a 1 = 0.

Mergesort

of comparisons