Handout: How to calculate time complexity? CSE 101 Winter 2014

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Handout: How to calculate time complexity? CSE 101 Winter 2014"

Transcription

1 Hadout: How to calculate time complexity? CSE 101 Witer 014 Recipe (a) Kow algorithm If you are usig a modied versio of a kow algorithm, you ca piggyback your aalysis o the complexity of the origial algorithm For example, if you use a modied versio of DFS or Dijkstra's algorithm, as log as your modicatios do ot aect the origial ruig time, you ca use the complexity of these other algorithms However, you must state (ad be correct) about why your chages do ot aect the origial algorithm's ruig time For example: The algorithm performs DFS ad marks each vertex with a color whe it is visited This is a costat amout of additioal work per vertex ad so the ruig time remais the same as DFS: O(jV j + jej) (b) Master Theorem If the time complexity equatio ca be writte as follow, the we ca use the Master Theorem T () = T () = a T b + O( d ) If log b a < d; T () = O( d ) If log b a = d; T () = O( d log ) If log b a > d; T () = O( log b a ) (c) Else, we have to evaluate T () to be able to take the big-o out of it (see Evaluatig sums ad Examples) There are 3 ways of doig this: Guess by lookig at the rst terms the prove, Guess by urollig the equatio the prove, Ad look at the recursio tree Importat trick Whe aalysig recurreces, for coveiece you ca 1 assume is a power of a umber by givig the followig explaatio: We assume without loss of geerality that is power of [your umber] This will ot iuece the al boud i ay importat way, after all, is at most a multiplicative factor away from some power of [your umber] 1 See the proof of Master Theorem i the book, page 49 1

2 Hadout: How to calculate time complexity? CSE 101 Witer 014 Evaluatig sums Arithmetic progressio Geometric progressio T = T 1 + c T = T 1 c We have: +c +c +c +c T 0 T 1 T 1 T T = rst + c (# of times c has bee added) rst + last T 0 + T T = (# of terms) Example: = 1 + c c c c T 0 T 1 T 1 T We have (c 6= 1): (# of times c has bee multiplied) T = rst c T 0 + T T = rst c(# of terms) 1 c 1 Example (c 6= 1): 1 + c + c + + c = c+1 1 c 1 Examples A) Fast multiplicatio Algorithm The idea is to square a to get a (oe multiplicatio) ad whe is odd, evaluate a 1 the same way ad the multiply it by a to get a (oe multiplicatio) Pseudo-code procedure mult(a, ): if == 1: retur a else if is eve: b = mult(a, / ) retur b * b else retur a * mult(a, - 1) Time complexity equatio Let T () be the umber of multiplicatios We assume without loss of geerality that is power of This will ot iuece the al boud i ay importat way, after all, is at most a multiplicative factor away from some power of At each step is divided by T () = T + 1

3 Hadout: How to calculate time complexity? CSE 101 Witer 014 Evaluatig T () Total work for step Total work for step Work at step (1 multiplicatio) The Master Theorem gives us a = 1 b = d = 0 so log b a = log 1 = 0 = d so T () = O(log ) B) Tower of Haoi: Lookig at the recursio tree Algorithm The algorithm requires that to move disks, we move rst 1 disks, the 1 ad ally 1 agai Time complexity equatio Let T () be the umber of moves T () = T ( 1) T ( 1) Total work for disks Total work for 1 disks Move 1 disk Total work for 1 disks We ca't apply Master Theorem o the complexity equatio T () = T ( evaluate T () to be able to give a big-o boud 1) + 1 so we have to The recursio tree Let's cosider the recurrece sub-problem tree: Level 0 : 1 problem Level 1 : problems 1 1 Level : 4 problems Level k: k Level 1 problems k k k k At the k-th level, there are k sub-problems that all require 1 move to get to level k 1 So, there are w(k) = k moves at level k (for level k oly) Google "tower of haoi recursive solutio" if you do't remember the solutio 3

4 Hadout: How to calculate time complexity? CSE 101 Witer 014 Summig to evaluate T () As T () is the sum of the moves of each level, we get: T () = We recogise here the sum of the rst terms of a geometric progressio whose ratio is ad rst term is 1 so we get: Therefore, T () = O( ) T () = 1 1 = 1 C) Tower of Haoi: Guessig with the first terms the prove Whe you have the recursio equatio T () = T ( by lookig at the rst terms: 1) + 1, you ca try to guess the value of T () T (0) = 0; T (1) = 1; T () = 3; T (3) = 7; T (4) = 15; T (5) = 31; T (6) = 63; : : : We ca guess it may be T () = 1, but we have to prove it! Let's do it by recursio o : Base case T (0) = 0 OK! Iductive hypothesis Let's suppose T () = 1 for a 0 Iductive step We have: T ( + 1) = T () + 1 = ( 1) + 1 (id hyp) = +1 1 Coclusio We have proved that T () = 1 for all 0 Therefore, T () = O( ) D) Tower of Haoi: Guessig by urollig the prove Aother way we ca guess the solutio is by urollig the recurrece, by substitutig it ito itself: T () = T ( 1) + 1 = ( T ( ) + 1) + 1 = 4 T ( ) + 3 = 4( T ( 3) + 1) + 3 = T ( 3) + 7 : : : Here we ca guess a ew recurrece: T () = k T ( k) + ( k 1) But we have also to prove it! Let's do it by recursio o k: 4

5 Hadout: How to calculate time complexity? CSE 101 Witer 014 Base case For k = 0, we have 0 T ( 0) + ( 0 1) = T () Ok! Iductive hypothesis Let's suppose T () = k T ( k) + ( k 1) for a k 0 Iductive step We have: T () = k T ( k) + ( k 1) = k ( T ( k 1) + 1) + ( k 1) itial recursio = k+1 T ( (k + 1)) + ( k+1 1) Coclusio We have proved that T () = k T ( k) + ( k 1) for k 0 Therefore, for k = we get T () = 1 so T () = O( ) E) Closest Pair of Poits i a Plae Let's evaluate the time complexity of the closest pair of poits i a plae solutio usig Divide ad Coquer is a power of We assume without loss of geerality that is power of This will ot iuece the al boud i ay importat way, after all, is at most a multiplicative factor away from some power of Sortig the poits before solvig First, before startig to solve the problem, we sort twice: Oce by the x-coordiate ad oce by the y-coordiate No further sortig is required at subsequet recursive steps Usig a stadard sortig algorithm requires O( log ), for example via mergesort Solvig For a set of poits i the plae (let T () be the time complexity): We partitio the curret set ito sub-sets deed by media x-coordiate As the poits have bee sorted by x-coordiate, dig the media requires oly a costat time operatio Recursively compute the closest pair distaces for the sub-sets T ( ) + T ( ) This requires a complexity of Deal with the middle ribbo Worst case sceario: all poits from the left side sub-problem ( poits) are i the ribbo ad for each of them, we have to check a maximum of 6 poits i the right side As the poits are sorted by y-coordiates ad we step through at most, checkig the middle ribbo takes at most a liear amout of time Fially take the miimum distace amog: the smallest of the right side, the smallest of the left side, ad the smallest of the middle ribbo That takes a costat time: O(1) 5

6 Hadout: How to calculate time complexity? CSE 101 Witer 014 We get: T () = O() + T + T + O() + O(1) Work for poits Splittig the plae (x-coord media) Work for the left side Work for the right side Work for the ribbo Combiig results (mi of 3 umbers) It ca be simplied i: Master Theorem gives us a = b = d = 1 T () = T + O() so log b a = log 1 = 1 = d so T () = O( log ) Coclusio We did steps: before solvig, we sorted the poits with a complexity of O( log ), ad we solved the problem with a complexity of T () = O( log ) So the overall time complexity is O( log ) F) Recursio tree agai We are give: T () = T + log We assume without loss of geerality that is power of This will ot iuece the al boud i ay importat way, after all, is at most a multiplicative factor away from some power of We ca't use the Master Theorem so we have to evaluate T () to be able to give the complexity i big-o terms Let's cosider the recurrece sub-problem tree: Level 0 : 1 problem Level 1 : problems = = Level : 4 problems =4 =4 =4 =4 Level k: k problems = k = k = k = k Level log

7 Hadout: How to calculate time complexity? CSE 101 Witer 014 As we kow the size of the sub-problems at level k is k accordig to the complexity equatio: The work for oe sub-problem of level k is, k log k = 1 k log() k As there is k sub-problems at level k, the total work made at level k is: k 1 k log() k = log() k # of problems at level k work for each problem of level k total work made at level k Therefore: T () = (work at level 0) + (work at level 1) + + (work at level log() - 1) = log() + log() = log() 1 + 1! log() We saw i the homework that we had: m = O(log m) I our previous sum, m = log so we get T () = O( log(log )) 7

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

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

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

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

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

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

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

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

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

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

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

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

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows:

Your organization has a Class B IP address of 166.144.0.0 Before you implement subnetting, the Network ID and Host ID are divided as follows: Subettig Subettig is used to subdivide a sigle class of etwork i to multiple smaller etworks. Example: Your orgaizatio has a Class B IP address of 166.144.0.0 Before you implemet subettig, the Network

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

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

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

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

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

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

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 5: Inner Product Spaces

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

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

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

.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

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

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

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

Quadratics - Revenue and Distance

Quadratics - Revenue and Distance 9.10 Quadratics - Reveue ad Distace Objective: Solve reveue ad distace applicatios of quadratic equatios. A commo applicatio of quadratics comes from reveue ad distace problems. Both are set up almost

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

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

Equation of a line. Line in coordinate geometry. Slope-intercept form ( 斜 截 式 ) Intercept form ( 截 距 式 ) Point-slope form ( 點 斜 式 )

Equation of a line. Line in coordinate geometry. Slope-intercept form ( 斜 截 式 ) Intercept form ( 截 距 式 ) Point-slope 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

Algebra Vocabulary List (Definitions for Middle School Teachers)

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

Literal Equations and Formulas

Literal Equations and Formulas . Literal Equatios ad Formulas. OBJECTIVE 1. Solve a literal equatio for a specified variable May problems i algebra require the use of formulas for their solutio. Formulas are simply equatios that express

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

A Resource for Free-standing Mathematics Qualifications Working with %

A Resource for Free-standing Mathematics Qualifications Working with % Ca you aswer these questios? A savigs accout gives % iterest per aum.. If 000 is ivested i this accout, how much will be i the accout at the ed of years? A ew car costs 16 000 ad its value falls by 1%

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

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

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

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

Chatpun Khamyat Department of Industrial Engineering, Kasetsart University, Bangkok, Thailand ocpky@hotmail.com

Chatpun Khamyat Department of Industrial Engineering, Kasetsart University, Bangkok, Thailand ocpky@hotmail.com SOLVING THE OIL DELIVERY TRUCKS ROUTING PROBLEM WITH MODIFY MULTI-TRAVELING SALESMAN PROBLEM APPROACH CASE STUDY: THE SME'S OIL LOGISTIC COMPANY IN BANGKOK THAILAND Chatpu Khamyat Departmet of Idustrial

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

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

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

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

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method Chapter 6: Variace, the law of large umbers ad the Mote-Carlo 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 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

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

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

Chapter 7 Methods of Finding Estimators

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

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

Mathematical goals. Starting points. Materials required. Time needed

Mathematical goals. Starting points. Materials required. Time needed Level A1 of challege: C A1 Mathematical goals Startig poits Materials required Time eeded Iterpretig algebraic expressios To help learers to: traslate betwee words, symbols, tables, ad area represetatios

More information

Solving Logarithms and Exponential Equations

Solving Logarithms and Exponential Equations Solvig Logarithms ad Epoetial Equatios Logarithmic Equatios There are two major ideas required whe solvig Logarithmic Equatios. The first is the Defiitio of a Logarithm. You may recall from a earlier topic:

More information

. P. 4.3 Basic feasible solutions and vertices of polyhedra. x 1. x 2

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

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

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

Chapter 6: CPU Scheduling. Previous Lectures. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts

Chapter 6: CPU Scheduling. Previous Lectures. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts Multithreadig Memory Layout Kerel vs User threads Represetatio i OS Previous Lectures Differece betwee thread ad process Thread schedulig Mappig betwee user ad kerel threads Multithreadig i Java Thread

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

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

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

Lesson 17 Pearson s Correlation Coefficient

Lesson 17 Pearson s Correlation Coefficient Outlie Measures of Relatioships Pearso s Correlatio Coefficiet (r) -types of data -scatter plots -measure of directio -measure of stregth Computatio -covariatio of X ad Y -uique variatio i X ad Y -measurig

More information

DEFINITION OF INVERSE MATRIX

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

Solutions to Exercises Chapter 4: Recurrence relations and generating functions

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

Solving equations. Pre-test. Warm-up

Solving equations. Pre-test. Warm-up Solvig equatios 8 Pre-test Warm-up We ca thik of a algebraic equatio as beig like a set of scales. The two sides of the equatio are equal, so the scales are balaced. If we add somethig to oe side of the

More information

1 Computing the Standard Deviation of Sample Means

1 Computing the Standard Deviation of Sample Means Computig the Stadard Deviatio of Sample Meas Quality cotrol charts are based o sample meas ot o idividual values withi a sample. A sample is a group of items, which are cosidered all together for our aalysis.

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

BENEFIT-COST ANALYSIS Financial and Economic Appraisal using Spreadsheets

BENEFIT-COST ANALYSIS Financial and Economic Appraisal using Spreadsheets BENEIT-CST ANALYSIS iacial ad Ecoomic Appraisal usig Spreadsheets Ch. 2: Ivestmet Appraisal - Priciples Harry Campbell & Richard Brow School of Ecoomics The Uiversity of Queeslad Review of basic cocepts

More information

Domain 1: Designing a SQL Server Instance and a Database Solution

Domain 1: Designing a SQL Server Instance and a Database Solution Maual SQL Server 2008 Desig, Optimize ad Maitai (70-450) 1-800-418-6789 Domai 1: Desigig a SQL Server Istace ad a Database Solutio Desigig for CPU, Memory ad Storage Capacity Requiremets Whe desigig a

More information

Stat 104 Lecture 2. Variables and their distributions. DJIA: monthly % change, 2000 to Finding the center of a distribution. Median.

Stat 104 Lecture 2. Variables and their distributions. DJIA: monthly % change, 2000 to Finding the center of a distribution. Median. Stat 04 Lecture Statistics 04 Lecture (IPS. &.) Outlie for today Variables ad their distributios Fidig the ceter Measurig the spread Effects of a liear trasformatio Variables ad their distributios Variable:

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

Notes on Hypothesis Testing

Notes on Hypothesis Testing Probability & Statistics Grishpa Notes o Hypothesis Testig A radom sample X = X 1,..., X is observed, with joit pmf/pdf f θ x 1,..., x. The values x = x 1,..., x of X lie i some sample space X. The parameter

More information

DAME - Microsoft Excel add-in for solving multicriteria decision problems with scenarios Radomir Perzina 1, Jaroslav Ramik 2

DAME - Microsoft Excel add-in for solving multicriteria decision problems with scenarios Radomir Perzina 1, Jaroslav Ramik 2 Itroductio DAME - Microsoft Excel add-i for solvig multicriteria decisio problems with scearios Radomir Perzia, Jaroslav Ramik 2 Abstract. The mai goal of every ecoomic aget is to make a good decisio,

More information

2-3 The Remainder and Factor Theorems

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

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find 1.8 Approximatig Area uder a curve with rectagles 1.6 To fid the area uder a curve we approximate the area usig rectagles ad the use limits to fid 1.4 the area. Example 1 Suppose we wat to estimate 1.

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

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

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean

Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean 1 Social Studies 201 October 13, 2004 Note: The examples i these otes may be differet tha used i class. However, the examples are similar ad the methods used are idetical to what was preseted i class.

More information

Concept: Types of algorithms

Concept: Types of algorithms Discrete Math for Bioiformatics WS 10/11:, by A. Bockmayr/K. Reiert, 18. Oktober 2010, 21:22 1001 Cocept: Types of algorithms The expositio is based o the followig sources, which are all required readig:

More information

Linear Algebra II. 4 Determinants. Notes 4 1st November Definition of determinant

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

1. C. The formula for the confidence interval for a population mean is: x t, which was

1. 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 : p-value

More information

Laws of Exponents. net effect is to multiply with 2 a total of 3 + 5 = 8 times

Laws of Exponents. net effect is to multiply with 2 a total of 3 + 5 = 8 times The Mathematis 11 Competey Test Laws of Expoets (i) multipliatio of two powers: multiply by five times 3 x = ( x x ) x ( x x x x ) = 8 multiply by three times et effet is to multiply with a total of 3

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

INDR 262 Optimization Models and Mathematical Programming LINEAR PROGRAMMING MODELS

INDR 262 Optimization Models and Mathematical Programming LINEAR PROGRAMMING MODELS LINEAR PROGRAMMING MODELS Commo termiology for liear programmig: - liear programmig models ivolve. resources deoted by i, there are m resources. activities deoted by, there are acitivities. performace

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

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

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

Using Excel to Construct Confidence Intervals

Using Excel to Construct Confidence Intervals OPIM 303 Statistics Ja Stallaert Usig Excel to Costruct Cofidece Itervals This hadout explais how to costruct cofidece itervals i Excel for the followig cases: 1. Cofidece Itervals for the mea of a populatio

More information

Learning objectives. Duc K. Nguyen - Corporate Finance 21/10/2014

Learning objectives. Duc K. Nguyen - Corporate Finance 21/10/2014 1 Lecture 3 Time Value of Moey ad Project Valuatio The timelie Three rules of time travels NPV of a stream of cash flows Perpetuities, auities ad other special cases Learig objectives 2 Uderstad the time-value

More information

Bond Valuation I. What is a bond? Cash Flows of A Typical Bond. Bond Valuation. Coupon Rate and Current Yield. Cash Flows of A Typical Bond

Bond Valuation I. What is a bond? Cash Flows of A Typical Bond. Bond Valuation. Coupon Rate and Current Yield. Cash Flows of A Typical Bond What is a bod? Bod Valuatio I Bod is a I.O.U. Bod is a borrowig agreemet Bod issuers borrow moey from bod holders Bod is a fixed-icome security that typically pays periodic coupo paymets, ad a pricipal

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

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the.

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the. Cofidece Itervals A cofidece iterval is a iterval whose purpose is to estimate a parameter (a umber that could, i theory, be calculated from the populatio, if measuremets were available for the whole populatio).

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

Engineering 323 Beautiful Homework Set 3 1 of 7 Kuszmar Problem 2.51

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

Modified Line Search Method for Global Optimization

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

Finding the circle that best fits a set of points

Finding the circle that best fits a set of points Fidig the circle that best fits a set of poits L. MAISONOBE October 5 th 007 Cotets 1 Itroductio Solvig the problem.1 Priciples............................... Iitializatio.............................

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

Measures of Central Tendency

Measures of Central Tendency Measures of Cetral Tedecy A studet s grade will be determied by exam grades ( each exam couts twice ad there are three exams, HW average (couts oce, fial exam ( couts three times. Fid the average if the

More information