Docsity

Recursion Relations, Lecture Slide - Biology, Slides of Computational Biology

Partial preview of the text

Download Recursion Relations, Lecture Slide - Biology and more Slides Computational Biology in PDF only on Docsity!

Computational Biology, Part 14

Recursion Relations

Robert F. Murphy

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.

 Let Ni 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, Ni+1 = f (Ni).

The simplest case

 Then f (Ni) = RNi.

 Quite naturally, the behavior of Ni depends on R.  R<1  Ni?

The simplest case

 Then f (Ni) = RNi.

 Quite naturally, the behavior of Ni depends on R.  R<1  Ni0R=1Ni?

The simplest case

 Then f (Ni) = RNi.

 Quite naturally, the behavior of Ni depends on R.  R<1  Ni0R=1NiN 0R>1Ni  

A better estimate

 Unlimited growth is unrealistic; eventually something (e.g., food supply) will limit growth.

 Assume R changes with Ni. Assume it decreases linearly as Ni increases  R ( Ni ) = r [1- Ni / K ] with r,K > 0

 Then

Ni+1 = rNi [1- Ni / K ]

Interactive demonstration

 (Demonstration D6)

Parameter line

 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.

0 1 2 3 r

monotonic monotonic oscillatory

unstable oscillatory

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.

Finding steady states using

circular references

 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)?

 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., C2) to hold the

value of the system and enter an IF

function along with the system formula

(e.g., xi+1=(xi+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

 Note that this must be done each time

reevaluation is desired, i.e. to see the

effect of changing the initial value

Interactive demonstration

 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 xi 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 xi for which xi+1 is the same, i.e., xi = xi+1 = xi r (1- xi )