Section II.6: Analysis of Iterative Searches and Sorts

Size: px
Start display at page:

Download "Section II.6: Analysis of Iterative Searches and Sorts"

Transcription

1 Sectio II.6: Aalysis of Iterative Searches ad Sorts Biary Search Biary Search is a efficiet algorithm that searches for a item X i a sorted array. The item X searched for is compared with the value of the midpoit of the list. If X is foud, the the positio i the list is give. If X is less tha this value, we search the left half of the list (excludig the midpoit). If X is greater tha this value, we search the right half of the list (excludig the midpoit). This process is cotiued util the legth of the sublist is 1. If X is foud, the positio i the list is retured. If X is ot foud, the the positio 0 is retured. Iterative pseudo code for Biary Search, foud i Epp, p. 51 is give below. Algorithm Biary Search Iput: positive iteger, array A [1], A [],..., A[] i ascedig order, item X of the same data type as the elemets of the array. Output: 0 (zero) if X is ot foud, otherwise the positio i the array where X is foud. Algorithm Body: idex := 0; bot := 1; top := ; while (bot top ad idex = 0) bot + top mid := if X = A[mid] the idex := mid else if X < A[mid] the top := mid - 1 else [X>A[mid]] bot := mid + 1; ed while retur idex ed Algorithm Biary Search Example II.6.1: (a) Trace the actio of Biary Search o the list 1, 8, 10, 1, 17, 19, 3 if we are searchig for item 10. (b) Trace the actio of Biary Search o the list 1, 8, 10, 1, 17, 19, 3 if we are searchig for item 15. Solutio: (a) Iteratio Number Variable mid Names X? A[mid] -- < > = bot top idex The item is foud i positio 3. 1

2 Solutio: (b) Iteratio Number Variable mid Names X? A[mid] -- > < < bot top idex The item is ot foud, idex 0 is retured. Tree Structure for Biary Search Defiitios (Iformal): A tree is a data structure such that each ode has at most oe predecessor (paret) ode. A ode may have may successor (childre) odes. Trees are formally covered later but are iformally used from ow o for illustrative purposes. There is oe ode without ay paret (the root), ad the leaves are odes that have o childre. The level of a ode is the legth of the path from the root to that ode. The root has level 0. A Biary Tree is oe where each ode has at most two childre. The biary tree for Biary Search is costructed as follows. At each level the midpoit of that sublist is the paret ad the midpoits of the left ad right sublists are the childre. The root of the tree is the midpoit of the origial list. The leaves are the odes for which the left ad right sublists are empty. Example II.6. (a): Draw the tree for the list i Example The solutio is show above. The first umber i each ode is the positio of the item i the list, ad the secod is the item itself. Example II.6. (b): Draw the tree for list 1, 4, 7, 8, 10, 1, 15, 17, 19,,

3 The solutio is show above. The first umber i each ode is the positio of the item i the list, ad the secod is the item itself. Aalysis of Iterative Biary Search We wish to fid (a) the ru time T() ad (b) a fuctio U() with oe term, ad leadig coefficiet 1, where T( = Θ(U()). Solutio: (a) k Case 1: If the size of the array is = 1 for some positive iteger k, the the tree structure is full, i. e., each level has the maximum umber of odes. (Example 1 is such a case for k = 3). The maximum umber of subdivisios of the origial array is the maximum umber of odes from the root to the leaf level of the tree ad this value is k. Sice k = + 1, we have k = log ( + 1) = log ( +1) sice log ( + 1) is a iteger. Therefore the ru time T() = log ( +1). Case : k < k for some positive iteger k. The tree for biary search requires at least oe ode at the ext level of the tree. So the maximal legth of a path through the tree is log ( +1). We must use the ceilig fuctio i this case sice log ( + 1) is ot a iteger. Therefore the ru time T() = log ( +1). I either case, the, T() = log ( +1). Solutio: (b) We show T() = Θ(log ). To show T()= O(log ), ote that log ( + 1) log + 1 log for all itegers. I the defiitio of big O, we ca take C =, X 0 =. I the above iequality we use 1 log ad fact that the slope of the graph of log ( + 1) is less tha the slope of the graph of log + 1. We also use the fact that log ( + 1) = log + 1for = 1. To show log = O( log ( +1) ), ote that log < log ( + 1) log ( +1). So C = 1 ad X 0 = 1 from the defiitio of big O ca be used Isertio Sort Isertio Sort is a sort that creates from the iput array A of size, a positive iteger, a sorted subarray of size i for each i, 1 i. Oce a sorted array of size i-1 is obtaied, for i, we assig A[i] to v. v is compared to A[i-1]. If v < A[i-1] the oe copies A[i-1] ito A[i]. The v is compared to A[i-]. If v < A[i-] the the elemets A[i-] is moved up. This process cotiues util v A[j] for some j, 0 j i. If the coditio v < A[1] is reached, the we must compare v to the setiel A[0]. Oe obtais v > A[0], ad this causes the while loop to termiate. This process is repeated for i =, i =3,... up to i =. Fially we get a sorted array of size. 3

4 The pseudo code for Isertio Sort is as follows: Algorithm Isertio Sort Iput: Positive iteger, array A of items. Output: Sorted array i ascedig order. Body of algorithm: A[0] := setiel [ put a value less tha all others i the list ito A[0]] for i := to v := A[i]; j := i; while A[j-1] > v A[j] := A[j-1]; j := j 1; ed while; A[j] := v; ext i; Ed Algorithm Isertio Sort Aalysis of Isertio Sort Worst Case: The list is i descedig order. For i betwee ad, there are i comparisos whe A[i] is smaller tha all previous values. The umber of comparisos, icludig a compariso agaist the setiel, is T() = i = i = ( +1) - 1 = + = Θ( ). Best Case: The list is already sorted. Whe A[i+1] is compared with A[i], it is always larger. So oly oe compariso is made for each i. The umber of comparisos is T() = -+1 = 1 = Θ(). Average Case: Assume that i ay subarray of A of legth i, the elemets are uiformly distributed, i.e., the maximum elemet is equally likely to be i ay positio. Let C be the total umber of comparisos eeded, ad C i be the umber of comparisos eeded whe we isert the elemet at idex i i its proper positio i the subarray A[1],, A[i] where A[1],, A[i-1] is already sorted. The T() = E[C] = E[C + + C ] = E[C i ] i = by the liearity of expectatio (Theorem I..1). We ow fid E[C i ]. Let P i (k) be the probability that max {A[1],...,A[i]} is i the k-th positio, 1 k i. The P i (k) = i 1. 4

5 Let C i (k) be the umber of comparisos eeded if the elemet at idex i is to be put i idex k, where the subarray A[1],, A[i-1] is already sorted. The C i (k) = i k + 1. We the have i i i (i +1) i i +1 E[C i ] = P i (k) C i (k) = (i k + 1) = ( j k =1 k =1 i i ) = = j =1 i Therefore +1 i + 1 i T () = E[C i ] = = = 1 ( +1)( + ) 1 - (1 + ) i = i = = = = Θ ( ). 4 4 Note that the average ru time is about half that of the worst case. i = 3 Example II.6.3: Give a array A that is 4, 3, 1, 9, 6 (a) Give the arragemet of the array A at the ed of each iteratio of the for loop i the Isertio Sort algorithm. (b) Compute the total umber of comparisos eeded. (c) Compute the umber of comparisos eeded i the best case, the worst case, ad the average case. Solutio: (a) Iitially: value of i array A (b) value of i Number of Comparisos 3 1 Total = 8. Note that if A[i] < A[1], the A[i] must be compared to the setiel A[0]. Therefore, we have comparisos for i = ad 3 comparisos for i = 3. (c) Plug i 5 for i above formulas for the best case, the worst case, ad the average case. Best case: T() = 5 1 = Worst Case: T() = = Average case: T() = = =

6 Exercises: (1) Let A be the sorted array 1, 7, 9, 1, 17, 1, 30. Use the format of Example II.6.1, parts (a) ad (b). (a) Fill i the trace table for Biary Search whe X = 9 is searched for. (b) Fill i the trace table for Biary Search whe X = 31 is searched for. (c) Draw a tree structure for this list (see Example II.6 ). () Let A be the sorted array 1, 3, 4, 5, 9,, 4, 31, 35, 36, 39, 41. Use the format of Example II.6.1, parts (a) ad (b). (a) Fill i the trace table for Biary Search whe X = 39 is searched for. (b) Fill i the trace table for Biary Search whe X= 8 is searched for. (c) Draw a tree structure for this list (see Example II.6.). (3) Compute the best case, the average case, ad the worst case for the ru time T() of isertio sort for a array of 16 elemets. (4) Let A be a array of elemets 5, 8,, 13, 4, 1, 15, 9. (a) Usig the method of example II.6.3, give the arragemet of array A at the ed of each iteratio of the for loop i the Isertio Sort algorithm. (b) Compute the actual umber of comparisos of A [i] to previous elemets for each i betwee ad 8. (c) Get the total umber of comparisos eeded. 6

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

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

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

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

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

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

2-3-4 Trees and Red- Black Trees

2-3-4 Trees and Red- Black Trees 2-3-4 Trees ad ed- Black Trees erm 204 2-3-4 Trees evealed Nodes store 1, 2, or 3 keys ad have 2, 3, or 4 childre, respectively All leaves have the same depth k b e h r a c d f i l m p s x 1 -- lo( N +

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

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design

A Combined Continuous/Binary Genetic Algorithm for Microstrip Antenna Design A Combied Cotiuous/Biary Geetic Algorithm for Microstrip Atea Desig Rady L. Haupt The Pesylvaia State Uiversity Applied Research Laboratory P. O. Box 30 State College, PA 16804-0030 haupt@ieee.org Abstract:

More information

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling

Taking DCOP to the Real World: Efficient Complete Solutions for Distributed Multi-Event Scheduling Taig DCOP to the Real World: Efficiet Complete Solutios for Distributed Multi-Evet Schedulig Rajiv T. Maheswara, Milid Tambe, Emma Bowrig, Joatha P. Pearce, ad Pradeep araatham Uiversity of Souther Califoria

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

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

How To Solve The Homewor Problem Beautifully

How To Solve The Homewor Problem Beautifully 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

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

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

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

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

Math 114- Intermediate Algebra Integral Exponents & Fractional Exponents (10 )

Math 114- Intermediate Algebra Integral Exponents & Fractional Exponents (10 ) Math 4 Math 4- Itermediate Algebra Itegral Epoets & Fractioal Epoets (0 ) Epoetial Fuctios Epoetial Fuctios ad Graphs I. Epoetial Fuctios The fuctio f ( ) a, where is a real umber, a 0, ad a, is called

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

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

Integer Factorization Algorithms

Integer Factorization Algorithms Iteger Factorizatio Algorithms Coelly Bares Departmet of Physics, Orego State Uiversity December 7, 004 This documet has bee placed i the public domai. Cotets I. Itroductio 3 1. Termiology 3. Fudametal

More 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

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

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

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

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

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

Section 11.3: The Integral Test

Section 11.3: The Integral Test Sectio.3: The Itegral Test Most of the series we have looked at have either diverged or have coverged ad we have bee able to fid what they coverge to. I geeral however, the problem is much more difficult

More 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

Lecture 4: Cheeger s Inequality

Lecture 4: Cheeger s Inequality Spectral Graph Theory ad Applicatios WS 0/0 Lecture 4: Cheeger s Iequality Lecturer: Thomas Sauerwald & He Su Statemet of Cheeger s Iequality I this lecture we assume for simplicity that G is a d-regular

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

Chapter 10 Computer Design Basics

Chapter 10 Computer Design Basics Logic ad Computer Desig Fudametals Chapter 10 Computer Desig Basics Part 1 Datapaths Charles Kime & Thomas Kamiski 2004 Pearso Educatio, Ic. Terms of Use (Hyperliks are active i View Show mode) Overview

More information

A Faster Clause-Shortening Algorithm for SAT with No Restriction on Clause Length

A Faster Clause-Shortening Algorithm for SAT with No Restriction on Clause Length Joural o Satisfiability, Boolea Modelig ad Computatio 1 2005) 49-60 A Faster Clause-Shorteig Algorithm for SAT with No Restrictio o Clause Legth Evgey Datsi Alexader Wolpert Departmet of Computer Sciece

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

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

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

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

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

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

Lecture 5: Span, linear independence, bases, and dimension

Lecture 5: Span, linear independence, bases, and dimension Lecture 5: Spa, liear idepedece, bases, ad dimesio Travis Schedler Thurs, Sep 23, 2010 (versio: 9/21 9:55 PM) 1 Motivatio Motivatio To uderstad what it meas that R has dimesio oe, R 2 dimesio 2, etc.;

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

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

1 Correlation and Regression Analysis

1 Correlation and Regression Analysis 1 Correlatio ad Regressio Aalysis I this sectio we will be ivestigatig the relatioship betwee two cotiuous variable, such as height ad weight, the cocetratio of a ijected drug ad heart rate, or the cosumptio

More information

Overview on S-Box Design Principles

Overview on S-Box Design Principles Overview o S-Box Desig Priciples Debdeep Mukhopadhyay Assistat Professor Departmet of Computer Sciece ad Egieerig Idia Istitute of Techology Kharagpur INDIA -721302 What is a S-Box? S-Boxes are Boolea

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

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

Cooley-Tukey. Tukey FFT Algorithms. FFT Algorithms. Cooley

Cooley-Tukey. Tukey FFT Algorithms. FFT Algorithms. Cooley Cooley Cooley-Tuey Tuey FFT Algorithms FFT Algorithms Cosider a legth- sequece x[ with a -poit DFT X[ where Represet the idices ad as +, +, Cooley Cooley-Tuey Tuey FFT Algorithms FFT Algorithms Usig these

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

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

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

.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

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

Chapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions

Chapter 5 Unit 1. IET 350 Engineering Economics. Learning Objectives Chapter 5. Learning Objectives Unit 1. Annual Amount and Gradient Functions Chapter 5 Uit Aual Amout ad Gradiet Fuctios IET 350 Egieerig Ecoomics Learig Objectives Chapter 5 Upo completio of this chapter you should uderstad: Calculatig future values from aual amouts. Calculatig

More information

EGYPTIAN FRACTION EXPANSIONS FOR RATIONAL NUMBERS BETWEEN 0 AND 1 OBTAINED WITH ENGEL SERIES

EGYPTIAN FRACTION EXPANSIONS FOR RATIONAL NUMBERS BETWEEN 0 AND 1 OBTAINED WITH ENGEL SERIES EGYPTIAN FRACTION EXPANSIONS FOR RATIONAL NUMBERS BETWEEN 0 AND OBTAINED WITH ENGEL SERIES ELVIA NIDIA GONZÁLEZ AND JULIA BERGNER, PHD DEPARTMENT OF MATHEMATICS Abstract. The aciet Egyptias epressed ratioal

More information

Math 113 HW #11 Solutions

Math 113 HW #11 Solutions Math 3 HW # Solutios 5. 4. (a) Estimate the area uder the graph of f(x) = x from x = to x = 4 usig four approximatig rectagles ad right edpoits. Sketch the graph ad the rectagles. Is your estimate a uderestimate

More information

Time Value of Money, NPV and IRR equation solving with the TI-86

Time Value of Money, NPV and IRR equation solving with the TI-86 Time Value of Moey NPV ad IRR Equatio Solvig with the TI-86 (may work with TI-85) (similar process works with TI-83, TI-83 Plus ad may work with TI-82) Time Value of Moey, NPV ad IRR equatio solvig with

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

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. Powers of a matrix We begi with a propositio which illustrates the usefuless of the diagoalizatio. Recall that a square matrix A is diogaalizable if

More 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

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

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

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

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

Sequences and Series Using the TI-89 Calculator

Sequences and Series Using the TI-89 Calculator RIT Calculator Site Sequeces ad Series Usig the TI-89 Calculator Norecursively Defied Sequeces A orecursively defied sequece is oe i which the formula for the terms of the sequece is give explicitly. For

More 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

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

7.1 Finding Rational Solutions of Polynomial Equations

7.1 Finding Rational Solutions of Polynomial Equations 4 Locker LESSON 7. Fidig Ratioal Solutios of Polyomial Equatios Name Class Date 7. Fidig Ratioal Solutios of Polyomial Equatios Essetial Questio: How do you fid the ratioal roots of a polyomial equatio?

More information

Estimating Probability Distributions by Observing Betting Practices

Estimating Probability Distributions by Observing Betting Practices 5th Iteratioal Symposium o Imprecise Probability: Theories ad Applicatios, Prague, Czech Republic, 007 Estimatig Probability Distributios by Observig Bettig Practices Dr C Lych Natioal Uiversity of Irelad,

More information

2. Degree Sequences. 2.1 Degree Sequences

2. Degree Sequences. 2.1 Degree Sequences 2. Degree Sequeces The cocept of degrees i graphs has provided a framewor for the study of various structural properties of graphs ad has therefore attracted the attetio of may graph theorists. Here we

More information

Pre-Suit Collection Strategies

Pre-Suit Collection Strategies Pre-Suit Collectio Strategies Writte by Charles PT Phoeix How to Decide Whether to Pursue Collectio Calculatig the Value of Collectio As with ay busiess litigatio, all factors associated with the process

More information

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT Keywords: project maagemet, resource allocatio, etwork plaig Vladimir N Burkov, Dmitri A Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT The paper deals with the problems of resource allocatio betwee

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

SEQUENCES AND SERIES CHAPTER

SEQUENCES AND SERIES CHAPTER CHAPTER SEQUENCES AND SERIES Whe the Grat family purchased a computer for $,200 o a istallmet pla, they agreed to pay $00 each moth util the cost of the computer plus iterest had bee paid The iterest each

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

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number.

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number. GCSE STATISTICS You should kow: 1) How to draw a frequecy diagram: e.g. NUMBER TALLY FREQUENCY 1 3 5 ) How to draw a bar chart, a pictogram, ad a pie chart. 3) How to use averages: a) Mea - add up all

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

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

Terminology for Bonds and Loans

Terminology for Bonds and Loans ³ ² ± Termiology for Bods ad Loas Pricipal give to borrower whe loa is made Simple loa: pricipal plus iterest repaid at oe date Fixed-paymet loa: series of (ofte equal) repaymets Bod is issued at some

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

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

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

Present Value Factor To bring one dollar in the future back to present, one uses the Present Value Factor (PVF): Concept 9: Present Value

Present Value Factor To bring one dollar in the future back to present, one uses the Present Value Factor (PVF): Concept 9: Present Value Cocept 9: Preset Value Is the value of a dollar received today the same as received a year from today? A dollar today is worth more tha a dollar tomorrow because of iflatio, opportuity cost, ad risk Brigig

More information

AP Calculus BC 2003 Scoring Guidelines Form B

AP Calculus BC 2003 Scoring Guidelines Form B AP Calculus BC Scorig Guidelies Form B The materials icluded i these files are iteded for use by AP teachers for course ad exam preparatio; permissio for ay other use must be sought from the Advaced Placemet

More information

THE HEIGHT OF q-binary SEARCH TREES

THE HEIGHT OF q-binary SEARCH TREES THE HEIGHT OF q-binary SEARCH TREES MICHAEL DRMOTA AND HELMUT PRODINGER Abstract. q biary search trees are obtaied from words, equipped with the geometric distributio istead of permutatios. The average

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

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

Confidence Intervals for One Mean

Confidence Intervals for One Mean Chapter 420 Cofidece Itervals for Oe Mea Itroductio This routie calculates the sample size ecessary to achieve a specified distace from the mea to the cofidece limit(s) at a stated cofidece level for a

More information

A Note on Sums of Greatest (Least) Prime Factors

A Note on Sums of Greatest (Least) Prime Factors It. J. Cotemp. Math. Scieces, Vol. 8, 203, o. 9, 423-432 HIKARI Ltd, www.m-hikari.com A Note o Sums of Greatest (Least Prime Factors Rafael Jakimczuk Divisio Matemática, Uiversidad Nacioal de Luá Bueos

More information

Listing terms of a finite sequence List all of the terms of each finite sequence. a) a n n 2 for 1 n 5 1 b) a n for 1 n 4 n 2

Listing terms of a finite sequence List all of the terms of each finite sequence. a) a n n 2 for 1 n 5 1 b) a n for 1 n 4 n 2 74 (4 ) Chapter 4 Sequeces ad Series 4. SEQUENCES I this sectio Defiitio Fidig a Formula for the th Term The word sequece is a familiar word. We may speak of a sequece of evets or say that somethig is

More information

THE LEAST COMMON MULTIPLE OF A QUADRATIC SEQUENCE

THE LEAST COMMON MULTIPLE OF A QUADRATIC SEQUENCE THE LEAST COMMON MULTIPLE OF A QUADRATIC SEQUENCE JAVIER CILLERUELO Abstract. We obtai, for ay irreducible quadratic olyomial f(x = ax 2 + bx + c, the asymtotic estimate log l.c.m. {f(1,..., f(} log. Whe

More information

Now here is the important step

Now here is the important step LINEST i Excel The Excel spreadsheet fuctio "liest" is a complete liear least squares curve fittig routie that produces ucertaity estimates for the fit values. There are two ways to access the "liest"

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

Non-life insurance mathematics. Nils F. Haavardsson, University of Oslo and DNB Skadeforsikring

Non-life insurance mathematics. Nils F. Haavardsson, University of Oslo and DNB Skadeforsikring No-life isurace mathematics Nils F. Haavardsso, Uiversity of Oslo ad DNB Skadeforsikrig Mai issues so far Why does isurace work? How is risk premium defied ad why is it importat? How ca claim frequecy

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

The Role of Latin Square in Cipher Systems: A Matrix Approach to Model Encryption Modes of Operation

The Role of Latin Square in Cipher Systems: A Matrix Approach to Model Encryption Modes of Operation UCLA COPUTR SCINC DPARTNT TCHNICAL RPORT 030038 1 The Role of Lati Square i Cipher Systems: A atrix Approach to odel cryptio odes of Operatio Jieju og Computer Sciece Departmet Uiversity of Califoria,

More information

AP Calculus AB 2006 Scoring Guidelines Form B

AP Calculus AB 2006 Scoring Guidelines Form B AP Calculus AB 6 Scorig Guidelies Form B The College Board: Coectig Studets to College Success The College Board is a ot-for-profit membership associatio whose missio is to coect studets to college success

More information

Automatic Tuning for FOREX Trading System Using Fuzzy Time Series

Automatic Tuning for FOREX Trading System Using Fuzzy Time Series utomatic Tuig for FOREX Tradig System Usig Fuzzy Time Series Kraimo Maeesilp ad Pitihate Soorasa bstract Efficiecy of the automatic currecy tradig system is time depedet due to usig fixed parameters which

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

Factors of sums of powers of binomial coefficients

Factors of sums of powers of binomial coefficients ACTA ARITHMETICA LXXXVI.1 (1998) Factors of sums of powers of biomial coefficiets by Neil J. Cali (Clemso, S.C.) Dedicated to the memory of Paul Erdős 1. Itroductio. It is well ow that if ( ) a f,a = the

More information

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006 Exam format UC Bereley Departmet of Electrical Egieerig ad Computer Sciece EE 6: Probablity ad Radom Processes Solutios 9 Sprig 006 The secod midterm will be held o Wedesday May 7; CHECK the fial exam

More information