Sex and Drugs



Disclaimer

Don't let the title excite you. We're talking about rabbit population models and antibiotic concentration in the body, not hormonally or socially induced acts of questionable judgment.

Rabbits

We begin with three simple premises:

A pair of mature rabbits will produce a pair of baby rabbits every month.

A pair of baby rabbits will mature in a month.

Rabbits never die.

We start at time 0 with 1 pair of newborn rabbits.

These premises do not provide a completely accurate model of rabbit populations, but they are useful for the purpose of showing how the population of a species will tend to grow under ideal circumstances.

We will proceed to determine the number of rabbit pairs after each of the first several months, and to establish a simple mathematical rule that allows us to continue to determine the number of pairs month by month without really having to think about every detail.

Consistent with the above assumption we begin with a single pair of newborn rabbits. We list the number of pairs of newborn (baby) rabbits and the number of pairs of mature rabbits:

month 0 population: 1 pair baby rabbits, 0 pairs mature rabbits

At the end of the first month, the pair of baby rabbits will have matured. Since they were babies they will not have reproduced and there will be no newborns. So the population configuration is:

month 1 population: 0 pairs baby rabbits, 1 pair mature rabbits

Now things start moving along. The mature pair will at the end of the next month produce a pair of newborns. The mature pair will of course still be there at the end of the month so we will have:

month 2 population: 1 pair baby rabbits, 1 pair mature rabbits

During the next month the pair of mature rabbits will produce another pair of baby rabbits. The pair of baby rabbits present at the beginning of the month will the mature at the end of the month and the original pair of mature rabbits will of course still be there. So we will have:

month 3 population: 1 pair baby rabbits, 2 pairs mature rabbits

At the beginning of the next month we will have the following: the 2 previous pairs of mature rabbits, 2 pairs of baby rabbits and 1 pair of newly mature rabbits for the following totals:

month 4 population: 2 pairs baby rabbits, 3 pairs mature rabbits

During the next month the 2 pairs of baby rabbits will mature, and the 3 pairs of mature rabbits will produce 3 pairs of baby rabbits and the totals will be:

month 5 population: 3 pairs baby rabbits, 5 pairs mature rabbits

At the end of each of the next three months the population figures will be:

month 6 population: 5 pairs baby rabbits, 8 pairs mature rabbits

month 7 population: 8 pairs baby rabbits, 13 pairs mature rabbits

month 8 population: 13 pairs baby rabbits, 21 pairs mature rabbits

Exercises 1-3

1. Explain how the populations for months 6, 7 and 8 were obtained. Keep track of the numbers of newborn rabbits, newly mature rabbits and old mature rabbits for each month.

2. Obtain the populations for each of the next four months.

3. For the first 12 months make a table with the following headings:

Number of month Number of baby rabbit pairs Number of newly mature rabbit pairs Number of old mature rabbit pairs Number of mature rabbit pairs Total number of rabbit pairs

Identify any patterns that seem to occur in your table.

Recurrence relation for rabbit population

Perhaps you noticed that the population for a given month is equal to the total number of rabbits from the previous month (since the rabbits always survive) plus the number of mature rabbits from that month (since each pair of mature rabbits produces a pair of baby rabbits). In addition you might have noticed that the number of mature rabbits in any given month is equal to the total number of rabbits from the month before. These observations can be combined to reveal a simple pattern.

In order to see the pattern it is useful to write down these observations in concise notation. We will use the notation of recurrence relations, letting a(n) stand for the number of rabbits at the end of month n. We will also use M(n) for the number of mature rabbits at the end of month n.

With this notation we see the following:

The number of mature rabbits at the end of month n is equal to a(n-1), the total number of rabbits at the end of the previous month.

The number of baby rabbits at the end of month n is equal to M(n-1), the number of mature rabbits at the end of the previous month.

So the number a(n) of rabbits at the end of month n is the number of mature rabbits plus the number of baby rabbits, which is

a(n) = a(n-1) + M(n-1).

The table below summarizes the relationships between the various quantities:

Fibonacci_table_no_ratios.gif (8828 bytes)

The table shows the numbers of 'baby' rabbit pairs, newly mature pairs, previously mature pairs, total mature pairs and total number of pairs. A look at the table shows that

the total number pairs a(n-2) in month n-2 (column 6) becomes the number of mature pairs M(n-1) in month n-1 (column 5): 

column 5 is just like column 6 shifted down one place

M(n-1) = a(n-2)

the number of baby pairs in month n (column 2) is equal to the number M(n-1) of mature pairs in month n-1, which we just saw must be equal to the total number of pairs in month n-2 (column 6). 

Column 2 is just column 6 shifted down two places.

Row n of Column 2 reprsents M(n-1) which is the same as a(n-2)

the total number a(n) of pairs (column 6) is equal to the number M(n-1) of baby pairs (column 2) plus the number M(n) of mature pairs (column 5)

a(n) = M(n-1) + M(n) = a(n-2) + a(n-1)

the number of mature pairs (column 5) is equal to the number of newly matured pairs (column 3) plus the number of previously matured pairs (column 4)

The numbers M(n-1) (new babies), M(n) (mature) and a(n) (total number) are summarized in the table below:

Fibonacci_table_essence.gif (5318 bytes)

We see that M(n) is equal to a(n-1), while a(n) = M(n-1) + M(n).  This is reasonably easy to understand. However it involves two sequences, a(n) and M(n). It is more economical to express the pattern in terms of only one sequence.

This is actually easy to do. To repeat ideas expressed previously: 

Since M(n) is the number of mature rabbits at the end of month n, and since the number of mature rabbits at the end of month n is equal to the total number from month n-1, we see that

M(n) = a(n-1).

If M(n) = a(n-1), then either common sense or substitution of n-1 for n will tell us that M(n-1) = a(n-2). So we see that

a(n) = a(n-1) + M(n-1) = a(n-1) + a(n-2).

In terms of the a(n) notation, we see that the total number of pairs in one month becomes the number of mature pairs in the next, and this becomes the number of baby pairs in the next month.  Thus a(n-2) is the total number of pairs in month n-2; all these rabbits become mature in month number n-1, and all these rabbits produce babies in the next month n.  So the a(n-2) on the table below migrates diagonally downward and to the left.

month

baby pairs

mature pairs

total number of pairs

n-2

a(n-2)

n-1

a(n-2)

a(n-1)

n

a(n-2)

a(n-1)

a(n)

n+1

a(n-1)

a(n)

n+2

a(n)

Similarly we see the a(n-1) and a(n) numbers repeating themselves in a similar pattern.

The nth row therefore shows how a(n-2) and  a(n-1) must add up to a(n), since the total number of pairs is equal to the number of baby pairs plus the number of mature pairs.

This recurrence relation a(n) = a(n-1) + a(n-2), with the initial conditions a(0) = 1 and a(1) = 1, defines what we call the Fibonacci sequence:

Fibonacci sequence: a(n) = a(n-1) + a(n-2), a(0)=1, a(1) = 1.

This sequence provides us with a mathematical model of rabbit reproduction according to our assumptions.

The recurrence relation can also be interpreted as follows:

a(n-2) is the total number of rabbit pairs at the end of month n-2, all of which will be mature at the end of month n-1; so a(n-2) is the number of mature pairs at the end of month n-1. All these pairs will produce baby pairs at the end of the next month, month n. So a(n-2) is the number of baby rabbit pairs at the end of  month number n.

a(n-1) is the total number of rabbit pairs at the end of month n-1; all these rabbits will be mature at the end of month n. So a(n-1) is the total number of mature rabbit pairs at the end of month n.

when we add the number of baby rabbit pairs to the number of mature pairs we get the total number of pairs.

Exercises 4-5

4. If we substitute 2 for n in the recurrence relation defining the Fibonacci sequence we obtain

a(2) = a(2-1) + a(2-2) = a(1) + a(0).

Evaluating this for the given values of a(1) and a(0) we easily obtain a(2) = 2.

Substituting in turn the values n=3, 4, 5, ..., 10 into the defining relationship, determine a(3), a(4), ..., a(10).

5. Calculate the ratios a(2) / a(1), a(3) / a(2), ..., a(10) / a(9). What sort of pattern do you see? What would a graph of these ratios a(n) / a(n-1) vs. n look like?

Near-Exponential Behavior and Exponential Approximation

A graph of rabbit population vs. time for the first 10 months is reminiscent of the graph of an exponential function:

The dark (black) line represents the point-to-point graph of the Fibonacci sequence. The (red) line forming the middle graph represents a similar graph of the number of mature pairs, and the (blue) line forming the rightmost and lowest graph represents the number of baby pairs at the end of each month.

The sequence is of course not exactly exponential, since a(0) = a(1) = 1 and an exponential cannot possibly take the same value at two different points.

We recall also that an exponential function has the constant-ratio property: For any sequence generated by evaluating the exponential function at constant intervals, the ratio of a number to its predecessor is always the same. The Fibonacci sequence ratios are

1/1 = 1, 2/1 = 2, 3/2 = 1.5, 5/3 = 1.66..., 8/5 = 1.60, 13/8 = 1.625, etc.

The first  17  ratios are shown on the table below:

Fibonacci_table_ratios.gif (5678 bytes)

Note that between n=16 and n=17 the ratio does not change through the seventh significant digit.  In fact the ratios appear stable through more and more digits as n increases.

These ratios are clearly not constant, so we again see that the Fibonacci sequence isn't precisely modeled by an exponential function.

However, the ratios do get closer and closer together. In fact they do so in such a way that two consecutive ratios 'squeeze' all subsequent ratios between them. For example, the ratios 1.5 and 1.66... occur consecutively and we note that subsequent ratios seem to all lie between 1.5 and 1.66... .

The graph below shows these ratios. The differences between first seven ratios are apparent from the slopes of the graph, but after that the slopes, and hence the differences between ratios, are so small that they do not show on the graph.

A graph with a y scale between 1.6 and 1.7 will show some of the details not apparent in the first:

The first few ratios are completely off the scale, but then the graph begins to look very much like the previous graph, showing about seven sloping segments before apparently straightening out again.

This process of looking more and more closely at the graph could continue indefinitely. The last graph shows that the ratios lie between 1.61 and 1.62; a more restricted graph would reveal ratios between 1.618 and 1.619. From this graph we could make subsequent refinements, focusing closer and closer to the limiting value of the ratio a(n) / a(n-1).

Since the ratios get squeezed closer and closer together, they become nearly constant after awhile. After 1.60 and 1.625, all ratios will be between these values. The graphs above show that the ratios quickly get squeezed very very close to some limiting ratio. After a short time the ratios don't vary much and so the sequence acts almost as if it has a constant ratio. So the sequence is very nearly exponential.

An exponential fit to the a(n) vs. n 'data' of a Fibonacci sequence will work very well. The f(x) = a b^x form of the exponential function will be reasonably close to f(x) = 1.618 ^ x. The value of b will be close to the 'sort-of-constant' ratio a(n) / a(n-1).

Exercises 6-8

6. Refer to the first graph of this section. This graph is repeated below, with grid lines for easy reference.

Explain how we can look at the figure in order to see that the function of the dark black graph is the sum of the other two functions represented. In terms of the meanings of these functions, explain why we would expect this to be so.

Explain how to see by looking at the graph that for a given month n the y value of the red graph (middle) is equal to the previous month's y value of the (thick) black graph, and the y value of the blue graph is equal to that of the black graph two months before.

7. The sequence of ratios a(n) / a(n-1) for a Fibonacci sequence approaches a limiting value of approximately 1.618, as indicated above. This value, 1.618, is accurate to 4 significant figures.

For what value of n will this ratio give the limiting value accurate to 6 significant figures? What is this value?

8. Use the Fibonacci sequence data points for n = 5 and n = 10 to obtain an exponential model in the form y = a b^x.

Compare the values predicted by your model to the first 10 members of the Fibonacci sequence. What is your average error?

Generalized Fibonacci sequences

We could change the definition of the Fibonacci sequence slightly, and obtain a 'Fibonacci-like' sequence with many similar characteristics.

For example we could define a sequence by

a(n) = 2 a(n-1) + 3 a(n-2), a(0) = 3, a(1) = 1.

This sequence has different starting values 3, 1, ... and uses different multiples of preceding numbers. It probably doesn't correspond very well with any reproductive model, though it might conceivably be useful for other applications.

We can easily evaluate this sequence:

n = 2: a(2) = 2 a(1) + 3 a(0) = 2*1 + 3*3 = 11

n = 3: a(3) = 2 a(2) + 3 a(1) = 2*11 + 3*1 = 25

n = 4: a(4) = 2 a(3) + 3 a(2) = 2*25 + 3*11 = 83

etc.

The ratios of this sequence so far are 1/3 = .333... , 11/1 = 11, 25 / 11 = 2.364.. , 83 / 25 = 3.32. It is already apparent that the ratios seem to exhibit the same sort of squeezing behavior seen with the Fibonacci sequence.

We could define a sequence in terms of three preceding values:

a(n) = a(n-1) + 3 a(n-2) + 2 a(n-3), a(0) = 1, a(1) = 3, a(2) = 1.

This sequence requires 3 initial values a(0), a(1) and a(2) to get started, since the first value we compute requires the three preceding values. The first two new values are:

n = 3: a(3) = a(2) + 3 a(1) + 2 a(0) = 1 + 3*3 + 2*1 = 12

n = 4: a(4) = a(3) + 3 a(2) + 2 a(1) = 12+ 3*1 + 2*3 = 21

Subsequent values will again reveal squeezing behavior and an approach to a limiting value.

A generalized Fibonacci sequence occurs whenever the term a(n) is obtained by adding fixed multiples of a certain number of preceding values a(n-1), a(n-2), and perhaps a(n-3), etc..

Exercises 9-11

9. Evaluate the sequence defined by a(n) = a(n-1) + 3 a(n-2) + 2 a(n-3), a(0) = 1, a(1) = 3, a(2) = 1, for n = 5 to 10.

Determine the ratios a(3) / a(2), a(4) / a(3), ..., a(10) / a(9) and investigate the squeezing behavior of these ratios.

Use DERIVE to obtain an exponential model for this sequence. Determine how well this exponential model fits the data.

Reminders:

You will need to obtain a linear regression line for a log(y) vs. x data set.

If you author your x values in #1 and your y values in #2, then [#1, #2] will be a complete data set.

The vector [#1, log(#2) ] will provide a log(y) vs. x data set on which you can perform a linear fit.

An exponential transformation of your resulting function will transform it into a y vs. x function.

10. If mature rabbits were to produce two baby pairs per month, what then would be the definition of the Fibonacci-type sequence that models the situation where we start with 1 pair of baby rabbits.

What would be population be at the end of each of the first 6 months?

What evidence can you find that this model can be reasonably approximated by a Fibonacci sequence?

11. How would the Fibonacci model change if rabbits required two months to mature, with each mature pair still producing 1 pair of baby rabbits per month?

Antibiotics

When you take a drug, the substance is typically absorbed into your bloodstream and delivered to various tissues, from which it flows back into the bloodstream and is removed by the kidneys in a pretty complicated manner with which we will not be concerned here.

The simple model used here for antibiotics assumes that

1. All the antibiotic goes immediately into the bloodstream when taken and stays there until it is removed by the kidneys.

2. The kidneys remove the antibiotic at a rate proportional to the amount present in the bloodstream.

The first assumption oversimplifies a process in which the antibiotic is absorbed into the cells of different tissues in order to make the mathematical model simple enough to understand easily. Even though the process is overly simplified, the model is still basically valid and correct. This is because all those complicated effects usually have less than a 10% effect on the actual behavior of the system.

The second assumption implies that a single dose of antibiotic would result in an initial concentration that would exponentially decrease toward 0. The exponential behavior is a result of the assumed proportionality between rate of removal and amount.

Maintenence Levels

The first question we will consider is this:

Given a desired minimum amount of drug that must remain present and the proportion of the drug removed between doses, what is the periodic dosage necessary to maintain that minimum level?

For example suppose we wish to maintain 1000 mg of a certain antibiotic in a patient, using one dose every six hours. If the body is known to remove 30% of the drug in 6 hours, how much should we give the patient for each dose?

We might try to reason as follows:

If the body removes 30% in six hours, then we should give the patient 30%(1000 mg) = 300 mg every six hours to offset this loss.

This seems reasonable enough, but if we in fact give the patient 300 mg at the instant the concentration has fallen to 1000 mg, the concentration will go up to 1300 mg. Then over the next 6 hours the concentration will fall by 30% of the 1300 mg, losing 30%(1300 mg) = 390 mg and ending up at 70% of the 1300 mg, or 910 mg.

This result shows us the flaw in our reasoning. When we give a dose, we increase the amount in the bloodstream and the 30% loss is based on this increased amount.

We are therefore stuck having to use a little algebra. We let D stand for the dose. In this example the amount of antibiotic in the bloodstream right after the dose will be 1000 mg + D (remember that we are giving the dose at the instant the amount falls to 1000 mg). After 6 hours the amount of antibiotic concentrated in the bloodstream will be 70% of the (1000 mg + D) present immediately after the dose.

We wish to find the dose D that will result in a minimal 1000 mg concentration after 6 hours. That is, we want 70% of the (1000 mg + D) that remains after six hours to equal the 1000 mg minimum. We write be following equation to depict this situation:

.70 ( 1000 mg + D ) = 1000 mg.

This equation is easily solved for D. We will obtain D = 429 mg, rounded to the nearest mg.

We can generalize this reasoning. If the desired level of the drug is L, and if the proportion lost between doses is r, then (1-r) of the drug present immediately after a dose D will remain when it is time for the next dose. In the previous example, L was 1000 mg, r was .30 and (1-r) was .70.

Using symbols we see that the amount immediately after dosage will be

amount after dose: L + D,

and that the amount remaining at the time of the next dose will be (1-r) of this:

amount at next dose = (1-r) (L + D).

Since we want the amount at the next dose to be the minimum level L, we therefore have the condition

condition for maintenence dose D: (1-r) (L + D) = L.

We easily solve this equation for D:

L + D = L / (1-r) multiplying both sides by 1 / (1-r)

D = L / (1-r) - L adding -L to both sides

D = L/(1-r) - (1-r) L / (1-r) common denominator for right side

D = [ L - (1-r) L ] / (1-r) adding numerators

D = r L / (1-r) simplifying the numerator

In our original example, r L / (1-r) was .3 (1000 mg) / .7 = 429 mg.

Exercises 12-16

12. In your own words describe how to reason out the dosage D required for a desired level L of a drug if proportion r of the drug present immediately after a dose has been removed at the time of the next dose.

13. Starting with a dose of 429 mg at the instant the concentration of a drug reaches 1000 mg, and knowing that 30% of the drug is removed in 6 hours, what exponential function models the amount of drug vs. time for the 6-hour interval between doses?

14. What dosage is required to maintain a minimum level of 800 mg if 70% of the drug is removed between doses?

15. What will be the maintenance dose of a drug, given a dose of 500 mg with 35% of the drug removed between doses?

16. If a patient starts with no drug in her body and takes a 500 mg dose every six hours, losing 40% of the after-dose amount during that time, then how much drug will remain six hours after the initial dose?

How much will remain just before the third dose, assuming that she takes her second 500 mg dose at the appropriate time?

How much will remain just before each of the next three doses, assuming that each dose is taking on schedule?

What sort of function do you think would model the just-before-dose drug concentration?

Fluctuations with Dosage

As the last exercise showed, when we start with no drug in our body and take regular doses the before-dose minimum concentration increases with every dose.

Here is another example, where a 500 mg dose is taken every 12 hours, and 60% of the drug present at an instant is removed in 12 hours:

dose number

dose taken

amt just before

amt just after

amt removed before next dose

amt remaining prior to next dose

1

500

0

500

300

200

2

500

200

700

420

280

3

500

280

780

468

312

4

500

312

812

487.2

324.8

5

500

324.8

824.8

494.88

329.92

6

500

329.92

829.92

497.952

331.968

7

500

331.968

831.968

499.1808

332.7872

8

500

332.7872

832.7872

499.6723

333.1149

9

500

333.1149

833.1149

499.8689

333.246

10

500

333.246

833.246

499.9476

333.2984

The first line of the table shows how the initial 500 mg dose results in a 500 mg concentration immediately after the dose and how 60%, or 300 mg, is removed prior to the next dose leaving 200 mg at that time.

The second line shows how the next 500 mg dose is added to the 200 mg remaining from the first, resulting in a 700 mg concentration from which 420 mg is removed, leaving 280 mg.

The third line adds another 500 mg dose to the remaining 280 mg; of the resulting 780 mg, 312 mg remains at the next dose, to which another 500 mg will be added at the following dose, etc..

The last column depicts the minimum concentration for each dosage cycle. This minimum increases from 200 mg to 280 mg to 312 mg, etc.. What sort of sequence is this?

The minimum-concentration sequence is 200, 280, 312, 324.8, .... The differences of this sequence are 80, 32, 12.8, ..., and its ratios are 1.4, 1.14, 1.04, .... Neither sequence is constant and neither looks promising for a set of difference calculations.

However the ratios of the difference sequence 80, 32, 12.8 are both .4. Not only that but .4 is the proportion remaining after each dosage cycle.

Thus the ratio sequence of the difference sequence is exponential with a growth factor of .4 and initial value 80. It follows that the ratio sequence of the difference sequence is modeled by the function

ratio sequence of difference sequence = 80 * .4 ^ n.

It isn't overly difficult to use this sequence to construct a drug concentration function. However a simpler technique for constructing this function will be outlined in the exercises.

A graph of the minimum concentration vs. number of cycles is shown below:

The graph shows the minimum concentration (X marks, thin blue line connecting points) and the maximum concentration (square marks, thin red line connecting points) for each cycle. The maximum concentration occurs just after the dosage. The actual concentration then falls exponentially to the minimum concentration for the following dose.

Exercises 17-23

17. Sketch a graph of the drug concentration vs. time, including the between-doses exponential drop from the maximum concentration just after each dose to the minimum just before the next.

Determine the exponential function that models the drug concentration from just after the third dose to just before the fourth.

18. For the example given above, what will be the maintenance level of the drug?

For each dosage cycle calculate the difference between the maintenance level and the minimum level for the cycle. Show that the sequence of these differences is exponential and find the exponential function y = A b^n that models these differences.

Use this function and your knowledge of the maintenance level to obtain the function that models the minimum concentration during a cycle vs. the number n of that cycle.

19. Determine the minimum concentration vs. dosage cycle of a drug for six dosage cycles, starting with the first dose, if the dosage is 750 mg and if 55% of the maximum concentration of the drug is removed during each cycle.

Use the technique outlined in the preceding problem to find the function that models the minimum concentration during a cycle vs. the number of the cycle.

20. For the example given in this section, suppose that a dose was missed, and that the next several doses were taken on schedule. Find the average minimum concentration for the next three dosage cycle, including the cycle in which the dose is missed.

21.  If a(n) is the amount of drug present just before the nth dose, then a(n-1) is the amount present just before dose number n-1.

If the dosage is 500 mg and the proportion removed during a dosage cycle is .6, then write expressions for the following:

In terms of a(n-1), the drug concentration just after dose number n-1.

In terms of the preceding expression, the drug concentration just before dose number n.

The expression you just wrote, along with the assumed initial condition a(11) = 0 (i.e., just before does #1 the concentration is zero), constituts a recurrence relation for a(n).

Evaluate your recurrence relation for n = 2, 3, 4 and 5.

22.  What is the dosage and what proportion of a drug is removed if the recurrence relation for the concentration a(n) just before the nth dose is

a(n) = .3(a(n-1) + 800), a(1) = 0  ?

23.  Write the general recurrence relation for initial concentration 0, dosage D and proportion removed = r.