Computational Biology, Part 14 Recursion Relations Robert F. Murphy Copyright  1996, 1999, 2000, 2001. All rights reserved.

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

Sequences and Mathematical Induction
Chapter 6 Models for Population Population models for single species –Malthusian growth model –The logistic model –The logistic model with harvest –Insect.
259 Lecture 7 Spring 2015 Population Models in Excel.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 18, Slide 1 Chapter 18 Confidence Intervals for Proportions.
Welcome To Math 463: Introduction to Mathematical Biology
Computational Biology, Part 17 Biochemical Kinetics I Robert F. Murphy Copyright  1996, All rights reserved.
Universidad de La Habana Lectures 5 & 6 : Difference Equations Kurt Helmes 22 nd September - 2nd October, 2008.
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Differential Equations (4/17/06) A differential equation is an equation which contains derivatives within it. More specifically, it is an equation which.
Math Calculus I Part 8 Power series, Taylor series.
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Dynamical Systems Analysis IV: Root Locus Plots & Routh Stability
CHE/ME 109 Heat Transfer in Electronics LECTURE 11 – ONE DIMENSIONAL NUMERICAL MODELS.
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 60 Chapter 8 Markov Processes.
Math Calculus I Part 8 Power series, Taylor series.
Continuous Models Chapter 4. Bacteria Growth-Revisited Consider bacteria growing in a nutrient rich medium Variables –Time, t –N(t) = bacteria density.
Solving Absolute Value Equations
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
DECISION MODELING Chapter 2 Spreadsheet Modeling Part 1 WITH MICROSOFT EXCEL Copyright 2001 Prentice Hall Publishers and Ardith E. Baker.
Mathematics for Economics and Business Jean Soper chapter two Equations in Economics 1.
In Engineering --- Designing a Pneumatic Pump Introduction System characterization Model development –Models 1, 2, 3, 4, 5 & 6 Model analysis –Time domain.
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
Math 15 Lecture 12 University of California, Merced Scilab Programming – No. 3.
Population Modeling Mathematical Biology Lecture 2 James A. Glazier (Partially Based on Brittain Chapter 1)
8.2 Negative and Zero Exponents I love exponents!.
Chapter 8. Section 8. 1 Section Summary Introduction Modeling with Recurrence Relations Fibonacci Numbers The Tower of Hanoi Counting Problems Algorithms.
Computational Biology, Part 12 Spreadsheet Basics I Robert F. Murphy Copyright  1996, All rights reserved.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 5a.
Math 3120 Differential Equations with Boundary Value Problems
1 Discretization of Fluid Models (Navier Stokes) Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal.
Computational Biology, Part 15 Biochemical Kinetics I Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
Chapter 1 Introduction to Statistics. Statistical Methods Were developed to serve a purpose Were developed to serve a purpose The purpose for each statistical.
LURE 2009 SUMMER PROGRAM John Alford Sam Houston State University.
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 1.1 Thinking Mathematically.
M 112 Short Course in Calculus Chapter 1 – Functions and Change Sections 1.5 Exponential Functions V. J. Motto.
© The McGraw-Hill Companies, 2005 TECHNOLOGICAL PROGRESS AND GROWTH: THE GENERAL SOLOW MODEL Chapter 5 – second lecture Introducing Advanced Macroeconomics:
CHAPTER 11 SECTION 2 Inference for Relationships.
The simplest model of population growth is dy/dt = ky, according to which populations grow exponentially. This may be true over short periods of time,
6.1 Inference for a Single Proportion  Statistical confidence  Confidence intervals  How confidence intervals behave.
Computational Biology, Part 13 Spreadsheet Basics II Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.
MTH 253 Calculus (Other Topics) Chapter 11 – Infinite Sequences and Series Section 11.1 – Sequences Copyright © 2009 by Ron Wallace, all rights reserved.
Week 3 Capacitance & Inductance Transitions Try your hand at graphing these functions Graph: y = e x Graph: y = e -x Graph: y = 1 - e -x.
Dynamic Modeling II Drawn largely from Sage QASS #27, by Huckfeldt, Kohfeld, and Likens. Courtney Brown, Ph.D. Emory University.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
1 6. Mean, Variance, Moments and Characteristic Functions For a r.v X, its p.d.f represents complete information about it, and for any Borel set B on the.
Outline of Today’s Discussion 1.The Chi-Square Test of Independence 2.The Chi-Square Test of Goodness of Fit.
System Time Response Characteristics
Chapter 8 Spreadsheets. Examining Spreadsheets  Basic Functions Performing Calculations Sorting Data Selecting Data Creating Graphs and Charts.
Copyright ©2015 Pearson Education, Inc. All rights reserved.
Copyright © Cengage Learning. All rights reserved. Rational Expressions and Equations; Ratio and Proportion 6.
ERT 210/4 Process Control & Dynamics DYNAMIC BEHAVIOR OF PROCESSES :
The Practice of Statistics Third Edition Chapter 15: Inference for Regression Copyright © 2008 by W. H. Freeman & Company.
Ch 9.6: Liapunov’s Second Method In Section 9.3 we showed how the stability of a critical point of an almost linear system can usually be determined from.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Chapter 6 More about Polynomials
Population Models in Excel
Boundary Element Analysis of Systems Using Interval Methods
Copyright © Cengage Learning. All rights reserved.
An Introduction to Mathematical Biomedicine
Differential Equations:
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
Numerical Analysis Lecture 38.
College Algebra Chapter 6 Matrices and Determinants and Applications
Copyright © Cengage Learning. All rights reserved.
ALGEBRA TWO Section Writing Equations of Lines
Population Modeling Mathematical Biology Lecture 2 James A. Glazier
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

Computational Biology, Part 14 Recursion Relations Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.

Illustration from Population Dynamics (after Segel) Consider a species of insect that hatches in the spring, lays eggs in the fall and dies in the winter. Consider a species of insect that hatches in the spring, lays eggs in the fall and dies in the winter. Let N i be the number of insects in year i. Let N i be the number of insects in year i. It is safe to say that the number of insects in a generation will be a function of the number in the previous generation, that is, N i+1 = f(N i ). It is safe to say that the number of insects in a generation will be a function of the number in the previous generation, that is, N i+1 = f(N i ).

A recursion relation This type of equation, N i+1 = f(N i ), is called a recursion relation. Given N 0 and f we can determine all values of N. This type of equation, N i+1 = f(N i ), is called a recursion relation. Given N 0 and f we can determine all values of N. In the simplest case, consider the birthrate to be constant. Let R be the ratio of the birthrate in the next generation to the birthrate in the current generation. In the simplest case, consider the birthrate to be constant. Let R be the ratio of the birthrate in the next generation to the birthrate in the current generation.

The simplest case Then f(N i ) = RN i. Then f(N i ) = RN i. Quite naturally, the behavior of N i depends on R. Quite naturally, the behavior of N i depends on R.  R<1  N i  ?

The simplest case Then f(N i ) = RN i. Then f(N i ) = RN i. Quite naturally, the behavior of N i depends on R. Quite naturally, the behavior of N i depends on R.  R<1  N i  0  R=1  N i  ?

The simplest case Then f(N i ) = RN i. Then f(N i ) = RN i. Quite naturally, the behavior of N i depends on R. Quite naturally, the behavior of N i depends on R.  R<1  N i  0  R=1  N i  N 0  R>1  N i  ?

The simplest case Then f(N i ) = RN i. Then f(N i ) = RN i. Quite naturally, the behavior of N i depends on R. Quite naturally, the behavior of N i depends on R.  R<1  N i  0  R=1  N i  N 0  R>1  N i  

A better estimate Unlimited growth is unrealistic; eventually something (e.g., food supply) will limit growth. Unlimited growth is unrealistic; eventually something (e.g., food supply) will limit growth. Assume R changes with N i. Assume it decreases linearly as N i increases Assume R changes with N i. Assume it decreases linearly as N i increases  R(N i ) = r[1-N i /K] with r,K > 0 Then Then  N i+1 = rN i [1-N i /K]

Changing variables N i+1 = rN i [1-N i /K] implies that when N i =K, the birthrate is zero. When N i >K, the birthrate is negative. Since a negative birthrate is meaningless, we can only interpret results when N i K, the birthrate is negative. Since a negative birthrate is meaningless, we can only interpret results when N i <=K. To simplify, let x i =N i /K. Then To simplify, let x i =N i /K. Then  x i+1 = r x i (1-x i )

Interactive demonstration (Demonstration D6) (Demonstration D6)

Parameter line From our modeling, we conclude that the system shows qualitatively different behavior for different parameter (r) values. From our modeling, we conclude that the system shows qualitatively different behavior for different parameter (r) values. We can construct a parameter line to illustrate this. We can construct a parameter line to illustrate this. 0123r monotonic oscillatory unstable oscillatory

Parameter line We can construct this line by hand (by exploring the behavior of the system using the spreadsheet) or we can try to automate the construction of the line. We can construct this line by hand (by exploring the behavior of the system using the spreadsheet) or we can try to automate the construction of the line. To do so we can try to find the “final” or steady state value of the system for various values of r. To do so we can try to find the “final” or steady state value of the system for various values of r.

Finding steady states The spreadsheet we have looked at uses a row for each generation of insects. We don’t necessarily know how many generations are required to reach a steady state. One solution is to expand the sheet to include “many” cells and assume that if there is a steady state it will be reached. The spreadsheet we have looked at uses a row for each generation of insects. We don’t necessarily know how many generations are required to reach a steady state. One solution is to expand the sheet to include “many” cells and assume that if there is a steady state it will be reached.

Finding steady states using circular references Another solution is to use a single cell and a circular reference Another solution is to use a single cell and a circular reference In this case, how do we initialize the system (to something other than zero)? In this case, how do we initialize the system (to something other than zero)? We can use a flag to trigger initialization and an IF function to check the flag We can use a flag to trigger initialization and an IF function to check the flag

Initializing using a flag and an IF function We choose a cell (e.g., A2) to show whether we want the system to be initialized or allowed to iterate to a possible steady state We choose a cell (e.g., A2) to show whether we want the system to be initialized or allowed to iterate to a possible steady state We choose a cell (e.g., B2) to contain the initial value desired We choose a cell (e.g., B2) to contain the initial value desired

Initializing using a flag and an IF function We choose a cell (e.g., C2) to hold the value of the system and enter an IF function along with the system formula (e.g., x i+1 =(x i +3)/2). For example, We choose a cell (e.g., C2) to hold the value of the system and enter an IF function along with the system formula (e.g., x i+1 =(x i +3)/2). For example,IF(A2=0,B2,(C2+3)/2)

Initializing using a flag and an IF function To allow the system to be evaluated, set the flag to zero, then set it to something non-zero To allow the system to be evaluated, set the flag to zero, then set it to something non-zero Note that this must be done each time reevaluation is desired, i.e. to see the effect of changing the initial value Note that this must be done each time reevaluation is desired, i.e. to see the effect of changing the initial value

Interactive demonstration Modify Demonstration D6 to use a single row of cells to calculate the “final” value of x i for each value of r (use a flag to initialize) Modify Demonstration D6 to use a single row of cells to calculate the “final” value of x i for each value of r (use a flag to initialize) Modify further to use two rows to calculate the “final” values starting from two initial values (e.g., starting from generation 1 and from generation 2) Modify further to use two rows to calculate the “final” values starting from two initial values (e.g., starting from generation 1 and from generation 2)

Interactive demonstration Calculate the difference to see if “final” value is stable and show qualitative conclusion for each value of r Calculate the difference to see if “final” value is stable and show qualitative conclusion for each value of r

Steady-state solutions We conclude for certain values of r that the final value of x i seems to vary with r. What determines the final value? We conclude for certain values of r that the final value of x i seems to vary with r. What determines the final value? We can solve the recursion relation for a steady-state value. To do so, we look for values of x i for which x i+1 is the same, i.e., x i = x i+1 = x i r(1- x i ) We can solve the recursion relation for a steady-state value. To do so, we look for values of x i for which x i+1 is the same, i.e., x i = x i+1 = x i r(1- x i )

Steady-state solutions There are two solutions to the equation x i = x i r(1- x i ) There are two solutions to the equation x i = x i r(1- x i ) (1) ? (1) ?

Steady-state solutions There are two solutions to the equation x i = x i r(1- x i ) There are two solutions to the equation x i = x i r(1- x i ) (1) x i = 0 (1) x i = 0 and and (2) ? (2) ?

Steady-state solutions There are two solutions to the equation x i = x i r(1- x i ) There are two solutions to the equation x i = x i r(1- x i ) (1) x i = 0 (1) x i = 0 and and (2) x i = 1 - 1/r (2) x i = 1 - 1/r

Steady-state solutions Which solution is actually observed or if a steady state is ever reached depends (1) on the value of r and (2) on the initial value of x i (x 1 ) Which solution is actually observed or if a steady state is ever reached depends (1) on the value of r and (2) on the initial value of x i (x 1 ) For example, if x 1 = 0 we can never get to the other steady state 1 - 1/r For example, if x 1 = 0 we can never get to the other steady state 1 - 1/r

Steady-state solutions We can mathematically determine which solution will apply and whether it can be reached by analysis of the approach to the steady-state, which involves examining the derivative of x i in the neighborhood of the solutions (e.g., by a Taylor expansion) We can mathematically determine which solution will apply and whether it can be reached by analysis of the approach to the steady-state, which involves examining the derivative of x i in the neighborhood of the solutions (e.g., by a Taylor expansion)

Steady-state solutions Alternatively, we can numerically (computationally) determine which solution will apply by simulation as we have done. Alternatively, we can numerically (computationally) determine which solution will apply by simulation as we have done.

Interactive demonstration Compare the “final” values in the modified Demonstration D6 to 1- 1/r to see if the steady state has been reached. Compare the “final” values in the modified Demonstration D6 to 1- 1/r to see if the steady state has been reached.

Parameter line We can update our parameter line to include the steady state values (if any). We can update our parameter line to include the steady state values (if any). 0123r x=0 monotonic x=1-r -1 monotonic x=1-r -1 oscillatory unstable oscillatory

Transition values Our modeling also reveals transition values, values of the parameter that separate one type of behavior from another (e.g., r=1). Our modeling also reveals transition values, values of the parameter that separate one type of behavior from another (e.g., r=1).

Assigned Reading for Next Class Yeargers Yeargers  Section 2.4  pp  Section 9.4 through end of Chapter 9