Need help on setting up an equation of population

  • Thread starter Thread starter Vintageflow
  • Start date Start date
  • Tags Tags
    population
Click For Summary
SUMMARY

The discussion centers on setting up a population growth equation for a computer science homework assignment involving Jackalopes. The key variables include J (original population), Y (generations), P (new population), b (birth percentage), and d (death percentage). The participant attempts to derive the population after Y generations using the formula P = J + (J(0.03-0.01))Y, but encounters discrepancies in results. The correct approach involves recognizing the formula for discrete growth as P(Y) = (1 +(b-d))Y J, which aligns with the expected outcome of 291 Jackalopes after 100 generations.

PREREQUISITES
  • Understanding of basic population growth concepts
  • Familiarity with algebraic equations and variables
  • Knowledge of discrete versus continuous growth models
  • Basic programming skills for implementing the equation
NEXT STEPS
  • Research discrete population growth models
  • Learn about the impact of rounding errors in programming
  • Explore the differences between exponential and linear growth equations
  • Implement the population growth equation in a programming language like Python
USEFUL FOR

Students in computer science courses, educators teaching population dynamics, and anyone interested in mathematical modeling of population growth.

Vintageflow
Messages
5
Reaction score
0
1. So for my computer science course I was given the homework on how to write a program on population growth. The serious dilemma is how to set up the equation. Here are the variables that are given to me:

J = original number of Jackalopes (the imaginary animal that my teacher used)
Y = generation (no specific unit of time)
P = new population after each generation
b = born percentage each generation (3% or 0.03)
d = death percentage each generation (1% or 0.01)

Example: J = 40 Jackalopes
Y = 100 generations
P = new population of 291 Jackalopes after 100 generations

2. The most relevant equation is population growth, which involves exponential functions. the equation looks like

X = X0ert
where:
X0 is the original population
r is the net rate of growth
t is time

The big problem is I can't use exponential functions, because I need to truncate the results and using exponential functions don't give the answer that my teacher is looking for.

3. Here is the attempted solution I came up with:

P = J + (J(0.03-0.01))Y

unfortunately my answer is way off. I recognize the pattern when I attempted to do the equation, but I don't know how to set it up. Please help me!
 
Physics news on Phys.org
Vintageflow said:
3. Here is the attempted solution I came up with:

P = J + (J(0.03-0.01))Y

After one generation,

P(1) = J + (b-d)J = (1+(b-d)) J

After Y generations,

P(Y) = (1 +(b-d))Y J.

It's possible to derive an exponential law if we treat a continuous growth, but this formula is fine for discrete growth. If find P(100)=290, the discrepancy might be due to round off error in a computer code.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
4K
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
20
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K