Mathematical Preliminaries

Size: px
Start display at page:

Download "Mathematical Preliminaries"

Transcription

1 Matheatical Preliiaries I this chapter we ll review soe atheatical cocepts that will be used throughout this course. We ll also lear soe ew atheatical otatios ad techiques that are iportat for aalysis of algoriths.. Floors ad Ceiligs I doig coputer coputatios, we soeties have to discard the fractioal part of a real uber x, while i other cases we ay have to roud upward to the first iteger larger tha or equal to x. It is coveiet to have siple atheatical otatios that idicate these operatios. The floor ad ceilig otatios were iveted for this purpose. Notatios. We shall use N for the set of cardial or atural ubers, N = {0,,,...}, Z for the set of itegers, Q for the set of ratioal ubers, ad R for the set of real ubers. Defiitio.. The floor of a real uber x, deoted by x, is the largest iteger that is less tha or equal to x. The ceilig of a real uber x, deoted by x, is the sallest iteger that is greater tha or equal to x. We ca express these defiitios i the followig way: x =ax{k : k Z, k x}; x =i{k : k Z, k x}. Exaples =3; 0.04 =0; 0.04 = ; 6 =6;.04 =; 3.7 =4; 0.04 =; 0.04 =0; 6 =6;.04 =3. Spriger Iteratioal Publishig Switzerlad 04 D. Vrajitoru ad W. Kight, Practical Aalysis of Algoriths, Udergraduate Topics i Coputer Sciece, DOI 0.007/ _ 9

2 0 Matheatical Preliiaries I a C or C++ progra, a expressio of the for / idicates iteger divisio whe ad are of a iteger data type. The atheatical expressio deotes the exact value of the C/C++ expressio / whe ad are positive. Thus, whe reasoig about progras i which iteger divisio is perfored, we will ake repeated use of expressios such as. If you cosult the docuetatio for the C/C++ ath.h or cath library header file, you will fid that it cotais the followig two prototypes: double ceil (double x); double floor(double x); Note that the values retured by these two fuctios are of type double, ot log. This ay surprise you util you realize that floatig poit real ubers ca be far larger tha the iteger LONG_MAX, ad so i order to have expressios such as floor(3.8e9) retur a sesible value, the fuctio ust retur the iteger i floatig poit for. The followig lea gives us a property of itegers that we will use ofte i this chapter. Lea..3 Let ad be ay iteger ubers. If <, the + ad. Proof Suppose <. If + were greater tha, the would be a iteger strictly betwee ad +. That is ipossible. Thus + ust be less tha or equal to. It follows fro + that. The followig theore lists soe properties of floor ad ceilig that we will use throughout i this book. It gives us a better idea about how the floor ad the ceilig relate to their arguet ad to each other. Theore..4 Let x ad y be ay real ubers. Let,, ad k be ay itegers. (a) x x < x+; equivaletly, x < x x. (b) x < x x ; equivaletly, x x < x +. (c) If x < + (or x < x), the = x; siilarly, if < x (or x < x + ), the = x. (d) If x y, the x y ad x y. Siilarly for x y. (e) If x, the x. If x the x. (f) If x has a iteger value, the x =x = x. If x has a o-iteger value, the x = x+. (g) ( )x =( ) x ad ( )x =( ) x. Proof (a) Take ay real uber x. The iequality x x is true because the floor of x is a eleet of a set of itegers less tha or equal to x. The iequality x < x+ is true because x is the largest of the itegers less tha or equal

3 . Floors ad Ceiligs to x, ad x+ is a iteger larger tha x,so x+ caot be i the set of itegers less tha or equal to x. Thus x+ is greater tha x. This copletes the proof that x x < x +. To prove that x < x x, we eed oly prove that x < x because we have already proved that x x. Take the iequality x < x+, which we have already proved, ad subtract fro both sides. This gives x < x. (b) Take ay real uber x. The iequality x x is true because the ceilig of x is a eleet of a set of itegers greater tha or equal to x. To prove the iequality x < x, first ote that x is the sallest of the itegers greater tha or equal to x, ad x is saller tha x,so x caot be i the set of itegers greater tha or equal to x. Thus x is saller tha x. This copletes the proof that x < x x. The iequalities x x < x + are proved by takig apart the iequalities above, addig to both sides of x < x, ad the puttig the pieces back together agai i a differet order. (c) Let x be ay real uber, ad let be a iteger satisfyig x < +. The ust be the largest of the itegers that are less tha or equal to x because by Lea..3 every iteger greater tha is at least +. By defiitio of x, it follows that = x. The secod assertio has a siilar proof. (d) Suppose x y. We ll prove that x yad leave the other assertios as exercises. First ote that either x < y or y x. Ifx < y, the we ca cobie this with the iequality x x (see part (a)) to coclude that x < y. If, istead, y x, we ca cobie this with x y ad y < y+ to obtai y x < y +. Sice y is a iteger, it follows fro part (c) that x = y. (e) Suppose x. The by (d), x. Sice has a iteger value, =, which eas that x. The proof of the secod part is siilar. (f) Suppose x has a iteger value. The trivially x belogs to the set {k : k Z, k x} ad is the largest eleet of the set, so x = x. Siilarly, x = x. Now suppose x is ot a iteger. We will prove that x = x+ by showig that x x+ ad x x+. Sice x is ot a iteger, the x < x < x, fro which we get x < x. Sice both x ad x are itegers, we ca use Lea..3 to coclude that x+ x. By part (a): x < x+. Sice x+ is a iteger, we ca apply (e) to deduce that x x+. Fro the two iequalities that we have proved, we ca coclude that x = x+. (g) Let us start with the secod iequality fro (a): x < x x. Multiply through by to reverses the iequalities: ( )( x ) >( )x ( )( x ). This ca be rewritte fro right to left as ( ) x ( )x <( ) x +. We ca see that the iteger ( ) x satisfies the first part of (c) with respect to the real uber ( )x, ad thus it ust be the floor of this uber: ( ) x = ( )x. The secod part is proved i a siilar way.

4 Matheatical Preliiaries The followig theore shows soe properties of the floor ad ceilig fuctios i relatio to arithetic operatios applied to their arguets. Theore..5 Let x ad y be ay real ubers. Let,, ad k be ay itegers. (a) x ± = x ± ad x ± = x ± ; but i geeral, x = x ad x = x ad x + y = x + y ad x + y = x + y. (b) + =. + (c) = ; equivaletly, + =. y y y y (d) If k > 0, the = ad =. I particular, if = 0 we ca k k k k put y = to get these idetities: = ad =. k k k k Proof (a) Take ay particular iteger. We ll prove that x + = x+. Sice x+ is a iteger, by Theore..4 (c) it suffices to prove that ( x+) x + < ( x +) +. These two iequalities are logically equivalet to ( x+) x + <( x+) +, which are i tur equivalet to x x < x +, which are true for all x (see Theore..4 (a)). This copletes the proof for floors. The proof for ceiligs is siilar. The equatio x = x is proved by otig that x = x + ( ) = x +( ) = x because is a iteger. The assertios ivolvig x ad x are deostrated by usig exaples: = ad = (b) Take ay iteger ad real uber x. If is eve, the = for soe iteger, ad thus + = + = + = + = =. If is odd, the = + for soe iteger, ad thus + = = By part (a) of this theore, this last expressio equals = = + =. (c) Take ay iteger. If is eve, the = for soe iteger, so + + = = + = + = + 0 = ad + = = = also, so =.

5 . Floors ad Ceiligs 3 + If is odd, the = + for soe iteger, ad thus = + + = + = +, ad = = + = + + = + also, ad thus =. The fact that + = + follows fro part (a) ad siple algebra. y (d) Take ay real uber y ad ay iteger k > 0. By defiitio of the floor, k y y is a iteger. To prove that = it suffices by Theore..4 (c) to k k y y prove that the iteger satisfies the iequalities y y k k k < + k (take x to be y y k ad to be ). k y First, let s prove y y k k. By Theore..4 (a), y y k k,so k y. k y Sice k is the product of two itegers, it is a iteger, ad it is less or equal k y y to y,so k yby Theore..4 (e). That proves y k k k. +, we ote that y k + > y k To prove that y y k < by Theore..4 (a), k ad y k y y k because y yby Theore..4 (a). Thus + > y k k, which is what we wated to prove (i tured-aroud for). The proof of the assertio about ceiligs is quite siilar ad will be oitted here. As a exaple of where soe of the forulas i Theores..4 ad..5 are useful, cosider what happes durig a biary search of a subarray a[first..last]. Here is a fraget of the code for the search (for the coplete fuctio see Fig. 5.3, p. 76): while (first <= last &&!foud) // The value paraeters first ad last will { // be odified durig executio of this code it id = (first + last)/; if (target < a[id])... A siilar calculatio of id = (first + last)/ occurs durig the Merge Sort algorith, which splits a array ito two pieces, sorts the recursively, ad the erges the back together. Whe aalyzig such algoriths, it is useful to have atheatical expressios for the legths of the followig three saller subarrays a[first..id-] a[first..id] a[id+..last] i ters of the legth of the larger subarray a[last].

6 4 Matheatical Preliiaries first id last a: / = ( )/ / / Fig.. Theore..6 0 first- first last Fig.. Theore..6 a Theore..6 Cosider a subarray a[first..last] of soe array a, where 0 first last. Let deote the legth of the subarray, ad let id deote the quatity (first + last) / (this is the average of the subscripts at the eds of the subarray). The (a) is the value of the expressio last - first + (b) the legth of the subarray a[first..id] is ; (c) the legth of the subarray a[first..id-] is = ; (d) the legth of the subarray a[id+..last] is. See Fig.. for a graphical represetatio. Proof Part (a) is proved by cosiderig the full array that starts at locatio 0 ad eds at locatio last. There are last + cells i that subarray. If we the reove the cells i the subarray a[0..first-] we produce the subarray a[first..last]. We are reovig (first-)+ = first cells fro last + cells, leavig (last+)-first = last-first+ cells. See Fig... For the proof of stateet (b), we begi by otig that the subarray a[first.. id] cotais id-first+ cells, ad id = (first+last)/. The we ca write first + last id first + = first + first + last = first + (by Theore..5 (a))

7 . Floors ad Ceiligs 5 first + last first + last first + = = (last first + ) + = + = =. To prove part (c), ote that the subarray a[first..id-] has oe less cell tha a[first..id]. By part (b), the legth of a[first..id] is /, so the legth of a[first..id-] is + = = by Theore..5 (c). To prove part (d), subtract the uber of cells i a[first..id] fro to obtai the uber of cells i a[id+..last]. We get = by Theore..5 (b)... Further Exaples Exaple..7 (a) Solutio (a) =? (b) =? (c) =? (d) =? = 3 + 5/7 =3 (b) 4 (c) 0 (d) 7 Exaple..8 Use part (a) of Theore..4 to prove that 0 x x < for all real ubers x. Solutio By Theore..4 (a) we kow that x x < x + for all real x. We ca pull this expressio apart ito the followig pair of iequalities: x x ad x < x+ for all real x. Fro the first of these it follows that 0 x x (subtract x fro both sides of the iequality); fro the secod it follows siilarly that x x <. Thus we have 0 x x ad x x < for all x. Puttig these back together gives the desired expressio: 0 x x <. Exaple..9 Verify part (a) of Theore..5 i the case where x =.46 ad = 5. Solutio x + =.46+( 5) = 7.46 =7, ad x+ =.46+( 5) = 5 = 7. Thus we have verified i this oe particular case that x + = x+. Siilarly, x + =.46 + ( 5) = 7.46 = 8 ad.46 +( 5) = 3 5 = 8.

8 6 Matheatical Preliiaries Exaple..0 Verify part (c) of Theore..5 for soe odd iteger ad also for soe eve iteger Solutio For = 3, is it true that =, i.e., that 7 = 6.5? Yes: both are equal to 7. For = 4, is it true that =, i.e., that 7.5 = 7? Yes: both are equal to 7. Exaple.. For each of the assertios below, cite oe or ore parts of Theores..4 ad..5 to help you justify the assertio. p + q p + q (a) For all itegers p ad q, + = p + q. (b) For all itegers, + = +. p (c) For all itegers, p, ad q, ifp = ad q =, the q =. More 4 p p p geerally, if p =, p =, p 3 =,...,p =, the p =. + (d) For all itegers, =. Solutio (a) Use part (b), with = p + q. (b) Use part (a), with x = ad =. p (c) Use part (d) with = ad k =. That is, q = = =. The secod setece i (c) is proved by iductio. 4 (d) Use part (c), with =. = Exaple.. I the C++ loop give below, assue that the variable has soe positive iteger value. Whe the loop is executed, how ay ties will the body of the loop be executed? (I this loop, the body of the loop cosists of just the cout stateet.) Express your aswer as a atheatical forula i ters of the variable. it k; for (k = ; (3*k)+ <= ; ++k) cout << k << edl; Solutio First ote that the iitial value coputed for (3*k) + is 4, so if the value of is 3 or less, the body of the loop will be executed 0 ties. So ow let s look at the cases where the value of is at least 4. I these cases the body of the loop will be executed at least oce. Sice the variable k starts with the value ad is icreeted by each tie the body of the loop is executed, k is a loop couter. That is, whe its value is i

9 . Floors ad Ceiligs 7 the cout stateet, the body of the loop is beig executed for the first tie. Whe its value is i the cout stateet, the body of the loop is beig executed for the secod tie. Etc. Let L deote the value of k i the cout stateet the last tie the body of the loop is executed. The that uber L is the total uber of ties the body of the loop is executed. That is, L is the uber we wat to copute. Let deote the value of the progra variable. The 3L + because whe k has the value L, the loop cotrol coditio (3 k)+ <= ust be true. (If that were ot so, the body of the loop would ot be executed whe k gets the value L.) Also ote that whe k is the icreeted to L + (i the expressio k++), the loop cotrol coditio ust the be false i order to ake the loop halt. Thus 3(L + ) + >. We ow have the followig two iequalities ivolvig L ad : 3L + < 3(L + ) +. Subtractig fro each the part of this expressio, ad the dividig each part by 3 gives the iequalities L < L + 3 It follows that the iteger L ust bethe floor of the fractio (-)/3 (see Theore..4 (c)). That is, L =. This is the uber of ties the body of 3 the loop is executed whe 4. I fact, this forula gives the correct uber of ties eve i the case where is,, or 3. Exaple..3 Prove that for all real ubers x ad y we have x + y x + y +. Solutio Take ay real ubers x ad y. By Theore..4 (b), x < x + ad y < y +. It follows that x + y < x + y +. By Theore..4 (b), x + y x + y, sox + y + x + y +. Puttig together the iequalities i the two precedig seteces we get x + y < x + y +. Note that the left ad right sides of this iequality are itegers. If i < j for itegers i ad j, the we kow that i j, so x + y x + y +... Exercises..4 Let a be the ae of a array of legth > 0 i a C or C++ progra. Explai why the expressio a[/] will be accepted by the copiler (eve though ay be a odd iteger) but a[floor(/.0)] will ot copile...5 Use part (b) of Theore..4 to prove that 0 x x < for all real ubers x...6 Is it always true that x = + x? If so, prove this fact. If ot, give a couterexaple, i.e., a exaple of a real uber for which the equatio is ot true.

10 8 Matheatical Preliiaries..7 Theore..4 (d) says that if x y the x y for all real ubers x ad y. Ca we coclude that if x < y the x < y?..8 (a) Give a exaple of a iteger ad a real uber x for which x = x. (See part (a) of Theore..5.) (b) Give a exaple of two real ubers x ad y for which x + y = x+ y. (See part (a) of Theore..5.)..9 Verify part (b) of Theore..5 for the odd iteger = ad also for the eve iteger =...0 (a) Verify part (d) of Theore..5 i the case where = 37, = 8, ad k = 3. (b) Verify part (d) of Theore..5 i the case where = 6, = 7, ad k =... Is it true that x = x for all itegers ad real ubers x? Aswer the sae questio for the equatio x = x... For each of the assertios below, cite oe or ore parts of Theores..4 ad..5 to help you justify the assertio. + (a) For all itegers, + =. (b) For all o-egative real ubers x, x = x. + (c) For all itegers, + = +. (d) For all real ubers x ad o-egative itegers p, x + p = x + p. (e) For all real ubers x, x + x = x...3 I the C++ loop give below, assue that the iteger variable has soe positive value. How ay ties is the body of the loop executed? Express your aswer as a atheatical expressio i ters of the value of. Justify your aswer by a arguet siilar to the oe i Exaple.. o p. 7. Also check your aswer carefully by deteriig what itegers are set to output whe = 50. it k; for (k = ; k*k <= ; ++k) cout << k << edl;..4 I the C++ loop give below, assue that the iteger variable has soe positive value. How ay ties is the body of the loop executed? Express your aswer as a atheatical expressio i ters of the value of. Justify your aswer by a arguet siilar to the oe i Exaple.. o p. 7. Also check your aswer carefully by deteriig what itegers are set to output whe =0ad also whe =.

11 . Floors ad Ceiligs 9 it k; for (k = ; *k < ; ++k) cout << k << edl;..5 (a) Prove that for all real ubers x ad y we have x+ y x + y x+ y+. (b) Prove that for all real ubers x ad y we have x + y x + y x + y. (c) Prove that for all o-egative real ubers x ad y, x y xy x y+ ( x+ y)...6 Let ad be two positive iteger ubers. Prove that + ad Let be a iteger uber. If is odd, the = ad = +.. Logariths Defiitio.. For a fixed real uber b >, the logarith base b fuctio is defied o positive real ubers x as follows: log b (x) = the power o b that produces x. I other words, log b (x) = y if ad oly if b y = x. Exaples: log 3 (9) = because 3 = 9. log 5 (5) = 3 because 5 3 = 5. log 4 (4) = because 4 = 4. log 6 () = 0 because 6 0 =. Two iportat equatios follow istatly fro this defiitio. Theore.. For ay fixed real uber b >, (a) b log b (x) = x for all real x > 0; (b) log b (b y ) = y for all real y. Logariths were iveted early 400 years ago because they have several iportat properties that could be used to siplify certai difficult arithetic calculatios: they covert products to sus, they covert quotiets to differeces, ad they covert powers to products. Here is a precise stateet of these properties. Theore..3 For ay fixed real uber b >,

12 0 Matheatical Preliiaries (a) log b (s t) = log b (s) + log b (t) for all positive real ubers s ad t; (b) log b (s/t) = log b (s) log b (t) for all positive real ubers s ad t; (c) log b (t p ) = p log b (t) for all real ubers p ad all positive real ubers t. Proof The proofs are give i algebra or pre-calculus textbooks ad will ot be repeated here. Exaple..4 Most of us et logariths base 0 i our high school algebra class. log 0 (000) = 3; log 0 (00) = ; log 0 (0) = ; log 0 () = 0 because 0 0 = ; log 0 (0.0) = because 0.0 = 0 ; log 0 ( 00) is udefied because 0 x > 0 for all real x; < log 0 (5) < because 0 < 5 < 0 ; by calculator, log 0 (5).4; log 0 (/t) = log 0 (t). Exaple..5 Here is the logarith you et i calculus; it s called the atural logarith: log e (x) = l(x) = x t dt for all real x > 0, where e.788. Of course, e l(x) = x if x > 0, ad l(e y ) = y for all real ubers y. I coputer sciece, the logarith that we ecouter ore ofte tha ay other is the logarith base fuctio, deoted by lg(x) or log (x). Here are soe easily coputed values of this fuctio: lg(3) = 5; lg(8) = 3; lg(04) = 0; lg() = 0; lg() = ; lg(/6) = 4. What is the uerical value of lg(00)? We ca see that it ust be betwee 6 ad 7 because 6 < 00 < 7. If we wat a ore exact aswer we will eed to cosult a table of logariths or use a electroic calculator. Most pocket calculators, however, do t have a lg butto. This is ot a proble because, as we will ow prove, all logarith fuctios are just costat ultiples of each other. Theore..6 For all real ubers a ad b greater tha ad all positive real ubers x, log b (x) = log a (x) log a (b). Proof Take the logarith, base a, of both sides of the idetity b log b (x) = x.

13 . Logariths Exaple..7 l(x) = log 0 (x) log 0 (e).303 log 0 (x) by usig a calculator. Siilarly, lg(x) = l(x) l() l(x) l(x); also, lg(x) = log 0 (x) log 0 () 3.3 log 0 (x). I aalysis of algoriths, we seldo have occasio to copute lg(x) whe x is a o-iteger real uber. Mostly we will ecouter lg() where is a positive iteger. Moreover, the lg usually appears i coectio with the floor or ceilig fuctio. The followig theore gives a uber of useful idetities ivolvig the lg fuctio cobied with floors ad ceiligs. Theore..8 Let be a positive iteger. (a) lg() < lg()+ ; equivaletly, < lg(). (b) lg() = ad lg()+ = 0. Moreover, the oly iteger k for which k = is k = lg(). We ca iterpret this as sayig that lg() is the uber of iteger divisios by that are required to reduce dow to. (c) lg( + ) = + lg() for all. (d) lg( /) = + lg() for all. (e) lg( / ) = + lg() for all. (f) lg( / ) = + lg( + ) for all. (g) lg( /) = + lg( ) for all 3. Proof To prove part (a), we ca start fro the fact that lg() lg() < lg()+, which is a istace of Theore..4 (a), with x = lg(). Fro this it follows that lg() lg() < lg()+. Sice lg() =, this proves that lg() < lg()+. To prove the first of the two equatios i part (b), divide the first double iequality i part (a) through by lg() to obtai <. lg() By Theore..4 (c), this iediately iplies that the iteger is the floor of lg() ; that is lg() =. To prove the secod part we start fro the double iequality above ad divide it through by to obtai lg()+ <. Sice 0 <, we ca deduce that 0 < lg()+ <, which iplies that lg()+ = 0.

14 Matheatical Preliiaries To prove the last assertio i part (b), let s start with ad divide it repeatedly by, discardig reaiders. We ll give aes to the itegers we produce alog the way: 0 = = 0 (here we are usig the fact that = ad 0 = ) 0 = = = = (here we are usig Theore..5 (d); ote we ve divided by twice) 3 = = 3 (agai we re usig Theore..5 (d); ote we ve divided by three ties) etc. For ay positive iteger k, after k divisios by we obtai k k = = k. I particular, whe k = lg(), we see by the first equatio i part (b) that we will arrive at the value. That is, by dividig by (discardig reaiders) lg() ties, we reduce to. To prove the equatio i part (c), it suffices by Theore..4 (c) to prove that the iteger + lg() satisfies the iequalities ( + lg()) < lg( + ) + lg(), which are equivalet to lg() < lg( + ) ad lg( + ) + lg(). The first oe is easy because lg() lg() <lg( + ). For the secod, start with the iequality < lg()+ that we proved i part (a). Both sides of the iequality are itegers, so it ust be true that + lg()+. Takig logariths o both sides gives the desired iequality above. To prove part (d) we begi with the first iequalities i part (a) ad divide by to obtai lg() / < lg() for all positive itegers. If, the lg() ad lg() are both itegers, ad thus lg() / < lg() for all itegers. Takig the logarith of every ter gives lg() lg( /) < lg(), which is exactly what is eeded to show that lg() = lg( /) (see Theore..4 (c)). To prove part (e), ote that ( lg ( / ) = lg ( ) = + lg ) + (by Theore..5 (c)) (by part (c) above) = + ( + lg( )) (by part (d) above)

15 . Logariths 3 Fig..3 Plot for the fuctio y = lg(x) = lg( ) = + lg(( )+) (by part (c) above, with replaced by ) = + lg(). The proofs of parts (f) ad (g) are siilar, ad left as a exercise. Exaple..9 To illustrate part (b) of Theore..8, take = 00. The 00/ =50; 50/ =5; 5/ =; / =6; 6/ =3; 3/ =. There are 6 iteger divisios by i that sequece, ad ideed, lg(00) =6 because 6 < 00 < 7,so6< lg(00) <7. Sice we ecouter ay divide ad coquer algoriths that ivolve cotiually splittig a list of legth ito two roughly equal pieces, Theore..8 (b) gives us soe isight ito why these algoriths ofte have ruig ties that ivolve lg() i oe way or aother. The ost iportat thig to uderstad about lg() is how very slowly it grows as icreases. Eve whe gets extreely large, lg() teds to reai relatively sall. The reaso is this: doublig the arguet i lg() just adds to the value of the logarith lg() = + lg(). This is illustrated i the graph of y = lg(x) show i Fig..3. You ight woder whether there is soe horizotal asyptote for this graph, i.e., a horizotal lie that the graph approaches as. I fact, there is o such asyptote. If we draw a horizotal lie at height h, the graph of y = lg(x) will itersect that lie whe x reaches the value h, ad will cotiue to rise slowly above the lie thereafter. I atheatical otatio, li lg(x) =+ (.) x Later i this book we will aalyze ethods for sortig data ito key order. Soe sortig algoriths require a aout of tie proportioal to i order to sort eleets, while certai other algoriths require a aout of tie proportioal to

16 4 Matheatical Preliiaries lg() i order to sort eleets. Which of these algoriths would require the least tie whe sortig eleets? The aswer is that the algorith requirig tie proportioal to lg() would require less tie whe is large. The reaso is this: for ay fixed positive costats of proportioality A ad B, A lg() B= B for all large values of (the sybol is read is uch saller tha ). The followig theore states a curious idetity that will prove to be useful. Theore..0 For all positive real ubers x ad y ad b > we have x log b (y) = y log b (x). Proof Sice the logarith fuctio is iductive (oe-to-oe) o its doai (the set of all positive real ubers), we ca prove that two positive ubers are equal by provig that their logariths (i ay base) are equal. Thus the forula i the theore is true if ad oly if log b (x log b (y) ) = log b (y log b (x) ) which is equivalet to log b (y) log b (x) = log b (x) log b (y). The latter is surely true for ay positive x ad y... Further Exaples Exaple.. For all positive itegers, 3 lg() = lg(3).58. Exaple.. Do the followig ultiple choice exercises without usig a calculator. (a) l(e 7x ) = Choose oe: (i) 7l(x) (ii) 7x (iii) 7e x (iv) l(7) + l(x) (b) l(x 7 ) = Choose oe: (i) 7l(x) (ii)7x (iii)7e x (iv) l(7) + l(x) (c) l(7x) = Choose oe: (i) 7l(x) (ii) 7x (iii) 7e x (iv) l(7) + l(x) (d) e l(7x) = Choose oe: (i) 7l(x) (ii) 7x (iii) 7e x (iv) 7 + x (e) e x+l(7) = Choose oe: (i) 7l(x) (ii) 7x (iii) 7e x (iv) 7 + x (f) lg( ) = Choose oe: (i) (ii) / (iii) (iv) (/) lg() (g) lg(8) = Choose oe: (i) 3 (ii) 8 (iii) 3 + (iv) 3 + lg() (h) lg(8 + ) = Choose oe: (i) 3 (ii) 8 (iii) 3 + (iv) 3 + lg() (i) lg(/3) = Choose oe: (i) /5 (ii) 5 (iii) 5 (iv) lg() 5 (j) lg(8) = Choose oe: (i) 9 (ii) 8 (iii) (iv) 36 (k) 3lg(3) = Choose oe: (i) 7 (ii) 64 (iii) 8 (iv) 8 (l) lg() = Choose oe: (i) (ii) / (iii) (iv) () lg( 8 ) = Choose oe: (i) 8 (ii) 36 (iii) lg(8) (iv) 8 () lg( ) = Choose oe: (i) (ii) 0.5 (iii) lg() (iv) 0.5 (o) l(e x ) = Choose oe: (i) l(x) (ii) e l(x) (iii) x (iv) x (p) e l(+) = Choose oe: (i) + e (ii) e (iii) (iv) + (q) e l(x) = Choose oe: (i) x (ii) x (iii) x (iv) l(x)

17 . Logariths 5 (r) e l() l() = Choose oe: (i) (ii) / (iii) l( )(iv) e l( ) (s) 4lg(3) = Choose oe: (i) (ii) 4 (iii) 48 (iv) 8 (t) lg(3 0 ) = Choose oe: (i) 5 (ii) 5 (iii) 5lg(0) (iv) 00 Solutio (a) (ii) because l(e r ) = r for ay real uber r (b) (i) because l(x p ) = p l(x) for ay real uber p (c) (iv) because l(st) = l(s) + l(t) (d) (ii) because e l(t) = t (e) (iii) because e a+b = e a e b by the properties of expoets (f) (i) because lg( p ) = p (g) (iv) because lg(8) = lg(8) + lg() = 3 + lg() (h) There is o correct aswer. It was a trick questio. (i) (iv) because lg(/3) = lg()g() 5 (j) (ii) because lg(x) = x (k) (i) because 3lg(3) = lg(33) = lg(7) = 7 (l) (i) because lg() = = lg( ) = () (i) () (ii) because = 0.5 (o) (iii) (p) (iv) (q) (i) because l(x) = l(x ) (r) (ii) because l() l() = l(/) (s) (iv) because 4 lg(3) = lg(3 4 ) = lg(8) (t) (iv) because lg(3 0 ) = 0 lg(3) Exaple..3 Show how to copute the value of lg(500) without usig a calculator. Solutio 0 = 04 < 500 < 048 =,so0 < lg(500) <, so lg(500) =0. Exaple..4 I the block of C++ code show below, assue that the variable has a positive iteger value. Whe the code is executed, how ay ties is the body of the loop executed? Express the aswer i ters of the value of. it k = ; it k, p; for (k =, p = ; p <= ; p *= ) // Double p after body of loop is executed. { cout << k << edl; ++k; } Solutio First cosider the special case where has the value. I that case, the loop cotrol coditio <= is iediately false, so the body of the loop is executed 0 ties. Now let s look at the cases where the value of is at least, so that the body of the loop will be executed at least oce. As i Exaple.. o p. 7, the variable k is a loop couter. Let L deote the value of k i the cout stateet the last tie the body of the loop is executed. The L is the uber we wat to copute.

18 6 Matheatical Preliiaries Whe the body of the loop is executed, the iitial value of k is set to output ad the k is icreeted to. Next, the value of p is doubled to 4 (= ) ad the the loop cotrol coditio p <= is tested. If it is foud to be true, the the value ofkwill be set to output, k will be icreeted to 3, ad p will be doubled to 8(= 3 ). Agai the loop cotrol coditio will be tested. Whe k gets the value L (which we wat to copute), the variable p will the get the value L, ad the loop cotrol coditio will be true for the last tie. The uber L will be set to output, the variable k will be icreeted to L +, ad p will be doubled to L+. The loop coditio will ow be foud to be false. If we let deote the (fixed) value of the progra variable, the the followig iequalities ust be true: L < L+. Takig the logarith base of each part gives us L lg() <L +. As we kow fro Theore..4 (c), this eas that L = lg(). This is the uber of ties the body of the loop is executed. Note that this forula is valid eve whe has the value, for i that case lg() = 0. I the solutio of the precedig exaple, the key observatio was that there exists a siple atheatical relatioship betwee the values k ad p of the progra variables k ad p each tie the loop cotrol coditio is tested. That relatioship is p = k, ad it is true eve whe the loop cotrol is tested for the last tie ad foud to be false (at that poit k = L + ad p = L+ ). Ay coditio that s true for the progra variables every tie a loop cotrol coditio is tested is called a loop ivariat for the loop. I the block of code i Exaple A..4, the loop ivariat p = k is easy to spot, ad seeig it was the key to solvig the give proble. There are other loop ivariats for the block of code i Exaple..4. Exaples are p > ad k < p, but these ivariats are ot useful i solvig the proble that we were give... Exercises..5 Do the followig ultiple choice exercises without usig a electroic calculator. (a) 5+lg(t) = Choose oe: (i) 3 + t (ii) 3t (iii) 5 + t (iv) 5t (b) lg( 5 ) = Choose oe: (i) 5 + (ii) 3 + (iii) 5 (iv) 3 (c) lg(3p) = Choose oe: (i) 5lg(p) (ii) 3 lg(p) (iii) 5p (iv) 5 + lg(p) (d) lg( 8 ) = Choose oe: (i) 8lg() (ii) 3lg() (iii) 3 (iv) 3 + lg() (e) 3lg(k) = Choose oe: (i) 8lg(k) (ii) 8k (iii) k 3 (iv) 3k (f) lg(8 k ) = Choose oe: (i) 8/k (ii) 3k (iii) /(3k) (iv) 3lg(k)

19 . Logariths 7 (g) lg(3x) = Choose oe: (i) 5 + lg(x) (ii) 5x (iii) 3 + x (iv) 5 lg(x) (h) lg(a bc) = Choose oe: (i) a + b + c (ii) abc (iii) a+b+c (iv) lg(a) + lg(b) + lg(c) (i) lg(8/ ) = Choose oe: (i) 6 lg() (ii) 3/ lg( ) (iii) 3/ (iv) 3 lg() (j) lg(5) = Choose oe: (i) 5 (ii) 3 (iii) 5 (iv) lg(5) (k) 3lg(5) = Choose oe: (i) 3 (ii) 5 (iii) 40 (iv) 5 (l) lg(8) = Choose oe: (i) 8 (ii) /(8) (iii) 8/ (iv) 64 () lg( 8 ) = Choose oe: (i) 56 (ii) 3 (iii) 8 (iv) 6 () lg( 38) = Choose oe: (i) 9 (ii) lg(38) (iii) lg(38) (iv) 38 (t) lg(8 5 ) = Choose oe: (i) 5 (ii) 40 (iii) 8lg(5) (iv) 3 + lg(5)..6 For each of the followig, give a sigle uerical value without usig a calculator. (a) lg(36) lg(9) (b) lg(56) lg(7) (c) lg( 8) (d) lg( 3 3)..7 (a) Show how to copute the value of lg(500) without usig a calculator. (b) Show how to copute the value of lg(900) without usig a calculator...8 (a) Express log 3 (x) as soe costat C ties log 0 (x). Use a pocket calculator to deterie the uerical value of the costat C. (b) Express log 5 (x) as soe costat C ties l(x). Use a pocket calculator to deterie the uerical value of the costat C...9 (a) Use Theore..0 to express l() as a power of. Use a calculator to fid the uerical value of the power. (b) Use Theore..0 to express 5 l() as soe costat ties a power of. Use a calculator to fid the uerical value of the power...0 We oted that the first of the two equatios i Theore..8 (b) ca be iterpreted as sayig that lg() is the uber of iteger divisios by that are required to reduce dow to. Give a siilar iterpretatio for the secod of the two equatios i Theore..8 (b)... Cosider the followig block of C++ code i which is a positive iteger. it k; for (k = ; k > ; k = k/) cout << "Hello" << edl; (a) How ay ties will the cout stateet be executed if the value of is whe the loop begis? (b) How ay ties will the cout stateet be executed if the value of is whe the loop begis?

20 8 Matheatical Preliiaries (c) How ay ties will the cout stateet be executed if the value of is 3 whe the loop begis? (d) Give a expressio ivolvig the variable for the uber of ties that the code above will sed Hello to output. Cite oe of the theores i this sectio to justify your aswer... (a) Use (aog other thigs) Theore..4 o floors ad ceiligs to prove that for all positive itegers, lg() <. Warig: i geeral, lg() = lg(). Hit: look at the proof for Theore..8 (a). (b) Use (aog other thigs) Theore..4 o floors ad ceiligs to prove that for all positive itegers, 0 < 0 log 0 (). Warig: i geeral, 0 log 0 () = 0 log 0 (). Hit: look at the proof for Theore..8 (a)...3 (a) Use Theore..5 (c) ad part (d) of Theore..8 to prove part (f) of Theore..8. (b) Use Theore..5 (c) ad part (e) of Theore..8 to prove part (g) of Theore (a) How ay ay ties is the body of the loop below executed? (Note: the block differs fro the code i Exaple..4 oly i the iitial value of p.) Justify your aswer by usig a loop ivariat. Assue that has a positive iteger value. it k, p; for (, p = ; p <= ; p *= ) // Double p after body is executed. { cout << k << edl; ++k; } (b) How ay ay ties is the body of the loop below executed? Assue that has a positive iteger value. You ay base your aswer o your aswer for part (a). it p; for (p = ; p <= ; p *= ) // Double p after body is executed. cout << p << edl; (c) How ay ties is the body of the loop below executed? Assue that has a positive iteger value. it p; for (p = ; p < ; p *= ) // Double p each tie body of loop is executed. cout << p << edl;

21 . Logariths 9 Hit. Iagie that a loop-coutig variable k with iitial value is itroduced ito the code. Give a loop ivariat ivolvig the values k ad p of the progra variables k ad p. Let L deote the value of k the last tie the body of the loop is executed. Use your loop ivariat to calculate L. You will eed to cite Theore..4 (c) at soe poit..3 Sus ad Suatio Notatio What is the value of the su ? To aswer this questio, you first have to fill i the issig ters that are idicated by the 3 dots i the su. I this case that s ot hard to do. The 3 dots ust surely stad for What about the su ? Here we ay or ay ot see that the ters ca be writte as , i which case the issig ters are = It is useful to have a otatio that lets us express sus i a ore precise way that eliiates the guesswork associated with the 3 dots otatio. The siga suatio otatio was iveted for this purpose. The two sus give above ca be writte this way: 0 (k ) ad 9 k(k + ) More geerally, suppose a real fuctio f (k) is defied o itegers k i the rage,...,. The expressio f (k) k= where is the upper case Greek letter siga, is a precise ad cocise way of writig the su f () + f ( + ) + + f (). The uerical value represeted by these expressios is exactly the value that would be produced i the variable su by executig the followig fraget of C code:

22 30 Matheatical Preliiaries su = 0; for (k = ; k <= ; ++k) su += f(k); I particular, by covetio, above). k= f (k) has the value 0 if < (look at the loop 5 k Exaples.3. (a) k + = = k= 7 (b) k k = = 769 (c) (d) k=0 4 5/k = 5/4 =3 k=4 5 3 = = 48 (because there are 5 + ters here, ot 0 just 5). More geerally, c = c( + ) for ay fixed real uber c ad k= itegers. ( 3 j ) ( ) ( 3 ) (e) ( j k) = ( k) + ( k) + (3 k) j= = (0 ) + ( + 0 ) + ( ) = 6 The variable k i the expressio k= f (k) is called the suatio idex. Itis iportat to uderstad that it is a duy idex that ca be replaced by ay other letter that has o pre-assiged eaig. Thus, for exaple, all four of the followig expressios have the sae value: k(k + ) i(i + ) t(t + ) a(a + ). k= k= k= i= Aother iportat fact is that suatio is a liear operator ; that is, ( ) c f (k) = c f (k) ad [ f (k)±g(k)] = f (k)± g(k). t= k= (.) Occasioally we have to iterchage the order of suatio i a double su. That is, we have to use the fact that ( q q ) f ( j, k) = f ( j, k). k= j=p j=p k= a= k= k=

23 .3 Sus ad Suatio Notatio 3 This equatio siply says that if we su over each row separately i the followig array, ad the add up the sus we get, we obtai the sae aswer as if we su over each colu separately ad the add up those sus. We ca do this as log as the boudaries p ad q for the iterior su are idepedet of the idex variable of the exterior su k. f (p, ) f (p +, ) f (p +, )... f (q, ) f (p, + ) f (p +, + ) f (p +, + )... f (q, + ) f (p, + ) f (p +, + ) f (p +, + )... f (q, + ) f (p, ) f (p +, ) f (p +, )... f (q, ) We are ow goig to look at several types of sus that occur frequetly i aalysis of algoriths. Our goal will be to fid soe shortcuts for coputig the values of these sus. Our first exaple is the siple su , where is a positive iteger. (Whe is or or 3, the by we ea siply or + or+ + 3 respectively.) We ca write this su i the siga suatio otatio this way: k. This is called a triagular su because if we draw a bar graph with bars of heights,, 3,...,, they for a rough triagle. It turs out that there is a siple forula for the value of the triagular su. It ca be obtaied by the followig algebraic trick. Let S() deote the su k. The S() = ( ) +. I reverse order we have S() = + ( ) + ( ) Addig the gives S() = ( + ) + ( + ) + ( + ) + +( + ) + ( + ) = ( + ) so ( + ) S() =. Theore.3. For ay positive iteger we have ( + ) =. More geerally, for ay itegers ad satisfyig we have + ( + ) + ( + ) + + = ( + ) +. Proof We have already proved the first of these suatio forulas. The secod ca be proved i a siilar way. These forulas should be eorized. It will help you to ote that i both forulas above the first factor o the right side is the uber of ters o the left side, while

24 3 Matheatical Preliiaries the secod factor o the right side is the average of the first ad last ubers o the left side. I geeral, whe we are cofroted with a expressio X ivolvig a sigasuatio sybol or a 3-dots ellipsis we like to have a closed for for the expressio, by which we ea a atheatical expressio Y whose value is the sae as that of X, but Y is copact ad easily coputed with a fixed uber of operatios icludig expoetiatio ad foratio of logariths. (We regard as a closed for because it ca be evaluated i two steps: let x = l(); the = exp(x).) The calculatio i Theore.3. shows that is a closed for for the expressios ( + ) ad k. Our ext exaple of a frequetly occurrig su looks like this: + t + t + t 3 + +t, where t is ay real uber ad is ay o-egative iteger. We ca write the su i siga otatio this way: t k. Note that the lower liit of the suatio k=0 is k = 0. By covetio, i siga sus of this for, t 0 is uderstood to stad for, eve whe t = 0. (Norally i atheatics the expressio 0 0 is cosidered to be udefied.) Sus of this for are called (fiite) geoetric sus. Wecafida closed for for the su by a trick siilar to the oe used for triagular sus. Let G(t, ) deote t k. The k=0 G(t, ) = + t + t + t 3 + +t. Multiplyig by t gives tg(t, ) = t + t + t 3 + t 4 + +t +. Subtractig the gives G(t, ) tg(t, ) = t + (other ters cacel). Factorig gives G(t, )( t) = t +.Ift =, the we obtai G(t, ) = t+. t That is, + t + t + t 3 + +t = t+ t = t+. whe t =. t Theore.3.3 For all real ubers t ad o-egative itegers, t + t k = if t = ; t + if t =. k=0 Proof See paragraphs precedig this theore. Our third exaple of a frequetly occurrig su looks like this: , which ca be writte i siga suatio otatio this way:. We call a su of k

25 .3 Sus ad Suatio Notatio 33 this for a haroic su ad deote it by H(). (I usic, if strigs of like aterial, diaeter, ad torsio have legths, /, /3, etc., the whe set i vibratio they produce haroic toes.) Sadly, there is o closed for for haroic sus. Nevertheless, we ca approxiate their values very closely by usig a techique that is applicable both here ad i other siilar situatios. The techique is give by the followig theore. Theore.3.4 Let f (x) be a strictly decreasig fuctio defied over a iterval [, ], where ad are itegers such that <. The f () + f (x)dx < k= f (k) < f () + Siilarly, if f (x) is strictly icreasig o [, ], the f () + f (x)dx < k= f (k) < f () + f (x)dx. f (x)dx. Proof The proof is easier if we begi by assuig that f (x) 0 for all x i [, ]. At the ed of the proof we will see how to take care of the cases where f (x) has soe egative values. For the proof whe f (x) 0 ad decreasig we use a graph of the equatio y = f (x) o [, ], draw soe rectagles, ad copare their areas with the area of the regio uder the curve y = f (x) show i Fig..4. Note that the area of the left-ost rectagle i Fig..4 is f () = f (), the area of the ext rectagle is f ( + ) = f ( + ), ad so o to the last oe, which has area f ( ) = f ( ). Now cosider the regio R bouded by the x-axis, the curve y = f (x), ad the vertical lies at x = ad x =. This regio R lies iside the collectio of rectagles show, ad thus the su of areas of Fig..4 Theore.3.4

26 34 Matheatical Preliiaries Fig..5 Theore.3.4 these rectagles is greater tha the area of R. This ca be expressed as follows: area of regio R = f (x)dx < f ()+ f ( +)+ + f ( ) = k= f (k). Addig f () to both sides of the iequality above gives the first of the iequalities about decreasig fuctios. For the secod of the iequalities about decreasig fuctios, cosider the graph show i Fig..5. All the rectagles i Fig..5 lie iside the regio S bouded by the x-axis, the curve y = f (x), ad the vertical lies at x = ad x =, so the su of the areas of the rectagles is less tha the area of S. This ca be expressed as follows: f ( + ) + f ( + ) + + f () < area of regio S = f (x) dx. Addig f () to both sides of the iequality above gives the secod of the iequalities about decreasig fuctios. Now let s take care of the case where soe or all of the values of f (x) are egative. Let C deote the value of f (). Sice f (x) is decreasig o the iterval [, ], it follows that f (x) C for all x i that iterval. This iplies that f (x) C 0 o that iterval. Now defie a ew fuctio g(x) by the forula g(x) = f (x) C. The g(x) 0 everywhere o [, ]. Moreover, g(x) is strictly decreasig o that iterval. By the first part of this proof, g() + g(x)dx < k= Replacig g(x) by f (x) C above gives us f () C + [ f (x) C] dx < g(k) < g() + g(x)dx. [ f (k) C] < f () C + k= [ f (x) C] dx.

27 .3 Sus ad Suatio Notatio 35 Now we use properties of suatio etioed i Exaples.3. (d) ad i forula (.3) o p. 9, together with stadard itegratio forulas to produce the followig iequalities: f () C + f (x)dx C( ) < f (k) C( + ) < f () C + f (x)dx C( ). k= Addig C( + ) to each part of the iequalities above gives the iequalities for f (x) stated i the theore. The proofs for the iequalities ivolvig icreasig fuctios are siilar ad will be left as a exercise. Theore.3.5 (Approxiatio for Haroic Sus). For all itegers > we have + l() <H() < + l(). Proof We wat to approxiate H() = for >. k To do this we apply Theore.3.4 to the strictly decreasig fuctio f (x) = x, with = ad >. We get + x dx < k < + dx for all >, x which iediately yields the iequalities stated i the theore. The iportat thig to reeber fro Theore.3.5 is that for all large we have H() l(). I rare cases where we wat a ore accurate approxiatio for H() whe is large, we ca use the followig theore discovered by Leohard Euler. Theore.3.6 (Euler) li [H() l()] =0.577 approxiately ad therefore H() l() for all large. Proof See alost ay advaced calculus textbook. The uber give i this theore is a approxiatio to the actual liit, which is kow to be a irratioal uber.

28 36 Matheatical Preliiaries Whe 5, Euler s approxiatio is correct to withi % of the actual value. Of course, for sall values of, we ca calculate H() very accurately with a pocket calculator. Closed fors for several other types of sus are occasioally eeded i aalysis of algoriths. They do ot, however, occur with sufficiet frequecy to ake the worth eorizig. We give four such sus below. Theore.3.7 For all positive itegers ad real ubers t =, + t + 3t + +t = + t+ ( + )t (t ). Proof The left side is just the derivative with respect to t of the fiite geoetric su + t + t + t 3 + +t. Thus we ca obtai the forula above siply by differetiatig both sides of the forula give i Theore.3.3 with respect to t. Theore.3.8 For all positive itegers, lg(k) = lg()+( + ) lg()+ ad k= lg(k) =( + ) lg( + )+ lg(+)+. k= Proof Whe k = wehave lg(k) =. Whe k = 3ork = 4wehave lg(k) =. Whe k = 5or6or7or8wehave lg(k) =3. Etc. Thus, the ters i lg(k) ca be grouped as follows k= k=3,4 k=5,6,7,8= 3 k=9,0,...,6= 4 k= lg() +,..., lg() + {}}{{}}{{}}{{}}{ ( + ) }{{} + ( ) }{{} + ( ) }{{} + + ( lg() + lg()) }{{} + ore 0 ter ters ters 3 ters lg() ters The ore (above) gives the reaiig ters, correspodig to k = lg() + up to k = (this set of ters is epty if is a power of ). Each of these ters is equal to lg()+. Thus we have lg(k) = k= lg() p= k= ( p p + lg()) ( lg()+). (.3)

29 .3 Sus ad Suatio Notatio 37 The siga su o the right side is just the su give i Theore.3.7, but with k replaced by p, replaced by lg(), ad t replaced by. Thus we get lg() p= p p = + lg() lg()+ ( lg()+) lg() ( ). Isertig this ito Eq. (.3) gives us lg(k) =+ lg() lg + ( lg()+) lg + lg()+ lg() lg lg, k= which reduces to the first of the two sus i the stateet of the theore. To prove the secod idetity i this theore, begi by replacig the sybol by the sybol + everywhere i the first equatio stated i the theore. This gives + lg(k) =(+) lg(+)+(+) lg(+)+ for all positive itegers. k= By Theore..8 (c), with replaced by k, we get lg(k) = + lg(k ), so the su above is + ( + lg(k )) = ( + ) lg( + )+( + ) lg(+)+. (.4) k= The left side ca be expressed as + k= + + k= lg(k ) = +0+ lg()+ lg(3)+ + lg() = + Puttig this ito Eq. (.4) gives + lg(k) =( + ) lg( + )+( + ) lg(+)+. k= Subtractig fro both sides of this equatio gives the desired equatio. lg(k). k= Exaple.3.9 May coputer sciece textbooks discuss the represetatio of positive itegers usig various bases. For exaple, the iteger (base 0 otatio) ca also be writte i biary otatio (base otatio) as or i octal otatio (base 8) as or i hexadecial otatio (base 6) as 78D 6. Of course, it is also possible to write this iteger i these bases with oe or ore leadig zeroes: , , , 78D 6. Let s agree to use the phrase stadard represetatio of base b to describe the represetatio of a positive iteger without leadig zeroes i base b otatio. Note that the uber of digits required by the stadard represetatio of depeds o the base used as well as o the size of. For exaple, the stadard represetatios of the uber discussed i the secod setece of this paragraph require 4, 3, 5, ad 4 digits, respectively, i base 0, base, base 8, ad base 6.

30 38 Matheatical Preliiaries How ay digits are there i the stadard decial (i.e., base 0) represetatio of the iteger 34 95? How ay bits (biary digits) does its stadard biary represetatio cotai? More geerally, give ay positive itegers ad b, ca we fid a forula for the uber of digits that will be required for the stadard represetatio of base b? Solutio Let s solve the geeral case first. Assue we are give positive itegers ad b. Let k deote the (ukow) uber of digits i the stadard represetatio of base b. Deote those digits by d 0, d, d,...,d k, where d 0 is the least sigificat digit ad d k is the ost sigificat (ad is therefore ot zero). Each of these digits lies i the rage fro 0 to b. (For exaple, if b is 0, the each digit lies i the rage fro 0 to 9.) Moreover, d k is at least. The = d k b k + +d b + d b + d 0 b 0. Sice d k ad all other d i 0, it follows that b k That is, b k. Siilarly, sice every d i b, it follows that (b )b k + +(b )b + (b )b + (b )b 0 (b )[b k + +b + b + ] (b ) bk b b k. Fro this it follows that < b k. We have ow established the iequalities b k < b k, where k is the uber of digits i the stadard represetatio of base b. Takig logariths base b of each of the quatities above gives us these iequalities: k log b () <k. Sice k is a iteger, it follows fro Theore..4 (c) that k = log b (), or equivaletly, k = + log b (). By Theore..8 (c), k = log b ( + ). Thus we have proved the followig useful fact: Theore.3.0 Let ad b be positive itegers with b. The uber of digits i the stadard represetatio of base b is + log b () = log b ( + ). Proof This forula is derived i Exaple.3.9.

31 .3 Sus ad Suatio Notatio 39 Now we ca aswer the questio we asked i Exaple.3.9 about the uber of digits i the stadard decial represetatio of the iteger The aswer, obtaied with the aid of a calculator, is + log 0 (34 95 )= + 95 log 0 (34) = = =45. The uber of bits i the stadard biary represetatio of is + log (34 95 )= + 95 log (34) = = =50. The su i the followig theore appears here ad there i aalysis of algoriths. Ufortuately it has o siple closed for, so it is helpful to have good lower ad upper bouds for it. Theore.3. The su the iequalities lg() lg() < k is asyptotic to. I particular, it satisfies lg() k. (.5) Proof Usig the fact that x < x x for all real ubers x, we ca write that lg() ( ) k < These iequalities are equivalet to The su lg() lg() k lg() < lg() lg() k k lg() lg() k. k. (.6) that appears i these iequalities ca be coputed by factorig k out the that occurs i every ter ad the usig the geoetric su forula. Note that the ter for k = 0 is issig fro the su ad ust therefore be subtracted fro it: lg() = lg() k = ( lg() ( ) ( k ( ) lg()+ = ) = lg(). Isertig this last forula ito lie.6 we get lg() < lg() lg() ) = k ( ) lg()+ lg(). (.7) lg()

32 40 Matheatical Preliiaries To get fro iequatio (.7) to the desired iequatio (.5) we ust estiate the ter. Theore..8 (a) gives us these useful iequalities: lg() lg() < lg()+. Dividig all ters by lg() ad the ultiplyig throughout by gives >. lg() It follows that lg() < lg() ad. lg() lg() Cobiig this pair of iequalities with iequality (.7) gives the desired result (.5)..3. Further Exaples Exaple.3. Evaluate the followig sus. I each case, give a sigle uerical aswer. 5 3 r + 4 p (a) (b) k(k + ) r (c) p 50 lg(k) (d) q k r=0 p= q= 00 Solutio (a) = 5 (b) = ( 4 (c) = + j j j j + ) ( ) 3 j= j= j= j= ( ) = (d) The value of this su is 0 because the lower liit of suatio (00) is larger tha the upper liit (50). Exaple.3.3 Write each of the followig sus i siga suatio otatio: (a) () + 3 () + 4 (3) + 5 (4) (b) Solutio (a) 4 k + k or 3 j=0 j + 5 ( j + ) or r (r ) (b) r= 0 k=0 3 k Exaple.3.4 For each of the followig sus, evaluate it uerically or express it i a algebraic closed for. (a) (b)

Chapter 2. Asymptotic Notation

Chapter 2. Asymptotic Notation Asyptotic Notatio 3 Chapter Asyptotic Notatio Goal : To siplify the aalysis of ruig tie by gettig rid of details which ay be affected by specific ipleetatio ad hardware. [1] The Big Oh (O-Notatio) : It

More information

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions

Name Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions Nae Period ALGEBRA II Chapter B ad A Notes Solvig Iequalities ad Absolute Value / Nubers ad Fuctios SECTION.6 Itroductio to Solvig Equatios Objectives: Write ad solve a liear equatio i oe variable. Solve

More information

REVIEW OF CALCULUS Herman J. Bierens Pennsylvania State University (January 28, 2004) x 2., or x 1. x j. ' ' n i'1 x i well.,y 2

REVIEW OF CALCULUS Herman J. Bierens Pennsylvania State University (January 28, 2004) x 2., or x 1. x j. ' ' n i'1 x i well.,y 2 REVIEW OF CALCULUS Hera J. Bieres Pesylvaia State Uiversity (Jauary 28, 2004) 1. Suatio Let x 1,x 2,...,x e a sequece of uers. The su of these uers is usually deoted y x 1 % x 2 %...% x ' j x j, or x 1

More information

COMP 2804 Solutions Assignment 1

COMP 2804 Solutions Assignment 1 COMP 2804 Solutios Assiget 1 Questio 1: O the first page of your assiget, write your ae ad studet uber Solutio: Nae: Jaes Bod Studet uber: 007 Questio 2: I Tic-Tac-Toe, we are give a 3 3 grid, cosistig

More information

Math 4707 Spring 2018 (Darij Grinberg): midterm 2 page 1. Math 4707 Spring 2018 (Darij Grinberg): midterm 2 with solutions [preliminary version]

Math 4707 Spring 2018 (Darij Grinberg): midterm 2 page 1. Math 4707 Spring 2018 (Darij Grinberg): midterm 2 with solutions [preliminary version] Math 4707 Sprig 08 Darij Griberg: idter page Math 4707 Sprig 08 Darij Griberg: idter with solutios [preliiary versio] Cotets 0.. Coutig first-eve tuples......................... 3 0.. Coutig legal paths

More information

Summer MA Lesson 13 Section 1.6, Section 1.7 (part 1)

Summer MA Lesson 13 Section 1.6, Section 1.7 (part 1) Suer MA 1500 Lesso 1 Sectio 1.6, Sectio 1.7 (part 1) I Solvig Polyoial Equatios Liear equatio ad quadratic equatios of 1 variable are specific types of polyoial equatios. Soe polyoial equatios of a higher

More information

4.3 Growth Rates of Solutions to Recurrences

4.3 Growth Rates of Solutions to Recurrences 4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.

More information

Bertrand s postulate Chapter 2

Bertrand s postulate Chapter 2 Bertrad s postulate Chapter We have see that the sequece of prie ubers, 3, 5, 7,... is ifiite. To see that the size of its gaps is ot bouded, let N := 3 5 p deote the product of all prie ubers that are

More information

Infinite Sequences and Series

Infinite Sequences and Series Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet

More information

Integrals of Functions of Several Variables

Integrals of Functions of Several Variables Itegrals of Fuctios of Several Variables We ofte resort to itegratios i order to deterie the exact value I of soe quatity which we are uable to evaluate by perforig a fiite uber of additio or ultiplicatio

More information

Automated Proofs for Some Stirling Number Identities

Automated Proofs for Some Stirling Number Identities Autoated Proofs for Soe Stirlig Nuber Idetities Mauel Kauers ad Carste Scheider Research Istitute for Sybolic Coputatio Johaes Kepler Uiversity Altebergerstraße 69 A4040 Liz, Austria Subitted: Sep 1, 2007;

More information

Orthogonal Functions

Orthogonal Functions Royal Holloway Uiversity of odo Departet of Physics Orthogoal Fuctios Motivatio Aalogy with vectors You are probably failiar with the cocept of orthogoality fro vectors; two vectors are orthogoal whe they

More information

4.1 Sigma Notation and Riemann Sums

4.1 Sigma Notation and Riemann Sums 0 the itegral. Sigma Notatio ad Riema Sums Oe strategy for calculatig the area of a regio is to cut the regio ito simple shapes, calculate the area of each simple shape, ad the add these smaller areas

More information

CHAPTER 10 INFINITE SEQUENCES AND SERIES

CHAPTER 10 INFINITE SEQUENCES AND SERIES CHAPTER 10 INFINITE SEQUENCES AND SERIES 10.1 Sequeces 10.2 Ifiite Series 10.3 The Itegral Tests 10.4 Compariso Tests 10.5 The Ratio ad Root Tests 10.6 Alteratig Series: Absolute ad Coditioal Covergece

More information

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):

CS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt): CS 70 Secod Midter 7 April 2011 NAME (1 pt): SID (1 pt): TA (1 pt): Nae of Neighbor to your left (1 pt): Nae of Neighbor to your right (1 pt): Istructios: This is a closed book, closed calculator, closed

More information

x !1! + 1!2!

x !1! + 1!2! 4 Euler-Maclauri Suatio Forula 4. Beroulli Nuber & Beroulli Polyoial 4.. Defiitio of Beroulli Nuber Beroulli ubers B (,,3,) are defied as coefficiets of the followig equatio. x e x - B x! 4.. Expreesio

More information

42 Dependence and Bases

42 Dependence and Bases 42 Depedece ad Bases The spa s(a) of a subset A i vector space V is a subspace of V. This spa ay be the whole vector space V (we say the A spas V). I this paragraph we study subsets A of V which spa V

More information

Zeros of Polynomials

Zeros of Polynomials Math 160 www.timetodare.com 4.5 4.6 Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered with fidig the solutios of polyomial equatios of ay degree

More information

A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data.

A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data. STAT-UB.003 NOTES for Wedesday 0.MAY.0 We will use the file JulieApartet.tw. We ll give the regressio of Price o SqFt, show residual versus fitted plot, save residuals ad fitted. Give plot of (Resid, Price,

More information

CS / MCS 401 Homework 3 grader solutions

CS / MCS 401 Homework 3 grader solutions CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of

More information

AVERAGE MARKS SCALING

AVERAGE MARKS SCALING TERTIARY INSTITUTIONS SERVICE CENTRE Level 1, 100 Royal Street East Perth, Wester Australia 6004 Telephoe (08) 9318 8000 Facsiile (08) 95 7050 http://wwwtisceduau/ 1 Itroductio AVERAGE MARKS SCALING I

More information

19.1 The dictionary problem

19.1 The dictionary problem CS125 Lecture 19 Fall 2016 19.1 The dictioary proble Cosider the followig data structural proble, usually called the dictioary proble. We have a set of ites. Each ite is a (key, value pair. Keys are i

More information

6.3 Testing Series With Positive Terms

6.3 Testing Series With Positive Terms 6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial

More information

Answer Key, Problem Set 1, Written

Answer Key, Problem Set 1, Written Cheistry 1 Mies, Sprig, 018 Aswer Key, Proble Set 1, Writte 1. 14.3;. 14.34 (add part (e): Estiate / calculate the iitial rate of the reactio); 3. NT1; 4. NT; 5. 14.37; 6. 14.39; 7. 14.41; 8. NT3; 9. 14.46;

More information

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials Math 60 www.timetodare.com 3. Properties of Divisio 3.3 Zeros of Polyomials 3.4 Complex ad Ratioal Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered

More information

Lecture 10: Bounded Linear Operators and Orthogonality in Hilbert Spaces

Lecture 10: Bounded Linear Operators and Orthogonality in Hilbert Spaces Lecture : Bouded Liear Operators ad Orthogoality i Hilbert Spaces 34 Bouded Liear Operator Let ( X, ), ( Y, ) i i be ored liear vector spaces ad { } X Y The, T is said to be bouded if a real uber c such

More information

) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii

) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii square atrix is oe that has the sae uber of rows as colus; that is, a atrix. he idetity atrix (deoted by I, I, or [] I ) is a square atrix with the property that for ay atrix, the product I equals. he

More information

MA131 - Analysis 1. Workbook 2 Sequences I

MA131 - Analysis 1. Workbook 2 Sequences I MA3 - Aalysis Workbook 2 Sequeces I Autum 203 Cotets 2 Sequeces I 2. Itroductio.............................. 2.2 Icreasig ad Decreasig Sequeces................ 2 2.3 Bouded Sequeces..........................

More information

7 Sequences of real numbers

7 Sequences of real numbers 40 7 Sequeces of real umbers 7. Defiitios ad examples Defiitio 7... A sequece of real umbers is a real fuctio whose domai is the set N of atural umbers. Let s : N R be a sequece. The the values of s are

More information

A PROBABILITY PROBLEM

A PROBABILITY PROBLEM A PROBABILITY PROBLEM A big superarket chai has the followig policy: For every Euros you sped per buy, you ear oe poit (suppose, e.g., that = 3; i this case, if you sped 8.45 Euros, you get two poits,

More information

1 (12 points) Red-Black trees and Red-Purple trees

1 (12 points) Red-Black trees and Red-Purple trees CS6 Hoework 3 Due: 29 April 206, 2 oo Subit o Gradescope Haded out: 22 April 206 Istructios: Please aswer the followig questios to the best of your ability. If you are asked to desig a algorith, please

More information

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms.

[ 11 ] z of degree 2 as both degree 2 each. The degree of a polynomial in n variables is the maximum of the degrees of its terms. [ 11 ] 1 1.1 Polyomial Fuctios 1 Algebra Ay fuctio f ( x) ax a1x... a1x a0 is a polyomial fuctio if ai ( i 0,1,,,..., ) is a costat which belogs to the set of real umbers ad the idices,, 1,...,1 are atural

More information

Sequences I. Chapter Introduction

Sequences I. Chapter Introduction Chapter 2 Sequeces I 2. Itroductio A sequece is a list of umbers i a defiite order so that we kow which umber is i the first place, which umber is i the secod place ad, for ay atural umber, we kow which

More information

SEQUENCES AND SERIES

SEQUENCES AND SERIES Sequeces ad 6 Sequeces Ad SEQUENCES AND SERIES Successio of umbers of which oe umber is desigated as the first, other as the secod, aother as the third ad so o gives rise to what is called a sequece. Sequeces

More information

4.1 SIGMA NOTATION AND RIEMANN SUMS

4.1 SIGMA NOTATION AND RIEMANN SUMS .1 Sigma Notatio ad Riema Sums Cotemporary Calculus 1.1 SIGMA NOTATION AND RIEMANN SUMS Oe strategy for calculatig the area of a regio is to cut the regio ito simple shapes, calculate the area of each

More information

Binomial transform of products

Binomial transform of products Jauary 02 207 Bioial trasfor of products Khristo N Boyadzhiev Departet of Matheatics ad Statistics Ohio Norther Uiversity Ada OH 4580 USA -boyadzhiev@ouedu Abstract Give the bioial trasfors { b } ad {

More information

6.4 Binomial Coefficients

6.4 Binomial Coefficients 64 Bioial Coefficiets Pascal s Forula Pascal s forula, aed after the seveteeth-cetury Frech atheaticia ad philosopher Blaise Pascal, is oe of the ost faous ad useful i cobiatorics (which is the foral ter

More information

Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009

Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009 Discrete Matheatics: Lectures 8 ad 9 Priciple of Iclusio ad Exclusio Istructor: Arijit Bishu Date: August ad 3, 009 As you ca observe by ow, we ca cout i various ways. Oe such ethod is the age-old priciple

More information

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes

Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes Beroulli Polyoials Tals give at LSBU, October ad Noveber 5 Toy Forbes Beroulli Polyoials The Beroulli polyoials B (x) are defied by B (x), Thus B (x) B (x) ad B (x) x, B (x) x x + 6, B (x) dx,. () B 3

More information

We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers,

We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers, Cofidece Itervals III What we kow so far: We have see how to set cofidece itervals for the ea, or expected value, of a oral probability distributio, both whe the variace is kow (usig the stadard oral,

More information

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3 MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special

More information

The Hypergeometric Coupon Collection Problem and its Dual

The Hypergeometric Coupon Collection Problem and its Dual Joural of Idustrial ad Systes Egieerig Vol., o., pp -7 Sprig 7 The Hypergeoetric Coupo Collectio Proble ad its Dual Sheldo M. Ross Epstei Departet of Idustrial ad Systes Egieerig, Uiversity of Souther

More information

Jacobi symbols. p 1. Note: The Jacobi symbol does not necessarily distinguish between quadratic residues and nonresidues. That is, we could have ( a

Jacobi symbols. p 1. Note: The Jacobi symbol does not necessarily distinguish between quadratic residues and nonresidues. That is, we could have ( a Jacobi sybols efiitio Let be a odd positive iteger If 1, the Jacobi sybol : Z C is the costat fuctio 1 1 If > 1, it has a decopositio ( as ) a product of (ot ecessarily distict) pries p 1 p r The Jacobi

More information

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting Statistics ad Data Aalysis i MATLAB Kedrick Kay, kedrick.kay@wustl.edu February 28, 2014 Lecture 4: Model fittig 1. The basics - Suppose that we have a set of data ad suppose that we have selected the

More information

The Binomial Multi-Section Transformer

The Binomial Multi-Section Transformer 4/15/2010 The Bioial Multisectio Matchig Trasforer preset.doc 1/24 The Bioial Multi-Sectio Trasforer Recall that a ulti-sectio atchig etwork ca be described usig the theory of sall reflectios as: where:

More information

MATH10040 Chapter 4: Sets, Functions and Counting

MATH10040 Chapter 4: Sets, Functions and Counting MATH10040 Chapter 4: Sets, Fuctios ad Coutig 1. The laguage of sets Iforally, a set is ay collectio of objects. The objects ay be atheatical objects such as ubers, fuctios ad eve sets, or letters or sybols

More information

NUMERICAL METHODS FOR SOLVING EQUATIONS

NUMERICAL METHODS FOR SOLVING EQUATIONS Mathematics Revisio Guides Numerical Methods for Solvig Equatios Page 1 of 11 M.K. HOME TUITION Mathematics Revisio Guides Level: GCSE Higher Tier NUMERICAL METHODS FOR SOLVING EQUATIONS Versio:. Date:

More information

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero?

If a subset E of R contains no open interval, is it of zero measure? For instance, is the set of irrationals in [0, 1] is of measure zero? 2 Lebesgue Measure I Chapter 1 we defied the cocept of a set of measure zero, ad we have observed that every coutable set is of measure zero. Here are some atural questios: If a subset E of R cotais a

More information

5.6 Binomial Multi-section Matching Transformer

5.6 Binomial Multi-section Matching Transformer 4/14/21 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-25 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

Complete Solutions to Supplementary Exercises on Infinite Series

Complete Solutions to Supplementary Exercises on Infinite Series Coplete Solutios to Suppleetary Eercises o Ifiite Series. (a) We eed to fid the su ito partial fractios gives By the cover up rule we have Therefore Let S S A / ad A B B. Covertig the suad / the by usig

More information

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions ECE 9 Lecture 4: Estiatio of Lipschitz sooth fuctios R. Nowak 5/7/29 Cosider the followig settig. Let Y f (X) + W, where X is a rado variable (r.v.) o X [, ], W is a r.v. o Y R, idepedet of X ad satisfyig

More information

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,

More information

Seunghee Ye Ma 8: Week 5 Oct 28

Seunghee Ye Ma 8: Week 5 Oct 28 Week 5 Summary I Sectio, we go over the Mea Value Theorem ad its applicatios. I Sectio 2, we will recap what we have covered so far this term. Topics Page Mea Value Theorem. Applicatios of the Mea Value

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 018/019 DR. ANTHONY BROWN 8. Statistics 8.1. Measures of Cetre: Mea, Media ad Mode. If we have a series of umbers the

More information

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016 subcaptiofot+=small,labelformat=pares,labelsep=space,skip=6pt,list=0,hypcap=0 subcaptio ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, /6/06. Self-cojugate Partitios Recall that, give a partitio λ, we may

More information

MA131 - Analysis 1. Workbook 3 Sequences II

MA131 - Analysis 1. Workbook 3 Sequences II MA3 - Aalysis Workbook 3 Sequeces II Autum 2004 Cotets 2.8 Coverget Sequeces........................ 2.9 Algebra of Limits......................... 2 2.0 Further Useful Results........................

More information

TEACHER CERTIFICATION STUDY GUIDE

TEACHER CERTIFICATION STUDY GUIDE COMPETENCY 1. ALGEBRA SKILL 1.1 1.1a. ALGEBRAIC STRUCTURES Kow why the real ad complex umbers are each a field, ad that particular rigs are ot fields (e.g., itegers, polyomial rigs, matrix rigs) Algebra

More information

Linear Regression Demystified

Linear Regression Demystified Liear Regressio Demystified Liear regressio is a importat subject i statistics. I elemetary statistics courses, formulae related to liear regressio are ofte stated without derivatio. This ote iteds to

More information

The Growth of Functions. Theoretical Supplement

The Growth of Functions. Theoretical Supplement The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that

More information

Contents Two Sample t Tests Two Sample t Tests

Contents Two Sample t Tests Two Sample t Tests Cotets 3.5.3 Two Saple t Tests................................... 3.5.3 Two Saple t Tests Setup: Two Saples We ow focus o a sceario where we have two idepedet saples fro possibly differet populatios. Our

More information

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k)

distinct distinct n k n k n! n n k k n 1 if k n, identical identical p j (k) p 0 if k > n n (k) THE TWELVEFOLD WAY FOLLOWING GIAN-CARLO ROTA How ay ways ca we distribute objects to recipiets? Equivaletly, we wat to euerate equivalece classes of fuctios f : X Y where X = ad Y = The fuctios are subject

More information

1. By using truth tables prove that, for all statements P and Q, the statement

1. By using truth tables prove that, for all statements P and Q, the statement Author: Satiago Salazar Problems I: Mathematical Statemets ad Proofs. By usig truth tables prove that, for all statemets P ad Q, the statemet P Q ad its cotrapositive ot Q (ot P) are equivalet. I example.2.3

More information

5.6 Binomial Multi-section Matching Transformer

5.6 Binomial Multi-section Matching Transformer 4/14/2010 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-250 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.

More information

(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1

(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1 ROOT LOCUS TECHNIQUE 93 should be desiged differetly to eet differet specificatios depedig o its area of applicatio. We have observed i Sectio 6.4 of Chapter 6, how the variatio of a sigle paraeter like

More information

Mathematical Induction

Mathematical Induction Mathematical Iductio Itroductio Mathematical iductio, or just iductio, is a proof techique. Suppose that for every atural umber, P() is a statemet. We wish to show that all statemets P() are true. I a

More information

Bertrand s Postulate

Bertrand s Postulate Bertrad s Postulate Lola Thompso Ross Program July 3, 2009 Lola Thompso (Ross Program Bertrad s Postulate July 3, 2009 1 / 33 Bertrad s Postulate I ve said it oce ad I ll say it agai: There s always a

More information

Math 2784 (or 2794W) University of Connecticut

Math 2784 (or 2794W) University of Connecticut ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really

More information

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece 1, 1, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet

More information

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

September 2012 C1 Note. C1 Notes (Edexcel) Copyright   - For AS, A2 notes and IGCSE / GCSE worksheets 1 September 0 s (Edecel) Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright

More information

Random Models. Tusheng Zhang. February 14, 2013

Random Models. Tusheng Zhang. February 14, 2013 Radom Models Tusheg Zhag February 14, 013 1 Radom Walks Let me describe the model. Radom walks are used to describe the motio of a movig particle (object). Suppose that a particle (object) moves alog the

More information

P.3 Polynomials and Special products

P.3 Polynomials and Special products Precalc Fall 2016 Sectios P.3, 1.2, 1.3, P.4, 1.4, P.2 (radicals/ratioal expoets), 1.5, 1.6, 1.7, 1.8, 1.1, 2.1, 2.2 I Polyomial defiitio (p. 28) a x + a x +... + a x + a x 1 1 0 1 1 0 a x + a x +... +

More information

Perturbation Theory, Zeeman Effect, Stark Effect

Perturbation Theory, Zeeman Effect, Stark Effect Chapter 8 Perturbatio Theory, Zeea Effect, Stark Effect Ufortuately, apart fro a few siple exaples, the Schrödiger equatio is geerally ot exactly solvable ad we therefore have to rely upo approxiative

More information

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data Lecture 9 Curve fittig I Itroductio Suppose we are preseted with eight poits of easured data (x i, y j ). As show i Fig. o the left, we could represet the uderlyig fuctio of which these data are saples

More information

X. Perturbation Theory

X. Perturbation Theory X. Perturbatio Theory I perturbatio theory, oe deals with a ailtoia that is coposed Ĥ that is typically exactly solvable of two pieces: a referece part ad a perturbatio ( Ĥ ) that is assued to be sall.

More information

CHAPTER I: Vector Spaces

CHAPTER I: Vector Spaces CHAPTER I: Vector Spaces Sectio 1: Itroductio ad Examples This first chapter is largely a review of topics you probably saw i your liear algebra course. So why cover it? (1) Not everyoe remembers everythig

More information

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as

More information

f(1), and so, if f is continuous, f(x) = f(1)x.

f(1), and so, if f is continuous, f(x) = f(1)x. 2.2.35: Let f be a additive fuctio. i Clearly fx = fx ad therefore f x = fx for all Z+ ad x R. Hece, for ay, Z +, f = f, ad so, if f is cotiuous, fx = fx. ii Suppose that f is bouded o soe o-epty ope set.

More information

1 Approximating Integrals using Taylor Polynomials

1 Approximating Integrals using Taylor Polynomials Seughee Ye Ma 8: Week 7 Nov Week 7 Summary This week, we will lear how we ca approximate itegrals usig Taylor series ad umerical methods. Topics Page Approximatig Itegrals usig Taylor Polyomials. Defiitios................................................

More information

Essential Question How can you use properties of exponents to simplify products and quotients of radicals?

Essential Question How can you use properties of exponents to simplify products and quotients of radicals? . TEXAS ESSENTIAL KNOWLEDGE AND SKILLS A.7.G Properties of Ratioal Expoets ad Radicals Essetial Questio How ca you use properties of expoets to simplify products ad quotiets of radicals? Reviewig Properties

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22 CS 70 Discrete Mathematics for CS Sprig 2007 Luca Trevisa Lecture 22 Aother Importat Distributio The Geometric Distributio Questio: A biased coi with Heads probability p is tossed repeatedly util the first

More information

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects

More information

x+ 2 + c p () x c p () x is an arbitrary function. ( sin x ) dx p f() d d f() dx = x dx p cosx = cos x+ 2 d p () x + x-a r (1.

x+ 2 + c p () x c p () x is an arbitrary function. ( sin x ) dx p f() d d f() dx = x dx p cosx = cos x+ 2 d p () x + x-a r (1. Super Derivative (No-iteger ties Derivative). Super Derivative ad Super Differetiatio Defitio.. p () obtaied by cotiuig aalytically the ide of the differetiatio operator of Higher Derivative of a fuctio

More information

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains.

REVISION SHEET FP1 (MEI) ALGEBRA. Identities In mathematics, an identity is a statement which is true for all values of the variables it contains. The mai ideas are: Idetities REVISION SHEET FP (MEI) ALGEBRA Before the exam you should kow: If a expressio is a idetity the it is true for all values of the variable it cotais The relatioships betwee

More information

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer. 6 Itegers Modulo I Example 2.3(e), we have defied the cogruece of two itegers a,b with respect to a modulus. Let us recall that a b (mod ) meas a b. We have proved that cogruece is a equivalece relatio

More information

Math 155 (Lecture 3)

Math 155 (Lecture 3) Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,

More information

Define a Markov chain on {1,..., 6} with transition probability matrix P =

Define a Markov chain on {1,..., 6} with transition probability matrix P = Pla Group Work 0. The title says it all Next Tie: MCMC ad Geeral-state Markov Chais Midter Exa: Tuesday 8 March i class Hoework 4 due Thursday Uless otherwise oted, let X be a irreducible, aperiodic Markov

More information

Recitation 4: Lagrange Multipliers and Integration

Recitation 4: Lagrange Multipliers and Integration Math 1c TA: Padraic Bartlett Recitatio 4: Lagrage Multipliers ad Itegratio Week 4 Caltech 211 1 Radom Questio Hey! So, this radom questio is pretty tightly tied to today s lecture ad the cocept of cotet

More information

Lecture Outline. 2 Separating Hyperplanes. 3 Banach Mazur Distance An Algorithmist s Toolkit October 22, 2009

Lecture Outline. 2 Separating Hyperplanes. 3 Banach Mazur Distance An Algorithmist s Toolkit October 22, 2009 18.409 A Algorithist s Toolkit October, 009 Lecture 1 Lecturer: Joatha Keler Scribes: Alex Levi (009) 1 Outlie Today we ll go over soe of the details fro last class ad ake precise ay details that were

More information

PROPERTIES OF THE POSITIVE INTEGERS

PROPERTIES OF THE POSITIVE INTEGERS PROPERTIES OF THE POSITIVE ITEGERS The first itroductio to mathematics occurs at the pre-school level ad cosists of essetially coutig out the first te itegers with oe s figers. This allows the idividuals

More information

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row: Math 50-004 Tue Feb 4 Cotiue with sectio 36 Determiats The effective way to compute determiats for larger-sized matrices without lots of zeroes is to ot use the defiitio, but rather to use the followig

More information

Sequences. Notation. Convergence of a Sequence

Sequences. Notation. Convergence of a Sequence Sequeces A sequece is essetially just a list. Defiitio (Sequece of Real Numbers). A sequece of real umbers is a fuctio Z (, ) R for some real umber. Do t let the descriptio of the domai cofuse you; it

More information

Essential Question How can you recognize an arithmetic sequence from its graph?

Essential Question How can you recognize an arithmetic sequence from its graph? . Aalyzig Arithmetic Sequeces ad Series COMMON CORE Learig Stadards HSF-IF.A.3 HSF-BF.A. HSF-LE.A. Essetial Questio How ca you recogize a arithmetic sequece from its graph? I a arithmetic sequece, the

More information

Lecture Notes for CS 313H, Fall 2011

Lecture Notes for CS 313H, Fall 2011 Lecture Notes for CS 313H, Fall 011 August 5. We start by examiig triagular umbers: T () = 1 + + + ( = 0, 1,,...). Triagular umbers ca be also defied recursively: T (0) = 0, T ( + 1) = T () + + 1, or usig

More information

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1.

PROBLEM SET 5 SOLUTIONS 126 = , 37 = , 15 = , 7 = 7 1. Math 7 Sprig 06 PROBLEM SET 5 SOLUTIONS Notatios. Give a real umber x, we will defie sequeces (a k ), (x k ), (p k ), (q k ) as i lecture.. (a) (5 pts) Fid the simple cotiued fractio represetatios of 6

More information

1.2 AXIOMATIC APPROACH TO PROBABILITY AND PROPERTIES OF PROBABILITY MEASURE 1.2 AXIOMATIC APPROACH TO PROBABILITY AND

1.2 AXIOMATIC APPROACH TO PROBABILITY AND PROPERTIES OF PROBABILITY MEASURE 1.2 AXIOMATIC APPROACH TO PROBABILITY AND NTEL- robability ad Distributios MODULE 1 ROBABILITY LECTURE 2 Topics 1.2 AXIOMATIC AROACH TO ROBABILITY AND ROERTIES OF ROBABILITY MEASURE 1.2.1 Iclusio-Exclusio Forula I the followig sectio we will discuss

More information

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence Chapter 3 Strog covergece As poited out i the Chapter 2, there are multiple ways to defie the otio of covergece of a sequece of radom variables. That chapter defied covergece i probability, covergece i

More information

Geometry Unit 3 Notes Parallel and Perpendicular Lines

Geometry Unit 3 Notes Parallel and Perpendicular Lines Review Cocepts: Equatios of Lies Geoetry Uit Notes Parallel ad Perpedicular Lies Syllabus Objective:. - The studet will differetiate aog parallel, perpedicular, ad skew lies. Lies that DO NOT itersect:

More information

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function. MATH 532 Measurable Fuctios Dr. Neal, WKU Throughout, let ( X, F, µ) be a measure space ad let (!, F, P ) deote the special case of a probability space. We shall ow begi to study real-valued fuctios defied

More information

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations Differece Equatios to Differetial Equatios Sectio. Calculus: Areas Ad Tagets The study of calculus begis with questios about chage. What happes to the velocity of a swigig pedulum as its positio chages?

More information