MA/CS 375 Fall 20021 MA/CS 375 Fall 2002 Lecture 29.

Slides:



Advertisements
Similar presentations
Clustering Overview Algorithm Begin with all sequences in one cluster While splitting some cluster improves the objective function: { Split each cluster.
Advertisements

Human Sciences. Looking at human activities using the methods of science Observation Measurement Experiments Laws.
Squarecube. Comparing enhances meaning Pyramids and a Prisms are similar because they both ________________. ________________. Pyramids and Prisms are.
The Build-up of the Red Sequence at z
Lecture 16 Hidden Markov Models. HMM Until now we only considered IID data. Some data are of sequential nature, i.e. have correlations have time. Example:
Richard Fateman CS 282 Lecture eea1 Extended Euclidean Algorithm Lecture eea.
Muller’s Method Dan Heflin Sarah Hare. Muller’s Method What problem does it solve? How is it represented? Where does it come from?
section 6.2 Solving Recurrence Relations
Exam One Review Quiz Psy302 Quantitative Methods.
Hand Crafting your own program By Eric Davis for CS103.
1.4 Solving Inequalities. Review: Graphing Inequalities Open dot:> or < Closed dot:> or < Which direction to shade the graph? –Let the arrow point the.
Boundedness from Above A sequence is said to be bounded from above if there exists a real number, c such that : S n ≤ c, nεN.
Ridiculously Simple Time Series Forecasting We will review the following techniques: Simple extrapolation (the “naïve” model). Moving average model Weighted.
CS211 Data Structures Sami Rollins Fall 2004.
CS 4432lecture #31 CS4432: Database Systems II Lecture #3 Using the Disk, and Disk Optimizations Professor Elke A. Rundensteiner.
MA 102 Statistical Controversies Monday, February 18, 2002 Today: Discuss Chapter 9 concepts and exercises Review Part 1 of the text Test 1 question types.
The Sampling Distribution of the Sample Mean AGAIN – with a new angle.
Finding Medians Lecture 09 CS 312. Objectives See another example of a divide and conquer solution. See another example of complexity analysis of a divide.
2006 Fall MATH 100 Lecture 81 MATH 100 Lecture 25 Final review Class 25 Final review 1.Function of two or more variables.
Index FAQ Limits of Sequences of Real Numbers Sequences of Real Numbers Limits through Rigorous Definitions The Squeeze Theorem Using the Squeeze Theorem.
 A function is like a machine that excepts input values (x) and enacts a procedure on the input to produce an output (y).  We call the input values.
Digit Sums of the factors of a number An Investigation.
A P STATISTICS LESSON 2 – 2 STANDARD NORMAL CALCULATIONS.
LECTURE 5.0. PROBLEMS ARE INTERCONNECTED ACCORDING TO MOHAMED, WHAT IS A CONTRIBUTING FACTOR TO TERRORISM?
VARIANCE & STANDARD DEVIATION By Farrokh Alemi, Ph.D. This lecture is organized by Dr. Alemi and narrated by Yara Alemi. The lecture is based on the OpenIntro.
Additional Problems.
22CS 338: Graphical User Interfaces. Dario Salvucci, Drexel University. Lecture 10: Advanced Input.
University of Colorado Boulder ASEN 5070: Statistical Orbit Determination I Fall 2014 Professor Brandon A. Jones Lecture 14: Probability Wrap-Up and Statistical.
Quadratic Relations Solving Quadratic Equations Day 2: Solve by Isolating the Variable Saturday, June 04, 20161Day 2 - Solve by Isolating the Variable.
Maximum and minimum in economic models Calculus and Optimisation Maximum and minimum in economics.
Time to Support PGES. Think and Share Let’s say a new teacher’s management skills result in a loss of instructional time. To solve the problem you ask.
Mathe III Lecture 5 Mathe III Lecture 5 Mathe III Lecture 5 Mathe III Lecture 5.
Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2004 Simonas Šaltenis E1-215b
Chapter 9 Efficiency of Algorithms. 9.1 Real Valued Functions.
Lecture 3: 18/4/1435 Searching for solutions. Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Lecture 29 – Power Series Def: The power series centered at x = a:
Machine Learning Lecture for Methodological Foundations of Biomedical Informatics Fall 2015 (BMSC-GA 4449) Sisi Ma NYU Langone Medical Center CHIBI.
Solving Polynomial Equations by Factoring Factoring by grouping Ex. 1. Solve:
Dynamic Symmetry breaking with AI and Algebra. Iain McDonald Dynamic Symmetry breaking with AI and Algebra.
Introduction to Validity True Experiment – searching for causality What effect does the I.V. have on the D.V. Correlation Design – searching for an association.
9.1c SKM & PP 1 Quadratic Equations. 9.1c SKM & PP 2 Square Roots: Know Your Squares! Consider this equation: What number(s) could be squared to give.
CS 140 Lecture Notes: Virtual MachinesSlide 1 Process Abstraction Instruction Set Registers MMU I/O Devices Physical Memory Virtual Memory System Calls.
CIE Centre A-level Further Pure Maths
CS 100Lecture 11 Introduction to Programming n What is an algorithm? n Input and output n Sequential execution n Conditional execution Reading: Chapter.
Your Science Fair Project Steps in doing a project DRAFT-OH1.
In this section, we will introduce the idea of an infinite sequence and what it means to say one converges or diverges.
CS 312: Algorithm Analysis Lecture #30: Linear Programming: Intro. to the Simplex Algorithm This work is licensed under a Creative Commons Attribution-Share.
Recap of L09: Normative Decision Theory
CS38 Introduction to Algorithms
Linear Inequalities in Two Variables
Complex & Imaginary Numbers
Do Now: Can you input all real numbers into the x variable in the following functions? If not what numbers can x not take on?
MTH 324 Lecture # 23 Power Series.
CS 140 Lecture Notes: Virtual Machines
Alyce Brady CS 470: Data Structures CS 510: Computer Algorithms
Topological Ordering Algorithm: Example
Chapter 1 Vocabulary 11.) square root 12.) radicand 13.) radical
CIS595: Lecture 5 Acknowledgement:
CS 140 Lecture Notes: Introduction
Executive Director and Endowed Chair
Topological Ordering Algorithm: Example
Topological Ordering Algorithm: Example
CS 140 Lecture Notes: Introduction
½ of 6 = 3.
Bell Work Name which level(s) of the Real Number System each number falls into REAL NUMBERS RATIONAL NUMBERS IRRATIONAL NUMBERS INTEGERS WHOLE.
Solving Special Cases.
CS 140 Lecture Notes: Virtual Machines
Calculus and analytic geometry
Topological Ordering Algorithm: Example
Maximum Likelihood Estimation (MLE)
Presentation transcript:

MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 29

MA/CS 375 Fall Root Finding Given a real valued function f of one variable (say x), the idea is to find an x such that: f(x) = 0

MA/CS 375 Fall Root Finding Examples 1)Find real x such that: 2)Again: 3)Again: Observations on 1, 2 and 3 ?? (two are trick questions)

MA/CS 375 Fall Requirements For An Algorithmic Approach Idea: find a sequence of x 1,x 2,x 3,x 4 …. so that for some N, x N is “close” to a root. i.e. |f(x N )|<tolerance What do we need?

MA/CS 375 Fall Requirements For Such a Root-Finding Scheme Initial guess: x 1 Relationship between x n+1 and x n and possibly x n-1, x n-2, x n-3, … When to stop the successive guesses?

MA/CS 375 Fall Some Alternative Methods Bisection Newton’s Method Global Newton’s Method Avoiding derivatives in Newton’ method..

MA/CS 375 Fall Bisection Recall the following: –The intermediate value theorem tells us that if a continuous function is positive at one end of an interval and is negative at the other end of the interval then there is a root somewhere in the interval.

MA/CS 375 Fall Bisection Algorithm 1)Notice that if f(a)*f(b) <=0 then there is a root somewhere between a and b 2)Suppose we are lucky enough to be given a and b so that f(a)*f(b) <= 0 3)Divide the interval into two and test to see which part of the interval contains the root 4)Repeat

MA/CS 375 Fall Step 1

MA/CS 375 Fall Even though the left hand side could have a root it in we are going to drop it from our search. The right hand side must contain a root!!!. So we are going to focus on it. Step 2

MA/CS 375 Fall Winning interval Step 3 Which way? Step 4

MA/CS 375 Fall Bisection Convergence Rate Every time we split the interval we reduce the search interval by a factor of two. i.e.

MA/CS 375 Fall Individual Exercise Code up the bisection method Starting with the interval a = -1, b = 1 Find the root of f(x) = tanh(x-.2) to a tolerance of 1e-5 Plot iteration number (k) on the horizontal axis and errRange(k) = abs(f(a k )-f(b k )) on the vertical axis

MA/CS 375 Fall Newton’s Method Luxury: Suppose we know the function f and its derivative f’ at any point. The tangent line defined by: can be thought of as a linear model of the function of the function at x c

MA/CS 375 Fall Newton’s Method cont. The zero of the linear model Lc is given by: If Lc is a good approximation to f over a wide interval then x+ should be a good approximation to a root of f

MA/CS 375 Fall Newton’s Method cont. Repeat the formula to create an algorithm: If at each step the linear model is a good approximation to f then x n should get closer to a root of f as n increases.

MA/CS 375 Fall (x1,f(x1)) (x2=x1-f(x1)/f’(x1),0) First stage:

MA/CS 375 Fall (x2,f(x2)) (x3=x2-f(x2)/f’(x2),0) Notice: we are getting closer Zoom in for second stage

MA/CS 375 Fall Convergence of Newton’s Method We will show that the rate of convergence is much faster than the bisection method. However – as always, there is a catch. The method uses a local linear approximation, which clearly breaks down near a turning point. Small f’(xn) makes the linear model very flat and will send the search far away …

MA/CS 375 Fall (x1,f(x1)) (x2=x1-f(x1)/f’(x1),0) Say we chose an initial x1 near a turning point. Then the linear fit shoots off into the distance!.

MA/CS 375 Fall Newton in Matlab

MA/CS 375 Fall Team Exercise 10 minutes Code Newton up Test it with some function you know the derivative of.

MA/CS 375 Fall Newton’s Method Without Knowing the Derivative Recall: we can approximate the derivative to a function with:

MA/CS 375 Fall Modification

MA/CS 375 Fall Team Exercise 10 minutes Modify your script to use the approximate derivative (note you will require an extra parameter delta) Test it with some function you do not know the derivative of.

MA/CS 375 Fall Convergence Rate For Newton’s Method Theorem 8 (van Loan p 285) –Suppose f(x) and f’(x) are defined on an interval where and positive constants rho and delta exist such that –If xc is in I, then is in I and –That is x+ is at least half the distance to x* that xc was. Also, the rate of convergence is quadratic.

MA/CS 375 Fall Convergence Rate of Newton’s Method cont The proof of this theorem works by using the fundamental theorem of calculus. All of the restrictions are important – and can be fairly easily broken by a general function The restrictions amount to: 1)f’ does not change sign in a neighbourhood of the root x* 2)f is not too non-linear (Lipschitz condition) 3)the Newton’s iteration starts close enough to the root x* then convergence is guaranteed and the convergence rate is quadratic.

MA/CS 375 Fall Summary We have looked at two ways to find the root of a single valued, single parameter function We considered a robust, but “slow” bisection method and then a “faster” but less robust Newton’s method. We discussed the theory of convergence for Newton’s method.