Lecture Notes CMSC 251

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Lecture Notes CMSC 251"

Transcription

1 We have this messy summatio to solve though First observe that the value remais costat throughout the sum, ad so we ca pull it out frot Also ote that we ca write 3 i / i ad (3/) i T () = log 3 (log ) 1 ( ) i 3 Note that this is a geometric series We may apply the formula for the geometric series, which gave i a earlier lecture For x 1: m x i = xm1 1 x 1 I this case x =3/ad m = log 1 We get T () = log 3 (3/)log 1 Applyig our favorite log idetity oce more to the expressio i the umerator (with a =3/ad b =)weget (3/) log = log (3/) = (log 3 log ) = (log 3 1) = log 3 If we plug this back i, we have log 3 T () = log 3 1 = log 3 log 3 1/ = log 3 ( log 3 ) = log 3 ( log 3 ) = 3 log 3 So the fial result (at last!) is T () = 3 log Θ() It is iterestig to ote the uusual expoet of log We have see that two ested loops typically leads to Θ( 2 ) time, ad three ested loops typically leads to Θ( 3 ) time, so it seems remarkable that we could geerate a strage expoet like 079 as part of a ruig time However, as we shall see, this is ofte the case i divide-ad-coquer recurreces Lecture 8: More o Recurreces (Thursday, Feb 19, 1998) Read: Chapt o recurreces, skip Sectio Recap: Last time we discussed recurreces, that is, fuctios that are defied recursively We discussed their importace i aalyzig divide-ad-coquer algorithms We also discussed two methods for solvig recurreces, amely guess-ad-verify (by iductio), ad iteratio These are both very powerful methods, but they are quite mechaical, ad it is difficult to get a quick ad ituitive sese of what is goig o i the recurrece Today we will discuss two more techiques for solvig recurreces The first provides a way of visualizig recurreces ad the secod, called the Master Theorem, is a method of solvig may recurreces that arise i divide-ad-coquer applicatios 27

2 Visualizig Recurreces Usig the Recursio Tree: Iteratio is a very powerful techique for solvig recurreces But, it is easy to get lost i all the symbolic maipulatios ad lose sight of what is goig o Here is a ice way to visualize what is goig o i iteratio We ca describe ay recurrece i terms of a tree, where each expasio of the recurrece takes us oe level deeper i the tree Recall that the recurrece for MergeSort (which we simplified by assumig that is a power of 2, ad hece could drop the floors ad ceiligs) { 1 if =1, T () = 2 otherwise Suppose that we draw the recursio tree for MergeSort, but each time we merge two lists, we label that ode of the tree with the time it takes to perform the associated (orecursive) merge Recall that to merge two lists of size m/2 to a list of size m takes Θ(m) time, which we will just write as m Below is a illustratio of the resultig recursio tree T() /2 T(/) / / / /2 / 1 = 2( /2) = ( /) = (/) = lg 1 levels (lg 1) Figure 5: Usig the recursio tree to visualize a recurrece Observe that the total work at the topmost level of the recursio is Θ() (or just for short) At the secod level we have two merges, each takig /2 time, for a total of 2(/2) = At the third level we have merges, each takig / time, for a total of (/) = This cotiues util the bottommost level of the tree Sice the tree exactly lg 1levels (0, 1, 2,,lg ), ad each level cotributes a total of time, the total ruig time is (lg 1)=lg This is exactly what we got by the iteratio method This ca be used for a umber of simple recurreces For example, let s try it o the followig recurrece The tree is illustrated below { 1 if =1, T () = 3 2 otherwise Agai, we label each ode with the amout of work at that level I this case the work for T (m) is m 2 For the top level (or 0th level) the work is 2 At level 1 we have three odes whose work is (/2) 2 each, for a total of 3(/2) 2 This ca be writte as 2 (3/) At the level 2 the work is 9(/) 2, which ca be writte as 2 (9/16) I geeral it is easy to extrapolate to see that at the level i, wehave3 i odes, each ivolvig (/2 i ) 2 work, for a total of 3 i (/2 i ) 2 = 2 (3/) i This leads to the followig summatio Note that we have ot determied where the tree bottoms out, so we have left off the upper boud o the sum? ( ) i 3 T () = 2 28

3 T() 2 (/2) 2 (/2) 2 (/2) 2 3(/2) 2= 2(3/) T(/) (/) 2 (/) 2 (/) 2 (/) 2 (/) 2 (/) 2 9(/) 2= 2 (9/16) 2(3/) i Figure 6: Aother recursio tree example = 2 If all we wated was a asymptotic expressio, the are essetially doe at this poit Why? The summatio is a geometric series, ad the base (3/) is less tha 1 This meas that this series coverges to some ozero costat (eve if we ra the sum out to ) Thus the ruig time is Θ( 2 ) To get a more exact result, observe that the recursio bottoms out whe we get dow to sigle items, ad sice the sizes of the iputs are cut by half at each level, it is ot hard to see that the fial level is level lg (It is easy to be off by ±1 here, but this sort of small error will ot affect the asymptotic result I this case we happe to be right) So, we ca plug i lg for the? i the above summatio lg ( ) i 3 T () = 2 If we wated to get a more exact aswer, we could plug the summatio ito the formula for the geometric series ad simplify This would lead to a expressio like T () = 2(3/)lg 1 1 This will take some work to simplify, but at this poit it is all just tedious algebra to get the formula ito simple form (This sort of algebraic is typical of algorithm aalysis, so be sure that you follow each step) T () = 2(3/)lg 1 1 = 2 ((3/) lg 1 1) = 2 (1 (3/) lg 1 ) = 2 (1 (3/)(3/) lg ) = 2 (1 (3/) lg(3/) ) = 2 (1 (3/) lg 3 lg ) = 2 (1 (3/) lg 3 2 ) = 2 (1 (3/)( lg 3 / 2 )) = 2 3 lg 3 Note that lg 3 158, so the whole expressio is Θ( 2 ) I coclusio, the techique of drawig the recursio tree is a somewhat more visual way of aalyzig summatios, but it is really equivalet to the method of iteratio (Simplified) Master Theorem: If you aalyze may divide-ad-coquer algorithms, you will see that the same geeral type of recurrece keeps poppig up I geeral you are breakig a problem ito a subproblems, where each subproblem is roughly a factor of 1/b of the origial problem size, ad 29

4 the time it takes to do the splittig ad combiig o a iput of size is Θ( k ) For example, i MergeSort, a =2,b=2, ad k =1 Rather tha doig every such recurrece from scratch, ca we just come up with a geeral solutio? The aswer is that you ca if all you eed is a asymptotic expressio This result is called the Master Theorem, because it ca be used to master so may differet types of recurrece Our text gives a fairly complicated versio of this theorem We will give a simpler versio, which is geeral eough for most typical situatios I cases where this does t apply, try the oe from the book If the oe from the book does t apply, the you will probably eed iteratio, or some other techique Theorem: (Simplified Master Theorem) Let a 1, b>1be costats ad let T () be the recurrece T () =at (/b) k, defied for 0 (As usual let us assume that is a power of b The basis case, T (1) ca be ay costat value) The Case 1: if a>b k the T () Θ( log b a ) Case 2: if a = b k the T () Θ( k log ) Case 3: if a<b k the T () Θ( k ) Usig this versio of the Master Theorem we ca see that i the MergeSort recurrece a =2,b=2, ad k =1 Thus, a = b k (2=2 1 ) ad so Case 2 applies From this we have T () Θ( log ) I the recurrece above, T () =3 2,wehavea=3,b=2ad k =2Wehavea<b k (3<2 2 ) i this case, ad so Case 3 applies From this we have T () Θ( 2 ) Fially, cosider the recurrece T () =T(/3), i which we have a =,b=3ad k =1I this case we have a>b k (>3 1 ), ad so Case 1 applies From this we have T () Θ( log 3 ) Θ( 126 ) This may seem to be a rather strage ruig time (a o-iteger expoet), but this ot ucommo for may divide-ad-coquer solutios There are may recurreces that caot be put ito this form For example, if the splittig ad combiig steps ivolve sortig, we might have see a recurrece of the form { 1 if =1, T () = 2 log otherwise This solves to T () =Θ(log 2 ), but the Master Theorem (either this form or the oe i CLR) will tell you this However, iteratio works just fie here Recursio Trees Revisited: The recursio trees offer some ituitio about why it is that there are three cases i the Master Theorem Geerally speakig the questio is where is most of the work doe: at the top of the tree (the root level), at the bottom of the tree (the leaf level), or spread equally throughout the etire tree For example, i the MergeSort recurrece (which correspods to Case 2 i the Master Theorem) every level of the recursio tree provides the same total work, amely For this reaso the total work is equal to this value times the height of the tree, amely Θ(log ), for a total of Θ( log ) Next cosider the earlier recurrece T () =3 2 (which correspods to Case 3 i the Master Theorem) I this istace most of the work was cocetrated at the root of the tree Each level of the tree provided a smaller fractio of work By the ature of the geometric series, it did ot matter how may levels the tree had at all Eve with a ifiite umber of levels, the geometric series that result will coverge to a costat value This is a importat observatio to make A commo way to desig the most efficiet divide-ad-coquer algorithms is to try to arrage the recursio so that most of the work is doe at the root, ad at each successive level of the tree the work at this level reduces (by some costat factor) As log as this is the case, Case 3 will apply 30

5 Fially, i the recurrece T () =T(/3) (which correspods to Case 1), most of the work is doe at the leaf level of the recursio tree This ca be see if you perform iteratio o this recurrece, the resultig summatio is log 3 ( ) i 3 (You might try this to see if you get the same result) Sice /3 > 1, as we go deeper ito the levels of the tree, that is deeper ito the summatio, the terms are growig successively larger The largest cotributio will be from the leaf level Lecture 9: Medias ad Selectio (Tuesday, Feb 2, 1998) Read: Todays material is covered i Sectios 102 ad 103 You are ot resposible for the radomized aalysis of Sectio 102 Our presetatio of the partitioig algorithm ad aalysis are somewhat differet from the oes i the book Selectio: I the last couple of lectures we have discussed recurreces ad the divide-ad-coquer method of solvig problems Today we will give a rather surprisig (ad very tricky) algorithm which shows the power of these techiques The problem that we will cosider is very easy to state, but surprisigly difficult to solve optimally Suppose that you are give a set of umbers Defie the rak of a elemet to be oe plus the umber of elemets that are smaller tha this elemet Sice duplicate elemets make our life more complex (by creatig multiple elemets of the same rak), we will make the simplifyig assumptio that all the elemets are distict for ow It will be easy to get aroud this assumptio later Thus, the rak of a elemet is its fial positio if the set is sorted The miimum is of rak 1 ad the maximum is of rak Of particular iterest i statistics is the media Ifis odd the the media is defied to be the elemet of rak ( 1)/2 Whe is eve there are two atural choices, amely the elemets of raks /2 ad (/2) 1 I statistics it is commo to retur the average of these two elemets We will defie the media to be either of these elemets Medias are useful as measures of the cetral tedecy of a set, especially whe the distributio of values is highly skewed For example, the media icome i a commuity is likely to be more meaigful measure of the cetral tedecy tha the average is, sice if Bill Gates lives i your commuity the his gigatic icome may sigificatly bias the average, whereas it caot have a sigificat ifluece o the media They are also useful, sice i divide-ad-coquer applicatios, it is ofte desirable to partitio a set about its media value, ito two sets of roughly equal size Today we will focus o the followig geeralizatio, called the selectio problem Selectio: Give a set A of distict umbers ad a iteger k, 1 k, output the elemet of A of rak k The selectio problem ca easily be solved i Θ( log ) time, simply by sortig the umbers of A, ad the returig A[k] The questio is whether it is possible to do better I particular, is it possible to solve this problem i Θ() time? We will see that the aswer is yes, ad the solutio is far from obvious The Sieve Techique: The reaso for itroducig this algorithm is that it illustrates a very importat special case of divide-ad-coquer, which I call the sieve techique We thik of divide-ad-coquer as breakig the problem ito a small umber of smaller subproblems, which are the solved recursively The sieve techique is a special case, where the umber of subproblems is just 1 31

Recursion and Recurrences

Recursion 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 information

Solving Divide-and-Conquer Recurrences

Solving Divide-and-Conquer Recurrences Solvig Divide-ad-Coquer Recurreces Victor Adamchik A divide-ad-coquer algorithm cosists of three steps: dividig a problem ito smaller subproblems solvig (recursively) each subproblem the combiig solutios

More information

Module 4: Mathematical Induction

Module 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 information

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

In 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 information

Soving Recurrence Relations

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 information

Divide and Conquer. Maximum/minimum. Integer Multiplication. CS125 Lecture 4 Fall 2015

Divide 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 information

Sequences II. Chapter 3. 3.1 Convergent Sequences

Sequences 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 information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Discrete 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 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

Example 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).

Example 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 information

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

CS103A 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 information

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem Lecture 4: Cauchy sequeces, Bolzao-Weierstrass, 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 information

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

THE 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 information

Sequences and Series

Sequences 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 information

CS103X: Discrete Structures Homework 4 Solutions

CS103X: 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 six-figure salaries i whole dollar amouts are there that cotai at least

More information

Sum and Product Rules. Combinatorics. Some Subtler Examples

Sum and Product Rules. Combinatorics. Some Subtler Examples Combiatorics Sum ad Product Rules Problem: How to cout without coutig. How do you figure out how may thigs there are with a certai property without actually eumeratig all of them. Sometimes this requires

More information

The second difference is the sequence of differences of the first difference sequence, 2

The 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 information

Properties of MLE: consistency, asymptotic normality. Fisher information.

Properties 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 information

8.1 Arithmetic Sequences

8.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 information

{{1}, {2, 4}, {3}} {{1, 3, 4}, {2}} {{1}, {2}, {3, 4}} 5.4 Stirling Numbers

{{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 information

Infinite Sequences and Series

Infinite 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 information

Here 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.

Here 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 information

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

Running 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 step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.

More information

5 Boolean Decision Trees (February 11)

5 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 information

The Stable Marriage Problem

The 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 information

arxiv:1012.1336v2 [cs.cc] 8 Dec 2010

arxiv:1012.1336v2 [cs.cc] 8 Dec 2010 Uary Subset-Sum 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 Subset-Sum problem which is defied as follows: Give itegers

More information

Gregory Carey, 1998 Linear Transformations & Composites - 1. Linear Transformations and Linear Composites

Gregory Carey, 1998 Linear Transformations & Composites - 1. Linear Transformations and Linear Composites Gregory Carey, 1998 Liear Trasformatios & Composites - 1 Liear Trasformatios ad Liear Composites I Liear Trasformatios of Variables Meas ad Stadard Deviatios of Liear Trasformatios A liear trasformatio

More information

NUMBERS COMMON TO TWO POLYGONAL SEQUENCES

NUMBERS 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 information

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable Week 3 Coditioal probabilities, Bayes formula, WEEK 3 page 1 Expected value of a radom variable We recall our discussio of 5 card poker hads. Example 13 : a) What is the probability of evet A that a 5

More information

4 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

4 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 p-series (the Compariso Test), but of

More information

Learning outcomes. Algorithms and Data Structures. Time Complexity Analysis. Time Complexity Analysis How fast is the algorithm? Prof. Dr.

Learning 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 information

3. Greatest Common Divisor - Least Common Multiple

3. 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 information

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return EVALUATING ALTERNATIVE CAPITAL INVESTMENT PROGRAMS By Ke D. Duft, Extesio Ecoomist I the March 98 issue of this publicatio we reviewed the procedure by which a capital ivestmet project was assessed. The

More information

The Euler Totient, the Möbius and the Divisor Functions

The 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 information

CHAPTER 3 THE TIME VALUE OF MONEY

CHAPTER 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 information

Department of Computer Science, University of Otago

Department of Computer Science, University of Otago Departmet of Computer Sciece, Uiversity of Otago Techical Report OUCS-2006-09 Permutatios Cotaiig May Patters Authors: M.H. Albert Departmet of Computer Sciece, Uiversity of Otago Micah Colema, Rya Fly

More information

hp calculators HP 12C Statistics - average and standard deviation Average and standard deviation concepts HP12C average and standard deviation

hp calculators HP 12C Statistics - average and standard deviation Average and standard deviation concepts HP12C average and standard deviation HP 1C Statistics - average ad stadard deviatio Average ad stadard deviatio cocepts HP1C average ad stadard deviatio Practice calculatig averages ad stadard deviatios with oe or two variables HP 1C Statistics

More information

Convexity, Inequalities, and Norms

Convexity, 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 information

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

.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 information

I. Chi-squared Distributions

I. Chi-squared Distributions 1 M 358K Supplemet to Chapter 23: CHI-SQUARED DISTRIBUTIONS, T-DISTRIBUTIONS, AND DEGREES OF FREEDOM To uderstad t-distributios, we first eed to look at aother family of distributios, the chi-squared distributios.

More information

Lecture 2: Karger s Min Cut Algorithm

Lecture 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 information

Basic Elements of Arithmetic Sequences and Series

Basic Elements of Arithmetic Sequences and Series MA40S PRE-CALCULUS 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 information

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n We will cosider the liear regressio model i matrix form. For simple liear regressio, meaig oe predictor, the model is i = + x i + ε i for i =,,,, This model icludes the assumptio that the ε i s are a sample

More information

Hypothesis testing. Null and alternative hypotheses

Hypothesis 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 information

S. Tanny MAT 344 Spring 1999. be the minimum number of moves required.

S. 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 information

1.3 Binomial Coefficients

1.3 Binomial Coefficients 18 CHAPTER 1. COUNTING 1. Biomial Coefficiets I this sectio, we will explore various properties of biomial coefficiets. Pascal s Triagle Table 1 cotais the values of the biomial coefficiets ( ) for 0to

More information

A Recursive Formula for Moments of a Binomial Distribution

A 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 information

Example Consider the following set of data, showing the number of times a sample of 5 students check their per day:

Example Consider the following set of data, showing the number of times a sample of 5 students check their  per day: Sectio 82: Measures of cetral tedecy Whe thikig about questios such as: how may calories do I eat per day? or how much time do I sped talkig per day?, we quickly realize that the aswer will vary from day

More information

Asymptotic Growth of Functions

Asymptotic 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 information

x(x 1)(x 2)... (x k + 1) = [x] k n+m 1

x(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 information

Repeating Decimals are decimal numbers that have number(s) after the decimal point that repeat in a pattern.

Repeating 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 information

Incremental calculation of weighted mean and variance

Incremental 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 information

CHAPTER 3 DIGITAL CODING OF SIGNALS

CHAPTER 3 DIGITAL CODING OF SIGNALS CHAPTER 3 DIGITAL CODING OF SIGNALS Computers are ofte used to automate the recordig of measuremets. The trasducers ad sigal coditioig circuits produce a voltage sigal that is proportioal to a quatity

More information

6.042/18.062J Mathematics for Computer Science. Recurrences

6.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 information

SAMPLE 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. (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 information

3. Covariance and Correlation

3. 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 information

Chapter One BASIC MATHEMATICAL TOOLS

Chapter One BASIC MATHEMATICAL TOOLS Chapter Oe BAIC MATHEMATICAL TOOL As the reader will see, the study of the time value of moey ivolves substatial use of variables ad umbers that are raised to a power. The power to which a variable is

More information

5.3. Generalized Permutations and Combinations

5.3. Generalized Permutations and Combinations 53 GENERALIZED PERMUTATIONS AND COMBINATIONS 73 53 Geeralized Permutatios ad Combiatios 53 Permutatios with Repeated Elemets Assume that we have a alphabet with letters ad we wat to write all possible

More information

THE UNLIKELY UNION OF PARTITIONS AND DIVISORS

THE 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 information

Building Blocks Problem Related to Harmonic Series

Building Blocks Problem Related to Harmonic Series TMME, vol3, o, p.76 Buildig Blocks Problem Related to Harmoic Series Yutaka Nishiyama Osaka Uiversity of Ecoomics, Japa Abstract: I this discussio I give a eplaatio of the divergece ad covergece of ifiite

More information

University of California, Los Angeles Department of Statistics. Distributions related to the normal distribution

University of California, Los Angeles Department of Statistics. Distributions related to the normal distribution Uiversity of Califoria, Los Ageles Departmet of Statistics Statistics 100B Istructor: Nicolas Christou Three importat distributios: Distributios related to the ormal distributio Chi-square (χ ) distributio.

More information

Standard Errors and Confidence Intervals

Standard Errors and Confidence Intervals Stadard Errors ad Cofidece Itervals Itroductio I the documet Data Descriptio, Populatios ad the Normal Distributio a sample had bee obtaied from the populatio of heights of 5-year-old boys. If we assume

More information

1. MATHEMATICAL INDUCTION

1. 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 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

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

Project 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 6-12 pages of text (ca be loger with appedix) 6-12 figures (please

More information

SEQUENCES AND SERIES

SEQUENCES 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 information

A probabilistic proof of a binomial identity

A 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 information

Maximum Likelihood Estimators.

Maximum Likelihood Estimators. Lecture 2 Maximum Likelihood Estimators. Matlab example. As a motivatio, let us look at oe Matlab example. Let us geerate a radom sample of size 00 from beta distributio Beta(5, 2). We will lear the defiitio

More information

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8 CME 30: NUMERICAL LINEAR ALGEBRA FALL 005/06 LECTURE 8 GENE H GOLUB 1 Positive Defiite Matrices A matrix A is positive defiite if x Ax > 0 for all ozero x A positive defiite matrix has real ad positive

More information

Trigonometric 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

Trigonometric 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

7. Sample Covariance and Correlation

7. 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 information

THE ABRACADABRA PROBLEM

THE 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 information

Section 1.6: Proof by Mathematical Induction

Section 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

BINOMIAL EXPANSIONS 12.5. In this section. Some Examples. Obtaining the Coefficients

BINOMIAL EXPANSIONS 12.5. In this section. Some Examples. Obtaining the Coefficients 652 (12-26) 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 information

I. Why is there a time value to money (TVM)?

I. Why is there a time value to money (TVM)? Itroductio to the Time Value of Moey Lecture Outlie I. Why is there the cocept of time value? II. Sigle cash flows over multiple periods III. Groups of cash flows IV. Warigs o doig time value calculatios

More information

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature. Itegrated Productio ad Ivetory Cotrol System MRP ad MRP II Framework of Maufacturig System Ivetory cotrol, productio schedulig, capacity plaig ad fiacial ad busiess decisios i a productio system are iterrelated.

More information

Snap. Jenine's formula. The SNAP probability is

Snap. Jenine's formula. The SNAP probability is Sap The game of SNAP is played with stadard decks of cards. The decks are shuffled ad cards are dealt simultaeously from the top of each deck. SNAP is called if the two dealt cards are idetical (value

More information

Lecture 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.

Lecture 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: Courat-Fischer formula ad Rayleigh quotiets The

More information

Determining the sample size

Determining the sample size Determiig the sample size Oe of the most commo questios ay statisticia gets asked is How large a sample size do I eed? Researchers are ofte surprised to fid out that the aswer depeds o a umber of factors

More information

MARTINGALES AND A BASIC APPLICATION

MARTINGALES AND A BASIC APPLICATION MARTINGALES AND A BASIC APPLICATION TURNER SMITH Abstract. This paper will develop the measure-theoretic approach to probability i order to preset the defiitio of martigales. From there we will apply this

More information

INFINITE SERIES KEITH CONRAD

INFINITE 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 information

INVESTMENT PERFORMANCE COUNCIL (IPC)

INVESTMENT PERFORMANCE COUNCIL (IPC) INVESTMENT PEFOMANCE COUNCIL (IPC) INVITATION TO COMMENT: Global Ivestmet Performace Stadards (GIPS ) Guidace Statemet o Calculatio Methodology The Associatio for Ivestmet Maagemet ad esearch (AIM) seeks

More information

Lesson 15 ANOVA (analysis of variance)

Lesson 15 ANOVA (analysis of variance) Outlie Variability -betwee group variability -withi group variability -total variability -F-ratio Computatio -sums of squares (betwee/withi/total -degrees of freedom (betwee/withi/total -mea square (betwee/withi

More information

Math C067 Sampling Distributions

Math C067 Sampling Distributions Math C067 Samplig Distributios Sample Mea ad Sample Proportio Richard Beigel Some time betwee April 16, 2007 ad April 16, 2007 Examples of Samplig A pollster may try to estimate the proportio of voters

More information

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized? 5.4 Amortizatio Questio 1: How do you fid the preset value of a auity? Questio 2: How is a loa amortized? Questio 3: How do you make a amortizatio table? Oe of the most commo fiacial istrumets a perso

More information

Distributions of Order Statistics

Distributions of Order Statistics Chapter 2 Distributios of Order Statistics We give some importat formulae for distributios of order statistics. For example, where F k: (x)=p{x k, x} = I F(x) (k, k + 1), I x (a,b)= 1 x t a 1 (1 t) b 1

More information

Elementary Theory of Russian Roulette

Elementary Theory of Russian Roulette Elemetary Theory of Russia Roulette -iterestig patters of fractios- Satoshi Hashiba Daisuke Miematsu Ryohei Miyadera Itroductio. Today we are goig to study mathematical theory of Russia roulette. If some

More information

Theorems About Power Series

Theorems 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 o-egative umber R, called the radius

More information

Trading the randomness - Designing an optimal trading strategy under a drifted random walk price model

Trading the randomness - Designing an optimal trading strategy under a drifted random walk price model Tradig the radomess - Desigig a optimal tradig strategy uder a drifted radom walk price model Yuao Wu Math 20 Project Paper Professor Zachary Hamaker Abstract: I this paper the author iteds to explore

More information

Descriptive statistics deals with the description or simple analysis of population or sample data.

Descriptive statistics deals with the description or simple analysis of population or sample data. Descriptive statistics Some basic cocepts A populatio is a fiite or ifiite collectio of idividuals or objects. Ofte it is impossible or impractical to get data o all the members of the populatio ad a small

More information

Unit 20 Hypotheses Testing

Unit 20 Hypotheses Testing Uit 2 Hypotheses Testig Objectives: To uderstad how to formulate a ull hypothesis ad a alterative hypothesis about a populatio proportio, ad how to choose a sigificace level To uderstad how to collect

More information

Solving Inequalities

Solving 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 CK-12

More information

Key Ideas Section 8-1: Overview hypothesis testing Hypothesis Hypothesis Test Section 8-2: Basics of Hypothesis Testing Null Hypothesis

Key Ideas Section 8-1: Overview hypothesis testing Hypothesis Hypothesis Test Section 8-2: Basics of Hypothesis Testing Null Hypothesis Chapter 8 Key Ideas Hypothesis (Null ad Alterative), Hypothesis Test, Test Statistic, P-value Type I Error, Type II Error, Sigificace Level, Power Sectio 8-1: Overview Cofidece Itervals (Chapter 7) are

More information

Lecture 13. Lecturer: Jonathan Kelner Scribe: Jonathan Pines (2009)

Lecture 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 Bru-Mikowski iequality for boxes. Today we ll go over the

More information

Overview. Learning Objectives. Point Estimate. Estimation. Estimating the Value of a Parameter Using Confidence Intervals

Overview. Learning Objectives. Point Estimate. Estimation. Estimating the Value of a Parameter Using Confidence Intervals Overview Estimatig the Value of a Parameter Usig Cofidece Itervals We apply the results about the sample mea the problem of estimatio Estimatio is the process of usig sample data estimate the value of

More information

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means)

CHAPTER 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 information

Chapter 14 Nonparametric Statistics

Chapter 14 Nonparametric Statistics Chapter 14 Noparametric Statistics A.K.A. distributio-free statistics! Does ot deped o the populatio fittig ay particular type of distributio (e.g, ormal). Sice these methods make fewer assumptios, they

More information

Overview of some probability distributions.

Overview 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 information

0.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

0.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 Kolmogorov-Smirov 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 information

Normal Distribution.

Normal Distribution. Normal Distributio www.icrf.l Normal distributio I probability theory, the ormal or Gaussia distributio, is a cotiuous probability distributio that is ofte used as a first approimatio to describe realvalued

More information