Induction Proofs and Recurrences: Fibonacci Numbers and Generating Functions, Exams of Mathematics

An introduction to induction proofs and recurrences, using the fibonacci sequence as an example. It explains the concept of weak induction, the importance of relating previous cases to the current case, and the process of finding solutions to homogeneous and non-homogeneous linear recurrences. The document also covers the use of generating functions to help solve recurrences and the inclusion-exclusion principle. Additionally, it introduces the concept of bipartite graphs and the handshake theorem.

Typology: Exams

Pre 2010

Uploaded on 08/30/2009

koofers-user-w2c
koofers-user-w2c 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Midterm II Material
Mathematical induction is a useful method of prov-
ing statements for n= 1,2, . . . (though we don’t have
to start at 1, we can start at any value). In general we
need to prove two parts:
1. The statement holds in the first case(s).
2. Assuming the statement holds for the cases kn,
show that the statement also hold for n+ 1.
(This is what is known as strong induction. Usually
it will suffice for us to only assume the previous case,
i.e., assume the case k=nis true and then show n+ 1
also holds (which is known as weak induction.)
The most important thing about an induction proof
(and also for recurrences) is to see how to relate the
previous case(s) to the current case. Often once that
is understood the rest of the proof is very straightfor-
ward.
A recurrence relation (or recursion relation) is a se-
quence anwhere the nth term anis expressed as a
function of nand the previous ak. For example the
Fibonacci numbers are based on the recurrence rela-
tion F0= 0, F1= 1 and Fn=Fn1+Fn2for n2
(we need to have terms F0and F1to “prime the pump”
of our recurrence, i.e., just the recurrence relationship
is not enough to evaluate we also need some starting
values).
We are interested in solving a recurrence which is
to find an expression for anthat is independent of the
previous terms. In other words we want to find some
function f(n) so that an=f(n). One method to do
this is to look at the first few terms, and find a pattern.
If we think we have the pattern then to verify we need
to verify the initial conditions and recurrence relations
are satisfied (closely analogous to induction).
The key to setting up a recurrence for a given prob-
lem is to relate what you are counting for the current
case to what you counted in earlier cases. Often the
idea is to look for how to add/remove the last ob-
ject (like we did for derangements) or look for ways
to decompose into smaller parts (like we did for Dyck
paths). Also once we have a recurrence sometimes we
can manipulate it into a more convenient form (like we
did for compositions).
Some recurrences can be solved systematically. For
instance homogeneous constant coefficient linear re-
cursions of order k, i.e.,
an=c1an1+c2an2+· · · +ckank,
can be solved by guessing that our solution is of the
form an=rn, the recurrence then puts a restriction
on r, namely,
rn=c1rn1+c2rn2+· · · +ckrnk.
We solve for the roots of this polynomial r1, r2, . . . , rk
to get solutions, and then do a linear combination of
these solutions to get our general answer,
an=D1rn
1+D2rn
2+· · · +Dkrn
k.
The D1, D2, . . . , Dkare then determined by the initial
conditions. Suppose we have a repeated root, ρof
multiplicity `, then we have to modify the solution.
Our method to do this is to introduce powers of n
(nudging our solutions), so that our solution will look
like
an=D1ρn+D2n+D3n2ρn+· · · +D`ρ`1ρn+· · ·
where the “+ · · · corresponds to the contribution of
any other roots.
If we do not have constant coefficients (or are not
linear) we can sometimes modify the recurrence to be-
come linear, i.e., the recurrence a2
n= 4a2
n14a2
n2
becomes bn= 4bn14bn2after the substitution
bn=a2
n. We then solve as before for bnand then
finally substitute back to get an.
If we are dealing with a non-homogeneous recur-
rence
an=c1an1+c2an2+· · · +ckank+f(n).
where f(n) = P(polynomial)·ρn(i.e., f(n) is similar
to the form of homogeneous solutions) then we can
solve it using the following steps.
1. Solve the homogeneous part (i.e., the recurrence
without the f(n)).
2. Solve the non-homogeneous part by setting up a
solution for anwith some coefficients to be deter-
mined by the recurrence.
3. Combine the above two part to get the general
solution. Solve for the constants using the initial
conditions.
Note that the order of operations is important. That
is, we need to solve for the homogeneous part before
we can do the non-homogeneous part and we need to
solve both parts before we can use initial conditions.
The reason that we need to solve the homogenous
part first is that it can influence how we solve the non-
homogeneous part. So now let us look at step 2 a little
more closely. So suppose that we have
f(n)=(jth degree polynomial in n)ρn.
We look at the homogeneous part and see if ρis a root,
i.e., part of the homogeneous solution. If it is not a
root then we guess that the non-homogeneous solution
will be of the form
an= (Bjnj+Bj1nj1+· · · +B0)ρn,
pf3
pf4

Partial preview of the text

Download Induction Proofs and Recurrences: Fibonacci Numbers and Generating Functions and more Exams Mathematics in PDF only on Docsity!

Midterm II Material

Mathematical induction is a useful method of prov- ing statements for n = 1, 2 ,... (though we don’t have to start at 1, we can start at any value). In general we need to prove two parts:

  1. The statement holds in the first case(s).
  2. Assuming the statement holds for the cases k ≤ n, show that the statement also hold for n + 1.

(This is what is known as strong induction. Usually it will suffice for us to only assume the previous case, i.e., assume the case k = n is true and then show n + 1 also holds (which is known as weak induction.) The most important thing about an induction proof (and also for recurrences) is to see how to relate the previous case(s) to the current case. Often once that is understood the rest of the proof is very straightfor- ward.

A recurrence relation (or recursion relation) is a se- quence an where the nth term an is expressed as a function of n and the previous ak. For example the Fibonacci numbers are based on the recurrence rela- tion F 0 = 0, F 1 = 1 and Fn = Fn− 1 + Fn− 2 for n ≥ 2 (we need to have terms F 0 and F 1 to “prime the pump” of our recurrence, i.e., just the recurrence relationship is not enough to evaluate we also need some starting values). We are interested in solving a recurrence which is to find an expression for an that is independent of the previous terms. In other words we want to find some function f (n) so that an = f (n). One method to do this is to look at the first few terms, and find a pattern. If we think we have the pattern then to verify we need to verify the initial conditions and recurrence relations are satisfied (closely analogous to induction). The key to setting up a recurrence for a given prob- lem is to relate what you are counting for the current case to what you counted in earlier cases. Often the idea is to look for how to add/remove the last ob- ject (like we did for derangements) or look for ways to decompose into smaller parts (like we did for Dyck paths). Also once we have a recurrence sometimes we can manipulate it into a more convenient form (like we did for compositions).

Some recurrences can be solved systematically. For instance homogeneous constant coefficient linear re- cursions of order k, i.e.,

an = c 1 an− 1 + c 2 an− 2 + · · · + ckan−k,

can be solved by guessing that our solution is of the form an = rn, the recurrence then puts a restriction on r, namely,

rn^ = c 1 rn−^1 + c 2 rn−^2 + · · · + ckrn−k.

We solve for the roots of this polynomial r 1 , r 2 ,... , rk to get solutions, and then do a linear combination of these solutions to get our general answer,

an = D 1 rn 1 + D 2 r 2 n + · · · + Dkrnk.

The D 1 , D 2 ,... , Dk are then determined by the initial conditions. Suppose we have a repeated root, ρ of multiplicity `, then we have to modify the solution. Our method to do this is to introduce powers of n (nudging our solutions), so that our solution will look like

an = D 1 ρn^ + D 2 nρn^ + D 3 n^2 ρn^ + · · · + Dρ−^1 ρn^ + · · ·

where the “+ · · · ” corresponds to the contribution of any other roots. If we do not have constant coefficients (or are not linear) we can sometimes modify the recurrence to be- come linear, i.e., the recurrence a^2 n = 4a^2 n− 1 − 4 a^2 n− 2 becomes bn = 4bn− 1 − 4 bn− 2 after the substitution bn = a^2 n. We then solve as before for bn and then finally substitute back to get an. If we are dealing with a non-homogeneous recur- rence

an = c 1 an− 1 + c 2 an− 2 + · · · + ckan−k + f (n).

where f (n) =

(polynomial)·ρn^ (i.e., f (n) is similar to the form of homogeneous solutions) then we can solve it using the following steps.

  1. Solve the homogeneous part (i.e., the recurrence without the f (n)).
  2. Solve the non-homogeneous part by setting up a solution for an with some coefficients to be deter- mined by the recurrence.
  3. Combine the above two part to get the general solution. Solve for the constants using the initial conditions.

Note that the order of operations is important. That is, we need to solve for the homogeneous part before we can do the non-homogeneous part and we need to solve both parts before we can use initial conditions. The reason that we need to solve the homogenous part first is that it can influence how we solve the non- homogeneous part. So now let us look at step 2 a little more closely. So suppose that we have

f (n) = (jth degree polynomial in n)ρn.

We look at the homogeneous part and see if ρ is a root, i.e., part of the homogeneous solution. If it is not a root then we guess that the non-homogeneous solution will be of the form

an = (Bj nj^ + Bj− 1 nj−^1 + · · · + B 0 )ρn,

where Bj , Bj− 1 , · · · , B 0 are constants which will be determined by putting this into the recursion, group- ing coefficients and then making sure each coefficient is zero. (See the examples below.) If ρ is a root then part of the above guess actually is in the homogeneous part and cannot contribute to the non-homogeneous part. In this case we need to gently nudge our solution. To do this, suppose that ρ occurs as a root m times. Then we modify our guess for the non-homogeneous solution so that it is now of the form

an = (Bj nm+j^ + Bj− 1 nm+j−^1 + · · · + B 0 nm)ρn.

That is we multiply by a power of nm^ to push the terms outside of the homogeneous solution. If f (n) has several parts added together we essen- tially do each part seperately and combine them to- gether.

We can use generating functions to help solve re- currences. The idea is that we are given a recurrence for an, and we want to solve for an. This is done by letting

g(x) =

n≥ 0

anxn,

we then translate the recurrence into a relationship for g(x) which lets us solve for g(x). We finally take the function g(x) and use it to find the coefficient for xn. Suppose we have initial conditions a 0 , a 1 ,... , ak− 1 and a recurrence an = f (n, an− 1 , an− 2 ,.. .) for n ≥ k.

  1. Write g(x) =

n≥ 0

anxn.

  1. Break off the initial conditions and use the recur- rence to replace the remaining terms, i.e., so we have

g(x) = a 0 + a 1 x + · · · + ak− 1 xk−^1

n≥k

f (n, an− 1 , an− 2 ,.. .)xn.

  1. (Hard step!) rewrite the right hand side in terms of g(x) and/or other functions.
  2. Now solve for g(x), and then expand this into a series to read off the coefficient to get an. For example, this can be done using general binomial theorem or partial fractions.

Sometimes we might only be interested in solving for the function g(x). Some things to watch for are shifting the indices of a sum, moving x’s in and out of the sums, multiplying two sums together, breaking up addition, and manip- ulating some common sums. It is good to be able to

manipulate the sum ∑

k≥ 0

xk^ =

1 − x

as well as ∑

k≥ 0

xk k!

= ex.

We now turn to set theory, our setting is that we have a universe of elements, U and some collection of subsets. If A is a subset and A is the complement of A (everything not in A) and |A| denotes the number of elements in A then

|U| = |A| + |A|. For two sets A and B we let A ∪ B denote the union of A and B where

A ∪ B = {x | x ∈ A or x ∈ B} ,

and A ∩ B denote the intersection of A and B where A ∩ B = {x | x ∈ A and x ∈ B}.

de Morgan’s laws

A ∩ B = A ∪ B A ∪ B = A ∩ B

If we want to count how many elements are in |A∪B| then we have

|A ∪ B| = |A| + |B| − |A ∩ B|.

The idea being that if we only look at |A| + |B| then we overcount elements that are in both so we need to correct for this. If we are dealing with three sets then the analogous statement is

|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|.

These are simple examples of the more general inclusion-exclusion principle.

Inclusion-Exclusion Principle: Let A 1 , A 2 ,... , An ⊆ U. Then

∣ ∣A 1 ∩ A 2 ∩ · · · ∩ An

∣ = |U| +

I⊆[n] I 6 =∅

(−1)|I|

j∈I

Aj

Inclusion-Exclusion Principle II: Let A 1 , A 2 ,... , An ⊆ U. Then

∣ ∣A 1 ∪ A 2 ∪ · · · ∪ An

I⊆[n] I 6 =∅

(−1)|I|−^1

j∈I

Aj

extra constraint. It is important to note in this defi- nition that a graph is planar if there is some way to draw it in the plane without edges intersecting, it does not mean that every way to draw it in the plane avoids edges intersecting. So for example in the we can draw Q 3 as shown below on the left. In this drawing we have edges crossing each other twice so that this is not a way to embed it in the plane without edges crossing, but we can draw it in a way without edges crossing which is shown below on the right.

Not all graphs are planar. For example K 5 and K 3 , 3 cannot be drawn in the plane without having edges cross. In some sense these are the problem graphs for planar graph.

Kuratowski’s Theorem: A graph is planar if and only if it does not contain a topological K 5 or K 3 , 3.

To say that a graph G contains a topological K 5 or K 3 , 3 means that there is a subgraph of G that by con- tracting edges (i.e., if u∼v is an edge remove the edge and combine u and v into one new vertex) produces K 5 or K 3 , 3. So for example the Petersen graph is not planar since we can contract the edges of the outer cycle to the inner star to get a K 5. If a graph is planar then we can draw it in the plane, this then divides the plane up into a finite number of regions called faces. If the graph were drawn on a piece of paper and we cut along the edges then the resulting different pieces of papers are the faces. For example for the drawing of Q 3 above there are six faces (don’t forget to count the outer face!). If we let V denote the set of vertices, E the set of edges and F the set of faces for a drawing of a planar graph then we have the following.

Euler’s formula: For a connected planar graph

|V | − |E| + |F | = 2.

Note in particular that the number of faces does not depend on how we draw the graph in the plane. Euler’s formula is the main tool for dealing with planar graphs (so if a problem asks a question about planar graphs a good place to start is with Euler’s formula or a variation). For example if a connected planar graph has at least three vertices then every face must have at least three edges. We can count the number of edges by adding up how many edges are in

each face, since each edge will be in exactly two faces this will count all edges twice, so we have

2 |E| =

f ∈F

edges in face f

∣ ≥^

f ∈F

3 = 3|F |,

so that |F | ≤ (2/3)|E|. Substituting this in and sim- plifying we have

2 = |V |−|E|+|F | ≤ |V |−|E|+

|E| or |E| ≤ 3 |V |− 6.

This must hold for every connected planar graph, and so we can use this to conclude that K 5 cannot be pla- nar since it has |E| = 10 and 3|V | − 6 = 9 so it does not satisfy the relationship. A similar argument shows that K 3 , 3 is not planar.

One useful technique for proving statements is to use proof by contradiction. The idea is to assume that the statement does not hold and show that this leads to an impossible situation, and so our assumption that the statement is false is wrong so the statement must be true. (Or put more succinctly we are proving some- thing is not not true.) As an example suppose we want to show that every undirected simple graph with two or more vertices has two vertices of the same degree. We suppose that this is false, so that there is an undirected simple graph with all vertices having distinct degrees. If this graph had n vertices then it must have a vertex of degree 0 and a vertex of degree n − 1. But this is impossible be- cause the vertex of degree 0 is not connected to anyone while the vertex of degree n − 1 is connected to every- one, a contradiction. So our assumption that there is a graph with distinct degrees is false, so every graph must have some two vertices with the same degree.

This space intentionally left blank.