Beruflich Dokumente
Kultur Dokumente
Alex Whitney
June 29, 2007
Contents
1
.
.
.
.
.
2
2
2
2
3
3
.
.
.
.
.
5
5
5
5
6
6
7
7
9
9
10
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
CONTENTS
6.2
6.3
6.4
6.5
Relations . . . . . . . . . . . .
Functions (Mapping) . . . . .
6.3.1 One-to-One (Injective)
6.3.2 Onto functions . . . .
Bijection . . . . . . . . . . . .
Pigeonhole Principle . . . . .
2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
16
16
16
16
17
June 4, 2007
8.1 Derangements Continued . . .
8.2 Rook Polynomials . . . . . . . .
8.3 Mathematical Definition . . . .
8.4 Computing Rook Polynomials .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
20
20
20
21
21
June 6, 2007
22
9.1 Arrangements with Forbidden Positions . . . . . . . . . . . . 22
CONTENTS
14.3 ??? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
37
Lecture 1
May 14, 2007
1.1
Introductory Notes
1.2
1.2.1
Rule of Sums If the possible outcomes of A can be divided into two disjoint sets, B and C, then |A| = |B| + |C|.
Example 1.2.1. There are two barrels of apples. The first barrel has 10 apples,
and the second barrel has 8 apples. A person walks by and selects an apple from a
barrel. How many different apples could the person have selected?
Solution The apples in each barrel are disjoint - that is to say that any
apple in the first barrel cannot be in the second barrel and vice versa. The
4
problem can be split into two parts. The first part is the number of different
apples the person could select from the first barrel, and the second part
is the number of different apples the person could select from the second
barrel.
Part 1:
10 different apples
Part 2:
8 different apples
By the rule of sums, the total number of different apples the person could
have selected is 10 + 8 = 18.
1.2.2
1.3
Permutations
Example 1.3.1. A coin is flipped and the result is recorded. The coin is flipped
again and the result recorded. List all of the permutations for this procedure.
Solution
{HH}, {HT}, {TH}, {TT}
r-permutations of n The number of permutations of all subsets of r objects
from a set of n distinct objects is given by the equation:
P(n,r) =
n!
(n r)!
Lecture 2
May 16, 2007
2.1
Combinations
2.1.1
Binomial Coefficient
Theorem 2.1.1. Binomial Coefficient. The number of r-combinations of n distinct objects is equal to:
!
n
n!
=
r!(n r)!
r
2.1.2
Multinomial Coefficient
n!
n
=
n1 !n2 ! . . . nk !
n1 , n2 , . . . , nk
Example 2.1.2. Find the number of unique permutations of the letters in CALCULATOR
Solution
10!
10!
= 3
2!2!2!
2
2.2
Binomial Theorem
k=0
2.3
Multinomial Theorem
X
n1 +n2 +...+n3 =n
!
n
xn1 xn2 . . . xnk k
n1 , n2 , . . . , nk 1 2
Lecture 3
May 19, 2007
3.1
I have also heard this called stars and bars and balls and buckets
10
n+r1
r1
Lecture 4
May 21, 2007
4.1
Induction
The principle of induction is used to prove a claim for all values greater
than or equal to a base case. Many mathematical principles can be proven
with induction.
Weak Principle of Induction To prove S(n), first prove S(n) for a base case
n0 . Assume S(k) holds for all k, then show that S(k + 1) holds. If S(n0 ) and
S(k + 1) hold, then S(n) holds for all n.
Example 4.1.1. Prove 0 + 1 + 2 + 3 + . . . + n =
n(n+1)
2
using induction.
Solution
Proof by induction.
Hypothesis: S(k) = 0 + 1 + 2 + 3 + . . . + k =
k(k+1)
,
2
k0
Base: n = 0
0(0+1)
0= 2
=0
Step: n = k + 1
(k + 1)(k + 1 + 1)
= 0 + 1 + 2 + 3 + . . . + k + (k + 1)
2
k(k + 1)
=
+ (k + 1)
2
11
12
k(k + 1) 2(k + 1)
+
2
2
k(k + 1) + 2(k + 1)
=
2
(k + 1)(k + 1 + 1)
=
2
By induction, 0 + 1 + 2 + 3 + . . . + n =
n(n+1)
,
2
n0
Strong Principle of Induction To prove S(n), first prove S(n) for a base
case n0 . Assume S(k) holds for all values between n0 and k, then show that
S(k + 1) holds. If S(n0 ) and S(k + 1) hold, then S(n) holds for all n.
Example 4.1.2. Prove that every integer n 2 is a product of primes
Solution
Proof by induction.
Hypothesis: P(n) = pq = n, where p, q are prime and k n 2, n Z
Base: n = 2
P(2) = 2 1 = 2
Step: P(k + 1) = pq
If k + 1 is prime, then k + 1 is a product of primes.
If k + 1 is not prime,
k + 1 = pq,
where 2 (p, q) k. p and q are product of primes, so pq
is a product of primes.
By induction, n is a product of primes n 2
4.2
Division Algorithm
13
Proof
Since b | a, m Z such that a = mb
Since c | b, n Z such that b = nc
Therefore, a = m(nc) = (mn)a, so c | a.
Lecture 5
May 23, 2007
5.1
5.2
Euclidean Algorithm
Used to find the greatest common divisors (GCD) of two given integers.
Common Divisors c is a common divisor of a and b if c | a and c | b, where
c , 0.
GCD c > 0 is the greatest common divisor (GCD) of a and b if c is a
common divisor of both a and B, and d | a, d | b d | c.
If c is a GCD of a and b, then it can be written that c = gcd(a, b).
gcd(a, 0) = |a|, a , 0
Theorem 5.2.1. a, b Z+ , a unique c Z+ such that c = gcd(a, b).
Proof S = {sa + tb > 0 | s, t Z}
Take a value c S which is the smallest element in S. This value is
unique.
c = sa + tb for some s, t Z
If d | a and d | b, then d | sa and d | tb, so d | (sa + tb), d | c
Suppose c - a, then
14
15
5.3
Additional Proofs
16
Lemma 5.3.4.
3 is irrational.
Proof Proof
bypcontradiction.
Suppose 3 = q
gcd(p, q) = 1, p, q Z.
p2
3 = q2
3q2 = p2
Lecture 6
May 25, 2007
This section is waiting a reformatting. Bijections and pigeonhole principle.
Useful for counting problems. Sometimes easier to count a set if you map
the set to something easier to count.
6.1
Cartesian Product For two sets A and B, the Cartesian product, or crossproduct, of A and B is defined as A (cross) B = {(a, b)|a A, b B}
Example 6.1.1. A = {1, 2, 3}, B = {a, b}
A(cross)B = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}.
Example 6.1.2. R(cross)R = R2 = {(x, y)|x, y R},
Which is the Cartesian Plane.
The cross product can easily be defined in n sets.
Example 6.1.3. Rn = R(cross)R(cross) . . . (cross)R.
6.2
Relations
6.3
18
Functions (Mapping)
6.3.1
One-to-One (Injective)
6.3.2
Onto functions
6.4
Bijection
10 . . . 0
1010 . . . 0
..
.
19
The numbers in the set on the left represent the positions in the binary
sequence where a 1 exists. Therefore, this mapping is both one-to-one and
onto, so it is a bijection and |A| = |B|. Since |B| = 2n , then |A| = 2n
6.5
Pigeonhole Principle
Lecture 7
May 30, 2007
This day went into some really boring stuff. I didnt really feel the need to
take notes.
Definition |A B| = |A| + |B| |A B|
7.1
7.1.1
S is a set.
|S| = n
c1 , . . . , ct are properties of elements of S.
N(ci ) = |ci | = number of elements of S satisfying the property ci
N(c1 , c2 ) = |c1 c2 | = number of elements of S satisfying the properties
of both c1 and c2 .
This is stupid. Its clear that ck is a subset, but he wont call it a subset.
Instead, he calls them properties. And instead of sticking to cardinality
(the |S| notation), he creates this new notation of N(S). It just adds abstraction when you have multiple sets in the N(), like N(S, T). What is the
relation between S and T? Well, if S,T are independent, then its just 0.
Otherwise its |S T|.
N(c1 , c2 , . . . , ct = number of elements of S not satisfying c1 c2 . . . ck .
Why does he do that, but then throw around terms like union?
Test Friday, June 8th.
20
7.2
June 1, 2007
21
Lecture 8
June 4, 2007
reformat me, please
8.1
Derangements Continued
Example 8.1.1. Given (1, 2, . . . , n), how many derangements are there?
Solution Let S = {arrangementso f (1, 2, . . . , n)}
c1 = a 1 in the first position.
c2 = a 2 in the second position.
Etc.
N(c1 , . . . , cn ) = S0 S1 + . . . + (1)n Sn
S0 = n!
!
n
X
n
S1 =
N(ci ) =
(n 1)!
1
i=1
!
X
n
S2 =
N(ci , c j ) =
(n 2)!
2
Etc.
n
X
(1)k n!
N(c1 , . . . , c2 ) =
k!
k=0
8.2
Rook Polynomials
23
8.3
Mathematical Definition
8.4
Lecture 9
June 6, 2007
Reformat. Blah. Its cold
9.1
Example 9.1.1. Suppose there are three people, R1 , R2 , R3 , and R4 . They are to be
seated at five tables, T1 , T2 , T3 , T4 , and T5 . Each person is seated at his or her own
table. T1 does not want to be seated at T1 or T2 . R2 does not want to be seated at
T2 . R3 does not want to be seated at T3 or T4 . R4 does not want to be seated at T4
or T5 .
Solution Let S be the set of seating arrangements of R1 , . . . , R4 at T1 , . . . , T2
so that no two people are seated at the same table.
Let c1 be the property that R1 is seated at T1 or T2 .
Let c2 be the property that R2 is seated at T2 .
Let C = the product of people and tables, minus the forbidden person
and table combinations.
..
.
N(c1 , c2 , c3 , c4 ) = S0 S1 + S2 S3 + S4
S0 = P
P(5, 4) = 5!
S1 = 4i=1 Nci = . . .
N(c1 ) = 2 P(4, 3)
N(c2 ) = 1 P(4, 3)
N(c3 ) = 2 P(4, 3)
N(c4 ) = 2 P(4, 3)
24
25
S1 = P
(2 + 1 + 2 + 2) P(4, 3)
S2 = {i,k} N(ci , c j ) = r2 (C) P(3, 2)
S3 = r3 (C)P(2, 1)
S4 = r4 (C)P(1, 0)
To solve, you can calculate rook polynomial: r(C) = 1 + 7x + 16x2 +
13x3 + 3x4
N(c1 , . . . , c4 ) = 5! 7 4! + 15 3! 13 2! + 3 1!
Lecture 10
June 13, 2007 (Reformat)
10.1
27
X
f (x) =
ai xi
i=0
X
0
1
2
f (x) = x + x + x + . . . =
i=0
This form is not helpful, so we should simplify it. This series is a geometrix
1
.
series with a common ratio x. With |x| < 1, this series will converge to 1x
Example 10.1.3. The sequence n0 , n1 , n2 , . . . , nn , 0, 0, . . . has a generating function:
!
!
!
n
n
n n
f (x) =
+
x + ... +
x = (1 + x)n
0
1
n
Theorem 10.1.1.
!
X
n+ii i
1
=
x
(1 x)n
n1
i=0
Proof The number of integer solutions
to
x1 + . . . + xn = i,xk 0 is n+i1
n1
The generating function for x1 , x2 , . . . , xn is:
f (x) = (x0 + x1 + . . . + xn )n
The coefficient of xi is equal to the number of integer solutions when
the sum of the series is i. !
n
X
n+i1 i
f (x) =
x
n
1
i=0
Example 10.1.4. Find the coefficient of x3 0 in (x + x2 + . . . + x9 )1 0
28
Solution (x + x2 + . . . + x9 )1 0
9 x
( xx
)1 0
1x
(1x9 )1 0
x1 0 (1x)1 0
(1x9 )1 0
1
X
X
10 + i 1 i
i 10 9i
x)
x )(
0i=0 (1)
(
10
1
i
i=0
+ (1)1
coefficient of x2 0 = (1)0 100 10+201
9
10.2
X
1
=
xi
1x
i=1
n
1 xn1 X i
=
x
1x
i=0
!
n
X
n i
n
(1 + x) =
x
i
i=0
!
n
X
m n
i n mi
(1 x ) =
(1)
x
i
i=1
!
X
1
n+i1 i
=
x
(1 x)n
i
i=0
10 10+111
1
9
+ (1)2
10 10+121
2
9
Lecture 11
June 15, 2007 (Reformat)
11.1
X
X
=(
xi ) (
x2i )
i=0
1
(1x)
1
(1x)(1x2 )
1
1x2
i=0
Now use case analysis. Fix the left term, then select the right term.
ile f t = 20, iright = 0
ile f t = 18, iright = 1
ile f t = 16, iright = 2
..
.ile f t = 0, iright = 10
There are 11 pairs, so the coefficient of x20 is 11.
Working with case analysis is easy when the power of x is small and
fixed, but if we were asked to find the coefficient of x2 01 or xn , it would be
much harder. In order to create an equation for the coefficient of a term,
you can use partial fractions.
Solution (2) In order to apply partial fractions, the fraction needs to be
decomposed into two parts.
1
A
+ Bx+C
= 1x
(1x)(1x2 )
1x2
The numerator of the decomposed fractions need to be polynomials of
lesser degrees. The denominator of partial fractions cannot have common
29
30
1 = (A + C) + (B + C 2A)x + (B + A)x2
1 = A + C 1 = C B 1 = 3B B 14 = B
0 = B + C 2A 0 = B + C + 2B C = 3B C = 34
0 = B + A B = A A = 14
1 1
1
x+3
4 (1+x)
4 (1x)2
Now expand the terms.
1 X i i x + 3 X
1 x +
(i + 1)xi
4 i=0
4
i=0
The coefficient of x20 is...
(1/4)(1)20 + (3/4)(21) (1/4)(20) = 11
This can be applied to the xn case, so that the coefficient of xn is:
(1/4)(1)n + (3/4)(n + 1) (1/4)n
11.2
Example 11.2.1. Find the number of ways to take 100 objects from four distinct
bins of an infinite number of identical objects, such that there are an even number
of objects taken from bins one and two, and an odd number of objects taken from
bins three and four.
Solution To solve this problem, we will create a generating function for
taking n objects from the four bins. Next, we have to set up a sequence.
Let an be the number of ways to take n objects from the four bins with
the given restrictions.
The generating function, g(x), is given by the following:
g(x) = a0 + a1 x + a2 x2 + . . . an xn + . . .
g(x) = (x0 + x2 + x4 + . . .)2 (x1 + x3 + x5 + . . .)2
x 2
1 2
g(x) = ( 1x
2 ) ( 1x2 )
4
1
g(x) = x2 ( 1x
2 )
31
X
4 + i 1 2i
x
g(x) = x
41
i=0
!
X
3 + i 2i
2
x
g(x) = x
3
i=0
The number of ways to select 100 objects from 4 bins with the given
restrictions is 49+3
3
2
Lecture 12
May 18, 2007
12.1
X
an xn
ak xk
a0 x0 a1 x1 a2 x2
+
+
+ ... +
+ ... =
f (x) =
0!
1!
2!
n!
k!
k=0
Example 12.1.1. Given a problem about permutations, let an = the answer to the
P ak xk
problem . Find the exponential generating function f (x) =
k=0 k!
Solution
an xk
n!
an = n! (coefficient of xn ).
Example 12.1.2. Find the number of ways to arrange 100 objects from three types
such that an even number of objects are from type 1 and an odd number of objects
are from type 2.
Solution Let an denote the number of arrangements of n objects from
three type such that an even number of objects are from type 1 and an odd
number of objects are from type 2.
P ak xk
f (x) =
k=0 k!
2
1
3
0
1
x0
f (x) = ( 0! + x2! + . . .)( x1! + x3! + . . .)( x0! + x1! + . . .)
x x
x x
f (x) = e +e2 e e2 ex
f (x) = 14 ex (e2x e2x )
32
12.2
e =
x
X
xk
k!
k=0
nk xk
k!
k=0
ex + ex X x2k
=
2
(2k)!
k=0
ex ex X x2k+1
=
2
(2k + 1)!
enx =
k=0
33
Lecture 13
June 20, 2007
13.1
f (x)
1x
P
P
= ( nk=0 ak xk )( nk=0 xk )
So the coefficient of xn = a0 + a1 + a2 + . . . + an
??????????
k=0 ak x
and g(x) =
n=0 (a0
k
f (x) = k=0 ak x = k=0 kx
f (x) = x + 2x2 + 3x3 + . . . + kxk + . . .
1
= 1 + x + x2 + . . . + xk + . . .
1x
Taking the derivative..
34
+ a1 + . . . + an )xn .
35
= 1 + 2x + 3x2 + . . . + kxk1 + . . .
= x + 2x+ 3x+ . . . + kxk + . . .
f (x)
x
x
So, f (x) = (1x)
2 and g(x) = 1x = (1x)3
Expanding P
g(x), we get
3+i1 i
g(x) = x
i=0 31 x
So the coefficient of xn = g(x) = 3+n11
=
31
n+1
2
Example 13.1.3. Find the compact formula for 1x2 + 2x3 + 3x4 + . . . + (n 1)n
Solution P
Let ak = (k1)k, S(n) = a0 +a1 +a2 +. . .+an = 1x2+2x3+. . .+(n1)n
k
f (x) =
k=0 (k + 1)kx
f (x) = (1)(2)x2 + (2)(3)x3 + . . . + (k 1)(k)xk + . . .
1
= 1 + x + x2 + . . . + xn + . . .
1x
1
= 1 + 2x + 3x2 + . . . + kxk1 + . . .
(1x)2
2
= (1)(2) + (2)(3)x + . . . + (k 1)kxk2 + . . .
(1x)3
2x2
(1x)3
So f (x) =
g(x)
S(n)
1
1
+ 12 . . . +
1
n+1
1
Solution Let ak = k+1
,k0
1
Sn = a0 + a1 + . . . + an = 11 + 12 + k+1
P 1 k 1 1
1 k
f (x) = k=0 k+1 x = 1 + 2 x + 31 x2 + . . . + k+1
x + ...
1
2
n
= 1 + x + x + ... + x + ...
1x
Taking the integral of both sides...
2
3
k+1
ln |1 x| = x + x2 + x3 + . . . + xk+1 + . . .
2
xk
ln |1x|
= 1 + x2 + x3 + . . . + k+1
+ . . . = f (x)
x
f (x)
ln |1x|
g(x) = 1x = x(1x)
To find coefficients for xn , we would have to use Taylor series, etc.
1
(1)(2)
1
(2)(3)
+ ... +
1
(n1)(n)
36
Example 13.1.6. Sn = 13 + 23 + . . . + n3
Let ak =Pk3
3 k
f (x) = P
k=0 k x
1
= kxk1
(1x)2
Multiply by x, then take the derivative, then multiply by x, then take the derivative
again.
P
x
= kxk
(1x)2
P 2 k
x(1+x)
=
kx
3
(1x)
P 3 k1
1+4x+x2
= kx
(1x)4
P
2
3
x+4x +x
= k3 xk = f (x)
(1x)4
+x
g(x) = 1x = x+4x
(1x)5
P
5+i1 1
g(x) = (x + 4x2 + x3 )
i=0 51 x
5+n31
+ 4 5+n21
+
Sn = 5+n11
4
4
4
n+3
n+2
n+1
Sn = 4 + 4 4 + 4
Usually we leave it alone at this point, but since we know the formula for sum of
cubes, we know that it can be simplified.
(n+3)(n+2)(n+1)n
(n+2)(n+2)n(n1)
(n+1)n(n1)(n2)
Sn =
+4
+
4!
4!
4!
n(n+1)
Sn = 4! ((n + 3)(n + 2) + 4(n + 2)(n 1) + (n 1)(n 2))
n(n+1)
Sn = 4! (6n2 + 6n)
f (x)
Sn =
(n(n+1))2
4
n2 (n1 )2
4
Lecture 14
June 22, 2007 (Reformat)
This is the first lecture with the new professor, Stephen Young.
14.1
Recurrence Relations
This will be the bulk of the test. This section will be Learn by example
for the most part.
The basic form of a recurrence relation is a function from one set to
another. Such as a : N R, where a(n + 1) = an+1 , and a0 = 5, a1 = 14, a2 =
45, etc.
Other examples:
bn = 2bn 1 n2 , b1 = 1, n 1
s2n = 3sn5 + sin(2sns ), n 0
We will focus on a few special recurrence relations and how to calculate
them without having to recurse.
Example 14.1.1. an = 2an1 + 3an2 , a0 = 1, a1 = 3
Find a general form for an .
Solution The first step is to plug in some numbers and look for a pattern.
a0 = 1
a1 = 3
a2 = 2 3 + 3 = 9
a3 = 2 27 + 3 9 = 27
a4 = 3 81 + 2 27 = 81
37
38
39
14.2
n+1
p ,n
n1 n
2, p2 = 2
Solution p3 = 3 p2 = 6 = 3(3 1)
p4 = 2 6 = 12 = 4(4 1)
p5 = 5/3 12 = 20 = 5(5 1)
p6 = 6/4 20 = 30 = 6(6 1)
..
.
pn = n(n 1)
Can be proved using induction.
14.3
???
Example 14.3.2. Using the recurrence relation from the previous example, find
the general form for an with a0 = 2, a1 = 2
Solution a2 = 10
a3 = 26
a4 = 82
a5 = 2 82 + 3 26 = 164 + 78 = 242
an = 3n + (1)n
Inductive step:
40
Lecture 15
June 25, 2007 (Reformat)
15.1
42
So far we have covered two unique roots and two complex roots, but
what about the case when both roots are the same?
Example 15.1.6. sn = 4sn1 4sn2 , s0 = 1, s1 = 2
Solution The characteristic polynomial is r2 4r + 4 = 0, or (n 2)2 = 0
Im going to show you what works, and I wish I had a better intuition
for why it works, but I dont. It just works.
sn = c1 2n + c2 n2n
s0 = c1 20 + c2 020 = 1
s 1 = c1 2 + c2 2 = 1
So c1 = 1 and c2 = 12
Lecture 16
June 27, 2007 (reformat)
16.1
Review
This is a quick review of Constant Coefficient Linear Homogeneous Recurrence Relations. This section generalizes the behavior of these forms of
relations.
If r is multiplicity m, it contributes a term in the form (0 + 1 n + 2 n2 +
. . . + m1 nm1 )rn
If r, r are complex roots of multiplicity m, then they contribute a term in
the form (0 + 1 n + x n2 + . . . + m1 nm1 )rn + (0 + 1 n + . . . + m1 nm1 )nm ,
which is equal to (c0 + c1 n + . . . + cm1 nm1 )|r|n cos(n) + i(d0 + d1 n . . . +
dm1 nm1 )|r|n sin(n), c Z, d C
16.2
43
44
Solution a0 = 1
a1 = 5
a2 = 19
a3 = 65
an = c1 2n + c2 3n
c1 2n + c2 3n = 2(c1 2n1 + c2 3n1 ) + 3n
c2 = 2/3c2 + 1
c2 = 3
a0 = c1 20 + 3 30 = c1 + 3 = 1 c1 = 2
an = 3n+1 2n+1
Proposition 16.2.1. Consider the linear constant coefficient non-homogeneous
P
recurrence relation ki=0 ci an1 = f (n). If p(n) satisfies f (n), and h(n) satisfied
Pk
i=0 ci ani = 0, then p(n) + h(n) satisfies f (n).
Remark There are two things going on in a non-homogeneous recurrence
relation. One part is homogeneous, and the other is non-homogeneous.
The non-homogeneous part determines the behavior of the function.
Example 16.2.3. an = 9an1 20an2 + 3n , a0 = a1 = 1
Solution First, lets just look at the homogeneous portion.
(h)
(h)
a(h)
n = 9an1 20an2
Solving for the characteristic polynomial, we get:
r2 9r + 20r = 0, r = 4, 5
n
n
a(h)
n = c1 4 + c2 5
Now we take a look at the non-homogeneous portion (the particular)
solution.
(p)
an = c3 3n
We dont use any initial conditions to solve for c3 , instead we use the
(p)
original recurrence relation. Remember, an satisfies the initial relation on
its own.
c3 3n = 9c3 3n1 20c3 3n2 + 3n
c3 = 3c3 20/9c3 + 1
c3 = 2/9
Now we combine the particular and homogeneous solutions to get the
final solution.
(p)
an = an + a(h)
n
45
an = c1 4n + c2 5n + 2/9 3n
Using the initial condition, c2 = 5/2, c1 = 5
Example 16.2.4. an = 3an1 + (3)n , a0 = 1
(h)
Solution a(h)
n = 3an1
n
a(h)
n = c1 (3)
(p)
an = c2 (3)n
c2 (3)n = 3c2 (3)n1 + (3)n
c2 = c2 + 1
We have a problem here. In the same way that double roots mess up
solutions, when the homogeneous and particular solutions are the same,
there can be problems. To solve, we can multiply by n.
(p)
an = c2 n(3)n
c2 n(3)n = 3c2 (n 1)(3)n1 + (3)n
c2 n = c2 n c2 + 1
c2 = 1
And then to combine the particular and homogeneous solutions and
solving with the initial condition..
an = n(3)n + c1 (3)n
a0 = 0(3)0 + c1 (3)0 = 1
c1 = 1
an = (3)n + n(3)n
16.2.1
46
Lecture 17
June 29, 2007 (reformat)
17.1
Example 17.1.1. Find the generating function for the following recurrence relation: an = 3an1 , a0 = 1, n 0.
Solution
an xn =P3an1 xn
P
n
n
n=1 an x =P n=1 3an1 x
n
Let f (x) = n=0
Pan x
f (x) a0 = 3xP n=1 an1 xn1
n
f (x) 1 = 3x
n=0 a0 x
f (x) 3x f (x) P
=1
1
n
=
f (x) = 13x
n=0 (3x)
Example 17.1.2. Find the recurrence relation for the following recurrence relation:
an = an1 + an2 + n2 2n , a0 = a1 = 1, n 0
P
P
P 2 n n
P
n
n
n
Solution
a
x
=
a
x
+
a
x
+
n2 x
n
n1
n2
n=2
n=2
P
n
Let f (x) =
a
x
i=0 n
2x(1+2x)
f (x) x 1 = x( f (x) 1) + x2 f (x) + (12x)2 2x
f (x) x f (x) x2 f (x) = x + 1 x +
2x(1+2x)
(12x)2
2x(1+2x)
f (x)(1 x x ) = 2x + 1 + (12x)2
2x(1+2x)
1
2x
f (x) = 1xx
2 1xx2 + (1xx2 )(12x)2
2
47
2x
17.2
g(x) = 1x
3x
14x2
2(1x)
g(x) = 14x2
1
g(x) = 2(1 x) 14x
P2
g(x) = 2(1
x) i=0 (2x)2iP
P
2i
g(x) = 2 i=0 (2x)2i 2x
i=0 (2x)
n
If n is odd, bn = 2
If n is even, bn = 2n + 1
17.3
y(1+y)
(1y)2
48
Additional Formulas
P
k=0
k2 yk