Data Structures and Algorithms CMPSC 465

Size: px
Start display at page:

Download "Data Structures and Algorithms CMPSC 465"

Transcription

1 Dt Structures nd Algorithms CMPSC 465 LECTURE 10 Solving recurrences Mster theorem Adm Smith S. Rskhodnikov nd A. Smith; bsed on slides by E. Demine nd C. Leiserson

2 Review questions Guess the solution to the recurrence: T(n)=2T(n/3)+n 3/2. (Answer: Θ(n 3/2 ).) Drw the recursion tree for this recurrence.. Wht is its height? b. Wht is the number of leves in the tree? (Answer: h=log 3 n.) (Answer: n (1/log 3).)

3 The mster method The mster method pplies to recurrences of the form T(n) = T(n/b) +, where 1, b > 1, nd f is symptoticlly positive, tht is >0 for ll n > n 0.

4 Three common cses Compre with n log b : 1. = O(n log b ε ) for some constnt ε > 0. grows polynomilly slower thn n log b (by n n ε fctor). Solution: T(n) = Θ(n log b ).

5 Three common cses Compre with n log b : 1. = O(n log b ε ) for some constnt ε > 0. grows polynomilly slower thn n log b (by n n ε fctor). Solution: T(n) = Θ(n log b ). 2. = Θ(n log b lg k n) for some constnt k 0. nd n log b grow t similr rtes. Solution: T(n) = Θ(n log b lg k+1 n).

6 Three common cses (cont.) Compre with n log b : 3. = Ω(n log b + ε ) for some constnt ε > 0. grows polynomilly fster thn n log b (by n n ε fctor), nd stisfies the regulrity condition tht f (n/b) c for some constnt c < 1. Solution: T(n) = Θ( ).

7 Ide of mster theorem Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b)

8 Ide of mster theorem Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 )

9 Ide of mster theorem h = log b n Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 )

10 Ide of mster theorem h = log b n Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 ) #leves = h = log bn = n log b n log b

11 Ide of mster theorem h = log b n Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 ) CASE 1: The weight increses geometriclly from the root to the leves. The leves hold constnt frction of the totl weight. n log b Θ(n log b )

12 Ide of mster theorem h = log b n Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 ) CASE 2: (k = 0) The weight is pproximtely the sme on ech of the log b n levels. n log b Θ(n log b lg n)

13 Ide of mster theorem h = log b n Recursion tree: f (n/b) f (n/b) f (n/b 2 ) f (n/b 2 ) f (n/b 2 ) f (n/b) f (n/b) 2 f (n/b 2 ) CASE 3: The weight decreses geometriclly from the root to the leves. The root holds constnt frction of the totl weight. n log b Θ( )

14 Exmples EX. T(n) = 4T(n/2) + n = 4, b = 2 n log b = n 2 ; = n. CASE 1: = O(n 2 ε ) for ε = 1. T(n) = Θ(n 2 ).

15 Exmples EX. T(n) = 4T(n/2) + n = 4, b = 2 n log b = n 2 ; = n. CASE 1: = O(n 2 ε ) for ε = 1. T(n) = Θ(n 2 ). EX. T(n) = 4T(n/2) + n 2 = 4, b = 2 n log b = n 2 ; = n 2. CASE 2: = Θ(n 2 lg 0 n), tht is, k = 0. T(n) = Θ(n 2 lg n).

16 Exmples EX. T(n) = 4T(n/2) + n 3 = 4, b = 2 n log b = n 2 ; = n 3. CASE 3: = Ω(n 2 + ε ) for ε = 1 nd 4(n/2) 3 cn 3 (reg. cond.) for c = 1/2. T(n) = Θ(n 3 ).

17 Exmples EX. T(n) = 4T(n/2) + n 3 = 4, b = 2 n log b = n 2 ; = n 3. CASE 3: = Ω(n 2 + ε ) for ε = 1 nd 4(n/2) 3 cn 3 (reg. cond.) for c = 1/2. T(n) = Θ(n 3 ). EX. T(n) = 4T(n/2) + n 2 /lg n = 4, b = 2 n log b = n 2 ; = n 2 /lg n. Mster method does not pply. In prticulr, for every constnt ε > 0, we hve n ε = ω(lg n).

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 12 Solving Recurrences Mster Theorem Adm Smith Review Question: Exponentition Problem: Compute b, where b N is n bits long. Question: How mny multiplictions? Nive lgorithm:

More information

Data Structures and Algorithms CMPSC 465

Data Structures and Algorithms CMPSC 465 Data Structures and Algorithms CMPSC 465 LECTURE 9 Solving recurrences Substitution method Adam Smith S. Raskhodnikova and A. Smith; based on slides by E. Demaine and C. Leiserson Review question Draw

More information

Section IV.6: The Master Method and Applications

Section IV.6: The Master Method and Applications Sectio IV.6: The Mster Method d Applictios Defiitio IV.6.1: A fuctio f is symptoticlly positive if d oly if there exists rel umer such tht f(x) > for ll x >. A cosequece of this defiitio is tht fuctio

More information

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve

4 7x =250; 5 3x =500; Read section 3.3, 3.4 Announcements: Bell Ringer: Use your calculator to solve Dte: 3/14/13 Objective: SWBAT pply properties of exponentil functions nd will pply properties of rithms. Bell Ringer: Use your clcultor to solve 4 7x =250; 5 3x =500; HW Requests: Properties of Log Equtions

More information

CS473-Algorithms I. Lecture 3. Solving Recurrences. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 3. Solving Recurrences. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorthms I Lecture 3 Solvg Recurreces Cevdet Aykt - Blket Uversty Computer Egeerg Deprtmet Solvg Recurreces The lyss of merge sort Lecture requred us to solve recurrece. Recurreces re lke solvg

More information

Design and Analysis of Algorithms Recurrence. Prof. Chuhua Xian School of Computer Science and Engineering

Design and Analysis of Algorithms Recurrence. Prof. Chuhua Xian   School of Computer Science and Engineering Design and Analysis of Algorithms Recurrence Prof. Chuhua Xian Email: chhxian@scut.edu.cn School of Computer Science and Engineering Course Information Instructor: Chuhua Xian ( 冼楚华 ) Email: chhxian@scut.edu.cn

More information

Read section 3.3, 3.4 Announcements:

Read section 3.3, 3.4 Announcements: Dte: 3/1/13 Objective: SWBAT pply properties of exponentil functions nd will pply properties of rithms. Bell Ringer: 1. f x = 3x 6, find the inverse, f 1 x., Using your grphing clcultor, Grph 1. f x,f

More information

What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt

What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency Asympt Lecture 3 The Analysis of Recursive Algorithm Efficiency What we have learned What is algorithm Why study algorithm The time and space efficiency of algorithm The analysis framework of time efficiency

More information

Math 31S. Rumbos Fall Solutions to Assignment #16

Math 31S. Rumbos Fall Solutions to Assignment #16 Mth 31S. Rumbos Fll 2016 1 Solutions to Assignment #16 1. Logistic Growth 1. Suppose tht the growth of certin niml popultion is governed by the differentil eqution 1000 dn N dt = 100 N, (1) where N(t)

More information

5. Solving recurrences

5. Solving recurrences 5. Solvig recurreces Time Complexity Alysis of Merge Sort T( ) 0 if 1 2T ( / 2) otherwise sortig oth hlves mergig Q. How to prove tht the ru-time of merge sort is O( )? A. 2 Time Complexity Alysis of Merge

More information

7 - Continuous random variables

7 - Continuous random variables 7-1 Continuous rndom vribles S. Lll, Stnford 2011.01.25.01 7 - Continuous rndom vribles Continuous rndom vribles The cumultive distribution function The uniform rndom vrible Gussin rndom vribles The Gussin

More information

Similar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication

Similar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication Next. Covered bsics of simple desig techique (Divided-coquer) Ch. of the text.. Next, Strsse s lgorithm. Lter: more desig d coquer lgorithms: MergeSort. Solvig recurreces d the Mster Theorem. Similr ide

More information

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as Improper Integrls Two different types of integrls cn qulify s improper. The first type of improper integrl (which we will refer to s Type I) involves evluting n integrl over n infinite region. In the grph

More information

5.2 Exponent Properties Involving Quotients

5.2 Exponent Properties Involving Quotients 5. Eponent Properties Involving Quotients Lerning Objectives Use the quotient of powers property. Use the power of quotient property. Simplify epressions involving quotient properties of eponents. Use

More information

Data Structures and Algorithms CSE 465

Data Structures and Algorithms CSE 465 Data Structures and Algorithms CSE 465 LECTURE 8 Analyzing Quick Sort Sofya Raskhodnikova and Adam Smith Reminder: QuickSort Quicksort an n-element array: 1. Divide: Partition the array around a pivot

More information

CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms

CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline CS 4407, Algorithms Growth Functions

More information

NUMERICAL INTEGRATION

NUMERICAL INTEGRATION NUMERICAL INTEGRATION How do we evlute I = f (x) dx By the fundmentl theorem of clculus, if F (x) is n ntiderivtive of f (x), then I = f (x) dx = F (x) b = F (b) F () However, in prctice most integrls

More information

Solution Manual. for. Fracture Mechanics. C.T. Sun and Z.-H. Jin

Solution Manual. for. Fracture Mechanics. C.T. Sun and Z.-H. Jin Solution Mnul for Frcture Mechnics by C.T. Sun nd Z.-H. Jin Chpter rob.: ) 4 No lod is crried by rt nd rt 4. There is no strin energy stored in them. Constnt Force Boundry Condition The totl strin energy

More information

The graphs of Rational Functions

The graphs of Rational Functions Lecture 4 5A: The its of Rtionl Functions s x nd s x + The grphs of Rtionl Functions The grphs of rtionl functions hve severl differences compred to power functions. One of the differences is the behvior

More information

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral Improper Integrls Every time tht we hve evluted definite integrl such s f(x) dx, we hve mde two implicit ssumptions bout the integrl:. The intervl [, b] is finite, nd. f(x) is continuous on [, b]. If one

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 9 Divide and Conquer Merge sort Counting Inversions Binary Search Exponentiation Solving Recurrences Recursion Tree Method Master Theorem Sofya Raskhodnikova S. Raskhodnikova;

More information

AP Calculus Multiple Choice: BC Edition Solutions

AP Calculus Multiple Choice: BC Edition Solutions AP Clculus Multiple Choice: BC Edition Solutions J. Slon Mrch 8, 04 ) 0 dx ( x) is A) B) C) D) E) Divergent This function inside the integrl hs verticl symptotes t x =, nd the integrl bounds contin this

More information

Numerical Analysis: Trapezoidal and Simpson s Rule

Numerical Analysis: Trapezoidal and Simpson s Rule nd Simpson s Mthemticl question we re interested in numericlly nswering How to we evlute I = f (x) dx? Clculus tells us tht if F(x) is the ntiderivtive of function f (x) on the intervl [, b], then I =

More information

Math 113 Exam 2 Practice

Math 113 Exam 2 Practice Mth Em Prctice Februry, 8 Em will cover sections 6.5, 7.-7.5 nd 7.8. This sheet hs three sections. The first section will remind you bout techniques nd formuls tht you should know. The second gives number

More information

A recursive construction of efficiently decodable list-disjunct matrices

A recursive construction of efficiently decodable list-disjunct matrices CSE 709: Compressed Sensing nd Group Testing. Prt I Lecturers: Hung Q. Ngo nd Atri Rudr SUNY t Bufflo, Fll 2011 Lst updte: October 13, 2011 A recursive construction of efficiently decodble list-disjunct

More information

Lab 11 Approximate Integration

Lab 11 Approximate Integration Nme Student ID # Instructor L Period Dte Due L 11 Approximte Integrtion Ojectives 1. To ecome fmilir with the right endpoint rule, the trpezoidl rule, nd Simpson's rule. 2. To compre nd contrst the properties

More information

( dg. ) 2 dt. + dt. dt j + dh. + dt. r(t) dt. Comparing this equation with the one listed above for the length of see that

( dg. ) 2 dt. + dt. dt j + dh. + dt. r(t) dt. Comparing this equation with the one listed above for the length of see that Arc Length of Curves in Three Dimensionl Spce If the vector function r(t) f(t) i + g(t) j + h(t) k trces out the curve C s t vries, we cn mesure distnces long C using formul nerly identicl to one tht we

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries nd String Mtching CS 240 - Dt Structures nd Dt Mngement Sjed Hque Veronik Irvine Tylor Smith Bsed on lecture notes by mny previous cs240 instructors Dvid R. Cheriton School of Computer

More information

Lecture 20: Numerical Integration III

Lecture 20: Numerical Integration III cs4: introduction to numericl nlysis /8/0 Lecture 0: Numericl Integrtion III Instructor: Professor Amos Ron Scribes: Mrk Cowlishw, Yunpeng Li, Nthnel Fillmore For the lst few lectures we hve discussed

More information

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014

Lecture 17. Integration: Gauss Quadrature. David Semeraro. University of Illinois at Urbana-Champaign. March 20, 2014 Lecture 17 Integrtion: Guss Qudrture Dvid Semerro University of Illinois t Urbn-Chmpign Mrch 0, 014 Dvid Semerro (NCSA) CS 57 Mrch 0, 014 1 / 9 Tody: Objectives identify the most widely used qudrture method

More information

20 MATHEMATICS POLYNOMIALS

20 MATHEMATICS POLYNOMIALS 0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of

More information

Math& 152 Section Integration by Parts

Math& 152 Section Integration by Parts Mth& 5 Section 7. - Integrtion by Prts Integrtion by prts is rule tht trnsforms the integrl of the product of two functions into other (idelly simpler) integrls. Recll from Clculus I tht given two differentible

More information

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

More information

Math 1B, lecture 4: Error bounds for numerical methods

Math 1B, lecture 4: Error bounds for numerical methods Mth B, lecture 4: Error bounds for numericl methods Nthn Pflueger 4 September 0 Introduction The five numericl methods descried in the previous lecture ll operte by the sme principle: they pproximte the

More information

Matrices, Moments and Quadrature, cont d

Matrices, Moments and Quadrature, cont d Jim Lmbers MAT 285 Summer Session 2015-16 Lecture 2 Notes Mtrices, Moments nd Qudrture, cont d We hve described how Jcobi mtrices cn be used to compute nodes nd weights for Gussin qudrture rules for generl

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

CS683: calculating the effective resistances

CS683: calculating the effective resistances CS683: clculting the effective resistnces Lecturer: John Hopcroft Note tkers: June Andrews nd Jen-Bptiste Jennin Mrch 7th, 2008 On Ferury 29th we sw tht, given grph in which ech edge is lelled with resistnce

More information

Best Approximation. Chapter The General Case

Best Approximation. Chapter The General Case Chpter 4 Best Approximtion 4.1 The Generl Cse In the previous chpter, we hve seen how n interpolting polynomil cn be used s n pproximtion to given function. We now wnt to find the best pproximtion to given

More information

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar) Lecture 3 (5.3.2018) (trnslted nd slightly dpted from lecture notes by Mrtin Klzr) Riemnn integrl Now we define precisely the concept of the re, in prticulr, the re of figure U(, b, f) under the grph of

More information

CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms

CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline CS 4407, Algorithms Growth Functions

More information

When a force f(t) is applied to a mass in a system, we recall that Newton s law says that. f(t) = ma = m d dt v,

When a force f(t) is applied to a mass in a system, we recall that Newton s law says that. f(t) = ma = m d dt v, Impulse Functions In mny ppliction problems, n externl force f(t) is pplied over very short period of time. For exmple, if mss in spring nd dshpot system is struck by hmmer, the ppliction of the force

More information

. Double-angle formulas. Your answer should involve trig functions of θ, and not of 2θ. sin 2 (θ) =

. Double-angle formulas. Your answer should involve trig functions of θ, and not of 2θ. sin 2 (θ) = Review of some needed Trig. Identities for Integrtion. Your nswers should be n ngle in RADIANS. rccos( 1 ) = π rccos( - 1 ) = 2π 2 3 2 3 rcsin( 1 ) = π rcsin( - 1 ) = -π 2 6 2 6 Cn you do similr problems?

More information

Dynamics: Newton s Laws of Motion

Dynamics: Newton s Laws of Motion Lecture 7 Chpter 4 Physics I 09.25.2013 Dynmics: Newton s Lws of Motion Solving Problems using Newton s lws Course website: http://fculty.uml.edu/andriy_dnylov/teching/physicsi Lecture Cpture: http://echo360.uml.edu/dnylov2013/physics1fll.html

More information

Recitation 3: More Applications of the Derivative

Recitation 3: More Applications of the Derivative Mth 1c TA: Pdric Brtlett Recittion 3: More Applictions of the Derivtive Week 3 Cltech 2012 1 Rndom Question Question 1 A grph consists of the following: A set V of vertices. A set E of edges where ech

More information

Improper Integrals. Introduction. Type 1: Improper Integrals on Infinite Intervals. When we defined the definite integral.

Improper Integrals. Introduction. Type 1: Improper Integrals on Infinite Intervals. When we defined the definite integral. Improper Integrls Introduction When we defined the definite integrl f d we ssumed tht f ws continuous on [, ] where [, ] ws finite, closed intervl There re t lest two wys this definition cn fil to e stisfied:

More information

Math 8 Winter 2015 Applications of Integration

Math 8 Winter 2015 Applications of Integration Mth 8 Winter 205 Applictions of Integrtion Here re few importnt pplictions of integrtion. The pplictions you my see on n exm in this course include only the Net Chnge Theorem (which is relly just the Fundmentl

More information

4.1. Probability Density Functions

4.1. Probability Density Functions STT 1 4.1-4. 4.1. Proility Density Functions Ojectives. Continuous rndom vrile - vers - discrete rndom vrile. Proility density function. Uniform distriution nd its properties. Expected vlue nd vrince of

More information

Integrals - Motivation

Integrals - Motivation Integrls - Motivtion When we looked t function s rte of chnge If f(x) is liner, the nswer is esy slope If f(x) is non-liner, we hd to work hrd limits derivtive A relted question is the re under f(x) (but

More information

Math 113 Exam 2 Practice

Math 113 Exam 2 Practice Mth 3 Exm Prctice Februry 8, 03 Exm will cover 7.4, 7.5, 7.7, 7.8, 8.-3 nd 8.5. Plese note tht integrtion skills lerned in erlier sections will still be needed for the mteril in 7.5, 7.8 nd chpter 8. This

More information

38 Riemann sums and existence of the definite integral.

38 Riemann sums and existence of the definite integral. 38 Riemnn sums nd existence of the definite integrl. In the clcultion of the re of the region X bounded by the grph of g(x) = x 2, the x-xis nd 0 x b, two sums ppered: ( n (k 1) 2) b 3 n 3 re(x) ( n These

More information

13.4. Integration by Parts. Introduction. Prerequisites. Learning Outcomes

13.4. Integration by Parts. Introduction. Prerequisites. Learning Outcomes Integrtion by Prts 13.4 Introduction Integrtion by Prts is technique for integrting products of functions. In this Section you will lern to recognise when it is pproprite to use the technique nd hve the

More information

1.2. Linear Variable Coefficient Equations. y + b "! = a y + b " Remark: The case b = 0 and a non-constant can be solved with the same idea as above.

1.2. Linear Variable Coefficient Equations. y + b ! = a y + b  Remark: The case b = 0 and a non-constant can be solved with the same idea as above. 1 12 Liner Vrible Coefficient Equtions Section Objective(s): Review: Constnt Coefficient Equtions Solving Vrible Coefficient Equtions The Integrting Fctor Method The Bernoulli Eqution 121 Review: Constnt

More information

1 Probability Density Functions

1 Probability Density Functions Lis Yn CS 9 Continuous Distributions Lecture Notes #9 July 6, 28 Bsed on chpter by Chris Piech So fr, ll rndom vribles we hve seen hve been discrete. In ll the cses we hve seen in CS 9, this ment tht our

More information

Lecture 14: Quadrature

Lecture 14: Quadrature Lecture 14: Qudrture This lecture is concerned with the evlution of integrls fx)dx 1) over finite intervl [, b] The integrnd fx) is ssumed to be rel-vlues nd smooth The pproximtion of n integrl by numericl

More information

Handout: Natural deduction for first order logic

Handout: Natural deduction for first order logic MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

More information

Anti-derivatives/Indefinite Integrals of Basic Functions

Anti-derivatives/Indefinite Integrals of Basic Functions Anti-derivtives/Indefinite Integrls of Bsic Functions Power Rule: In prticulr, this mens tht x n+ x n n + + C, dx = ln x + C, if n if n = x 0 dx = dx = dx = x + C nd x (lthough you won t use the second

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Chapter 2. Recurrence Relations. Divide and Conquer. Divide and Conquer Strategy. Another Example: Merge Sort. Merge Sort Example. Merge Sort Example

Chapter 2. Recurrence Relations. Divide and Conquer. Divide and Conquer Strategy. Another Example: Merge Sort. Merge Sort Example. Merge Sort Example Recurrence Relations Chapter 2 Divide and Conquer Equation or an inequality that describes a function by its values on smaller inputs. Recurrence relations arise when we analyze the running time of iterative

More information

If deg(num) deg(denom), then we should use long-division of polynomials to rewrite: p(x) = s(x) + r(x) q(x), q(x)

If deg(num) deg(denom), then we should use long-division of polynomials to rewrite: p(x) = s(x) + r(x) q(x), q(x) Mth 50 The method of prtil frction decomposition (PFD is used to integrte some rtionl functions of the form p(x, where p/q is in lowest terms nd deg(num < deg(denom. q(x If deg(num deg(denom, then we should

More information

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve. Clculus Li Vs The Fundmentl Theorem of Clculus. The Totl Chnge Theorem nd the Are Under Curve. Recll the following fct from Clculus course. If continuous function f(x) represents the rte of chnge of F

More information

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature

Lecture 6: Singular Integrals, Open Quadrature rules, and Gauss Quadrature Lecture notes on Vritionl nd Approximte Methods in Applied Mthemtics - A Peirce UBC Lecture 6: Singulr Integrls, Open Qudrture rules, nd Guss Qudrture (Compiled 6 August 7) In this lecture we discuss the

More information

Data Structures and Algorithms CSE 465

Data Structures and Algorithms CSE 465 Data Structures and Algorithms CSE 465 LECTURE 3 Asymptotic Notation O-, Ω-, Θ-, o-, ω-notation Divide and Conquer Merge Sort Binary Search Sofya Raskhodnikova and Adam Smith /5/0 Review Questions If input

More information

Main topics for the First Midterm

Main topics for the First Midterm Min topics for the First Midterm The Midterm will cover Section 1.8, Chpters 2-3, Sections 4.1-4.8, nd Sections 5.1-5.3 (essentilly ll of the mteril covered in clss). Be sure to know the results of the

More information

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007 A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H Thoms Shores Deprtment of Mthemtics University of Nebrsk Spring 2007 Contents Rtes of Chnge nd Derivtives 1 Dierentils 4 Are nd Integrls 5 Multivrite Clculus

More information

Exam 1 Solutions (1) C, D, A, B (2) C, A, D, B (3) C, B, D, A (4) A, C, D, B (5) D, C, A, B

Exam 1 Solutions (1) C, D, A, B (2) C, A, D, B (3) C, B, D, A (4) A, C, D, B (5) D, C, A, B PHY 249, Fll 216 Exm 1 Solutions nswer 1 is correct for ll problems. 1. Two uniformly chrged spheres, nd B, re plced t lrge distnce from ech other, with their centers on the x xis. The chrge on sphere

More information

APPROXIMATE INTEGRATION

APPROXIMATE INTEGRATION APPROXIMATE INTEGRATION. Introduction We hve seen tht there re functions whose nti-derivtives cnnot be expressed in closed form. For these resons ny definite integrl involving these integrnds cnnot be

More information

1 The Riemann Integral

1 The Riemann Integral The Riemnn Integrl. An exmple leding to the notion of integrl (res) We know how to find (i.e. define) the re of rectngle (bse height), tringle ( (sum of res of tringles). But how do we find/define n re

More information

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0) 1 Tylor polynomils In Section 3.5, we discussed how to pproximte function f(x) round point in terms of its first derivtive f (x) evluted t, tht is using the liner pproximtion f() + f ()(x ). We clled this

More information

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), ) Euler, Iochimescu nd the trpezium rule G.J.O. Jmeson (Mth. Gzette 96 (0), 36 4) The following results were estblished in recent Gzette rticle [, Theorems, 3, 4]. Given > 0 nd 0 < s

More information

DIRECT CURRENT CIRCUITS

DIRECT CURRENT CIRCUITS DRECT CURRENT CUTS ELECTRC POWER Consider the circuit shown in the Figure where bttery is connected to resistor R. A positive chrge dq will gin potentil energy s it moves from point to point b through

More information

Ordinary Differential Equations- Boundary Value Problem

Ordinary Differential Equations- Boundary Value Problem Ordinry Differentil Equtions- Boundry Vlue Problem Shooting method Runge Kutt method Computer-bsed solutions o BVPFD subroutine (Fortrn IMSL subroutine tht Solves (prmeterized) system of differentil equtions

More information

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O 1 Section 5. The Definite Integrl Suppose tht function f is continuous nd positive over n intervl [, ]. y = f(x) x The re under the grph of f nd ove the x-xis etween nd is denoted y f(x) dx nd clled the

More information

Design Patterns for Data Structures. Chapter 3. Recursive Algorithms

Design Patterns for Data Structures. Chapter 3. Recursive Algorithms Chapter 3 Recursive Algorithms Writing recurrences + Writing recurrences To determine the statement execution count is a two-step problem. Write down the recurrence from the recursive code for the algorithm.

More information

Connected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs

Connected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs Prm University, Mth. Deprtment Summry of lecture 9 Algorithms nd Dt Structures Disjoint sets Summry of this lecture: (CLR.1-3) Dt Structures for Disjoint sets: Union opertion Find opertion Mrco Pellegrini

More information

Resistors. Consider a uniform cylinder of material with mediocre to poor to pathetic conductivity ( )

Resistors. Consider a uniform cylinder of material with mediocre to poor to pathetic conductivity ( ) 10/25/2005 Resistors.doc 1/7 Resistors Consider uniform cylinder of mteril with mediocre to poor to r. pthetic conductivity ( ) ˆ This cylinder is centered on the -xis, nd hs length. The surfce re of the

More information

Best Approximation in the 2-norm

Best Approximation in the 2-norm Jim Lmbers MAT 77 Fll Semester 1-11 Lecture 1 Notes These notes correspond to Sections 9. nd 9.3 in the text. Best Approximtion in the -norm Suppose tht we wish to obtin function f n (x) tht is liner combintion

More information

5.5 The Substitution Rule

5.5 The Substitution Rule 5.5 The Substitution Rule Given the usefulness of the Fundmentl Theorem, we wnt some helpful methods for finding ntiderivtives. At the moment, if n nti-derivtive is not esily recognizble, then we re in

More information

Physics 202, Lecture 10. Basic Circuit Components

Physics 202, Lecture 10. Basic Circuit Components Physics 202, Lecture 10 Tody s Topics DC Circuits (Chpter 26) Circuit components Kirchhoff s Rules RC Circuits Bsic Circuit Components Component del ttery, emf Resistor Relistic Bttery (del) wire Cpcitor

More information

du = C dy = 1 dy = dy W is invertible with inverse U, so that y = W(t) is exactly the same thing as t = U(y),

du = C dy = 1 dy = dy W is invertible with inverse U, so that y = W(t) is exactly the same thing as t = U(y), 29. Differentil equtions. The conceptul bsis of llometr Did it occur to ou in Lecture 3 wh Fiboncci would even cre how rpidl rbbit popultion grows? Mbe he wnted to et the rbbits. If so, then he would be

More information

Math 120 Answers for Homework 13

Math 120 Answers for Homework 13 Mth 12 Answers for Homework 13 1. In this problem we will use the fct tht if m f(x M on n intervl [, b] (nd if f is integrble on [, b] then (* m(b f dx M(b. ( The function f(x = 1 + x 3 is n incresing

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

8 Laplace s Method and Local Limit Theorems

8 Laplace s Method and Local Limit Theorems 8 Lplce s Method nd Locl Limit Theorems 8. Fourier Anlysis in Higher DImensions Most of the theorems of Fourier nlysis tht we hve proved hve nturl generliztions to higher dimensions, nd these cn be proved

More information

A. Limits - L Hopital s Rule ( ) How to find it: Try and find limits by traditional methods (plugging in). If you get 0 0 or!!, apply C.! 1 6 C.

A. Limits - L Hopital s Rule ( ) How to find it: Try and find limits by traditional methods (plugging in). If you get 0 0 or!!, apply C.! 1 6 C. A. Limits - L Hopitl s Rule Wht you re finding: L Hopitl s Rule is used to find limits of the form f ( x) lim where lim f x x! c g x ( ) = or lim f ( x) = limg( x) = ". ( ) x! c limg( x) = 0 x! c x! c

More information

6.2 CONCEPTS FOR ADVANCED MATHEMATICS, C2 (4752) AS

6.2 CONCEPTS FOR ADVANCED MATHEMATICS, C2 (4752) AS 6. CONCEPTS FOR ADVANCED MATHEMATICS, C (475) AS Objectives To introduce students to number of topics which re fundmentl to the dvnced study of mthemtics. Assessment Emintion (7 mrks) 1 hour 30 minutes.

More information

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

Math 520 Final Exam Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008 Mth 520 Finl Exm Topic Outline Sections 1 3 (Xio/Dums/Liw) Spring 2008 The finl exm will be held on Tuesdy, My 13, 2-5pm in 117 McMilln Wht will be covered The finl exm will cover the mteril from ll of

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

More information

Week 10: Riemann integral and its properties

Week 10: Riemann integral and its properties Clculus nd Liner Algebr for Biomedicl Engineering Week 10: Riemnn integrl nd its properties H. Führ, Lehrstuhl A für Mthemtik, RWTH Achen, WS 07 Motivtion: Computing flow from flow rtes 1 We observe the

More information

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3)

E 1 (n) = E 0 (n-1) E 0 (n) = E 0 (n-1)+e 0 (n-2) T(n -1)=2E 0 (n-2) + E 0 (n-3) cs3102: Theory of Computtion Clss 5: Non-Regulr PS1, Prolem 8 Menu Non-regulr lnguges Spring 2010 University of Virgini Dvid Evns PS1 Generl Comments Proofs re for mking convincing rguments, not for ofusction.

More information

We partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.

We partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b. Mth 255 - Vector lculus II Notes 4.2 Pth nd Line Integrls We begin with discussion of pth integrls (the book clls them sclr line integrls). We will do this for function of two vribles, but these ides cn

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Analysis of Algorithms - Using Asymptotic Bounds -

Analysis of Algorithms - Using Asymptotic Bounds - Analysis of Algorithms - Using Asymptotic Bounds - Andreas Ermedahl MRTC (Mälardalens Real-Time Research Center) andreas.ermedahl@mdh.se Autumn 004 Rehersal: Asymptotic bounds Gives running time bounds

More information

MASTER CLASS PROGRAM UNIT 4 SPECIALIST MATHEMATICS WEEK 11 WRITTEN EXAMINATION 2 SOLUTIONS SECTION 1 MULTIPLE CHOICE QUESTIONS

MASTER CLASS PROGRAM UNIT 4 SPECIALIST MATHEMATICS WEEK 11 WRITTEN EXAMINATION 2 SOLUTIONS SECTION 1 MULTIPLE CHOICE QUESTIONS MASTER CLASS PROGRAM UNIT 4 SPECIALIST MATHEMATICS WEEK WRITTEN EXAMINATION SOLUTIONS FOR ERRORS AND UPDATES, PLEASE VISIT WWW.TSFX.COM.AU/MC-UPDATES SECTION MULTIPLE CHOICE QUESTIONS QUESTION QUESTION

More information

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

5.1 How do we Measure Distance Traveled given Velocity? Student Notes . How do we Mesure Distnce Trveled given Velocity? Student Notes EX ) The tle contins velocities of moving cr in ft/sec for time t in seconds: time (sec) 3 velocity (ft/sec) 3 A) Lel the x-xis & y-xis

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Chapter 9: Inferences based on Two samples: Confidence intervals and tests of hypotheses

Chapter 9: Inferences based on Two samples: Confidence intervals and tests of hypotheses Chpter 9: Inferences bsed on Two smples: Confidence intervls nd tests of hypotheses 9.1 The trget prmeter : difference between two popultion mens : difference between two popultion proportions : rtio of

More information