The well-known Fibonacci sequence is defined by a recurrence. Specifically,letF i denote the ith number. Then, we have:
|
|
- Erick Shelton
- 5 years ago
- Views:
Transcription
1 Week 4 Recurrences (I) 4.1 The Fibonacci Sequence The well-known Fibonacci sequence is defined by a recurrence. Specifically,letF i denote the ith number. Then, we have: F 0 =0 (4.1) F 1 =1 (4.2) F n = F n 1 + F n 2,foralln 2. (4.3) Notice that the definition has 2 parts: the first 2 equations specify initial conditions while the last equation shows us how to generate the next term of the sequence, given the terms we have so far. This is quite similar to the Principle of Mathematical Induction, in which we show something is true explicitly for a base case, thenuseinductiontoshowthatitholdsinthenextcase,giventhatitholds for the cases we have considered so far. Such recurrences can be useful for a variety of counting problems. Here is one surprising example from Sanskrit poetry. Example 4.1. Suppose that each line of a poem is made up of some fixed number of beats. There are 2 kinds of syllables, heavy and light. Heavy syllables take up 2 beats, while light syllables take up 1 beat. How many di erent patterns of syllables are there for a line with n beats? Solution. There is one line with no beats (the empty line) and one line with a single beat (it has 1 light syllable). Think now about an arbitrary line with n 2 beats. How many ways can we make such a line? Well, we can end with either a heavy or light syllable (but obviously not both). If we end with a heavy syllable, 36
2 4.1. The Fibonacci Sequence MTH6109 Combinatorics (Fall 2017) the rest of the line must be made up of n 2beats. Thenumberoflinesthat end with a heavy syllable is then just the number of ways to make up an arbitrary line of n 2beats. Ifweendwithalightsyllable,therestofthelinemustbe made up of n 1beats. Thus,thenumberoflinesthatendwithalightsyllable is the number of ways to make up an arbitrary line with n 1beats.Bytherule of sum, we get that the number of lines with n beats is the number of lines with n 1 beats plus the number of lines with n 2 beats. By now, we recognise that this is exactly the Fibonacci sequence. 1 The recurrence gives us a way to compute F n iteratively starting from F 0.But what if we wanted to know F 10000? For this, it would be nice to have a direct formula for F n as a function of n alone. Over the next few lectures, we will see a general recipe for solving recurrences and turning recurrences into functions of n. Fornow,let sproceedaccordingtointuition Solving the Fibonacci Recurrence If we look at the first several terms of the Fibonacci sequence, we observe that they seem to be growing roughly exponentially. Based on this, we adopt the hypothesis that F n = x n,forsomeappropriatelychosenconstantx. Buthowdowedetermine x? Well,let slookattherecurrence.iff n = x n,then(4.3)becomes x n = x n 1 + x n 2. Dividing by x n 2 we get an order 2 polynomial: x 2 = x +1. Then, we only need to solve for x. Ignoringthetrivialsolutionx =0,wegetthe following pair of solutions (via the quadratic formula): For convenience, define: x = 1 ± p 5 2. = 1+p 5 2 = 1 p 5 2 Then, we must have that both F n = n and F n = n satisfy (4.3). We now need to make sure that the initial conditions (4.1) and (4.2) are valid. Here things get 1 There is admittedly some disagreement over whether we start the sequence with 0, 1, 1 or just with 1, 1, but you can verify the sequence of remaining terms is the same 37
3 4.2. Solving Linear Recurrences MTH6109 Combinatorics (Fall 2017) a little tricky. Notice that if F n = n and F n = n are both solutions to (4.3) then so F n = A n + B n for any constants A and B. Indeed, in that case we would have: F n = A n + B n = A( n 1 + n 2 )+B( n 1 + n 2 ) (Assume n and n satisfy (4.3)) =(A n 1 + B n 1 )+(A n 2 + B n 2 ) (Rearrange terms) = F n 1 + F n 2. So, let s choose A and B so that our initial conditions hold. If F n = A n + B n then equations (4.1) and (4.2) become: A 0 + B 0 =0 A 1 + B 1 =1 A + B =0 A + B =1. After a bit of algebraic wrangling, we find that A = p and B = p5. solution is then: Our F n = 1 p 5 n 1 p5 n = 1 p 5 1+ p 5 2! n 1 p5 1 2 p! n 5.. We can now observe another interesting property of the Fibonacci numbers. The number above is also known as the Golden Ratio, which occurs throughout nature and art. Notice that > 1while < 1. So, lim n n!1 =0,andthefirsttermisagoodapproximationforlargen. Intuitively, this means that for large n, the ratio between two consecutive Fibonacci numbers F is approximately the Golden Ratio. Indeed, one can show that lim n n!1 F n+1 =. 4.2 Solving Linear Recurrences We now generalise our previous discussion into a general recipe for solving recurrences of the following particular form. cients). We call a re- Definition 4.2 (Linear Recurrences with Constant Coe currence of the form: a n = b 1 a n 1 + b 2 a n b d a n d + f(n), where b 1,b 2,...,b d are constants and f : N! R, alinear recurrence of order d with constant coe cients. Iff(n) =0foralln, wesaythattherecurrence is homogeneous. Otherwise,wesaythatitisnon-homogeneous. 38
4 4.3. The Homogeneous Case MTH6109 Combinatorics (Fall 2017) 4.3 The Homogeneous Case First, we consider the easy case, in which f(n) =0. recurrence of the form: Then,weinfacthavea a n = b 1 a n 1 + b 2 a n b d a n d (4.4) where b 1,b 2,...,b d are constants. Suppose that we are also given d initial values a 0, a 1,..., a d.weproceedusingthefollowingrecipe. Step 1: Substitute x i for each term a i in the recurrence. Simplify to obtain adegreed polynomial in x. This is called the characteristic polynomial of the recurrence. We then solve the characteristic polynomial to obtain a set of roots for x. Suppose that we get k apple d di erent roots r 1,r 2,...r k with multiplicities m 1,m 2,...,m k.inotherwords,thecharacteristicpolynomialis equivalent to: (x r 1 ) m 1 (x r 2 ) m2 (x r k ) m k. Step 2: The general solution of the recurrence relation will be of the form: a n = r n 1 (A 1 + A 2 n + A 3 n A m1 n m 1 1 ) + r n 2 (B 1 + B 2 n + B 3 n B m2 n m 2 1 ) (4.5). + r n k (K 1 + K 2 n + K 3 n K mk n m k 1 ), where each capital letter represents an unknown coe cient. Notice that we will have exactly d unknown coe cients altogether. We also have d initial values a n for 0 apple n<d.pluggingthesedvalues into (4.5) together with the corresponding value of n gives a system of d linear equations in the unknown coe cients. We can therefore solve this system to find the correct coe cients. This gives the solution to the recurrence under the given initial conditions. This is all a bit abstract, so let s look at a concrete example. Example 4.3. Solve a n =3a n 1 4a n 3 with initial values a 0 =1,a 1 =2, a 2 =3. Solution. Let s go through our recipe 39
5 4.4. The Non-Homogeneous Case MTH6109 Combinatorics (Fall 2017) Step 1: We construct x n = 3x n 1 4x n 3. We simplify this to obtain the polynomial: x 3 3x 2 +4=0. We can factor this as So, we have k =2roots: (x +1)(x 2) 2 =0. r 1 = 1 m 1 =1 r 2 =2 m 2 =2. Step 2: Using the above roots, we form the general solution: a n =( 1) n A 1 +2 n (B 1 + B 2 n). (4.6) We combine this with our initial values to get the system: 1=a 0 =( 1) 0 A (B 1 +0 B 2 )=A 1 + B 1 2=a 1 =( 1) 1 A (B 1 +1 B 2 )= A 1 +2B 1 +2B 2 3=a 2 =( 1) 2 A (B 1 +2 B 2 )=A 1 +4B 1 +8B 2 Eliminating A 1 and simplifying, we get: 3=3B 1 +2B 2 5=6B 1 +10B 2 Finally, eliminating B 1 gives us B 2 = 1/6, and so B 1 =10/9, and A 1 = 1/9. Now, we substitute the values of these 3 coe cients into the general solution (4.6) to get our answer: a n = ( 1)n +2 n 9 n The Non-Homogeneous Case Now, let s turn to the more complicated case in which f(n) isnotidentically0. In this case, we need to guess an additional solution of a particular form in order to deal with f(n). Luckily, if f(n) issomepolynomialinn, thenthereisanapproach that is guaranteed to always work: guess a general polynomial in n of the same degree as f(n), then substitute into the recurrence to determine the coe cients.. 40
6 4.4. The Non-Homogeneous Case MTH6109 Combinatorics (Fall 2017) Let s formulate a general recipe for solving non-homogeneous linear recurrences with constant coe cients when f(n) is polynomial. In this case, we are looking at recurrences like: a n = b 1 a n 1 + b 2 a n b d a n d + f(n), (4.7) and assuming that f(n) isapolynomialofsomedegree`. As usual, to uniquely determine the solution, we must also be given d initial values of the form a 0,a 1,...a d. We now have a 3 step recipe: Step 1: Ignore the term f(n) intherecurrence(4.7)toobtainahomogeneous recurrence of the form: a n = b 1 a n 1 + b 2 a n b d a n d. Use Step 1 from Section 4.3 to get a general solution to this recurrence. That is, find the characteristic polynomial, determine its roots, and then construct a solution with d unknown coe cients, as in (4.5). Call this expression the general (homogeneous) solution a (h). Step 2: We assume that f(n)isapolynomialofdegreeh. Considerageneral degree ` polynomial p(n) with` + 1 unknown coe cients P i,0appleiapple`: p(n) =P`n` + P` 1 n` P 1 n + P 0. Substitute a n = p(n) intotheoriginalnon-homogeneousrecurrence. This gives a single equation, relating 2 degree ` polynomials. Two polynomials are equal for all n if and only if each term n i has the same coe cient for 0 apple i apple `. Thus, we now get ` +1 equations: one for each 0apple i apple ` that involves all the terms like Xn i.solvingthesewecanfindthevaluesofthe`+1 coe cients P i for p(n). If we set the coe cients to these values, the resulting polynomial will be a solution of our recurrence (4.7). This polynomial is a particular solution, which we call a (p) n. Step 3: We now find the remaining coe cients from Step 1, using our initial values. We take the solution: a n = a (h) n + a (p) n. We substitute each initial value into this equation (together with the corresponding value of n). We get d equations over d unknown coe cients as before. We then solve to find the solution. 41
7 4.4. The Non-Homogeneous Case MTH6109 Combinatorics (Fall 2017) Notice that we proceed essentially as in the homogeneous case, ignoring f(n), except that we carry out an intermediate step. Specifically, in Step 2 we find a particular solution corresponding to the term f(n). We then add this solution onto the homogeneous solution before finding our coe cients using the given initial values in the last step. As before, let s see an example. Example 4.4. Solve the recurrence a n =3a n 1 4a n 3 +6n 9withinitial values a 0 = 1, a 1 =5,anda 2 =18. Solution. Here we have f(n) =6n apply the recipe: 9, which is a polynomial of degree 1. Let s Step 1: Ignoring the term 6n 9correspondingtof(n) wegetahomogeneous recurrence: a n =3a n 1 4a n 3. We form the characteristic polynomial, find its roots, and construct a general solution. This is done exactly as in the previous example. We find: a (h) n =( 1) n A 1 +2 n (B 1 + B 2 n) (4.8) Step 2: Here f(n) =6n 9isapolynomialofdegree` =1. Wethusconstruct ageneraldegree1polynomial: p(n) =P 1 n + P 0. Substituting p(n) infora n in our original (non-homogeneous) recurrence for this problem we get: P 1 n + P 0 =3P 1 (n 1) + 3P 0 4P 1 (n 3) 4P 0 +6n 9. Now, equating the coe cients for each power of n above gives us 2 equations: one for terms involving n and one for constant terms: P 1 n =3P 1 n 4P 1 n +6n P 0 = 3P 1 +3P 0 +12P 1 4P 0 9. Solving the first we get P 1 = 3, and so we must then have P 0 = 9. So, our particular solution is: a (p) n =3n +9. (4.9) 42
8 4.4. The Non-Homogeneous Case MTH6109 Combinatorics (Fall 2017) Step 3: solution: We add the general solution (4.8) and particular solution (4.9) to get a a n = a (h) n + a (p) n =( 1) n A 1 +2 n (B 1 + B 2 n)+3n +9. This gives us an equation corresponding to each of the initial values a 0, a 1, a 2. Specifically, we have: 1=A 1 + B 1 +9 (n =0) 5= A 1 +2B 1 +2B (n =1) 18 = A 1 +4B 1 +8B (n =2) Just as before, we have a linear system of 3 equations in 3 unknowns. Solving this system gives A 1 = 1, B 1 = 9andB 2 =5. Thus,oursolutionis: a n =( 1) n ( 1) + 2 n ( 9+5n)+3n +9 =( 1) n+1 +2 n (5n 9) + 3n +9. Finally, let s see an example of using recurrences to solve real problems. Example 4.5. You take out a 1000 loan, with an interest rate of 10%, compounded monthly. How long will it take you to pay it o, if you make a monthly payment of 150? Proof. We can model this as a recurrence. Let a n be the balance you owe n months after you take the loan. Then, this is equal to the previous balance plus 10% interest, minus the payment you make at the end of the month. That is: a n = a n a n = 1.1 a n This is a degree 1, non-homogeneous linear recurrence with constant coe cients. Also, the term f(n) isjustadegree0polynomialf(n) =100,sowecanusethe machinery we ve seen to solve it. Step 1: We form the homogeneous recurrence: a n =1.1 a n 1. This has characteristic polynomial x 1.1 =0 which has 1 root r 1 =1.1 of multiplicity 1. So our general solution is: a n =(1.1) n A 0. (4.10) 43
9 4.4. The Non-Homogeneous Case MTH6109 Combinatorics (Fall 2017) Step 2: Since f(n) isadegree0polynomial,weconsideranarbitrarydegree0 polynomial p(n) =P 0. We substitute p(n) =P 0 into our recurrence for a n. We get: P 0 =1.1 P Then, we must have 0.1 P 0 = 150, and so P 0 =1500. Thisgivesusaparticular solution of: a (p) n =1500. (4.11) Step 3: Now, we combine (4.10) and (4.11) to get: a n = a (h) n + a (p) n =(1.1) n A Substituting in our initial value a 0 =1000forn =0weget: 1000 = A and so A 0 = 500. Our final equation is then: a n = (1.1) n. (4.12) Let s sanity check our work before we go further. We can do this using mathematical induction. We want to show that (4.12) is a solution for all n. Thebasecasecorresponds to our initial value a 0 =1000. Indeed,wehavea 0 = (1.1 0 )= For the induction step, let s assume that a n = (1.1) n and consider a n+1.fromtherecurrence,weget: a n+1 =(1.1)a n 150 =(1.1) ( (1.1) n ) 150 = (1.1) n = (1.1) n+1 as required. Note that we used the induction hypothesis in the second line. To complete the problem we need only figure out how big n has to be before a n apple 0. This is precisely when (1.1) n apple 0 So it takes 12 months to repay the loan. n 500 (1.1) n apple 1500 (1.1) n 3 n ln 1.1 ln 3 ln 3 ln
10 4.5. A Recurrence for Derangements MTH6109 Combinatorics (Fall 2017) 4.5 A Recurrence for Derangements In order to get a feel for how to model problems by recurrences, let us reconsider derangements, as first discussed in Section 3.3. Remember that a derangement on n elements is just a permutation f :[n]! [n]withthepropertythatf(i) 6= i for all i 2 [n]. In Theorem 3.14 we derived a formula for the number of derangements of n elements by using Inclusion-Exclusion. However, we can also solve the problem with recurrences A Second-Order Recurrence Let D n be the number of derangements on [n]. In order to apply recurrences to solve a di cult counting problem, we usually proceed similarly to Example 4.1. First, we work out a few small terms by brute force. By thinking carefully, we find that D 0 =1,andD 1 =0. Thereisonefunctiononnoelements: itisthe empty function f : ;!;. Clearly there is then no element i such that f(i) =i, because the domain of f is empty. Thus D 0 =1. Forasingleelement,theonly function f : {1}!{1} is the identity function f(1) = 1 and clearly this is not a derangement, so D 1 =0. For{1, 2} we have 2 permutations, but only one of them is a derangement: the one that sets f(1) = 2 and f(2) = 1. Now, let s see if we can do the di cult part. The trick here is to think about an object of size n, andthenimagineallofthedi erentwaysthatwecouldmakesome final choice when constructing this object. For each of these final choices, we try to show that the number of objects made with this choice is somehow related to the total number of objects of size less than n. In Example 4.1 we thought about the last syllable chosen for the line. It could have 1 or 2 beats. We then saw that in the case the number of possible ways to choose the syllables in each case was the number of ways to fill the first n 1and n 2beats,respectively.Ingeneral,weworkbystartingwithanobjectofsizen, then think backwards. Weimagineeachlaststep,thenfigureouthowmanyways we could have gotten to that step. Here, we imagine a derangement on [n] andthinkaboutchoosingthemapping f(n). Since we cannot have f(n) =n, therearen 1forthiselement,ingeneral. For each possible choice f(n) =i, howmanywayscouldwehaveconstructedsuch aderangement? Unfortunately, things are now not so obvious, but here is an idea: f maps n to i; wheredoesitmapi to? We consider 2 cases. First, suppose that f(i) = n. Then, f swaps i and n. We have n 2otherelementsin[n] \{i, n} and they must map to elements of [n] \{i, n}. So, in this case each derangement must take each element in j 2 [n] \{i, n} to some other element of f(j) 2 [n] \{i, n}, with f(j) 6= j. Butthesemappingscorrespondexactlytoderangementsonn 2 45
11 4.5. A Recurrence for Derangements MTH6109 Combinatorics (Fall 2017) elements. Summarising, we have the following: Claim 4.6. For any i 6= n, thenumberofpossiblederangementson[n] withf(n) = i and f(i) =n is D n 2. Now, suppose that f(i) 6= n. Then, there must be some other element j 6= i such that f(j) =n. We construct a derangement g :[n 1]! [n 1] from f as follows. For all x 2 [n] \{n, j}, setg(x) =f(x). Then, since f was a derangement we have g(x) 6= x for all of such x. Moreover,g(x) 6= n for all x 6= j, sotherange of g is contained in [n 1] as required. So far so good, but our problem is that g does not yet map the element j to anything and (since f(n) =i) g does not yet map anything to element i. Wefixthisbysimplysettingg(j) = i. Now, the range and domain of g are [n 1] as required. Moreover, since j 6= i by assumption, g is now a derangement. We now claim that this operation produces a one-to-one correspondence between the derangements f on [n] withf(n) =i and f(i) 6= n and the derangements g on [n 1]. First we show that it is surjective. Note that every derangement g on [n 1] must have g(j) =i for some j 6= i. Wecouldindeedobtainsuchag from the derangement f on [n] thatagreeswithg on all x 62 {n, j} but has f(j) =n, and f(n) =i. Notice that, as required, we also have f(i) 6= n since f(j) =n and j 6= i. Next, we show that our operation is injective. Suppose that we have two derangements f 1 6= f 2 on [n] withf 1 (n) =i, f 1 (i) 6= n and f 2 (n) =i, f 2 (i) 6= n. Consider the derangements g 1 and g 2 on [n 1] produced by applying our operation to f 1 and f 2,respectively. Wewillshowthatg 1 6= g 2. Let j 1 = f1 1 (n) and j 2 = f2 1 (n). Then, our procedure sets g 1 (j 1 )=f 1 (n) =i and g 2 (j 2 )=f 2 (n) =i. If j 1 6= j 2,wegetthatg 1 6= g 2 (they map di erent elements to i). Suppose that j 1 = j 2.Theremustbesomexsuch that f 1 (x) 6= f 2 (x), since f 1 6= f 2.Wecannot have x = n, sincef 1 (n) =i and f 2 (n) =i. Also, we cannot have x = j 1 (= j 2 ) since f 1 (j 1 )=n and f 2 (j 2 )=n. But, this means that we set g 1 (x) =f 1 (x) and g 2 (x) =f 2 (x) soalsog 1 (x) 6= g 2 (x). Again g 1 and g 2 are di erent as required. By the Correspondence Principle we then have: Claim 4.7. For any i 6= n, thenumberofpossiblederangementson[n] withf(n) = i and f(i) 6= n is D n 1. Putting everything together we get our main recurrence Theorem 4.8. For any i 0, let D i be the number of derangements on [i]. Then, D 0 =1,D 1 =0,andforalln 2: D n =(n 1)(D n 1 + D n 2 ) Proof. Consider a derangement f on [n]. As we discussed there are n 1di erent 46
12 4.5. A Recurrence for Derangements MTH6109 Combinatorics (Fall 2017) choices for f(n). For each such choice of i, thereared n 1 derangements with f(n) =i and f(i) =n and D n 2 derangements with f(n) =i and f(i) 6= n. Bythe Rule of Sum there are then altogether D n 1 + D n 2 derangements with f(n) =i. Since there are n 1choicesfori, eachleadingtoauniquesetofd n 1 + D n 2 derangements, the Rule of Product gives that D n =(n 1)(D n 1 + D n 2 ). Notice that this recurrence ended up looking very similar to the Fibonacci recurrence. It is a linear recurrence, but unfortunately it has non-constant coe - cients, so our recipes cannot be applied. 47
CDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.
CDM Recurrences and Fibonacci 1 Recurrence Equations Klaus Sutner Carnegie Mellon University Second Order 20-fibonacci 2017/12/15 23:16 The Fibonacci Monoid Recurrence Equations 3 Terminology 4 We can
More information1 Basic Combinatorics
1 Basic Combinatorics 1.1 Sets and sequences Sets. A set is an unordered collection of distinct objects. The objects are called elements of the set. We use braces to denote a set, for example, the set
More informationCDM. Recurrences and Fibonacci
CDM Recurrences and Fibonacci Klaus Sutner Carnegie Mellon University 20-fibonacci 2017/12/15 23:16 1 Recurrence Equations Second Order The Fibonacci Monoid Recurrence Equations 3 We can define a sequence
More informationOrdinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore
Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Module - 3 Lecture - 10 First Order Linear Equations (Refer Slide Time: 00:33) Welcome
More informationGenerating Function Notes , Fall 2005, Prof. Peter Shor
Counting Change Generating Function Notes 80, Fall 00, Prof Peter Shor In this lecture, I m going to talk about generating functions We ve already seen an example of generating functions Recall when we
More informationCDM Combinatorial Principles
CDM Combinatorial Principles 1 Counting Klaus Sutner Carnegie Mellon University Pigeon Hole 22-in-exclusion 2017/12/15 23:16 Inclusion/Exclusion Counting 3 Aside: Ranking and Unranking 4 Counting is arguably
More informationCS1800: Strong Induction. Professor Kevin Gold
CS1800: Strong Induction Professor Kevin Gold Mini-Primer/Refresher on Unrelated Topic: Limits This is meant to be a problem about reasoning about quantifiers, with a little practice of other skills, too
More informationSYDE 112, LECTURE 7: Integration by Parts
SYDE 112, LECTURE 7: Integration by Parts 1 Integration By Parts Consider trying to take the integral of xe x dx. We could try to find a substitution but would quickly grow frustrated there is no substitution
More informationExample. How to Guess What to Prove
How to Guess What to Prove Example Sometimes formulating P (n) is straightforward; sometimes it s not. This is what to do: Compute the result in some specific cases Conjecture a generalization based on
More informationMATH 320, WEEK 7: Matrices, Matrix Operations
MATH 320, WEEK 7: Matrices, Matrix Operations 1 Matrices We have introduced ourselves to the notion of the grid-like coefficient matrix as a short-hand coefficient place-keeper for performing Gaussian
More informationCountability. 1 Motivation. 2 Counting
Countability 1 Motivation In topology as well as other areas of mathematics, we deal with a lot of infinite sets. However, as we will gradually discover, some infinite sets are bigger than others. Countably
More informationBasic counting techniques. Periklis A. Papakonstantinou Rutgers Business School
Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED
More informationLAMC Advanced Circle May 21, Jason O Neill and Brad Dirks
LAMC Advanced Circle May 21, 2017 Jason O Neill and Brad Dirks jasonmoneill9@g.ucla.edu, bdirks@ucla.edu Definition 1. Let σ S n be a permutation. We say i is a fixed point of σ if σ(i) = i. In other words,
More informationQuick Sort Notes , Spring 2010
Quick Sort Notes 18.310, Spring 2010 0.1 Randomized Median Finding In a previous lecture, we discussed the problem of finding the median of a list of m elements, or more generally the element of rank m.
More informationDiscrete Mathematics. Kishore Kothapalli
Discrete Mathematics Kishore Kothapalli 2 Chapter 4 Advanced Counting Techniques In the previous chapter we studied various techniques for counting and enumeration. However, there are several interesting
More informationMATH 243E Test #3 Solutions
MATH 4E Test # Solutions () Find a recurrence relation for the number of bit strings of length n that contain a pair of consecutive 0s. You do not need to solve this recurrence relation. (Hint: Consider
More informationChapter 11 - Sequences and Series
Calculus and Analytic Geometry II Chapter - Sequences and Series. Sequences Definition. A sequence is a list of numbers written in a definite order, We call a n the general term of the sequence. {a, a
More informationFourth Lecture: 11/4
Fourth Lecture: 11/4 Definition 4.1. A sequence a n ) n=1 of complex numbers is said to be defined recursively, or to satsify a recurrence relation, if there exists a fixed k N, called the degree of the
More informationModern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur
Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur Lecture 02 Groups: Subgroups and homomorphism (Refer Slide Time: 00:13) We looked
More information6 CARDINALITY OF SETS
6 CARDINALITY OF SETS MATH10111 - Foundations of Pure Mathematics We all have an idea of what it means to count a finite collection of objects, but we must be careful to define rigorously what it means
More informationEXAMPLES OF PROOFS BY INDUCTION
EXAMPLES OF PROOFS BY INDUCTION KEITH CONRAD 1. Introduction In this handout we illustrate proofs by induction from several areas of mathematics: linear algebra, polynomial algebra, and calculus. Becoming
More informationSome Review Problems for Exam 3: Solutions
Math 3355 Spring 017 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want
More informationMath 123, Week 2: Matrix Operations, Inverses
Math 23, Week 2: Matrix Operations, Inverses Section : Matrices We have introduced ourselves to the grid-like coefficient matrix when performing Gaussian elimination We now formally define general matrices
More informationConnectedness. Proposition 2.2. The following are equivalent for a topological space (X, T ).
Connectedness 1 Motivation Connectedness is the sort of topological property that students love. Its definition is intuitive and easy to understand, and it is a powerful tool in proofs of well-known results.
More informationEx. Here's another one. We want to prove that the sum of the cubes of the first n natural numbers is. n = n 2 (n+1) 2 /4.
Lecture One type of mathematical proof that goes everywhere is mathematical induction (tb 147). Induction is essentially used to show something is true for all iterations, i, of a sequence, where i N.
More informationSome Review Problems for Exam 3: Solutions
Math 3355 Fall 018 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want
More informationAdvanced Counting Techniques. Chapter 8
Advanced Counting Techniques Chapter 8 Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence Relations Nonhomogeneous Recurrence Relations Divide-and-Conquer
More informationGeneral Comments on Proofs by Mathematical Induction
Fall 2015: CMSC250 Notes on Mathematical Induction Proofs General Comments on Proofs by Mathematical Induction All proofs by Mathematical Induction should be in one of the styles below. If not there should
More informationMATH 802: ENUMERATIVE COMBINATORICS ASSIGNMENT 2
MATH 80: ENUMERATIVE COMBINATORICS ASSIGNMENT KANNAPPAN SAMPATH Facts Recall that, the Stirling number S(, n of the second ind is defined as the number of partitions of a [] into n non-empty blocs. We
More informationSolutions to Tutorial 4 (Week 5)
The University of Sydney School of Mathematics and Statistics Solutions to Tutorial 4 (Week 5) MATH2069/2969: Discrete Mathematics and Graph Theory Semester 1, 2018 1. Prove by induction that, for all
More informationMATH39001 Generating functions. 1 Ordinary power series generating functions
MATH3900 Generating functions The reference for this part of the course is generatingfunctionology by Herbert Wilf. The 2nd edition is downloadable free from http://www.math.upenn. edu/~wilf/downldgf.html,
More informationCS 2110: INDUCTION DISCUSSION TOPICS
CS 110: INDUCTION DISCUSSION TOPICS The following ideas are suggestions for how to handle your discussion classes. You can do as much or as little of this as you want. You can either present at the board,
More informationLecture 3: Big-O and Big-Θ
Lecture 3: Big-O and Big-Θ COSC4: Algorithms and Data Structures Brendan McCane Department of Computer Science, University of Otago Landmark functions We saw that the amount of work done by Insertion Sort,
More information36 What is Linear Algebra?
36 What is Linear Algebra? The authors of this textbook think that solving linear systems of equations is a big motivation for studying linear algebra This is certainly a very respectable opinion as systems
More informationq-series Michael Gri for the partition function, he developed the basic idea of the q-exponential. From
q-series Michael Gri th History and q-integers The idea of q-series has existed since at least Euler. In constructing the generating function for the partition function, he developed the basic idea of
More informationLecture 10: Powers of Matrices, Difference Equations
Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each
More information5. Sequences & Recursion
5. Sequences & Recursion Terence Sim 1 / 42 A mathematician, like a painter or poet, is a maker of patterns. Reading Sections 5.1 5.4, 5.6 5.8 of Epp. Section 2.10 of Campbell. Godfrey Harold Hardy, 1877
More informationDiscrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3
EECS 70 Discrete Mathematics and Probability Theory Spring 014 Anant Sahai Note 3 Induction Induction is an extremely powerful tool in mathematics. It is a way of proving propositions that hold for all
More informationCS1800: Mathematical Induction. Professor Kevin Gold
CS1800: Mathematical Induction Professor Kevin Gold Induction: Used to Prove Patterns Just Keep Going For an algorithm, we may want to prove that it just keeps working, no matter how big the input size
More informationGeneral Comments Proofs by Mathematical Induction
CMSC351 Notes on Mathematical Induction Proofs These are examples of proofs used in cmsc250. These proofs tend to be very detailed. You can be a little looser. General Comments Proofs by Mathematical Induction
More informationINEQUALITIES OF SYMMETRIC FUNCTIONS. 1. Introduction to Symmetric Functions [?] Definition 1.1. A symmetric function in n variables is a function, f,
INEQUALITIES OF SMMETRIC FUNCTIONS JONATHAN D. LIMA Abstract. We prove several symmetric function inequalities and conjecture a partially proved comprehensive theorem. We also introduce the condition of
More information2.5 The Fundamental Theorem of Algebra.
2.5. THE FUNDAMENTAL THEOREM OF ALGEBRA. 79 2.5 The Fundamental Theorem of Algebra. We ve seen formulas for the (complex) roots of quadratic, cubic and quartic polynomials. It is then reasonable to ask:
More informationProblems for M 11/2: A =
Math 30 Lesieutre Problem set # November 0 Problems for M /: 4 Let B be the basis given by b b Find the B-matrix for the transformation T : R R given by x Ax where 3 4 A (This just means the matrix for
More informationMath Circle: Recursion and Induction
Math Circle: Recursion and Induction Prof. Wickerhauser 1 Recursion What can we compute, using only simple formulas and rules that everyone can understand? 1. Let us use N to denote the set of counting
More information1 The distributive law
THINGS TO KNOW BEFORE GOING INTO DISCRETE MATHEMATICS The distributive law The distributive law is this: a(b + c) = ab + bc This can be generalized to any number of terms between parenthesis; for instance:
More informationc 2007 Je rey A. Miron
Review of Calculus Tools. c 007 Je rey A. Miron Outline 1. Derivatives. Optimization 3. Partial Derivatives. Optimization again 5. Optimization subject to constraints 1 Derivatives The basic tool we need
More informationMath 475, Problem Set #8: Answers
Math 475, Problem Set #8: Answers A. Brualdi, problem, parts (a), (b), and (d). (a): As n goes from to 6, the sum (call it h n ) takes on the values,, 8, 2, 55, and 44; we recognize these as Fibonacci
More informationAsymptotic Analysis and Recurrences
Appendix A Asymptotic Analysis and Recurrences A.1 Overview We discuss the notion of asymptotic analysis and introduce O, Ω, Θ, and o notation. We then turn to the topic of recurrences, discussing several
More informationSome Review Problems for Exam 2: Solutions
Math 5366 Fall 017 Some Review Problems for Exam : Solutions 1 Find the coefficient of x 15 in each of the following: 1 (a) (1 x) 6 Solution: 1 (1 x) = ( ) k + 5 x k 6 k ( ) ( ) 0 0 so the coefficient
More informationWarm-up Simple methods Linear recurrences. Solving recurrences. Misha Lavrov. ARML Practice 2/2/2014
Solving recurrences Misha Lavrov ARML Practice 2/2/2014 Warm-up / Review 1 Compute 100 k=2 ( 1 1 ) ( = 1 1 ) ( 1 1 ) ( 1 1 ). k 2 3 100 2 Compute 100 k=2 ( 1 1 ) k 2. Homework: find and solve problem Algebra
More information5 + 9(10) + 3(100) + 0(1000) + 2(10000) =
Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,
More informationABSTRACT VECTOR SPACES AND THE CONCEPT OF ISOMORPHISM. Executive summary
ABSTRACT VECTOR SPACES AND THE CONCEPT OF ISOMORPHISM MATH 196, SECTION 57 (VIPUL NAIK) Corresponding material in the book: Sections 4.1 and 4.2. General stuff... Executive summary (1) There is an abstract
More informationAdvanced Counting Techniques
. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education. Advanced Counting
More informationMITOCW ocw f99-lec01_300k
MITOCW ocw-18.06-f99-lec01_300k Hi. This is the first lecture in MIT's course 18.06, linear algebra, and I'm Gilbert Strang. The text for the course is this book, Introduction to Linear Algebra. And the
More informationCSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!
CSCE 222 Discrete Structures for Computing Review for Exam 2 Dr. Hyunyoung Lee 1 Strategy for Exam Preparation - Start studying now (unless have already started) - Study class notes (lecture slides and
More informationWhen we use asymptotic notation within an expression, the asymptotic notation is shorthand for an unspecified function satisfying the relation:
CS 124 Section #1 Big-Oh, the Master Theorem, and MergeSort 1/29/2018 1 Big-Oh Notation 1.1 Definition Big-Oh notation is a way to describe the rate of growth of functions. In CS, we use it to describe
More informationand The important theorem which connects these various spaces with each other is the following: (with the notation above)
When F : U V is a linear transformation there are two special subspaces associated to F which are very important. One is a subspace of U and the other is a subspace of V. They are: kerf U (the kernel of
More informationUnit Combinatorics State pigeonhole principle. If k pigeons are assigned to n pigeonholes and n < k then there is at least one pigeonhole containing more than one pigeons. Find the recurrence relation
More informationLearning Objectives
Learning Objectives Learn about recurrence relations Learn the relationship between sequences and recurrence relations Explore how to solve recurrence relations by iteration Learn about linear homogeneous
More information1 GSW Sets of Systems
1 Often, we have to solve a whole series of sets of simultaneous equations of the form y Ax, all of which have the same matrix A, but each of which has a different known vector y, and a different unknown
More informationTheorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)
Week 1: Logic Lecture 1, 8/1 (Sections 1.1 and 1.3) Examples of theorems and proofs Theorem (Pythagoras). Let ABC be a right triangle, with legs of lengths a and b, and hypotenuse of length c. Then a +
More informationCombinatorics. But there are some standard techniques. That s what we ll be studying.
Combinatorics Problem: How to count without counting. How do you figure out how many things there are with a certain property without actually enumerating all of them. Sometimes this requires a lot of
More informationCartesian Products and Relations
Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) : (a A) and (b B)}. The following points are worth special
More information1.1.1 Algebraic Operations
1.1.1 Algebraic Operations We need to learn how our basic algebraic operations interact. When confronted with many operations, we follow the order of operations: Parentheses Exponentials Multiplication
More informationMA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 3
MA008 p.1/37 MA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 3 Dr. Markus Hagenbuchner markus@uow.edu.au. MA008 p.2/37 Exercise 1 (from LN 2) Asymptotic Notation When constants appear in exponents
More informationSEQUENCES & SERIES. Arithmetic sequences LESSON
LESSON SEQUENCES & SERIES In mathematics you have already had some experience of working with number sequences and number patterns. In grade 11 you learnt about quadratic or second difference sequences.
More informationEvery subset of {1, 2,...,n 1} can be extended to a subset of {1, 2, 3,...,n} by either adding or not adding the element n.
11 Recurrences A recurrence equation or recurrence counts things using recursion. 11.1 Recurrence Equations We start with an example. Example 11.1. Find a recurrence for S(n), the number of subsets of
More informationLecture 2: Divide and conquer and Dynamic programming
Chapter 2 Lecture 2: Divide and conquer and Dynamic programming 2.1 Divide and Conquer Idea: - divide the problem into subproblems in linear time - solve subproblems recursively - combine the results in
More informationComputational Complexity. This lecture. Notes. Lecture 02 - Basic Complexity Analysis. Tom Kelsey & Susmit Sarkar. Notes
Computational Complexity Lecture 02 - Basic Complexity Analysis Tom Kelsey & Susmit Sarkar School of Computer Science University of St Andrews http://www.cs.st-andrews.ac.uk/~tom/ twk@st-andrews.ac.uk
More informationSPECIAL POINTS AND LINES OF ALGEBRAIC SURFACES
SPECIAL POINTS AND LINES OF ALGEBRAIC SURFACES 1. Introduction As we have seen many times in this class we can encode combinatorial information about points and lines in terms of algebraic surfaces. Looking
More informationGenerating Functions
8.30 lecture notes March, 0 Generating Functions Lecturer: Michel Goemans We are going to discuss enumeration problems, and how to solve them using a powerful tool: generating functions. What is an enumeration
More informationDiscrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1
CS 70 Discrete Mathematics and Probability Theory Fall 013 Vazirani Note 1 Induction Induction is a basic, powerful and widely used proof technique. It is one of the most common techniques for analyzing
More informationLecture 4: September Reminder: convergence of sequences
36-705: Intermediate Statistics Fall 2017 Lecturer: Siva Balakrishnan Lecture 4: September 6 In this lecture we discuss the convergence of random variables. At a high-level, our first few lectures focused
More informationMITOCW ocw f99-lec09_300k
MITOCW ocw-18.06-f99-lec09_300k OK, this is linear algebra lecture nine. And this is a key lecture, this is where we get these ideas of linear independence, when a bunch of vectors are independent -- or
More informationCSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010
CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010 We now embark on a study of computational classes that are more general than NP. As these classes
More informationSum of Squares. Defining Functions. Closed-Form Expression for SQ(n)
CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims Lecture 22: Induction Overview Recursion A programming strategy that solves a problem by reducing it to simpler
More informationConfidence intervals
Confidence intervals We now want to take what we ve learned about sampling distributions and standard errors and construct confidence intervals. What are confidence intervals? Simply an interval for which
More informationIntroductory Quantum Chemistry Prof. K. L. Sebastian Department of Inorganic and Physical Chemistry Indian Institute of Science, Bangalore
Introductory Quantum Chemistry Prof. K. L. Sebastian Department of Inorganic and Physical Chemistry Indian Institute of Science, Bangalore Lecture - 4 Postulates Part 1 (Refer Slide Time: 00:59) So, I
More informationInduction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2
Induction 0-8-08 Induction is used to prove a sequence of statements P(), P(), P(3),... There may be finitely many statements, but often there are infinitely many. For example, consider the statement ++3+
More informationProblem Solving in Math (Math 43900) Fall 2013
Problem Solving in Math (Math 43900) Fall 203 Week six (October ) problems recurrences Instructor: David Galvin Definition of a recurrence relation We met recurrences in the induction hand-out. Sometimes
More information12 Sequences and Recurrences
12 Sequences and Recurrences A sequence is just what you think it is. It is often given by a formula known as a recurrence equation. 12.1 Arithmetic and Geometric Progressions An arithmetic progression
More informationMathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur. Lecture 1 Real Numbers
Mathematics-I Prof. S.K. Ray Department of Mathematics and Statistics Indian Institute of Technology, Kanpur Lecture 1 Real Numbers In these lectures, we are going to study a branch of mathematics called
More informationMA1131 Lecture 15 (2 & 3/12/2010) 77. dx dx v + udv dx. (uv) = v du dx dx + dx dx dx
MA3 Lecture 5 ( & 3//00) 77 0.3. Integration by parts If we integrate both sides of the proct rule we get d (uv) dx = dx or uv = d (uv) = dx dx v + udv dx v dx dx + v dx dx + u dv dx dx u dv dx dx This
More information3 The language of proof
3 The language of proof After working through this section, you should be able to: (a) understand what is asserted by various types of mathematical statements, in particular implications and equivalences;
More information2 Discrete Dynamical Systems (DDS)
2 Discrete Dynamical Systems (DDS) 2.1 Basics A Discrete Dynamical System (DDS) models the change (or dynamics) of single or multiple populations or quantities in which the change occurs deterministically
More information(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).
CMPSCI611: Verifying Polynomial Identities Lecture 13 Here is a problem that has a polynomial-time randomized solution, but so far no poly-time deterministic solution. Let F be any field and let Q(x 1,...,
More informationLecture 3 - Tuesday July 5th
Lecture 3 - Tuesday July 5th jacques@ucsd.edu Key words: Identities, geometric series, arithmetic series, difference of powers, binomial series Key concepts: Induction, proofs of identities 3. Identities
More informationSection 11.1: Sequences
Section 11.1: Sequences In this section, we shall study something of which is conceptually simple mathematically, but has far reaching results in so many different areas of mathematics - sequences. 1.
More informationCHAPTER 1. FUNCTIONS 7
CHAPTER 1. FUNCTIONS 7 1.3.2 Polynomials A polynomial is a function P with a general form P (x) a 0 + a 1 x + a 2 x 2 + + a n x n, (1.4) where the coe cients a i (i 0, 1,...,n) are numbers and n is a non-negative
More informationMath 38: Graph Theory Spring 2004 Dartmouth College. On Writing Proofs. 1 Introduction. 2 Finding A Solution
Math 38: Graph Theory Spring 2004 Dartmouth College 1 Introduction On Writing Proofs What constitutes a well-written proof? A simple but rather vague answer is that a well-written proof is both clear and
More informationSection 3.6 Complex Zeros
04 Chapter Section 6 Complex Zeros When finding the zeros of polynomials, at some point you're faced with the problem x = While there are clearly no real numbers that are solutions to this equation, leaving
More informationMAT137 - Term 2, Week 2
MAT137 - Term 2, Week 2 This lecture will assume you have watched all of the videos on the definition of the integral (but will remind you about some things). Today we re talking about: More on the definition
More informationFunctions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014
Functions and cardinality (solutions) 21-127 sections A and F TA: Clive Newstead 6 th May 2014 What follows is a somewhat hastily written collection of solutions for my review sheet. I have omitted some
More informationThe integers. Chapter 3
Chapter 3 The integers Recall that an abelian group is a set A with a special element 0, and operation + such that x +0=x x + y = y + x x +y + z) =x + y)+z every element x has an inverse x + y =0 We also
More informationSolving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 =
Solving Recurrence Relations 1. Guess and Math Induction Example: Find the solution for a n = 2a n 1 + 1, a 0 = 0 We can try finding each a n : a 0 = 0 a 1 = 2 0 + 1 = 1 a 2 = 2 1 + 1 = 3 a 3 = 2 3 + 1
More informationRecurrences COMP 215
Recurrences COMP 215 Analysis of Iterative Algorithms //return the location of the item matching x, or 0 if //no such item is found. index SequentialSearch(keytype[] S, in, keytype x) { index location
More informationCosets and Lagrange s theorem
Cosets and Lagrange s theorem These are notes on cosets and Lagrange s theorem some of which may already have been lecturer. There are some questions for you included in the text. You should write the
More informationCHAPTER 8 Advanced Counting Techniques
96 Chapter 8 Advanced Counting Techniques CHAPTER 8 Advanced Counting Techniques SECTION 8. Applications of Recurrence Relations 2. a) A permutation of a set with n elements consists of a choice of a first
More informationSeunghee Ye Ma 8: Week 2 Oct 6
Week 2 Summary This week, we will learn about sequences and real numbers. We first define what we mean by a sequence and discuss several properties of sequences. Then, we will talk about what it means
More informationSeminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)
http://math.sun.ac.za/amsc/sam Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics 2009-2010 Lecture notes in progress (27 March 2010) Contents 2009 Semester I: Elements 5 1. Cartesian product
More information