Advanced Course of Algorithm Design and Analysis
|
|
- Gabriel Brown
- 5 years ago
- Views:
Transcription
1 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 time depedig o the iput data eve if the amout of data is the same Worst case complexity W() Average case complexity A() Best case complexity B() Uavoidable complexity T() 5 ms 4 ms 3 ms 2 ms 1 ms worst-case average-case? best-case 1/30 A B C D E F G Iput 2/30 Differet complexity measures Usually we talk about the worst-case complexity It may be more difficult to fid the average case complexity because we must assume some statistical properties about the iput ad do the aalysis how this affects the average complexity of the algorithm. It is importat to kow the worst case complexity of the software i the safety-critical applicatios where the good performace i average is ot eough. Sometimes it is importat to estimate the space complexity - how much memory (storage) is eeded Measurig the complexity How to measure the ruig time of a algorithm? We ca do experimets write a program implemetig the algorithm ru it o data of differet size ad with differet properties measure the time of executio. (eg. System.curretTimeMillis() i Java) t (ms) / /30 Shortcomigs of the experimetal complexity To aalyse the complexity of a algorithm, we have to implemet a program ad ru it. compariso ca be doe oly o the fixed software/hardware eviromet It is possible to experimet with oly a fiite umber of iputs ad this may ot represet the behaviour o all possible iput datasets. Geeral methodology We will look at some geeral methodology, which uses the abstract represetatio of a algorithm take accout of all possible iputs does ot deped o software/hardware eviromet 5/30 6/30 1
2 Complexity of algorithms Complexity of a algorithm is a fuctio C() of depedece betwee umber of operatios ad size of iput It is ot clear how to defie a operatio geerally somethig doe i hardware i some costat (ited) time arithmetical operatio, assigmet, compariso operatio umber of lies Iput size ca be defied differetly amout of iput data (array, file, database) value of iput parameter size of iput parameter (umber of bits/bytes) Asymptotical complexity Goal: simplify aalysis to discard the uimportat details (aalogous to roudig 1,000,001 1,000,000) We wat to say F() - 2 F() We will use big-o otatio 3 2 o O( 2 ) 3 F() - 2 o O(F()) 4687 o O() 1,76*10 25 o O(1) 7/30 8/30 Asymptotical complexity Asymptotical complexity There are costats c ad N, so that for fuctios f() ad g() holds: f() c g(), if N c g() = 4 f() = o the other side 2 is ot O() because there is o costats c ad N, so that: 2 c, if N coclusio: 2+6 is O(). g() = (We ca choose arbitrary c, but there is some, so that 2 >c ). 9/30 10/30 Big Oh otatio Eables you to talk about the complexity of the algorithms i rough terms Tool to compare the complexity of algorithms Basis for complexity classes time() = 3 F() - 2 time() = 2 time() = 4687 time() = 1,76*10 25 is O(F()) is O() is O() is O(1) Formally: A Geeral Portable Performace Metric O( g() ) is the set of fuctios, f, such that f() < c g() for some costat, c > 0, ad > N Alteratively, we may write ad say f() g() c ie for sufficietly large g is a upper boud for f 11/30 12/30 2
3 A Geeral Portable Performace Metric O( g ) - the set of fuctios that grow o faster tha g. A Geeral Portable Performace Metric O( g ) - the set of fuctios that grow o faster tha g. Two additioal otatios Ω( g ) - the set of fuctios, f, such that f() > c g() for some costat, c, ad > N g is a lower boud for f f() g() c 13/30 14/30 A Geeral Portable Performace Metric O( g ) - the set of fuctios that grow o faster tha g. Two additioal otatios Ω( g ) - the set of fuctios, f, such that f() > c g() for some costat, c, ad > N Θ( g ) = O( g ) Ω( g ) g is a lower boud for f Set of fuctios growig at the same rate as g 15/30 16/30 A Geeral Portable Performace Metric O( g ) - Big-O the set of fuctios that grow o faster tha g. o( g ) - little-o the set of fuctios f that grow slower tha g. f() = 0 g() ω( g ) - little-omega the set of fuctios f that grow faster tha g. f() = g() Properties of the O otatio Costat factors may be igored k > 0, kf is O( f) Higher powers grow faster r is O( s ) if 0 r s Fastest growig term domiates a sum If f is O(g), the f + g is O(g) eg a 4 + b 3 is O( 4 ) Polyomial s growth rate is determied by leadig term If f is a polyomial of degree d, the f is O( d ) If f o( g ) or f ω( g ) the f Θ( g ) 17/30 18/30 3
4 Properties of the O otatio Properties of the O otatio f is O(g) is trasitive If f is O(g) ad g is O(h) the f is O(h) Product of upper bouds is upper boud for the product If f is O(g) ad h is O(r) the fh is O(gr) Expoetial fuctios grow faster tha powers k is O( b ) b > 1 ad k 0 eg 20 is O( 1.05 ) Logarithms grow more slowly tha powers log b is O( k ) b > 1 ad k > 0 eg log 2 is O( 0.5 ) Importat! All logarithms grow at the same rate log b is O(log d ) b, d > 1 19/30 20/30 Properties of the O otatio All logarithms grow at the same rate log b is O(log d ) b, d > 1 Sum of first r th powers grows as the (r+1) th power Σ k r k=1 is Θ ( r+1 ) eg Σ i = (+1) is Θ ( 2 ) k=1 2 Summary Ο, Ω, Θ Ο, Ω, Θ, o, ω are the sets of fuctios O upper boud of the set Ω lower boud of the set Θ exact complexity class o, ω O\Θ, Ω\Θ O is ofte used whe Θ is cosidered Abstracts away a costat factor ad lower rak members O( ) = O( 3 ) Iclusio relatio of the commo complexity classes O(log ) O() O( 2 ) O( k ) O(k ) O(!) O( ) 21/30 22/30 Polyomial ad Itractable Algorithms Polyomial Time complexity A algorithm is said to be polyomial if it is O( d ) for some iteger d Polyomial algorithms are said to be efficiet They solve problems i reasoable times! Itractable algorithms Algorithms for which there is o kow polyomial time algorithm We will come back to this importat class later i the course Aalysig a Algorithm Simple statemet sequece s 1 ; s 2 ;. ; s k O(1) as log as k is costat Simple loops for(i=0;i<;i++) { s; where s is O(1) Time complexity is O(1) or O() Nested loops for(i=0;i<;i++) for(j=0;j<;j++) { s; Complexity is O() or O( 2 ) This part is O() 23/30 24/30 4
5 Aalysig a Algorithm Loop idex does t vary liearly h = 1; while ( h <= ) { s; h = 2 * h; h takes values 1, 2, 4, util it exceeds There are 1 + log 2 iteratios Complexity O(log ) Aalysig a Algorithm Loop idex depeds o outer loop idex for(j=0;j<;j++) for(k=0;k<j;k++){ s; Ier loop executed 1, 2, 3,., times Complexity O( 2 ) Σ i = i=1 (+1) 2 Distiguish this case - where the iteratio cout icreases (decreases) by a costat O( k ) from the previous oe - where it chages by a factor O(log ) 25/30 26/30 Aalysis of programs Sequetial (liear) search Worst-case complexity W() = Best-case complexity B() = 1 Average-case complexity A() = ( + 1) / 2 If x is i the list A() = (p/) (+1)/2 + (1-p) If x is i the list with probability p No every-case complexity sequetial search(list L,item x) { for (each item y i the list) if (y matches x) retur y retur o match 27/30 28/30 Bubble (exchage) sort Some mathematical otatios Every-case complexity T() = (-1)/2 O( 2 ) If there is a every-case complexity the it is equal to worst, best, ad average-case complexity This sortig algorithm is simple but ueffective for (i=0; i<-1; i++) { for (j=0; j<-1-i; j++) /*compare eighbors*/ if (a[j+1] < a[j]) { /*swap a[j]. a[j+1]*/ tmp = a[j]; a[j] = a[j+1]; a[j+1] = tmp; x floor of x 7/2 = 3 x ceilig of x 7/2 = 4 sum i = i=1 29/30 30/30 5
6 Logarithms A commo logarithm of a umber x is the power to which 10 must be raised to produce the umber A logarithm of a umber x is the power to which the base a must be raised to produce the umber log 10 = = 10 log 1000 = = 1000 log 0.01 = = 0.01 log 1 = = 1 Properties of logarithms log 1 = 0 a log x = x log(xy) = log x + log y log x/y = log x - log y log x y = y log x y log x = x log y log a x = log b x / log b a log 2 8 = = 8 log lg x log 2 x l x log e x (e ) 31/30 32/30 Home Assigmets Home assigmets at the course web page! Solve the exercises ad ad submit the solutios at the ext exercise lesso (ext week), Get the textbook from the library if you do t have oe. We will discuss the solutios i the exercise lesso. Write the programs of Fiboacci umbers! 33/30 6
Algorithm 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 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 informationDesign and Analysis of ALGORITHM (Topic 2)
DR. Gatot F. Hertoo, MSc. Desig ad Aalysis of ALGORITHM (Topic 2) Algorithms + Data Structures = Programs Lessos Leared 1 Our Machie Model: Assumptios Geeric Radom Access Machie (RAM) Executes operatios
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 informationCS161 Design and Analysis of Algorithms. Administrative
CS161 Desig ad Aalysis of Algorithms Da Boeh 1 Admiistrative Lecture 1, April 3, 1 Web page http://theory.staford.edu/~dabo/cs161» Hadouts» Aoucemets» Late breakig ews Gradig ad course requiremets» Midterm/fial/hw»
More informationCh3. Asymptotic Notation
Ch. Asymptotic Notatio copyright 006 Preview of Chapters Chapter How to aalyze the space ad time complexities of program Chapter Review asymptotic otatios such as O, Ω, Θ, o for simplifyig the aalysis
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 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 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 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 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 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 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 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 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 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 informationITEC 360 Data Structures and Analysis of Algorithms Spring for n 1
ITEC 360 Data Structures ad Aalysis of Algorithms Sprig 006 1. Prove that f () = 60 + 5 + 1 is Θ ( ). 60 + 5 + 1 60 + 5 + = 66 for 1 Take C 1 = 66 f () = 60 + 5 + 1 is O( ) Sice 60 + 5 + 1 60 for 1 If
More informationCOMP26120: Introducing Complexity Analysis (2018/19) Lucas Cordeiro
COMP60: Itroduig Complexity Aalysis (08/9) Luas Cordeiro luas.ordeiro@mahester.a.uk Itroduig Complexity Aalysis Textbook: Algorithm Desig ad Appliatios, Goodrih, Mihael T. ad Roberto Tamassia (hapter )
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 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 informationTest One (Answer Key)
CS395/Ma395 (Sprig 2005) Test Oe Name: Page 1 Test Oe (Aswer Key) CS395/Ma395: Aalysis of Algorithms This is a closed book, closed otes, 70 miute examiatio. It is worth 100 poits. There are twelve (12)
More informationCSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN
CSI 5163 (95.573) ALGORITHM ANALYSIS AND DESIGN CSI 5163 (95.5703) ALGORITHM ANALYSIS AND DESIGN (3 cr.) (T) Topics of curret iterest i the desig ad aalysis of computer algorithms for graphtheoretical
More informationChapter 2. Asymptotic Notation
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
More informationCS 332: Algorithms. Linear-Time Sorting. Order statistics. Slide credit: David Luebke (Virginia)
1 CS 332: Algorithms Liear-Time Sortig. Order statistics. Slide credit: David Luebke (Virgiia) Quicksort: Partitio I Words Partitio(A, p, r): Select a elemet to act as the pivot (which?) Grow two regios,
More information2.4 - Sequences and Series
2.4 - Sequeces ad Series Sequeces A sequece is a ordered list of elemets. Defiitio 1 A sequece is a fuctio from a subset of the set of itegers (usually either the set 80, 1, 2, 3,... < or the set 81, 2,
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 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 informationUnit 6: Sequences and Series
AMHS Hoors Algebra 2 - Uit 6 Uit 6: Sequeces ad Series 26 Sequeces Defiitio: A sequece is a ordered list of umbers ad is formally defied as a fuctio whose domai is the set of positive itegers. It is commo
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 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 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 informationLecture 9: Hierarchy Theorems
IAS/PCMI Summer Sessio 2000 Clay Mathematics Udergraduate Program Basic Course o Computatioal Complexity Lecture 9: Hierarchy Theorems David Mix Barrigto ad Alexis Maciel July 27, 2000 Most of this lecture
More informationExamples: data compression, path-finding, game-playing, scheduling, bin packing
Algorithms - Basic Cocepts Algorithms so what is a algorithm, ayway? The dictioary defiitio: A algorithm is a well-defied computatioal procedure that takes iput ad produces output. This class will deal
More informationSECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES
SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES Read Sectio 1.5 (pages 5 9) Overview I Sectio 1.5 we lear to work with summatio otatio ad formulas. We will also itroduce a brief overview of sequeces,
More informationThe Growth of Functions. Theoretical Supplement
The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that
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 information6.3 Testing Series With Positive Terms
6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial
More information(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3
MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special
More informationAnalysis of Algorithms. Growth of Functions
Aalysis of Algorithms Growth of Fuctios Growth of Fuctios Asymptotic Notatio : Ο, Ω, Θ, ο, ω Asymptotic Notatio Properties Growth of Fuctios Growth Rates 2-7 2 2 0.5 + 3 log Liear lim f () / g() = Growth
More informationMath 2784 (or 2794W) University of Connecticut
ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really
More informationIn general, we need to describe how much time or memory will be required with respect to one or more variables. The most common variables include:
2.3 Asymptotic Aalysis It has already bee described qualitatively that if we ited to store othig but objects, that this ca be doe quickly usig a hash table; however, if we wish to store relatioships ad
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 informationSequences. Notation. Convergence of a Sequence
Sequeces A sequece is essetially just a list. Defiitio (Sequece of Real Numbers). A sequece of real umbers is a fuctio Z (, ) R for some real umber. Do t let the descriptio of the domai cofuse you; it
More informationData Structures Lecture 9
Fall 2017 Fag Yu Software Security Lab. Dept. Maagemet Iformatio Systems, Natioal Chegchi Uiversity Data Structures Lecture 9 Midterm o Dec. 7 (9:10-12:00am, 106) Lec 1-9, TextBook Ch1-8, 11,12 How to
More informationThe Quest for Efficiency
CST8130: Data Structures Algorithm Efficiecy ad the Big-O Created by Rex Woollard Use PageUp ad PageDow to move from scree to scree. Olie use arrow buttos. Click o speaker to play soud. The Quest for Efficiecy
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 information62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +
62. Power series Defiitio 16. (Power series) Give a sequece {c }, the series c x = c 0 + c 1 x + c 2 x 2 + c 3 x 3 + is called a power series i the variable x. The umbers c are called the coefficiets of
More informationParallel Vector Algorithms David A. Padua
Parallel Vector Algorithms 1 of 32 Itroductio Next, we study several algorithms where parallelism ca be easily expressed i terms of array operatios. We will use Fortra 90 to represet these algorithms.
More informationChapter 7: Numerical Series
Chapter 7: Numerical Series Chapter 7 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals
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 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 informationHashing and Amortization
Lecture Hashig ad Amortizatio Supplemetal readig i CLRS: Chapter ; Chapter 7 itro; Sectio 7.. Arrays ad Hashig Arrays are very useful. The items i a array are statically addressed, so that isertig, deletig,
More informationSequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018
CSE 353 Discrete Computatioal Structures Sprig 08 Sequeces, Mathematical Iductio, ad Recursio (Chapter 5, Epp) Note: some course slides adopted from publisher-provided material Overview May mathematical
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 information2. ALGORITHM ANALYSIS
2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times 2. ALGORITHM ANALYSIS computatioal tractability survey of commo ruig times Lecture slides by Kevi Waye Copyright 2005 Pearso-Addiso
More informationMath 113 Exam 3 Practice
Math Exam Practice Exam will cover.-.9. This sheet has three sectios. The first sectio will remid you about techiques ad formulas that you should kow. The secod gives a umber of practice questios for you
More informationOlli Simula T / Chapter 1 3. Olli Simula T / Chapter 1 5
Sigals ad Systems Sigals ad Systems Sigals are variables that carry iformatio Systemstake sigals as iputs ad produce sigals as outputs The course deals with the passage of sigals through systems T-6.4
More informationChapter 6. Advanced Counting Techniques
Chapter 6 Advaced Coutig Techiques 6.: Recurrece Relatios Defiitio: A recurrece relatio for the sequece {a } is a equatio expressig a i terms of oe or more of the previous terms of the sequece: a,a2,a3,,a
More informationOnce we have a sequence of numbers, the next thing to do is to sum them up. Given a sequence (a n ) n=1
. Ifiite Series Oce we have a sequece of umbers, the ext thig to do is to sum them up. Give a sequece a be a sequece: ca we give a sesible meaig to the followig expressio? a = a a a a While summig ifiitely
More informationCSE Introduction to Parallel Processing. Chapter 3. Parallel Algorithm Complexity
Dr. Izadi CSE-40533 Itroductio to Parallel Processig Chapter 3 Parallel Algorithm Complexity Review algorithm complexity ad various complexity classes Itroduce the otios of time ad time-cost optimality
More informationChapter 6 Overview: Sequences and Numerical Series. For the purposes of AP, this topic is broken into four basic subtopics:
Chapter 6 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals (which is what most studets
More informationChapter 6 Infinite Series
Chapter 6 Ifiite Series I the previous chapter we cosidered itegrals which were improper i the sese that the iterval of itegratio was ubouded. I this chapter we are goig to discuss a topic which is somewhat
More informationCS161 Handout 05 Summer 2013 July 10, 2013 Mathematical Terms and Identities
CS161 Hadout 05 Summer 2013 July 10, 2013 Mathematical Terms ad Idetities Thaks to Ady Nguye ad Julie Tibshirai for their advice o this hadout. This hadout covers mathematical otatio ad idetities that
More informationECE 308 Discrete-Time Signals and Systems
ECE 38-5 ECE 38 Discrete-Time Sigals ad Systems Z. Aliyazicioglu Electrical ad Computer Egieerig Departmet Cal Poly Pomoa ECE 38-5 1 Additio, Multiplicatio, ad Scalig of Sequeces Amplitude Scalig: (A Costat
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 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 informationDesign and Analysis of Algorithms
Desig ad Aalysis of Algorithms CSE 53 Lecture 9 Media ad Order Statistics Juzhou Huag, Ph.D. Departmet of Computer Sciece ad Egieerig Dept. CSE, UT Arligto CSE53 Desig ad Aalysis of Algorithms Medias ad
More informationAnalysis of Algorithms -Quicksort-
Aalysis of Algorithms -- Adreas Ermedahl MRTC (Mälardales Real-Time Research Ceter) adreas.ermedahl@mdh.se Autum 2004 Proposed by C.A.R. Hoare i 962 Worst- case ruig time: Θ( 2 ) Expected ruig time: Θ(
More informationChapter 6: Numerical Series
Chapter 6: Numerical Series 327 Chapter 6 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals
More informationBasic Sets. Functions. MTH299 - Examples. Example 1. Let S = {1, {2, 3}, 4}. Indicate whether each statement is true or false. (a) S = 4. (e) 2 S.
Basic Sets Example 1. Let S = {1, {2, 3}, 4}. Idicate whether each statemet is true or false. (a) S = 4 (b) {1} S (c) {2, 3} S (d) {1, 4} S (e) 2 S. (f) S = {1, 4, {2, 3}} (g) S Example 2. Compute the
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 informationOblivious Gradient Clock Synchronization
Motivatio: Clock Sychroizatio Oblivious Gradiet Clock Sychroizatio Thomas Locher, ETH Zurich Roger Wattehofer, ETH Zurich Clock sychroizatio is a classic, importat problem! May results have bee published
More informationLesson 10: Limits and Continuity
www.scimsacademy.com Lesso 10: Limits ad Cotiuity SCIMS Academy 1 Limit of a fuctio The cocept of limit of a fuctio is cetral to all other cocepts i calculus (like cotiuity, derivative, defiite itegrals
More informationOptimally Sparse SVMs
A. Proof of Lemma 3. We here prove a lower boud o the umber of support vectors to achieve geeralizatio bouds of the form which we cosider. Importatly, this result holds ot oly for liear classifiers, but
More informationSome special clique problems
Some special clique problems Reate Witer Istitut für Iformatik Marti-Luther-Uiversität Halle-Witteberg Vo-Seckedorff-Platz, D 0620 Halle Saale Germay Abstract: We cosider graphs with cliques of size k
More informationSignal Processing. Lecture 02: Discrete Time Signals and Systems. Ahmet Taha Koru, Ph. D. Yildiz Technical University.
Sigal Processig Lecture 02: Discrete Time Sigals ad Systems Ahmet Taha Koru, Ph. D. Yildiz Techical Uiversity 2017-2018 Fall ATK (YTU) Sigal Processig 2017-2018 Fall 1 / 51 Discrete Time Sigals Discrete
More informationSkip Lists. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 S 3 S S 1
Presetatio for use with the textbook, Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Skip Lists S 3 15 15 23 10 15 23 36 Skip Lists 1 What is a Skip List A skip list for
More informationFall 2013 MTH431/531 Real analysis Section Notes
Fall 013 MTH431/531 Real aalysis Sectio 8.1-8. Notes Yi Su 013.11.1 1. Defiitio of uiform covergece. We look at a sequece of fuctios f (x) ad study the coverget property. Notice we have two parameters
More informationA New Method to Order Functions by Asymptotic Growth Rates Charlie Obimbo Dept. of Computing and Information Science University of Guelph
A New Method to Order Fuctios by Asymptotic Growth Rates Charlie Obimbo Dept. of Computig ad Iformatio Sciece Uiversity of Guelph ABSTRACT A ew method is described to determie the complexity classes of
More informationLinearly Independent Sets, Bases. Review. Remarks. A set of vectors,,, in a vector space is said to be linearly independent if the vector equation
Liearly Idepedet Sets Bases p p c c p Review { v v vp} A set of vectors i a vector space is said to be liearly idepedet if the vector equatio cv + c v + + c has oly the trivial solutio = = { v v vp} The
More informationSignals & Systems Chapter3
Sigals & Systems Chapter3 1.2 Discrete-Time (D-T) Sigals Electroic systems do most of the processig of a sigal usig a computer. A computer ca t directly process a C-T sigal but istead eeds a stream of
More informationChapter 10: Power Series
Chapter : Power Series 57 Chapter Overview: Power Series The reaso series are part of a Calculus course is that there are fuctios which caot be itegrated. All power series, though, ca be itegrated because
More informationAdvanced Analysis. Min Yan Department of Mathematics Hong Kong University of Science and Technology
Advaced Aalysis Mi Ya Departmet of Mathematics Hog Kog Uiversity of Sciece ad Techology September 3, 009 Cotets Limit ad Cotiuity 7 Limit of Sequece 8 Defiitio 8 Property 3 3 Ifiity ad Ifiitesimal 8 4
More informationWe will conclude the chapter with the study a few methods and techniques which are useful
Chapter : Coordiate geometry: I this chapter we will lear about the mai priciples of graphig i a dimesioal (D) Cartesia system of coordiates. We will focus o drawig lies ad the characteristics of the graphs
More informationQuantum Information & Quantum Computation
CS9A, Sprig 5: Quatum Iformatio & Quatum Computatio Wim va Dam Egieerig, Room 59 vadam@cs http://www.cs.ucsb.edu/~vadam/teachig/cs9/ Admiistrivia Do the exercises. Aswers will be posted at the ed of the
More informationINFINITE SEQUENCES AND SERIES
11 INFINITE SEQUENCES AND SERIES INFINITE SEQUENCES AND SERIES 11.4 The Compariso Tests I this sectio, we will lear: How to fid the value of a series by comparig it with a kow series. COMPARISON TESTS
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 informationIn number theory we will generally be working with integers, though occasionally fractions and irrationals will come into play.
Number Theory Math 5840 otes. Sectio 1: Axioms. I umber theory we will geerally be workig with itegers, though occasioally fractios ad irratioals will come ito play. Notatio: Z deotes the set of all itegers
More informationMATH 1910 Workshop Solution
MATH 90 Workshop Solutio Fractals Itroductio: Fractals are atural pheomea or mathematical sets which exhibit (amog other properties) self similarity: o matter how much we zoom i, the structure remais the
More informationQuantum Computing Lecture 7. Quantum Factoring
Quatum Computig Lecture 7 Quatum Factorig Maris Ozols Quatum factorig A polyomial time quatum algorithm for factorig umbers was published by Peter Shor i 1994. Polyomial time meas that the umber of gates
More informationMAT1026 Calculus II Basic Convergence Tests for Series
MAT026 Calculus II Basic Covergece Tests for Series Egi MERMUT 202.03.08 Dokuz Eylül Uiversity Faculty of Sciece Departmet of Mathematics İzmir/TURKEY Cotets Mootoe Covergece Theorem 2 2 Series of Real
More informationMechatronics. Time Response & Frequency Response 2 nd -Order Dynamic System 2-Pole, Low-Pass, Active Filter
Time Respose & Frequecy Respose d -Order Dyamic System -Pole, Low-Pass, Active Filter R 4 R 7 C 5 e i R 1 C R 3 - + R 6 - + e out Assigmet: Perform a Complete Dyamic System Ivestigatio of the Two-Pole,
More informationA sequence of numbers is a function whose domain is the positive integers. We can see that the sequence
Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as
More information1 Hash tables. 1.1 Implementation
Lecture 8 Hash Tables, Uiversal Hash Fuctios, Balls ad Bis Scribes: Luke Johsto, Moses Charikar, G. Valiat Date: Oct 18, 2017 Adapted From Virgiia Williams lecture otes 1 Hash tables A hash table is a
More informationZeros of Polynomials
Math 160 www.timetodare.com 4.5 4.6 Zeros of Polyomials I these sectios we will study polyomials algebraically. Most of our work will be cocered with fidig the solutios of polyomial equatios of ay degree
More informationNumber Conversion. Roland Backhouse March 5, 2001
1 Number Coversio Rolad Backhouse March 5, 2001 Outlie 2 We discuss the mathematical properties of covertig real umbers to itegers. I particular, we show how to implemet roudig up (of ratioal umbers) i
More informationFIR Filters. Lecture #7 Chapter 5. BME 310 Biomedical Computing - J.Schesser
FIR Filters Lecture #7 Chapter 5 8 What Is this Course All About? To Gai a Appreciatio of the Various Types of Sigals ad Systems To Aalyze The Various Types of Systems To Lear the Skills ad Tools eeded
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 informationt distribution [34] : used to test a mean against an hypothesized value (H 0 : µ = µ 0 ) or the difference
EXST30 Backgroud material Page From the textbook The Statistical Sleuth Mea [0]: I your text the word mea deotes a populatio mea (µ) while the work average deotes a sample average ( ). Variace [0]: The
More informationENGI Series Page 6-01
ENGI 3425 6 Series Page 6-01 6. Series Cotets: 6.01 Sequeces; geeral term, limits, covergece 6.02 Series; summatio otatio, covergece, divergece test 6.03 Stadard Series; telescopig series, geometric series,
More information