- •Preface
- •GNU Free Documentation License
- •1. APPLICABILITY AND DEFINITIONS
- •2. VERBATIM COPYING
- •3. COPYING IN QUANTITY
- •4. MODIFICATIONS
- •5. COMBINING DOCUMENTS
- •6. COLLECTIONS OF DOCUMENTS
- •7. AGGREGATION WITH INDEPENDENT WORKS
- •8. TRANSLATION
- •9. TERMINATION
- •10. FUTURE REVISIONS OF THIS LICENSE
- •Pseudocode
- •Operators
- •Algorithms
- •Arrays
- •The for loop
- •The while loop
- •Homework
- •Answers
- •Proof Methods
- •Proofs: Direct Proofs
- •Proofs: Mathematical Induction
- •Proofs: Reductio ad Absurdum
- •Proofs: Pigeonhole Principle
- •Homework
- •Answers
- •Logic, Sets, and Boolean Algebra
- •Logic
- •Sets
- •Boolean Algebras and Boolean Operations
- •Sum of Products and Products of Sums
- •Logic Puzzles
- •Homework
- •Answers
- •Relations and Functions
- •Partitions and Equivalence Relations
- •Functions
- •Number Theory
- •Division Algorithm
- •Greatest Common Divisor
- •Non-decimal Scales
- •Congruences
- •Divisibility Criteria
- •Homework
- •Answers
- •Enumeration
- •The Multiplication and Sum Rules
- •Combinatorial Methods
- •Permutations without Repetitions
- •Permutations with Repetitions
- •Combinations without Repetitions
- •Combinations with Repetitions
- •Inclusion-Exclusion
- •Homework
- •Answers
- •Sums and Recursions
- •Famous Sums
- •First Order Recursions
- •Second Order Recursions
- •Applications of Recursions
- •Homework
- •Answers
- •Graph Theory
- •Simple Graphs
- •Graphic Sequences
- •Connectivity
- •Traversability
- •Planarity
- •Homework
- •Answers
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chapter 7 |
Therefore |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
= |
1 |
|
− |
1 |
|
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
1·4·7 |
|
|
|
|
|
6·1·4 |
|
|
6·4·7 |
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
1 |
|
|
|
|
= |
1 |
|
− |
1 |
|
|
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
4·7·10 |
|
|
|
|
6·4·7 |
|
|
6·7·10 |
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
1 |
|
|
|
|
|
1 |
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
= |
|
|
− |
|
|
|
|
|
|
|
|
|
|
||||||||||
|
|
|
|
|
7·10·13 |
|
|
6·7·10 |
6·10·13 |
|
|
|
|
|
||||||||||||||||||
|
|
|
|
|
. |
|
|
|
|
. . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
. |
|
|
|
|
. . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
. |
|
|
|
|
. . |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
1 |
|
|
|
|
|
1 |
|
|
|
|
1 |
|
|
|
|
|
|
|
|
||||||||
|
|
|
|
|
|
|
|
= |
|
|
|
− |
|
|
|
|
|
|
|
|||||||||||||
|
|
|
|
|
25·28·31 |
6·25·28 |
6·28·31 |
|
|
|
|
|
||||||||||||||||||||
Adding each column, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+ |
1 |
+ |
1 |
|
|
|
+ ···+ |
1 |
|
|
|
|
|
|
= |
|
1 |
− |
1 |
= |
9 |
. |
|||||||||
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||||||||
1 ·4 ·7 |
4 ·7 ·10 |
7 ·10 ·13 |
|
25 ·28 ·31 |
|
6 ·1 ·4 |
6 ·28 ·31 |
217 |
||||||||||||||||||||||||
319 Example Find the sum
1 ·2 + 2 ·3 + 3 ·4 + ··· + 99 ·100.
Solution: Observe that
k(k + 1) = 13 (k)(k + 1)(k + 2) − 13 (k −1)(k)(k + 1).
Therefore
1 ·2 |
= |
31 ·1 ·2 ·3 − 31 ·0 ·1 ·2 |
2 ·3 |
= |
31 ·2 ·3 ·4 − 31 ·1 ·2 ·3 |
3 ·4 |
= |
31 ·3 ·4 ·5 − 31 ·2 ·3 ·4 |
. |
. . |
|
|
|
|
|
|
|
. |
. . |
|
|
|
|
|
|
|
. |
. . |
|
|
|
|
|
|
|
99 ·100 |
= 31 ·99 ·100 ·101 − 31 ·98 ·99 ·100 |
|
|
|||||
Adding each column, |
|
1 |
|
1 |
|
|
|
|
1 ·2 + 2 ·3 + 3 ·4 + ··· + 99 ·100 = |
·99 ·100 ·101 − |
·0 ·1 |
·2 |
= 333300. |
||||
|
|
|||||||
3 |
3 |
|||||||
7.2 First Order Recursions
The order of the recurrence is the difference between the highest and the lowest subscripts. For example un+2 −un+1 = 2
is of the first order, and
un+4 + 9u2n = n5
is of the fourth order.
A recurrence is linear if the subscripted letters appear only to the first power. For example
un+2 −un+1 = 2
is a linear recurrence and
x2n + nxn−1 = 1 and xn + 2xn−1 = 3
are not linear recurrences.
A recursion is homogeneous if all its terms contain the subscripted variable to the same power. Thus xm+3 + 8xm+2 −9xm = 0
is homogeneous. The equation
xm+3 + 8xm+2 −9xm = m2 −3
82
First Order Recursions |
83 |
is not homogeneous.
A closed form of a recurrence is a formula that permits us to find the n-th term of the recurrence without having to know a priori the terms preceding it.
We outline a method for solving first order linear recurrence relations of the form
|
xn = axn−1 + f (n), a 6= 1, |
where f is a polynomial. |
|
1. |
First solve the homogeneous recurrence xn = axn−1 by “raising the subscripts” in the form xn = axn−1 . This we call the characteristic |
|
equation. Cancelling this gives x = a. The solution to the homogeneous equation xn = axn−1 will be of the form xn = Aan, where A is |
|
a constant to be determined. |
2. |
Test a solution of the form xn = Aan + g(n), where g is a polynomial of the same degree as f . |
320 Example Let x0 = 7 and xn = 2xn−1, n ≥ 1. Find a closed form for xn.
Solution: Raising subscripts we have the characteristic equation xn = 2xn−1. Cancelling, x = 2. Thus we try a solution of the form xn = A2n, were A is a constant. But 7 = x0 = A20 and so A = 7. The solution is thus xn = 7(2)n.
Aliter: We have
x0 = 7
x1 |
= |
2x0 |
x2 |
= |
2x1 |
x3 |
= |
2x2 |
. |
. . |
. |
. . |
. |
. . |
xn |
= 2xn−1 |
Multiplying both columns,
x0x1 ···xn = 7 ·2n x0x1x2 ···xn−1.
Cancelling the common factors on both sides of the equality,
xn = 7 ·2n.
321 Example Let x0 = 7 and xn = 2xn−1 + 1, n ≥ 1. Find a closed form for xn.
Solution: By raising the subscripts in the homogeneous equation we obtain xn = 2xn−1 or x = 2. A solution to the homogeneous equation
will be of the form xn = A(2)n. Now f (n) = 1 is a polynomial of degree 0 (a constant) and so we test a particular constant solution C. The general solution will have the form xn = A2n + B. Now, 7 = x0 = A20 + B = A + B. Also, x1 = 2x0 + 7 = 15 and so 15 = x1 = 2A + B. Solving the simultaneous equations
A + B = 7,
2A + B = 15, we find A = 8, B = −1. So the solution is xn = 8(2n) −1 = 2n+3 −1.
Aliter: We have:
x0 |
= |
7 |
x1 |
= |
2x0 + 1 |
x2 |
= |
2x1 + 1 |
x3 |
= |
2x2 + 1 |
. |
. . |
|
. |
. . |
|
. |
. . |
|
xn−1 |
= 2xn−2 + 1 |
|
xn |
= |
2xn−1 + 1 |
83
84 |
|
Chapter 7 |
Multiply the kth row by 2n−k . We obtain |
|
|
2nx0 |
= |
2n ·7 |
2n−1x1 |
= 2nx0 + 2n−1 |
|
2n−2x2 |
= 2n−1x1 + 2n−2 |
|
2n−3x3 |
= 2n−2x2 + 2n−3 |
|
. |
. . |
|
. |
. . |
|
. |
. . |
|
22xn−2 |
= 23xn−3 + 22 |
|
2xn−1 |
= 22xn−2 + 2 |
|
xn |
= |
2xn−1 + 1 |
Adding both columns, cancelling, and adding the geometric sum,
xn = 7 ·2n + (1 + 2 + 22 + ···+ 2n−1) = 7 ·2n + 2n −1 = 2n+3 −1.
Aliter: Let un = xn + 1 = 2xn−1 + 2 = 2(xn−1 + 1) = 2un−1. We solve the recursion un = 2un−1 as we did on our first example: un = 2nu0 = 2n(x0 + 1) = 2n ·8 = 2n+3. Finally, xn = un −1 = 2n+3 −1.
322 Example Let x0 = 2, xn = 9xn−1 −56n + 63. Find a closed form for this recursion.
Solution: By raising the subscripts in the homogeneous equation we obtain the characteristic equation xn = 9xn−1 or x = 9. A solution to the homogeneous equation will be of the form xn = A(9)n. Now f (n) = −56n + 63 is a polynomial of degree 1 and so we test a particular solution of the form Bn + C. The general solution will have the form xn = A9n + Bn + C. Now
x0 = 2, x1 = 9(2) −56 + 63 = 25, x2 = 9(25) −56(2) + 63 = 176. We thus solve the system
2 = A + C,
25 = 9A + B + C,
176 = 81A + 2B + C. We find A = 2, B = 7,C = 0. The general solution is xn = 2(9n) + 7n.
323 Example Let x0 = 1, xn = 3xn−1 −2n2 + 6n −3. Find a closed form for this recursion.
Solution: By raising the subscripts in the homogeneous equation we obtain the characteristic equation xn = 3xn−1 or x = 9. A solution to the homogeneous equation will be of the form xn = A(3)n. Now f (n) = −2n2 + 6n −3 is a polynomial of degree 2 and so we test a particular
solution of the form Bn2 + Cn + D. The general solution will have the form xn = A3n + Bn2 + Cn + D. Now
x0 = 1, x1 = 3(1) −2 + 6 −3 = 4, x2 = 3(4) −2(2)2 + 6(2) −3 = 13, x3 = 3(13) −2(3)2 + 6(3) −3 = 36. We thus solve the system
1 = A + D,
4 = 3A + B + C + D,
13 = 9A + 4B + 2C + D,
36 = 27A + 9B + 3C + D.
We find A = B = 1,C = D = 0. The general solution is xn = 3n + n2.
324 Example Find a closed form for xn = 2xn−1 + 3n−1, x0 = 2.
Solution: We test a solution of the form xn = A2n + B3n. Then x0 = 2, x1 = 2(2) + 30 = 5. We solve the system
2 = A + B,
7 = 2A + 3B.
We find A = 1, B = 1. The general solution is xn = 2n + 3n.
We now tackle the case when a = 1. In this case, we simply consider a polynomial g of degree 1 higher than the degree of f .
84
Second Order Recursions |
85 |
325 Example Let x0 = 7 and xn = xn−1 + n, n ≥ 1. Find a closed formula for xn.
Solution: By raising the subscripts in the homogeneous equation we obtain the characteristic equation xn = xn−1 or x = 1. A solution to the homogeneous equation will be of the form xn = A(1)n = A, a constant. Now f (n) = n is a polynomial of degree 1 and so we test a particular solution of the form Bn2 + Cn + D, one more degree than that of f . The general solution will have the form xn = A + Bn2 + Cn + D. Since A and D are constants, we may combine them to obtain xn = Bn2 + Cn + E. Now, x0 = 7, x1 = 7 + 1 = 8, x2 = 8 + 2 = 10. So we solve the system
|
|
|
|
|
|
|
|
|
7 = E, |
|
|
|
|
|
|
|
|
|
8 = B + C + E, |
||
|
|
|
|
|
|
|
10 = 4B + 2C + E. |
|||
1 |
|
|
|
n2 |
|
|
n |
|
|
|
We find B = C = |
|
, E |
= 7. The general solution is xn = |
|
+ |
|
+ 7. |
|
||
2 |
2 |
2 |
|
|||||||
Aliter: We have |
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
x0 |
= |
7 |
|
|
|
|
|
|
|
|
x1 |
= |
x0 + 1 |
|
|
|
|
|
|
|
|
x2 |
= |
x1 + 2 |
|
|
|
|
|
|
|
|
x3 |
= |
x2 + 3 |
|
|
|
|
|
|
|
. . . |
||||
|
|
|
|
|
|
. . . |
||||
|
|
|
|
|
|
. . . |
||||
|
|
|
|
|
|
|
xn |
= |
xn−1 + n |
|
Adding both columns, |
x0 + x1 + x2 + ···+ xn = 7 + x0 + x2 + ···+ xn−1 + (1 + 2 + 3 + ··· + n). |
|||||||||
|
|
|
||||||||
|
|
|
|
n(n + 1) |
|
|
||||
Cancelling and using the fact that 1 + 2 + ··· + n = |
|
|
|
, |
|
|
|
|||
2 |
|
|
|
|
|
|||||
xn = 7 + n(n + 1) .
2
Some non-linear first order recursions maybe reduced to a lin ear first order recursion by a suitable transformation.
326 Example A recursion satisfies |
u0 = 3, un2+1 = un, n ≥ 1. Find a closed form for this recursion. |
|
|
|||||||||||
Solution: Let v |
= log u . Then v |
n |
= log u = log u1/2 |
= 1 log u |
n−1 |
= vn−1 |
. As v |
n |
= v |
n−1 |
/2, we have v |
n |
= v /2n, that is, |
|
n |
n |
n |
n 1 |
2 |
2 |
|
|
|
0 |
|||||
log un = (log u0)/2n. Therefore, un = 31/2n . |
− |
|
|
|
|
|
|
|
|
|
|
|||
327 Example (Putnam 1985) Let d be a real number. For each integer m ≥ 0, define a sequence am ( j), j = 0, 1, 2, ··· by am (0) = 2dm , and am( j + 1) = (am( j + 1))2 + 2am( j), j ≥ 0. Evaluate
lim an(n). n→∞
Solution: Observe that am( j + 1) + 1 = (am( j))2 + 2am ( j) + 1 = (am( j) + 1)2. Put v j = am( j) + 1. Then v j+1 = v2j , and ln v j+1 = 2 ln v j ;
Put y j = ln v j. Then y j+1 = 2y j ; and hence 2ny0 = yn or 2n ln v0 = ln vn or vn = (v0)2n = (1 + 2dm )2n or am(n) + 1 = (1 + 2dm )2n . Thus an(n) = ( 2dn + 1)2n −1 → ed −1 as n → ∞.
7.3 Second Order Recursions
All the recursions that we have so far examined are first order recursions, that is, we find the next term of the sequence give n the preceding one. Let us now briefly examine how to solve some second order r ecursions.
We now outline a method for solving second order homogeneous linear recurrence relations of the form
xn = axn−1 + bxn−2 .
85
