Section IV.5: Recurrence Relations from Algorithms


 Arabella Hoover
 2 years ago
 Views:
Transcription
1 Sectio IV.5: Recurrece Relatios from Algorithms Give a recursive algorithm with iput size, we wish to fid a Θ (best big O) estimate for its ru time T() either by obtaiig a explicit formula for T() or by obtaiig a upper or lower boud U() for T() such that T() = Θ(U()). This ca be doe with the followig sequece of steps. (a) Fid the base cases ad a recurrece relatio for the algorithm. (b) (1) Obtai a iterative formula for T() if possible. The oe ca use methods i Epp, chapter 8, or Sectio IV.1 of these otes or () Obtai a upper or lower boud U() if the iterative formula is difficult or impossible to obtai explicitly. I Epp (sectio 8.), there are examples of obtaiig iterative formulas for T() for simple cases like arithmetic or geometric sequeces. Also illustrated are examples where familiar summatio idetities ca be used to get iterative formulas. Whe iterative formulas for T() are difficult or impossible to obtai, oe ca use either (1) a recursio tree method, () a iteratio method, or () a substitutio method with iductio to get T() or a boud U() of T() where T() = Θ(U()). Examples of these methods are foud i Corme (pp. 561). Examples of each of these methods are give below. Defiitio IV.5.1: Give a recursive algorithm (Defiitio i Sectio IV1), a recurrece relatio for the algorithm is a equatio that gives the ru time o a iput size i terms of the ru times of smaller iput sizes. Defiitio IV.5.: A recursio tree is a tree geerated by tracig the executio of a recursive algorithm. (Corme, p. 59) Example IV.5.1: For Example IV.1.. i Sectio IV.1 (Summig a Array), get a recurrece relatio for the algorithm ad iterative formula T(). Use (a) a iteratio method ad (b) a recursio tree method. Get the Θ estimate of T(). Solutio: (a) T() = T(1) + 1, sice additio of the th elemet ca be doe by addig it to the sum of the 1 precedig elemets, ad additio ivolves oe operatio. Also T()=. Therefore, T(k) = T(k1) + 1 for k betwee 1 ad is the recurrece relatio. Iteratio gives T() = T(1) + 1 = T()+1 +1 = T() =... = T() = T() + =. (At the last stage we have added oe to itself times). Therefore, T() = Θ(). 1
2 Solutio: (b) At each level of the tree, replace the paret of that subtree by the costat term of the recurrece relatio T(k) = T(k1) + 1 ad make T(k1) the child. The tree is really a list here. It is developed from left to right i the diagram below. T() T(1) 1 É 1 1 É É T() T() T() is computed by fidig the sum of the elemets at each level of the tree. Therefore T() =, ad T() = Θ(). Example IV.5.: Biary Search (recursive versio) The pseudo code for recursive biary search is give below. Algorithm Recursive Biary Search Iput: Value X of the same data type as array A, idices low ad high, which are positive itegers, ad A, the array A[low],..., A[high] i ascedig order. Output: The idex i array if X is foud, (zero) if X ot foud. Algorithm Body: low + high mid := if X = A[mid] the idex := mid else if X < A[mid] ad low < mid the call Biary Search with iputs X, low, mid1, A else if X > A[mid] ad mid < high the call Biary Search with iputs X, mid+1, high, A else idex := ed Algorithm Recursive Biary Search Derive a recurrece relatio o Biary Search ad get a Θ estimate of the worst case ruig time T(). Use a recursio tree method. Solutio to Example IV.5.: Oe could cout the umber of comparisos of X to A[mid]. Biary Search is called o a subarray of legth approximately ad there are comparisos i the worst case before a recursive call is eeded agai. So the recurrece relatio is T() = T(/) +, or more specifically, T(k) = T(k/) + for iput size k. Also T(1) =.
3 The recursio tree is developed similar to that i Example 1. At each level, let the paret be the costat term ad the child be the term T(k/). The process is illustrated below. T() T(/) T(/) T(1) The depth of the tree is approximately log. Addig the values i the levels of the tree we get T() log. Therefore T() = Θ (log ). Example IV.5.: Merge Sort The pseudocode for Merge Sort is give i Epp, p. 59. Develop a recurrece relatio ad get a Θ estimate for this algorithm. Algorithm Merge Sort Iput: positive itegers bot ad top, bot top, array items A[bot], A[bot+1],..., A[top] that ca be ordered. Output: array A[bot], A[bot+1],..., A[top] of the same elemets as i the iput array but i ascedig order. Algorithm Body: if bot < top the do bot + top mid := call Merge Sort with iput bot, mid, A[bot],..., A[mid] call Merge Sort with iput mid + 1, top, A[mid+1],..., A[top] Merge A[bot],..., A[mid] ad A[mid+1],..., A[top] [where Merge takes these two arrays i ascedig order ad gives a array i ascedig order] ed do ed Algorithm Merge Sort Solutio to Example IV..: For simplicity let the iput size be = k, k a positive iteger. Let T() deote the ru time. I the worst case of Merge, there are about comparisos eeded to determie the orderig i the merged array (actually 1 sice the last elemet eed ot be compared). Sice we desire a Θ estimate ad ot a exact formula, we ca assume. I the best case there are / comparisos i Merge. This algorithm is called recursively o two subarrays of legth approximately /. Therefore, the recurrece relatio is T() = T(/) +, so for particular k, T(k) = T( k ) + k.
4 The recursio tree is developed below, usig fact that, at each level of the tree, the paret k ode is the term ot ivolvig T ad there are two childre due to the term T( ). The tree is developed as show, goig from left to right ad top to bottom. T() à T(/) T(/) à T( ) T( ) T( ) T( ) The sum of the values at each level of the tree is (m odes times the value m i each ode). There are k = log levels sice we ca cut the array i half k times. Thus, the sum of the elemets i all odes of the tree is log. Therefore, T() = Θ( log ). Example IV.5.: Give the recurrece T() = T( ) + T( ) +, get a Θ estimate for T() usig the recursio tree method. Solutio: The recursio tree is developed below. T( ) T( ) T( ) T( ) T( ) T( ) The costructio cotiues util we get to the leaves. We keep multiplyig by util k ( ) = 1. The logest possible path of this tree is of legth k where k ( ) = 1, i.e.,
5 where k = log. The sum of the values i each level of the tree is at most. The left part of the tree plays out before the right side; the legth of the path from the root to the leaves ca vary from log to log, depedig o whether argumet k i T(k) goes to k/ or k/. Oe obtais T() log ad T() log. By the fact that growth rate of a log fuctio is idepedet of its base (Theorem II.5.8), we ca coclude T() = O( log ) ad T() = Ω( log ). Therefore T() = Θ( log ). The ext two examples use the iteratio method. Example IV.5.5 ivolves a coverget geometric series, ad Example IV.5.6 is more complicated sice the geometric series diverges. Example IV.5.5: Give the recurrece T() = T method that T() = Θ(). ( ) +, show by a iteratio Solutio: For simplicity, we shall use m for m sice the recurrece is i terms of the floor fuctio. The iteratio proceeds as follows: T() + T( ) = + (( ) + T( 16 ) ) = T( 6 ) i ( / ) = from the formula ( r i ) = i= i= 1 1 r whe r < 1 (here r = ). (The formula for T() ivolves a decreasig geometric series with ratio r = ). Therefore, T() = O() (use C = ad X = N = 1 i the defiitio of big O). Also, T() sice T( ) >. So T() = Ω () (use C = 1 ad X = N = 1 i the defiitio of Ω). By the defiitio of Θ (sectio II.5), we have T() = Θ(). Example IV.5.6: Give the recurrece T() = T( ) +, use the iteratio method to get a big O estimate for T(). Solutio: For simplicity, we shall use m for m sice the recurrece is i terms of the floor fuctio. The iteratio proceeds as follows: T() = + T( ) = + (( ) + T( ) ) = T( ) = The coefficiets form the terms of the geometric series ( r i ) where r = /. Sice i= 5
6 r > 1, the ifiite series diverges. However, there are oly fiitely may terms i the sum. The sum termiates for the smallest iteger k where k > (the umber of times we divide by is log ), i.e., whe k log. Sice we have T() ( 1 log 1 / log ) log 1 i = ( ) = (( ) 1) log /( log 1) = (( ) 1) i= = ( ) log  log = ( ) log  log =  usig log = = log . I the last step, we used b (*) a log b a = log, which is derived i Sectio IV.6. Sice log > 1, we kow that term coclude that T() = O ( log ). log domiates. From sectio II.5, we ca Note: We use stadard properties of logarithms i this argumet. We also use the i idetity r = r + 1 ( 1) ( r 1) whe r 1. i= Note: The Master method give i Sectio IV.6 will give us a much easier way to do this problem. Substitutio method with iductio The ext two examples use the substitutio method with iductio. The method is described as follows. We show T() = O(U()). Showig T() = Ω(U()) is similar. (1) Guess the form of a boud U() of T(). () Assume by strog iductio that for some costats C ad, T(k) C U(k) for all k ad k <. Show that for these values of C ad, T() C U( )for all > () Fid a pair C ad that also satisfy the iitial coditios (values of T(1), T(). etc.). These must satisfy the coditios i () ad (); therefore, the values may chage. () If the give form does ot work, try a differet U() with same growth rate. If this fails, try a U() with a differet growth rate. Example IV.5.7: Fid a Θ boud for T() where T() = T(1) + ad T() = 1. Use the substitutio method with iductio. 6
7 Solutio: From Epp, sectio 8., oe ca get the iterative formula T() = 1 + ( +1). So we kow that T() = Θ( ). However, we show how substitutio ad iductio works i this example Assume T() C for all >, k <, ad fid C ad that work. Usig the iductio assumptio, we try to fid C ad where T() = T(1) + C ( 1) + = C (  +1) + = C  C + C + C for all >. This iequality implies that C C, i.e., C (1) or C. 1 Sice the expressio is decreasig (verify by takig derivatives), we substitute 1 1 for ad must have 1/(1) C, that is, C 1. However, o C works for T(), ad T(1) =. For T(1) C (1) to hold, we must have C. Puttig together the costraits C 1 ad C, we kow that C works, ad also that 1 must hold. So take C = ad = 1 i the defiitio of big O. It is true that we did ot eed such a complicated procedure to solve Example II.5.7. However, may times oe caot easily get a closed form for T(). Yet the substitutio method with iductio works. Example IV.5.8 illustrates this. Example IV.5.8: Use the substitutio ad iductio approach to show T() = T( ) +, where T(1) = 1, is Θ( log ). Solutio: Show that T() C log for all > k ad fid a C ad. Usig the iductio assumptio ad recurrece formula, oe obtais T C ( ) ( log ) + () C log + = C log C log + = C log C + Clog if C 1. (We use properties of logs ad fact that i this derivatio). 7
8 However, T() C log is ot true for = 1, for 1 log 1 =. So we must choose. Now, T() = T(1) + = ad T() = T(1) + = 5. We must pick C large eough that T() C ( log ) ad T() C ( log ). Ay C works. So we ca take C = ad = i the defiitio of big O. Chagig Variables Sometimes oe ca do algebraic maipulatio to write a ukow recurrece i terms of a familiar oe. The oe solves the familiar oe ad writes the solutio i terms of the origial variable. Example IV.5.9 illustrates this. Example IV.5.9: Solve T() = T( ) + log. m m Solutio: Let m = log. The this recurrece becomes T( ) = T ( ) + m. Let S(m) = T( m m (m ), i.e. S(m) = T(g(m)) where g(m) =. So S ( m ) = T( ) ad the ew recurrece S(m) = S(m/) + m is produced. This is the same form as Example m IV.5.8; therefore it has the solutio S(m) = Θ(m log m ). By the substitutio =, we m get T() = T( ) = S(m) = Θ(m log m ) = Θ( log log (log )). Exercises: (1) Use the recursio tree method to get a Θ estimate, coefficiet 1, for the recurrece T() = T( ) +. () Use the recursio tree method to get a Θ estimate, coefficiet 1, for the recurrece i Example IV.5.5. You eed to get the height of the recursio tree. () Use the recursio tree method to get a Θ estimate, coefficiet 1, for the recurrece T T() = T( ) + T( ) +. () Use a iteratio method (similar to Example IV.5.5) to get a Θ estimate, coefficiet 1, for recurrece the T() = T 5 +. (5) Use a iteratio method (similar to Example IV.5.6) to get a Θ estimate, coefficiet 1, for the recurrece T() = 5T +. 8
9 (6) Give the recurrece T() = T ( ) + T ( ) + 1, show that T() C for ay C caot be show usig a iductio argumet. Show T() = O() is correct by fidig a C ad b where T() C b works. Assume that the iitial coditio is T(1) = 1. (7) Solve the recurrece T ( ) = T ( 1/ ) + T ( ) + log usig a substitutio m i terms of similar to that i Example IV.5.9. You will get a recurrece i m that is oe of the previous examples. Solve it i terms of m ad solve the give recurrece i terms of. 9
Soving Recurrence Relations
Sovig Recurrece Relatios Part 1. Homogeeous liear 2d degree relatios with costat coefficiets. Cosider the recurrece relatio ( ) T () + at ( 1) + bt ( 2) = 0 This is called a homogeeous liear 2d degree
More informationInfinite Sequences and Series
CHAPTER 4 Ifiite Sequeces ad Series 4.1. Sequeces A sequece is a ifiite ordered list of umbers, for example the sequece of odd positive itegers: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29...
More informationModule 4: Mathematical Induction
Module 4: Mathematical Iductio Theme 1: Priciple of Mathematical Iductio Mathematical iductio is used to prove statemets about atural umbers. As studets may remember, we ca write such a statemet as a predicate
More informationSolving DivideandConquer Recurrences
Solvig DivideadCoquer Recurreces Victor Adamchik A divideadcoquer algorithm cosists of three steps: dividig a problem ito smaller subproblems solvig (recursively) each subproblem the combiig solutios
More informationSequences and Series
CHAPTER 9 Sequeces ad Series 9.. Covergece: Defiitio ad Examples Sequeces The purpose of this chapter is to itroduce a particular way of geeratig algorithms for fidig the values of fuctios defied by their
More informationSECTION 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 informationCS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations
CS3A Hadout 3 Witer 00 February, 00 Solvig Recurrece Relatios Itroductio A wide variety of recurrece problems occur i models. Some of these recurrece relatios ca be solved usig iteratio or some other ad
More informationLecture 4: Cauchy sequences, BolzanoWeierstrass, and the Squeeze theorem
Lecture 4: Cauchy sequeces, BolzaoWeierstrass, ad the Squeeze theorem The purpose of this lecture is more modest tha the previous oes. It is to state certai coditios uder which we are guarateed that limits
More informationIn nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008
I ite Sequeces Dr. Philippe B. Laval Keesaw State Uiversity October 9, 2008 Abstract This had out is a itroductio to i ite sequeces. mai de itios ad presets some elemetary results. It gives the I ite Sequeces
More informationLearning outcomes. Algorithms and Data Structures. Time Complexity Analysis. Time Complexity Analysis How fast is the algorithm? Prof. Dr.
Algorithms ad Data Structures Algorithm efficiecy Learig outcomes Able to carry out simple asymptotic aalysisof algorithms Prof. Dr. Qi Xi 2 Time Complexity Aalysis How fast is the algorithm? Code the
More information8.1 Arithmetic Sequences
MCR3U Uit 8: Sequeces & Series Page 1 of 1 8.1 Arithmetic Sequeces Defiitio: A sequece is a comma separated list of ordered terms that follow a patter. Examples: 1, 2, 3, 4, 5 : a sequece of the first
More informationIncremental calculation of weighted mean and variance
Icremetal calculatio of weighted mea ad variace Toy Fich faf@cam.ac.uk dot@dotat.at Uiversity of Cambridge Computig Service February 009 Abstract I these otes I eplai how to derive formulae for umerically
More informationAsymptotic Growth of Functions
CMPS Itroductio to Aalysis of Algorithms Fall 3 Asymptotic Growth of Fuctios We itroduce several types of asymptotic otatio which are used to compare the performace ad efficiecy of algorithms As we ll
More informationRecursion and Recurrences
Chapter 5 Recursio ad Recurreces 5.1 Growth Rates of Solutios to Recurreces Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer. Cosider, for example,
More informationThe second difference is the sequence of differences of the first difference sequence, 2
Differece Equatios I differetial equatios, you look for a fuctio that satisfies ad equatio ivolvig derivatives. I differece equatios, istead of a fuctio of a cotiuous variable (such as time), we look for
More information4.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 informationBasic Elements of Arithmetic Sequences and Series
MA40S PRECALCULUS UNIT G GEOMETRIC SEQUENCES CLASS NOTES (COMPLETED NO NEED TO COPY NOTES FROM OVERHEAD) Basic Elemets of Arithmetic Sequeces ad Series Objective: To establish basic elemets of arithmetic
More information4 n. n 1. You shold think of the Ratio Test as a generalization of the Geometric Series Test. For example, if a n ar n is a geometric sequence then
SECTION 2.6 THE RATIO TEST 79 2.6. THE RATIO TEST We ow kow how to hadle series which we ca itegrate (the Itegral Test), ad series which are similar to geometric or pseries (the Compariso Test), but of
More informationSolutions to Exercises Chapter 4: Recurrence relations and generating functions
Solutios to Exercises Chapter 4: Recurrece relatios ad geeratig fuctios 1 (a) There are seatig positios arraged i a lie. Prove that the umber of ways of choosig a subset of these positios, with o two chose
More informationSAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx
SAMPLE QUESTIONS FOR FINAL EXAM REAL ANALYSIS I FALL 006 3 4 Fid the followig usig the defiitio of the Riema itegral: a 0 x + dx 3 Cosider the partitio P x 0 3, x 3 +, x 3 +,......, x 3 3 + 3 of the iterval
More informationS. Tanny MAT 344 Spring 1999. be the minimum number of moves required.
S. Tay MAT 344 Sprig 999 Recurrece Relatios Tower of Haoi Let T be the miimum umber of moves required. T 0 = 0, T = 7 Iitial Coditios * T = T + $ T is a sequece (f. o itegers). Solve for T? * is a recurrece,
More information7. Sample Covariance and Correlation
1 of 8 7/16/2009 6:06 AM Virtual Laboratories > 6. Radom Samples > 1 2 3 4 5 6 7 7. Sample Covariace ad Correlatio The Bivariate Model Suppose agai that we have a basic radom experimet, ad that X ad Y
More informationThe Euler Totient, the Möbius and the Divisor Functions
The Euler Totiet, the Möbius ad the Divisor Fuctios Rosica Dieva July 29, 2005 Mout Holyoke College South Hadley, MA 01075 1 Ackowledgemets This work was supported by the Mout Holyoke College fellowship
More informationINFINITE SERIES KEITH CONRAD
INFINITE SERIES KEITH CONRAD. Itroductio The two basic cocepts of calculus, differetiatio ad itegratio, are defied i terms of limits (Newto quotiets ad Riema sums). I additio to these is a third fudametal
More informationCS103X: Discrete Structures Homework 4 Solutions
CS103X: Discrete Structures Homewor 4 Solutios Due February 22, 2008 Exercise 1 10 poits. Silico Valley questios: a How may possible sixfigure salaries i whole dollar amouts are there that cotai at least
More informationFIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix
FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. Powers of a matrix We begi with a propositio which illustrates the usefuless of the diagoalizatio. Recall that a square matrix A is diogaalizable if
More informationSection 6.1 Radicals and Rational Exponents
Sectio 6.1 Radicals ad Ratioal Expoets Defiitio of Square Root The umber b is a square root of a if b The priciple square root of a positive umber is its positive square root ad we deote this root by usig
More informationI. Chisquared Distributions
1 M 358K Supplemet to Chapter 23: CHISQUARED DISTRIBUTIONS, TDISTRIBUTIONS, AND DEGREES OF FREEDOM To uderstad tdistributios, we first eed to look at aother family of distributios, the chisquared distributios.
More informationTheorems About Power Series
Physics 6A Witer 20 Theorems About Power Series Cosider a power series, f(x) = a x, () where the a are real coefficiets ad x is a real variable. There exists a real oegative umber R, called the radius
More informationOur aim is to show that under reasonable assumptions a given 2πperiodic function f can be represented as convergent series
8 Fourier Series Our aim is to show that uder reasoable assumptios a give periodic fuctio f ca be represeted as coverget series f(x) = a + (a cos x + b si x). (8.) By defiitio, the covergece of the series
More informationSequences II. Chapter 3. 3.1 Convergent Sequences
Chapter 3 Sequeces II 3. Coverget Sequeces Plot a graph of the sequece a ) = 2, 3 2, 4 3, 5 + 4,...,,... To what limit do you thik this sequece teds? What ca you say about the sequece a )? For ǫ = 0.,
More information5 Boolean Decision Trees (February 11)
5 Boolea Decisio Trees (February 11) 5.1 Graph Coectivity Suppose we are give a udirected graph G, represeted as a boolea adjacecy matrix = (a ij ), where a ij = 1 if ad oly if vertices i ad j are coected
More informationx(x 1)(x 2)... (x k + 1) = [x] k n+m 1
1 Coutig mappigs For every real x ad positive iteger k, let [x] k deote the fallig factorial ad x(x 1)(x 2)... (x k + 1) ( ) x = [x] k k k!, ( ) k = 1. 0 I the sequel, X = {x 1,..., x m }, Y = {y 1,...,
More informationAlgebra Vocabulary List (Definitions for Middle School Teachers)
Algebra Vocabulary List (Defiitios for Middle School Teachers) A Absolute Value Fuctio The absolute value of a real umber x, x is xifx 0 x = xifx < 0 http://www.math.tamu.edu/~stecher/171/f02/absolutevaluefuctio.pdf
More information4.3. The Integral and Comparison Tests
4.3. THE INTEGRAL AND COMPARISON TESTS 9 4.3. The Itegral ad Compariso Tests 4.3.. The Itegral Test. Suppose f is a cotiuous, positive, decreasig fuctio o [, ), ad let a = f(). The the covergece or divergece
More informationTrigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE 6.44. The absolute value of the complex number z a bi is
0_0605.qxd /5/05 0:45 AM Page 470 470 Chapter 6 Additioal Topics i Trigoometry 6.5 Trigoometric Form of a Complex Number What you should lear Plot complex umbers i the complex plae ad fid absolute values
More information.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth
Questio 1: What is a ordiary auity? Let s look at a ordiary auity that is certai ad simple. By this, we mea a auity over a fixed term whose paymet period matches the iterest coversio period. Additioally,
More information6.042/18.062J Mathematics for Computer Science. Recurrences
6.04/8.06J Mathematics for Computer Sciece Srii Devadas ad Eric Lehma March 7, 00 Lecture Notes Recurreces Recursio breakig a object dow ito smaller objects of the same type is a major theme i mathematics
More informationExample 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).
BEGINNING ALGEBRA Roots ad Radicals (revised summer, 00 Olso) Packet to Supplemet the Curret Textbook  Part Review of Square Roots & Irratioals (This portio ca be ay time before Part ad should mostly
More informationRunning Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis
Ruig Time ( 3.) Aalysis of Algorithms Iput Algorithm Output A algorithm is a stepbystep procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.
More informationDivide and Conquer. Maximum/minimum. Integer Multiplication. CS125 Lecture 4 Fall 2015
CS125 Lecture 4 Fall 2015 Divide ad Coquer We have see oe geeral paradigm for fidig algorithms: the greedy approach. We ow cosider aother geeral paradigm, kow as divide ad coquer. We have already see a
More information0.7 0.6 0.2 0 0 96 96.5 97 97.5 98 98.5 99 99.5 100 100.5 96.5 97 97.5 98 98.5 99 99.5 100 100.5
Sectio 13 KolmogorovSmirov test. Suppose that we have a i.i.d. sample X 1,..., X with some ukow distributio P ad we would like to test the hypothesis that P is equal to a particular distributio P 0, i.e.
More informationHere are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.
This documet was writte ad copyrighted by Paul Dawkis. Use of this documet ad its olie versio is govered by the Terms ad Coditios of Use located at http://tutorial.math.lamar.edu/terms.asp. The olie versio
More informationTHE UNLIKELY UNION OF PARTITIONS AND DIVISORS
THE UNLIKELY UNION OF PARTITIONS AND DIVISORS Abdulkadir Hasse, Thomas J. Osler, Mathematics Departmet ad Tirupathi R. Chadrupatla, Mechaical Egieerig Rowa Uiversity Glassboro, NJ 828 I the multiplicative
More informationArithmetic Sequences and Partial Sums. Arithmetic Sequences. Definition of Arithmetic Sequence. Example 1. 7, 11, 15, 19,..., 4n 3,...
3330_090.qxd 1/5/05 11:9 AM Page 653 Sectio 9. Arithmetic Sequeces ad Partial Sums 653 9. Arithmetic Sequeces ad Partial Sums What you should lear Recogize,write, ad fid the th terms of arithmetic sequeces.
More informationA Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design
A Combied Cotiuous/Biary Geetic Algorithm for Microstrip Atea Desig Rady L. Haupt The Pesylvaia State Uiversity Applied Research Laboratory P. O. Box 30 State College, PA 168040030 haupt@ieee.org Abstract:
More information23 The Remainder and Factor Theorems
 The Remaider ad Factor Theorems Factor each polyomial completely usig the give factor ad log divisio 1 x + x x 60; x + So, x + x x 60 = (x + )(x x 15) Factorig the quadratic expressio yields x + x x
More informationa 4 = 4 2 4 = 12. 2. Which of the following sequences converge to zero? n 2 (a) n 2 (b) 2 n x 2 x 2 + 1 = lim x n 2 + 1 = lim x
0 INFINITE SERIES 0. Sequeces Preiary Questios. What is a 4 for the sequece a? solutio Substitutig 4 i the expressio for a gives a 4 4 4.. Which of the followig sequeces coverge to zero? a b + solutio
More informationSEQUENCES AND SERIES
Chapter 9 SEQUENCES AND SERIES Natural umbers are the product of huma spirit. DEDEKIND 9.1 Itroductio I mathematics, the word, sequece is used i much the same way as it is i ordiary Eglish. Whe we say
More informationBINOMIAL EXPANSIONS 12.5. In this section. Some Examples. Obtaining the Coefficients
652 (1226) Chapter 12 Sequeces ad Series 12.5 BINOMIAL EXPANSIONS I this sectio Some Examples Otaiig the Coefficiets The Biomial Theorem I Chapter 5 you leared how to square a iomial. I this sectio you
More informationLecture 3. denote the orthogonal complement of S k. Then. 1 x S k. n. 2 x T Ax = ( ) λ x. with x = 1, we have. i = λ k x 2 = λ k.
18.409 A Algorithmist s Toolkit September 17, 009 Lecture 3 Lecturer: Joatha Keler Scribe: Adre Wibisoo 1 Outlie Today s lecture covers three mai parts: CouratFischer formula ad Rayleigh quotiets The
More informationDiscrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13
EECS 70 Discrete Mathematics ad Probability Theory Sprig 2014 Aat Sahai Note 13 Itroductio At this poit, we have see eough examples that it is worth just takig stock of our model of probability ad may
More informationLecture 13. Lecturer: Jonathan Kelner Scribe: Jonathan Pines (2009)
18.409 A Algorithmist s Toolkit October 27, 2009 Lecture 13 Lecturer: Joatha Keler Scribe: Joatha Pies (2009) 1 Outlie Last time, we proved the BruMikowski iequality for boxes. Today we ll go over the
More informationThe Stable Marriage Problem
The Stable Marriage Problem William Hut Lae Departmet of Computer Sciece ad Electrical Egieerig, West Virgiia Uiversity, Morgatow, WV William.Hut@mail.wvu.edu 1 Itroductio Imagie you are a matchmaker,
More informationSection 11.3: The Integral Test
Sectio.3: The Itegral Test Most of the series we have looked at have either diverged or have coverged ad we have bee able to fid what they coverge to. I geeral however, the problem is much more difficult
More information1. MATHEMATICAL INDUCTION
1. MATHEMATICAL INDUCTION EXAMPLE 1: Prove that for ay iteger 1. Proof: 1 + 2 + 3 +... + ( + 1 2 (1.1 STEP 1: For 1 (1.1 is true, sice 1 1(1 + 1. 2 STEP 2: Suppose (1.1 is true for some k 1, that is 1
More informationChapter 6: Variance, the law of large numbers and the MonteCarlo method
Chapter 6: Variace, the law of large umbers ad the MoteCarlo method Expected value, variace, ad Chebyshev iequality. If X is a radom variable recall that the expected value of X, E[X] is the average value
More informationEquation of a line. Line in coordinate geometry. Slopeintercept form ( 斜 截 式 ) Intercept form ( 截 距 式 ) Pointslope form ( 點 斜 式 )
Chapter : Liear Equatios Chapter Liear Equatios Lie i coordiate geometr I Cartesia coordiate sstems ( 卡 笛 兒 坐 標 系 統 ), a lie ca be represeted b a liear equatio, i.e., a polomial with degree. But before
More information. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2
4. Basic feasible solutios ad vertices of polyhedra Due to the fudametal theorem of Liear Programmig, to solve ay LP it suffices to cosider the vertices (fiitely may) of the polyhedro P of the feasible
More information3. Greatest Common Divisor  Least Common Multiple
3 Greatest Commo Divisor  Least Commo Multiple Defiitio 31: The greatest commo divisor of two atural umbers a ad b is the largest atural umber c which divides both a ad b We deote the greatest commo gcd
More informationSequences and Series Using the TI89 Calculator
RIT Calculator Site Sequeces ad Series Usig the TI89 Calculator Norecursively Defied Sequeces A orecursively defied sequece is oe i which the formula for the terms of the sequece is give explicitly. For
More informationA probabilistic proof of a binomial identity
A probabilistic proof of a biomial idetity Joatho Peterso Abstract We give a elemetary probabilistic proof of a biomial idetity. The proof is obtaied by computig the probability of a certai evet i two
More informationModified Line Search Method for Global Optimization
Modified Lie Search Method for Global Optimizatio Cria Grosa ad Ajith Abraham Ceter of Excellece for Quatifiable Quality of Service Norwegia Uiversity of Sciece ad Techology Trodheim, Norway {cria, ajith}@q2s.tu.o
More informationLinear Algebra II. 4 Determinants. Notes 4 1st November Definition of determinant
MTH6140 Liear Algebra II Notes 4 1st November 2010 4 Determiats The determiat is a fuctio defied o square matrices; its value is a scalar. It has some very importat properties: perhaps most importat is
More information1. C. The formula for the confidence interval for a population mean is: x t, which was
s 1. C. The formula for the cofidece iterval for a populatio mea is: x t, which was based o the sample Mea. So, x is guarateed to be i the iterval you form.. D. Use the rule : pvalue
More informationEngineering 323 Beautiful Homework Set 3 1 of 7 Kuszmar Problem 2.51
Egieerig 33 eautiful Homewor et 3 of 7 Kuszmar roblem.5.5 large departmet store sells sport shirts i three sizes small, medium, ad large, three patters plaid, prit, ad stripe, ad two sleeve legths log
More informationEscola Federal de Engenharia de Itajubá
Escola Federal de Egeharia de Itajubá Departameto de Egeharia Mecâica PósGraduação em Egeharia Mecâica MPF04 ANÁLISE DE SINAIS E AQUISÇÃO DE DADOS SINAIS E SISTEMAS Trabalho 02 (MATLAB) Prof. Dr. José
More informationClass Meeting # 16: The Fourier Transform on R n
MATH 18.152 COUSE NOTES  CLASS MEETING # 16 18.152 Itroductio to PDEs, Fall 2011 Professor: Jared Speck Class Meetig # 16: The Fourier Trasform o 1. Itroductio to the Fourier Trasform Earlier i the course,
More informationTHE ABRACADABRA PROBLEM
THE ABRACADABRA PROBLEM FRANCESCO CARAVENNA Abstract. We preset a detailed solutio of Exercise E0.6 i [Wil9]: i a radom sequece of letters, draw idepedetly ad uiformly from the Eglish alphabet, the expected
More informationNUMBERS COMMON TO TWO POLYGONAL SEQUENCES
NUMBERS COMMON TO TWO POLYGONAL SEQUENCES DIANNE SMITH LUCAS Chia Lake, Califoria a iteger, The polygoal sequece (or sequeces of polygoal umbers) of order r (where r is r > 3) may be defied recursively
More informationDEFINITION OF INVERSE MATRIX
Lecture. Iverse matrix. To be read to the music of Back To You by Brya dams DEFINITION OF INVERSE TRIX Defiitio. Let is a square matrix. Some matrix B if it exists) is said to be iverse to if B B I where
More informationHypothesis testing. Null and alternative hypotheses
Hypothesis testig Aother importat use of samplig distributios is to test hypotheses about populatio parameters, e.g. mea, proportio, regressio coefficiets, etc. For example, it is possible to stipulate
More informationCooleyTukey. Tukey FFT Algorithms. FFT Algorithms. Cooley
Cooley CooleyTuey Tuey FFT Algorithms FFT Algorithms Cosider a legth sequece x[ with a poit DFT X[ where Represet the idices ad as +, +, Cooley CooleyTuey Tuey FFT Algorithms FFT Algorithms Usig these
More informationA function f whose domain is the set of positive integers is called a sequence. The values
EQUENCE: A fuctio f whose domi is the set of positive itegers is clled sequece The vlues f ( ), f (), f (),, f (), re clled the terms of the sequece; f() is the first term, f() is the secod term, f() is
More informationLecture 2: Karger s Min Cut Algorithm
priceto uiv. F 3 cos 5: Advaced Algorithm Desig Lecture : Karger s Mi Cut Algorithm Lecturer: Sajeev Arora Scribe:Sajeev Today s topic is simple but gorgeous: Karger s mi cut algorithm ad its extesio.
More informationLesson 15 ANOVA (analysis of variance)
Outlie Variability betwee group variability withi group variability total variability Fratio Computatio sums of squares (betwee/withi/total degrees of freedom (betwee/withi/total mea square (betwee/withi
More informationInteger Factorization Algorithms
Iteger Factorizatio Algorithms Coelly Bares Departmet of Physics, Orego State Uiversity December 7, 004 This documet has bee placed i the public domai. Cotets I. Itroductio 3 1. Termiology 3. Fudametal
More informationChapter 7 Methods of Finding Estimators
Chapter 7 for BST 695: Special Topics i Statistical Theory. Kui Zhag, 011 Chapter 7 Methods of Fidig Estimators Sectio 7.1 Itroductio Defiitio 7.1.1 A poit estimator is ay fuctio W( X) W( X1, X,, X ) of
More informationThe Field Q of Rational Numbers
Chapter 3 The Field Q of Ratioal Numbers I this chapter we are goig to costruct the ratioal umber from the itegers. Historically, the positive ratioal umbers came first: the Babyloias, Egyptias ad Grees
More informationGCE Further Mathematics (6360) Further Pure Unit 2 (MFP2) Textbook. Version: 1.4
GCE Further Mathematics (660) Further Pure Uit (MFP) Tetbook Versio: 4 MFP Tetbook Alevel Further Mathematics 660 Further Pure : Cotets Chapter : Comple umbers 4 Itroductio 5 The geeral comple umber 5
More informationOverview of some probability distributions.
Lecture Overview of some probability distributios. I this lecture we will review several commo distributios that will be used ofte throughtout the class. Each distributio is usually described by its probability
More informationChapter 5: Inner Product Spaces
Chapter 5: Ier Product Spaces Chapter 5: Ier Product Spaces SECION A Itroductio to Ier Product Spaces By the ed of this sectio you will be able to uderstad what is meat by a ier product space give examples
More informationConvexity, Inequalities, and Norms
Covexity, Iequalities, ad Norms Covex Fuctios You are probably familiar with the otio of cocavity of fuctios. Give a twicedifferetiable fuctio ϕ: R R, We say that ϕ is covex (or cocave up) if ϕ (x) 0 for
More informationDepartment of Computer Science, University of Otago
Departmet of Computer Sciece, Uiversity of Otago Techical Report OUCS200609 Permutatios Cotaiig May Patters Authors: M.H. Albert Departmet of Computer Sciece, Uiversity of Otago Micah Colema, Rya Fly
More informationCHAPTER 7: Central Limit Theorem: CLT for Averages (Means)
CHAPTER 7: Cetral Limit Theorem: CLT for Averages (Meas) X = the umber obtaied whe rollig oe six sided die oce. If we roll a six sided die oce, the mea of the probability distributio is X P(X = x) Simulatio:
More information3. Covariance and Correlation
Virtual Laboratories > 3. Expected Value > 1 2 3 4 5 6 3. Covariace ad Correlatio Recall that by takig the expected value of various trasformatios of a radom variable, we ca measure may iterestig characteristics
More informationArithmetic Sequences
Arithmetic equeces A simple wy to geerte sequece is to strt with umber, d dd to it fixed costt d, over d over gi. This type of sequece is clled rithmetic sequece. Defiitio: A rithmetic sequece is sequece
More informationApproximating the Sum of a Convergent Series
Approximatig the Sum of a Coverget Series Larry Riddle Ages Scott College Decatur, GA 30030 lriddle@agesscott.edu The BC Calculus Course Descriptio metios how techology ca be used to explore covergece
More informationSection 1.6: Proof by Mathematical Induction
Sectio.6 Proof by Iductio Sectio.6: Proof by Mathematical Iductio Purpose of Sectio: To itroduce the Priciple of Mathematical Iductio, both weak ad the strog versios, ad show how certai types of theorems
More information{{1}, {2, 4}, {3}} {{1, 3, 4}, {2}} {{1}, {2}, {3, 4}} 5.4 Stirling Numbers
. Stirlig Numbers Whe coutig various types of fuctios from., we quicly discovered that eumeratig the umber of oto fuctios was a difficult problem. For a domai of five elemets ad a rage of four elemets,
More informationCHAPTER 3 THE TIME VALUE OF MONEY
CHAPTER 3 THE TIME VALUE OF MONEY OVERVIEW A dollar i the had today is worth more tha a dollar to be received i the future because, if you had it ow, you could ivest that dollar ad ear iterest. Of all
More informationA Recursive Formula for Moments of a Binomial Distribution
A Recursive Formula for Momets of a Biomial Distributio Árpád Béyi beyi@mathumassedu, Uiversity of Massachusetts, Amherst, MA 01003 ad Saverio M Maago smmaago@psavymil Naval Postgraduate School, Moterey,
More informationTHE ARITHMETIC OF INTEGERS.  multiplication, exponentiation, division, addition, and subtraction
THE ARITHMETIC OF INTEGERS  multiplicatio, expoetiatio, divisio, additio, ad subtractio What to do ad what ot to do. THE INTEGERS Recall that a iteger is oe of the whole umbers, which may be either positive,
More informationProperties of MLE: consistency, asymptotic normality. Fisher information.
Lecture 3 Properties of MLE: cosistecy, asymptotic ormality. Fisher iformatio. I this sectio we will try to uderstad why MLEs are good. Let us recall two facts from probability that we be used ofte throughout
More informationRepeating Decimals are decimal numbers that have number(s) after the decimal point that repeat in a pattern.
5.5 Fractios ad Decimals Steps for Chagig a Fractio to a Decimal. Simplify the fractio, if possible. 2. Divide the umerator by the deomiator. d d Repeatig Decimals Repeatig Decimals are decimal umbers
More informationarxiv:1012.1336v2 [cs.cc] 8 Dec 2010
Uary SubsetSum is i Logspace arxiv:1012.1336v2 [cs.cc] 8 Dec 2010 1 Itroductio Daiel M. Kae December 9, 2010 I this paper we cosider the Uary SubsetSum problem which is defied as follows: Give itegers
More informationChapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions
Chapter 5 Uit Aual Amout ad Gradiet Fuctios IET 350 Egieerig Ecoomics Learig Objectives Chapter 5 Upo completio of this chapter you should uderstad: Calculatig future values from aual amouts. Calculatig
More informationProject Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments
Project Deliverables CS 361, Lecture 28 Jared Saia Uiversity of New Mexico Each Group should tur i oe group project cosistig of: About 612 pages of text (ca be loger with appedix) 612 figures (please
More informationTaylor Series and Polynomials
Taylor Series ad Polyomials Motivatios The purpose of Taylor series is to approimate a fuctio with a polyomial; ot oly we wat to be able to approimate, but we also wat to kow how good the approimatio is.
More informationSolving Inequalities
Solvig Iequalities Say Thaks to the Authors Click http://www.ck12.org/saythaks (No sig i required) To access a customizable versio of this book, as well as other iteractive cotet, visit www.ck12.org CK12
More information