Chapter 2. Asymptotic Notation
|
|
- Archibald Hawkins
- 5 years ago
- Views:
Transcription
1 Asyptotic Notatio 3 Chapter Asyptotic Notatio Goal : To siplify the aalysis of ruig tie by gettig rid of details which ay be affected by specific ipleetatio ad hardware. [1] The Big Oh (O-Notatio) : It gives us the upper boud (Worst case behaviour) of the ruig tie. If f() ad g() are two icreasig fuctios o o-egative ubers the. f() = O(g()) if there exists costat c ad 0 where c ad 0 are two positive costats ad c > 0 & 0 1 f c g. such that 0 Ruig tie c.g() f() Exaple: If f() = the f() < where c = 76 f 1 0 O f < Iput size Siple Rule: Pop lower order ters ad costat factors. e.g is O ad 5 log 7 is O log []. Oega Notatio ( ) : It gives the tight boud (Lower boud) o ruig tie. If f() ad g() are two icreasig fuctios over o-egative ubers. The f g if there exists a costat c ad 0 ad c 0 & 0 1 such that f c g 0
2 4 Asyptotic Notatio Ruig tie f() c g() 0 Iput size For exaple: f Therefore, f where c 60 ad > 1 [3]. Theta Notatio : It gives the tight boud (Average case behaviour) o ruig tie. If f() ad g() are two icreasig fuctio defied over o-egative ubers the f g if there exists costats c 1, c ad 0 such that c g f c g 1 0 f() is sadwidthed betwee c g ad c g 1 0 If f O g ad f g The f g ad vice-versa. As we have, f ad f O ad f Therefore, f [4]. Little O Notatio (o) : f o g g is strictly (do ot cosider equality) larger tha f g 0 Graphical represetatio reai sae. f li 0 g f
3 Asyptotic Notatio 5 [5] Little Oega : f g g is strictly saller tha 0 f g f Graphical represetatio reai sae. f li g Types of tie coplexitites: (i) costat tie coplexity O1 (ii) logarithic tie coplexity Olog (iii) liear tie coplexity O (iv) quadratic O 3 (v) cubic O k (vi) polyoial O k 0 (vii) expoetial O c c 1 (1) 1 log log log log () log (3) (4) log (5)! (6)! (7)! (8) 100 log (9) log (10) log log log log (11) a b a log b Note :! O correct!=o exactly correct Properties of Asyptotic Notatio: (1) Relfexive properties: (i) f O f
4 6 (ii) f f (iii) f f (iv) f o f (v) f f () Syetric properties: (i) if the f O g g O f (ii) if the f g g f (iii) if (3) Trasitive property: the f g g f (i) If f O g & & g O h the f O h (ii) If & & the f g g h f h (4) If f O g the h f O h g where, h is positive fuctio. (5) If f O g d O h the (i) ax f d g h O g h (ii) f d O g h Proble : Cosider the followig z fuctios. & & f O g g O f & & g O h h O g True/False (a) f g O h (b) f O h (c) f g O h h (d) h O f Fid the Tie coplexity? ai ( ) x y z; for (i = 1; i ; i ) ( tie exeuctio) x y z; for i 1; i ; i Asyptotic Notatio
5 Asyptotic Notatio 7 for j 1; j ; j x x z; so, O( ). Fid coplexity. ai ( ) x y z for i 1; i ; i for j 1; j i; j tie excutio x y z ( ) = so, O Differece betwee Relative Aalysis ad Absolute Aalysis Relative Aalysis : (1) It is software ad hardware depedet aalysis. () Exact aswers (3) Aswer is chagig fro syste to syste. Absolute aalysis: (1) It is software ad hardware idepedet aalysis. () Approxiate aswers (3) Aswer will be sae i all coputer systes. Note : Absolute aalysis is the stadard aalysis i practice. Absolute aalysis : It is a deteriatio of order of agitude of a stateet Nuber of ties a stateet is executig. Exaple : ai ( ) x y z; 1 tie executio O(1) or order of 1. 1
6 8 SOLVED PROBLEMS Asyptotic Notatio 1. Solve the recurrece equatios T() = T( 1) + T(1) = 1 Sol. By usig substitutio ethod we get followig series: ( 1) ( ) ( 3) Which is su of atural ubers. ( 1) O( ). What is the geeratig fuctio G(z) for the sequece of Fiboacci ubers? z Sol. The geeratig fuctio for the Fiboacci ubers G(z) is G(z). 1 z z 3. As. Sol. 1 k O(), where O() stads for order is [GATE-1987 : Marks] [GATE-1987 : Marks] (a) O() (b) O( ) (c) O( 3 ) (d) O(3 ) [GATE-1993 : Marks] (b) 1 k ( 1) O() O(1) O() O(3)... O() O O( ) 4. Cosider the followig two fuctios: As. Sol. 3 for 0 10, 000 g () for 10, 000 Which of the followig is true? (a) g 1() is O(g ()) 1 3 for g () for 100 (b) (c) g () is O(g 1 ()) (d) (a) 3 g 1() is O( ) g () is O() [GATE-1994 : Marks] Therefore; 3 for N g 1() O(g ()) Correct optio is (a).
7 Asyptotic Notatio 5. Which of the followig is false? (a) log 100 log O 100 (b) log O(log log ) x y (c) If 0 x y the O( ) (d) O(k) As. (b, d) Sol. (a) We kow that f() = O(g()) i.e., f() k.g() for k, soe positive itegers ad > 0 log 100 log for k = log 100 log = O [GATE-1996 : 1 Mark] (b) log 1 log log log O(log log ) x y (c) as 0 x y x y O( ) (d) k for k O(k) 6. The cocateatio of two lists is to be perfored i O(1) tie. Which of the followig ipleetatios of a list should be used? (a) sigly liked list (b) doubly liked list (c) circular doubly liked list (d) array ipleetatio of list [GATE-1997 : 1 Mark] As. (c) Sol. As list cocateatio requires traversig at least oe list to the ed. So sigly liked list ad doubly liked requires O() tie coplexity whereas circular doubly liked list required O(1) tie. 7. Let f() = log ad g() = (log ) 10 be two positive fuctios of. Which of the followig stateets is correct? (a) f () O(g()) ad g() O(f ()) (b) g() O(f ()) ad f () O(g()) (c) f () O(g()) ad g() O(f ()) (d) f () O(g()) ad g() O(f ()) [GATE-001 : 1 Mark] As. (b) Sol. f () log (log ) 10 g() (log ) Whereas f () log 10 g() O(f ()) O(g()) because 10 log (log )
8 10 Asyptotic Notatio 8. I the worst case, the uber of coparisos eeded to search sigly liked list of legth for a give eleets is (a) log (b) / (c) log 1 (d) [GATE-00 : 1 Mark] As. Sol. (d) Worst case of searchig sigly liked list is whe give eleet does t preset at all i the sigly liked list. Usig liear search the require coparisos i worst case. 9. Cosider the followig fuctios As. log f () 3 g() h()! Which of the followig is true? (a) h() is O(f()) (b) h() is O(g()) (c) g() is ot O(f()) (d) f() is O(g()) [GATE-00 : Marks] (d) log Sol. f () 3, g(), h() =! = O( ) log log b log a g() [a b ] 10. Cosider the followig algorith for searchig for a give uber x i a isorted array A[1...] havig distict values: 1. Choose a i uiforly at rado fro 1...;. If A[i] = x the Stop else Goto 1; Assuig that x is preset o A, What is the expected uber of coparisos ade by the algorith before it teriates? (a) (b) 1 (c) (d) / [GATE-00 : Marks] As. (a) Sol. Let expected uber of coparisos be E. Value of E is su of followig expressio for all the possible cases: Case-I If A[i] is foud i the first attept, Nuber of coparisos = 1 Probability = 1/. Case-II If A[i] if foud i the secod attept, Nuber of coparisos = ( 1) 1 Probability Case-III If A[i] is foud i the third attept, Nuber of coparisos = 3 ( 1) ( 1) 1 Probability There are actually ifiite such cases. So, we have followig ifiite series for E ( 1) ( 1) 1 E (i) After ultiplyig equatio (i) with ( 1), we get ( 1) E......(ii)
9 Asyptotic Notatio Subtractig (ii) fro (i), we get E The expressio o right side is a G.P. with ifiite eleets. a So apply the su forula 1 r 11 E 1 ( 1) 1 E Correct optio is (a). 11. The ruig tie of the followig algorith Procedure A(). If < = retur (1) else retur A As. Sol. best described by (a) O() (b) O(log ) (c) O(log log ) (d) O(1) (c) Recursive relatio for procedure A() is T() T c1if Let T() T( ) T( ) S() T() S() / T T S / T() T c1if S() S c1 O(log ) O(log log ) [ log ] T() S() O(log log ) Correct optio is (c). ; is [GATE-00 : Marks] 1. Cosider the followig three clais 1. ( k) ( ), where k ad are costat. 1 O( ) 3. 1 O( ) Which of these clais are correct? (a) 1 ad (b) 1 ad 3 (c) ad 3 (d) 1, ad 3 [GATE-003 : 1 Mark] As. (a) Sol. Cosider each stateet separately
10 1 I. II. III. f () ( k) so, f () (1 ) f () 1 C C C f () O( ) 1 f () 1 f () f () f () O( ) 1 f () (Assue k = 1 is costat) 1 1 f () f () f () O( ) Therefore I ad II are correct. Asyptotic Notatio 13. Cosider the followig C fuctio. float f (float x, it y) float p, s; it i; for (s = 1, p = 1, i = 1; i < y; i++) p* = x/i; s + = p; retur s; For large values of y, the retur value of the fuctio f best approxiates (a) x y (b) e x (c) l (1 + x) (d) x x [GATE-003 : 1 Mark] As. Sol. (b) The give fuctio f is ot recursive, so cosider the followig iteratio ethod. i p s x p p* s s p i Iitialize p x s 1 x x x p x s 1 x 3 x x x x 3 p s 1 x x x x x x 4 p s 1 x x x x x x x 5 p s 1 x For large value of y assue y the i also teds to ifiite it eas icreet of for loop ay teds to ifiite. I the give fuctio we choose y as a large iteger but ot ifiite. The retur value of the fuctio f is s.
11 Asyptotic Notatio x x x x s 1 x x x x x s 1 x!!3!4!5 s e x 14. The tighest lower boud o the uber of coparisos, i the worst case, for coparisos-based sortig is of the order of (a) (b) (c) log (d) log [GATE-004 : 1 Mark] As. (c) Sol. Ay decisio tree that sorts distict eleets has height at least log. So the tighest lower boud o the uber of copariso based sortig is log but fro starlig s approxiatio. (/e) Takig log both sides log log (/e) log log (/e) log (log log e) log (log 1.44) log log 1.44 So log O( log ) 15. What does the followig algorith approxiate? (Assue > 1, > 0). x = ; y = 1; while (x y > ) x = (x + y)/; y = /x; prit (x); (a) log (b) (c) 1/ (d) 1/3 [GATE-004 : Marks] As. Sol. (c) Let x = = 9. The loop will be teriated whe x y = 0 or x y < 0. Cosider the followig iteratio for x 9, y 1 x y > 0 x ( x y)/, y / x x 5.0, y 9/ x 3.4, y 9/ x 3.0, y 9/ x y = = 0, loop teriated So, = 9 the x = 3 x = () 1/ = (9) 1/ x = 3 So the algorith coputes x = 1/.
12 14 Asyptotic Notatio 16. Let A[1,..., ] be a array storig a bit (1 or 0) at each locatio, ad f() is a fuctio whose tie coplexity is (). Cosider the followig progra fraget writte i a C like laguage: couter = 0; for (i = 1; i < ; i++) if (A[i] = = 1) couter ++; else f (couter); couter = 0; The coplexity of this progra fraget is (a) ( ) (b) ( log ) ad O( ) (c) () (d) O( log ) [GATE-004 : Marks] As. Sol. (c) The give code is 1. Couter = 0;. for (i = 1; i < = ; i++) 3. if (A[i] = = 1) couter ++; 4. else f(couter); couter = 0; 5. The tie coplexity of the progra fraget depeds o the frequecy (Nuber of steps) of lie 3 d 4. I lie 4 the frequecy depeds o the variable couter ad there is o icreet i the couter variable which is iitialize to 0, so f(0) the couter = 0 it eas there is o cell i a array which havig a bit 0, so all cells i the array cotais 1. Cosider the lie 3 if (A[i] = = 1) couter ++; the value of i will be icreases upto so the value of couter will be. Sice is the frequecy of the lie 3 ad the frequecy of lie 4 is 0. So the tie coplexity of lie 3 is O() o average ad f(0) = O(1) is the tie coplexity of lie 4. So the tie coplexity of the progra fraget is axiu of lie 3 ad 4 which is O() o average. 17. The tie coplexity of the followig C fuctio is (assue > 0) it recursive (it ) if ( = = 1) retur (1); else retur (recursive ( 1) + recursive ( 1)); (a) O() (b) O( log ) (c) O( ) (d) O( ) [GATE-004 : Marks] As. Sol. (d) The give C fuctio is recursive. The best way to fid the tie coplexity of recursive fuctio is that covert the code (algorith) ito recursio equatio ad solutio of the recursio equatio is the tie coplexity of give algorith. 1. it recursive (it ). if ( = = 1) retur (1); 3. else 4. retur (recursive ( 1) + recursive ( 1)); 5. Let recursive() = T()
13 Asyptotic Notatio Accordig to lie 4 the recursio equatio is T() = T( 1) + T( 1), > 1. So the coplete recursio equatios is T() = 1, = 1 T() = T( 1) + T( 1), > 1 or T() = T( 1), > 1 T(1) = 1 = T() = T(1).1 = 1 T(3) = T() =. = T(4) = T(3) =. = 3 T() = 1 or T() = 1/ So, T() = O( ) 18. The recurrece equatio T(1) = 1 T() = T( 1) +, evaluates to (a) 1 (b) (c) 1 (d) [GATE-004 : Marks] As. (a) Sol. T(1) = 1 T() = T( 1) + T() = T(1) + =.1 + = 4 T(3) = T() + 3 = = 11 T(4) = T(3) + 4 = = 6 T( 1) = T( ) + = ( 1) So T() = Let f(), g() ad h() be fuctios defied for positive itegers such that f() = O(g(), g()) O(f()), g() = O(h()), ad h() = O(g()). Which oe of the followig stateets is FALSE? (a) f() + g() = O(h()) + h()) (b) f() = O(h()) (c) h() O(f()) (d) f()h() O(g()h()) [GATE-004 : Marks] As. (d) Sol. We ca verify as: f f BUT g f. Therefore, f < g, Also g = h as g = O(h) ad h = O(g). Therefore f < g ad g = h (a) f () g() O(h()) h()) is true. (b) f () O(h()) is true. f g f h h h f h (c) h() O(f ()) is true. (d) f ()h() O(g()h()) is false. h f is correct. f h g h iplies fh O(gh) 0. The tie coplexity of coputig the trasitive closure of a biary relatio o a set of eleets is kow to be (a) O() (b) O( log ) (c) O( 3/ ) (d) O( 3 ) [GATE-005 : 1 Mark] 15
19.1 The dictionary problem
CS125 Lecture 19 Fall 2016 19.1 The dictioary proble Cosider the followig data structural proble, usually called the dictioary proble. We have a set of ites. Each ite is a (key, value pair. Keys are i
More informationRecurrence Relations
Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The
More informationRecursive Algorithms. Recurrences. Recursive Algorithms Analysis
Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects
More informationClassification of problem & problem solving strategies. classification of time complexities (linear, logarithmic etc)
Classificatio of problem & problem solvig strategies classificatio of time complexities (liear, arithmic etc) Problem subdivisio Divide ad Coquer strategy. Asymptotic otatios, lower boud ad upper boud:
More informationName Period ALGEBRA II Chapter 1B and 2A Notes Solving Inequalities and Absolute Value / Numbers and Functions
Nae Period ALGEBRA II Chapter B ad A Notes Solvig Iequalities ad Absolute Value / Nubers ad Fuctios SECTION.6 Itroductio to Solvig Equatios Objectives: Write ad solve a liear equatio i oe variable. Solve
More information(s)h(s) = K( s + 8 ) = 5 and one finite zero is located at z 1
ROOT LOCUS TECHNIQUE 93 should be desiged differetly to eet differet specificatios depedig o its area of applicatio. We have observed i Sectio 6.4 of Chapter 6, how the variatio of a sigle paraeter like
More informationBinomial transform of products
Jauary 02 207 Bioial trasfor of products Khristo N Boyadzhiev Departet of Matheatics ad Statistics Ohio Norther Uiversity Ada OH 4580 USA -boyadzhiev@ouedu Abstract Give the bioial trasfors { b } ad {
More informationChapter 22 Developing Efficient Algorithms
Chapter Developig Efficiet Algorithms 1 Executig Time Suppose two algorithms perform the same task such as search (liear search vs. biary search). Which oe is better? Oe possible approach to aswer this
More informationMathematical Preliminaries
Matheatical Preliiaries I this chapter we ll review soe atheatical cocepts that will be used throughout this course. We ll also lear soe ew atheatical otatios ad techiques that are iportat for aalysis
More informationModel of Computation and Runtime Analysis
Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map
More informationCS / MCS 401 Homework 3 grader solutions
CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of
More informationCOMP 2804 Solutions Assignment 1
COMP 2804 Solutios Assiget 1 Questio 1: O the first page of your assiget, write your ae ad studet uber Solutio: Nae: Jaes Bod Studet uber: 007 Questio 2: I Tic-Tac-Toe, we are give a 3 3 grid, cosistig
More informationModel of Computation and Runtime Analysis
Model of Computatio ad Rutime Aalysis Model of Computatio Model of Computatio Specifies Set of operatios Cost of operatios (ot ecessarily time) Examples Turig Machie Radom Access Machie (RAM) PRAM Map
More informationBertrand s postulate Chapter 2
Bertrad s postulate Chapter We have see that the sequece of prie ubers, 3, 5, 7,... is ifiite. To see that the size of its gaps is ot bouded, let N := 3 5 p deote the product of all prie ubers that are
More informationAdvanced Course of Algorithm Design and Analysis
Differet complexity measures Advaced Course of Algorithm Desig ad Aalysis Asymptotic complexity Big-Oh otatio Properties of O otatio Aalysis of simple algorithms A algorithm may may have differet executio
More informationDefine a Markov chain on {1,..., 6} with transition probability matrix P =
Pla Group Work 0. The title says it all Next Tie: MCMC ad Geeral-state Markov Chais Midter Exa: Tuesday 8 March i class Hoework 4 due Thursday Uless otherwise oted, let X be a irreducible, aperiodic Markov
More informationJacobi symbols. p 1. Note: The Jacobi symbol does not necessarily distinguish between quadratic residues and nonresidues. That is, we could have ( a
Jacobi sybols efiitio Let be a odd positive iteger If 1, the Jacobi sybol : Z C is the costat fuctio 1 1 If > 1, it has a decopositio ( as ) a product of (ot ecessarily distict) pries p 1 p r The Jacobi
More informationSummer MA Lesson 13 Section 1.6, Section 1.7 (part 1)
Suer MA 1500 Lesso 1 Sectio 1.6, Sectio 1.7 (part 1) I Solvig Polyoial Equatios Liear equatio ad quadratic equatios of 1 variable are specific types of polyoial equatios. Soe polyoial equatios of a higher
More information1 (12 points) Red-Black trees and Red-Purple trees
CS6 Hoework 3 Due: 29 April 206, 2 oo Subit o Gradescope Haded out: 22 April 206 Istructios: Please aswer the followig questios to the best of your ability. If you are asked to desig a algorith, please
More informationStatistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting
Statistics ad Data Aalysis i MATLAB Kedrick Kay, kedrick.kay@wustl.edu February 28, 2014 Lecture 4: Model fittig 1. The basics - Suppose that we have a set of data ad suppose that we have selected the
More informationCS 270 Algorithms. Oliver Kullmann. Growth of Functions. Divide-and- Conquer Min-Max- Problem. Tutorial. Reading from CLRS for week 2
Geeral remarks Week 2 1 Divide ad First we cosider a importat tool for the aalysis of algorithms: Big-Oh. The we itroduce a importat algorithmic paradigm:. We coclude by presetig ad aalysig two examples.
More informationECE 901 Lecture 4: Estimation of Lipschitz smooth functions
ECE 9 Lecture 4: Estiatio of Lipschitz sooth fuctios R. Nowak 5/7/29 Cosider the followig settig. Let Y f (X) + W, where X is a rado variable (r.v.) o X [, ], W is a r.v. o Y R, idepedet of X ad satisfyig
More informationCS583 Lecture 02. Jana Kosecka. some materials here are based on E. Demaine, D. Luebke slides
CS583 Lecture 02 Jaa Kosecka some materials here are based o E. Demaie, D. Luebke slides Previously Sample algorithms Exact ruig time, pseudo-code Approximate ruig time Worst case aalysis Best case aalysis
More informationData Structures and Algorithm. Xiaoqing Zheng
Data Structures ad Algorithm Xiaoqig Zheg zhegxq@fudaeduc What are algorithms? A sequece of computatioal steps that trasform the iput ito the output Sortig problem: Iput: A sequece of umbers
More informationCSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture)
CSI 101 Discrete Structures Witer 01 Prof. Lucia Moura Uiversity of Ottawa Homework Assigmet #4 (100 poits, weight %) Due: Thursday, April, at 1:00pm (i lecture) Program verificatio, Recurrece Relatios
More information4.3 Growth Rates of Solutions to Recurrences
4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.
More informationProblem. Consider the sequence a j for j N defined by the recurrence a j+1 = 2a j + j for j > 0
GENERATING FUNCTIONS Give a ifiite sequece a 0,a,a,, its ordiary geeratig fuctio is A : a Geeratig fuctios are ofte useful for fidig a closed forula for the eleets of a sequece, fidig a recurrece forula,
More informationMa/CS 6a Class 22: Power Series
Ma/CS 6a Class 22: Power Series By Ada Sheffer Power Series Mooial: ax i. Polyoial: a 0 + a 1 x + a 2 x 2 + + a x. Power series: A x = a 0 + a 1 x + a 2 x 2 + Also called foral power series, because we
More informationAlgorithm Analysis. Chapter 3
Data Structures Dr Ahmed Rafat Abas Computer Sciece Dept, Faculty of Computer ad Iformatio, Zagazig Uiversity arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Algorithm Aalysis Chapter 3 3. Itroductio
More informationx !1! + 1!2!
4 Euler-Maclauri Suatio Forula 4. Beroulli Nuber & Beroulli Polyoial 4.. Defiitio of Beroulli Nuber Beroulli ubers B (,,3,) are defied as coefficiets of the followig equatio. x e x - B x! 4.. Expreesio
More informationInfinite Sequences and Series
Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet
More informationAnswer Key, Problem Set 1, Written
Cheistry 1 Mies, Sprig, 018 Aswer Key, Proble Set 1, Writte 1. 14.3;. 14.34 (add part (e): Estiate / calculate the iitial rate of the reactio); 3. NT1; 4. NT; 5. 14.37; 6. 14.39; 7. 14.41; 8. NT3; 9. 14.46;
More information5.6 Binomial Multi-section Matching Transformer
4/14/21 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-25 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.
More informationA recurrence equation is just a recursive function definition. It defines a function at one input in terms of its value on smaller inputs.
CS23 Algorithms Hadout #6 Prof Ly Turbak September 8, 200 Wellesley College RECURRENCES This hadout summarizes highlights of CLRS Chapter 4 ad Appedix A (CLR Chapters 3 & 4) Two-Step Strategy for Aalyzig
More information10.1 Sequences. n term. We will deal a. a n or a n n. ( 1) n ( 1) n 1 2 ( 1) a =, 0 0,,,,, ln n. n an 2. n term.
0. Sequeces A sequece is a list of umbers writte i a defiite order: a, a,, a, a is called the first term, a is the secod term, ad i geeral eclusively with ifiite sequeces ad so each term Notatio: the sequece
More informationMathematical Foundation. CSE 6331 Algorithms Steve Lai
Mathematical Foudatio CSE 6331 Algorithms Steve Lai Complexity of Algorithms Aalysis of algorithm: to predict the ruig time required by a algorithm. Elemetary operatios: arithmetic & boolea operatios:
More informationCS 70 Second Midterm 7 April NAME (1 pt): SID (1 pt): TA (1 pt): Name of Neighbor to your left (1 pt): Name of Neighbor to your right (1 pt):
CS 70 Secod Midter 7 April 2011 NAME (1 pt): SID (1 pt): TA (1 pt): Nae of Neighbor to your left (1 pt): Nae of Neighbor to your right (1 pt): Istructios: This is a closed book, closed calculator, closed
More informationis also known as the general term of the sequence
Lesso : Sequeces ad Series Outlie Objectives: I ca determie whether a sequece has a patter. I ca determie whether a sequece ca be geeralized to fid a formula for the geeral term i the sequece. I ca determie
More informationComplete Solutions to Supplementary Exercises on Infinite Series
Coplete Solutios to Suppleetary Eercises o Ifiite Series. (a) We eed to fid the su ito partial fractios gives By the cover up rule we have Therefore Let S S A / ad A B B. Covertig the suad / the by usig
More informationGenerating Functions and Their Applications
Geeratig Fuctios ad Their Applicatios Agustius Peter Sahaggau MIT Matheatics Departet Class of 2007 18.104 Ter Paper Fall 2006 Abstract. Geeratig fuctios have useful applicatios i ay fields of study. I
More informationFormula List for College Algebra Sullivan 10 th ed. DO NOT WRITE ON THIS COPY.
Forula List for College Algera Sulliva 10 th ed. DO NOT WRITE ON THIS COPY. Itercepts: Lear how to fid the x ad y itercepts. Syetry: Lear how test for syetry with respect to the x-axis, y-axis ad origi.
More information42 Dependence and Bases
42 Depedece ad Bases The spa s(a) of a subset A i vector space V is a subspace of V. This spa ay be the whole vector space V (we say the A spas V). I this paragraph we study subsets A of V which spa V
More informationCOMP26120: More on the Complexity of Recursive Programs (2018/19) Lucas Cordeiro
COMP26120: More o the Complexity of Recursive Programs (2018/19) Lucas Cordeiro lucas.cordeiro@machester.ac.uk Divide-ad-Coquer (Recurrece) Textbook: Algorithm Desig ad Applicatios, Goodrich, Michael T.
More informationLecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data
Lecture 9 Curve fittig I Itroductio Suppose we are preseted with eight poits of easured data (x i, y j ). As show i Fig. o the left, we could represet the uderlyig fuctio of which these data are saples
More informationCS:3330 (Prof. Pemmaraju ): Assignment #1 Solutions. (b) For n = 3, we will have 3 men and 3 women with preferences as follows: m 1 : w 3 > w 1 > w 2
Shiyao Wag CS:3330 (Prof. Pemmaraju ): Assigmet #1 Solutios Problem 1 (a) Cosider iput with me m 1, m,..., m ad wome w 1, w,..., w with the followig prefereces: All me have the same prefereces for wome:
More informationA PROBABILITY PROBLEM
A PROBABILITY PROBLEM A big superarket chai has the followig policy: For every Euros you sped per buy, you ear oe poit (suppose, e.g., that = 3; i this case, if you sped 8.45 Euros, you get two poits,
More informationThis Lecture. Divide and Conquer. Merge Sort: Algorithm. Merge Sort Algorithm. MergeSort (Example) - 1. MergeSort (Example) - 2
This Lecture Divide-ad-coquer techique for algorithm desig. Example the merge sort. Writig ad solvig recurreces Divide ad Coquer Divide-ad-coquer method for algorithm desig: Divide: If the iput size is
More informationDivide & Conquer. Divide-and-conquer algorithms. Conventional product of polynomials. Conventional product of polynomials.
Divide-ad-coquer algorithms Divide & Coquer Strategy: Divide the problem ito smaller subproblems of the same type of problem Solve the subproblems recursively Combie the aswers to solve the origial problem
More informationOPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES
OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES Peter M. Maurer Why Hashig is θ(). As i biary search, hashig assumes that keys are stored i a array which is idexed by a iteger. However, hashig attempts to bypass
More informationDesign and Analysis of Algorithms
Desig ad Aalysis of Algorithms Probabilistic aalysis ad Radomized algorithms Referece: CLRS Chapter 5 Topics: Hirig problem Idicatio radom variables Radomized algorithms Huo Hogwei 1 The hirig problem
More informationAlgorithm Analysis. Algorithms that are equally correct can vary in their utilization of computational resources
Algorithm Aalysis Algorithms that are equally correct ca vary i their utilizatio of computatioal resources time ad memory a slow program it is likely ot to be used a program that demads too much memory
More informationREVIEW OF CALCULUS Herman J. Bierens Pennsylvania State University (January 28, 2004) x 2., or x 1. x j. ' ' n i'1 x i well.,y 2
REVIEW OF CALCULUS Hera J. Bieres Pesylvaia State Uiversity (Jauary 28, 2004) 1. Suatio Let x 1,x 2,...,x e a sequece of uers. The su of these uers is usually deoted y x 1 % x 2 %...% x ' j x j, or x 1
More informationEvaluation of Bessel Functions Using a Computer Program
Evaluatio of Bessel Fuctios Usig a Coputer Progra P. S. Yeh, Ph.D. Abstract I cylidrical coordiate, there are two types of Bessel fuctios. These fuctios are the Bessel fuctio ad the odified Bessel fuctio.
More informationThe Binomial Multi- Section Transformer
4/4/26 The Bioial Multisectio Matchig Trasforer /2 The Bioial Multi- Sectio Trasforer Recall that a ulti-sectio atchig etwork ca be described usig the theory of sall reflectios as: where: ( ω ) = + e +
More informationOn the Fibonacci-like Sequences of Higher Order
Article Iteratioal Joural of oder atheatical Scieces, 05, 3(): 5-59 Iteratioal Joural of oder atheatical Scieces Joural hoepage: wwwoderscietificpressco/jourals/ijsaspx O the Fiboacci-like Sequeces of
More informationThe Binomial Multi-Section Transformer
4/15/2010 The Bioial Multisectio Matchig Trasforer preset.doc 1/24 The Bioial Multi-Sectio Trasforer Recall that a ulti-sectio atchig etwork ca be described usig the theory of sall reflectios as: where:
More informationOn an Algorithm for Isomorphism-Free Generations of Combinatorial Objects
O a Algorith for Isoorphis-Free Geeratios of Cobiatorial Objects Krasiir Yordzhev Faculty of Matheatics ad Natural Scieces South-West Uiversity, Blagoevgrad, Bulgaria yordzhev@swubg Abstract: I the wor
More informationDepartment of Informatics Prof. Dr. Michael Böhlen Binzmühlestrasse Zurich Phone:
Departmet of Iformatics Prof. Dr. Michael Böhle Bizmühlestrasse 14 8050 Zurich Phoe: +41 44 635 4333 Email: boehle@ifi.uzh.ch Iformatik II Midterm1 Sprig 018 3.03.018 Advice You have 90 miutes to complete
More informationq-fibonacci polynomials and q-catalan numbers Johann Cigler [ ] (4) I don t know who has observed this well-known fact for the first time.
-Fiboacci polyoials ad -Catala ubers Joha Cigler The Fiboacci polyoials satisfy the recurrece F ( x s) = s x = () F ( x s) = xf ( x s) + sf ( x s) () with iitial values F ( x s ) = ad F( x s ) = These
More informationINMO-2018 problems and solutions
Pioeer Educatio The Best Way To Success INMO-018 proles ad solutios NTSE Olypiad AIPMT JEE - Mais & Advaced 1. Let ABC e a o-equilateral triagle with iteger sides. Let D ad E e respectively the id-poits
More informationAnalysis of Algorithms. Introduction. Contents
Itroductio The focus of this module is mathematical aspects of algorithms. Our mai focus is aalysis of algorithms, which meas evaluatig efficiecy of algorithms by aalytical ad mathematical methods. We
More informationCIS 121 Data Structures and Algorithms with Java Spring Code Snippets and Recurrences Monday, February 4/Tuesday, February 5
CIS 11 Data Structures ad Algorithms with Java Sprig 019 Code Sippets ad Recurreces Moday, February 4/Tuesday, February 5 Learig Goals Practice provig asymptotic bouds with code sippets Practice solvig
More informationThe Hypergeometric Coupon Collection Problem and its Dual
Joural of Idustrial ad Systes Egieerig Vol., o., pp -7 Sprig 7 The Hypergeoetric Coupo Collectio Proble ad its Dual Sheldo M. Ross Epstei Departet of Idustrial ad Systes Egieerig, Uiversity of Souther
More informationWe have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers,
Cofidece Itervals III What we kow so far: We have see how to set cofidece itervals for the ea, or expected value, of a oral probability distributio, both whe the variace is kow (usig the stadard oral,
More informationCHAPTER 1 SEQUENCES AND INFINITE SERIES
CHAPTER SEQUENCES AND INFINITE SERIES SEQUENCES AND INFINITE SERIES (0 meetigs) Sequeces ad limit of a sequece Mootoic ad bouded sequece Ifiite series of costat terms Ifiite series of positive terms Alteratig
More informationChapter 9 Computation of the Discrete. Fourier Transform
Chapter 9 Coputatio of the Discrete Fourier Trasfor Itroductio Efficiet Coputatio of the Discrete Fourier Trasfor Goertzel Algorith Deciatio-I-Tie FFT Algoriths Deciatio-I-Frequecy FFT Algoriths Ipleetatio
More informationProblems with Solutions in the Analysis of Algorithms. Minko Markov
Problems with Solutios i the Aalysis of Algorithms Miko Markov Draft date November 13, 014 Copyright c 010 014 Miko Markov All rights reserved. Maple is a trademark of Waterloo Maple Ic. Cotets I Backgroud
More informationAutomated Proofs for Some Stirling Number Identities
Autoated Proofs for Soe Stirlig Nuber Idetities Mauel Kauers ad Carste Scheider Research Istitute for Sybolic Coputatio Johaes Kepler Uiversity Altebergerstraße 69 A4040 Liz, Austria Subitted: Sep 1, 2007;
More informationAcoustic Field inside a Rigid Cylinder with a Point Source
Acoustic Field iside a Rigid Cylider with a Poit Source 1 Itroductio The ai objectives of this Deo Model are to Deostrate the ability of Coustyx to odel a rigid cylider with a poit source usig Coustyx
More informationSEQUENCE AND SERIES NCERT
9. Overview By a sequece, we mea a arragemet of umbers i a defiite order accordig to some rule. We deote the terms of a sequece by a, a,..., etc., the subscript deotes the positio of the term. I view of
More informationSums, products and sequences
Sums, products ad sequeces How to write log sums, e.g., 1+2+ (-1)+ cocisely? i=1 Sum otatio ( sum from 1 to ): i 3 = 1 + 2 + + If =3, i=1 i = 1+2+3=6. The ame ii does ot matter. Could use aother letter
More informationECE Spring Prof. David R. Jackson ECE Dept. Notes 20
ECE 6341 Sprig 016 Prof. David R. Jackso ECE Dept. Notes 0 1 Spherical Wave Fuctios Cosider solvig ψ + k ψ = 0 i spherical coordiates z φ θ r y x Spherical Wave Fuctios (cot.) I spherical coordiates we
More informationCHAPTER 10 INFINITE SEQUENCES AND SERIES
CHAPTER 10 INFINITE SEQUENCES AND SERIES 10.1 Sequeces 10.2 Ifiite Series 10.3 The Itegral Tests 10.4 Compariso Tests 10.5 The Ratio ad Root Tests 10.6 Alteratig Series: Absolute ad Coditioal Covergece
More informationSorting Algorithms. Algorithms Kyuseok Shim SoEECS, SNU.
Sortig Algorithms Algorithms Kyuseo Shim SoEECS, SNU. Desigig Algorithms Icremetal approaches Divide-ad-Coquer approaches Dyamic programmig approaches Greedy approaches Radomized approaches You are ot
More informationOn Modeling On Minimum Description Length Modeling. M-closed
O Modelig O Miiu Descriptio Legth Modelig M M-closed M-ope Do you believe that the data geeratig echais really is i your odel class M? 7 73 Miiu Descriptio Legth Priciple o-m-closed predictive iferece
More informationBernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes
Beroulli Polyoials Tals give at LSBU, October ad Noveber 5 Toy Forbes Beroulli Polyoials The Beroulli polyoials B (x) are defied by B (x), Thus B (x) B (x) ad B (x) x, B (x) x x + 6, B (x) dx,. () B 3
More informationTopic 1 2: Sequences and Series. A sequence is an ordered list of numbers, e.g. 1, 2, 4, 8, 16, or
Topic : Sequeces ad Series A sequece is a ordered list of umbers, e.g.,,, 8, 6, or,,,.... A series is a sum of the terms of a sequece, e.g. + + + 8 + 6 + or... Sigma Notatio b The otatio f ( k) is shorthad
More informationECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations
ECE-S352 Itroductio to Digital Sigal Processig Lecture 3A Direct Solutio of Differece Equatios Discrete Time Systems Described by Differece Equatios Uit impulse (sample) respose h() of a DT system allows
More informationMA541 : Real Analysis. Tutorial and Practice Problems - 1 Hints and Solutions
MA54 : Real Aalysis Tutorial ad Practice Problems - Hits ad Solutios. Suppose that S is a oempty subset of real umbers that is bouded (i.e. bouded above as well as below). Prove that if S sup S. What ca
More informationQueueing Theory II. Summary. M/M/1 Output process Networks of Queue Method of Stages. General Distributions
Queueig Theory II Suary M/M/1 Output process Networks of Queue Method of Stages Erlag Distributio Hyperexpoetial Distributio Geeral Distributios Ebedded Markov Chais 1 M/M/1 Output Process Burke s Theore:
More informationarxiv: v1 [math.nt] 26 Feb 2014
FROBENIUS NUMBERS OF PYTHAGOREAN TRIPLES BYUNG KEON GIL, JI-WOO HAN, TAE HYUN KIM, RYUN HAN KOO, BON WOO LEE, JAEHOON LEE, KYEONG SIK NAM, HYEON WOO PARK, AND POO-SUNG PARK arxiv:1402.6440v1 [ath.nt] 26
More informationSEQUENCES AND SERIES
9 SEQUENCES AND SERIES INTRODUCTION Sequeces have may importat applicatios i several spheres of huma activities Whe a collectio of objects is arraged i a defiite order such that it has a idetified first
More informationStatistics for Applications Fall Problem Set 7
18.650. Statistics for Applicatios Fall 016. Proble Set 7 Due Friday, Oct. 8 at 1 oo Proble 1 QQ-plots Recall that the Laplace distributio with paraeter λ > 0 is the cotiuous probaλ bility easure with
More informationMath 155 (Lecture 3)
Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,
More informationAlgorithms and Data Structures Lecture IV
Algorithms ad Data Structures Lecture IV Simoas Šalteis Aalborg Uiversity simas@cs.auc.dk September 5, 00 1 This Lecture Aalyzig the ruig time of recursive algorithms (such as divide-ad-coquer) Writig
More information5.6 Binomial Multi-section Matching Transformer
4/14/2010 5_6 Bioial Multisectio Matchig Trasforers 1/1 5.6 Bioial Multi-sectio Matchig Trasforer Readig Assiget: pp. 246-250 Oe way to axiize badwidth is to costruct a ultisectio Γ f that is axially flat.
More informationLINEAR RECURSION RELATIONS - LESSON FOUR SECOND-ORDER LINEAR RECURSION RELATIONS
LINEAR RECURSION RELATIONS - LESSON FOUR SECOND-ORDER LINEAR RECURSION RELATIONS BROTHER ALFRED BROUSSEAU St. Mary's College, Califoria Give a secod-order liear recursio relatio (.1) T. 1 = a T + b T 1,
More informationCS161: Algorithm Design and Analysis Handout #10 Stanford University Wednesday, 10 February 2016
CS161: Algorithm Desig ad Aalysis Hadout #10 Staford Uiversity Wedesday, 10 February 2016 Lecture #11: Wedesday, 10 February 2016 Topics: Example midterm problems ad solutios from a log time ago Sprig
More informationA Tabu Search Method for Finding Minimal Multi-Homogeneous Bézout Number
Joural of Matheatics ad Statistics 6 (): 105-109, 010 ISSN 1549-3644 010 Sciece Publicatios A Tabu Search Method for Fidig Miial Multi-Hoogeeous Bézout Nuber Hassa M.S. Bawazir ad Ali Abd Raha Departet
More informationMath 475, Problem Set #12: Answers
Math 475, Problem Set #12: Aswers A. Chapter 8, problem 12, parts (b) ad (d). (b) S # (, 2) = 2 2, sice, from amog the 2 ways of puttig elemets ito 2 distiguishable boxes, exactly 2 of them result i oe
More information) n. ALG 1.3 Deterministic Selection and Sorting: Problem P size n. Examples: 1st lecture's mult M(n) = 3 M ( È
Algorithms Professor Joh Reif ALG 1.3 Determiistic Selectio ad Sortig: (a) Selectio Algorithms ad Lower Bouds (b) Sortig Algorithms ad Lower Bouds Problem P size fi divide ito subproblems size 1,..., k
More informationw (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.
2 5. Weighted umber of late jobs 5.1. Release dates ad due dates: maximimizig the weight of o-time jobs Oce we add release dates, miimizig the umber of late jobs becomes a sigificatly harder problem. For
More informationLP in Standard and Slack Forms
LP i Stadard ad Slack Fors ax j=1 s.t. j=1 c j a ij b i for i=1, 2,..., 0 for j=1, 2,..., z = 0 j=1 c j x i = b i j=1 a ij for i=1, 2,..., Auxiliary Liear Progra L: LP i stadard for: ax j=1 L aux : Auxiliary
More informationA PROOF OF THE THUE-SIEGEL THEOREM ABOUT THE APPROXIMATION OF ALGEBRAIC NUMBERS FOR BINOMIAL EQUATIONS
A PROO O THE THUE-SIEGEL THEOREM ABOUT THE APPROXIMATION O ALGEBRAIC NUMBERS OR BINOMIAL EQUATIONS KURT MAHLER, TRANSLATED BY KARL LEVY I 98 Thue () showed that algebraic ubers of the special for = p a
More informationDiscrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009
Discrete Matheatics: Lectures 8 ad 9 Priciple of Iclusio ad Exclusio Istructor: Arijit Bishu Date: August ad 3, 009 As you ca observe by ow, we ca cout i various ways. Oe such ethod is the age-old priciple
More information) is a square matrix with the property that for any m n matrix A, the product AI equals A. The identity matrix has a ii
square atrix is oe that has the sae uber of rows as colus; that is, a atrix. he idetity atrix (deoted by I, I, or [] I ) is a square atrix with the property that for ay atrix, the product I equals. he
More informationCSE 4095/5095 Topics in Big Data Analytics Spring 2017; Homework 1 Solutions
CSE 09/09 Topics i ig Data Aalytics Sprig 2017; Homework 1 Solutios Note: Solutios to problems,, ad 6 are due to Marius Nicolae. 1. Cosider the followig algorithm: for i := 1 to α log e do Pick a radom
More informationX. Perturbation Theory
X. Perturbatio Theory I perturbatio theory, oe deals with a ailtoia that is coposed Ĥ that is typically exactly solvable of two pieces: a referece part ad a perturbatio ( Ĥ ) that is assued to be sall.
More informationPerturbation Theory, Zeeman Effect, Stark Effect
Chapter 8 Perturbatio Theory, Zeea Effect, Stark Effect Ufortuately, apart fro a few siple exaples, the Schrödiger equatio is geerally ot exactly solvable ad we therefore have to rely upo approxiative
More informationRandomly Generated Triangles whose Vertices are Vertices of a Regular Polygon
Radoly Geerated Triagles whose Vertices are Vertices of a Regular Polygo Aa Madras Drury Uiversity Shova KC Hope College Jauary, 6 Abstract We geerate triagles radoly by uiforly choosig a subset of three
More information