// Numbas version: exam_results_page_options {"name": "Exponential and logarithms: Introduction - Population Doubling Time", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Exponential and logarithms: Introduction - Population Doubling Time", "tags": [], "metadata": {"description": "

Knowing the doubling time of a population and the population on day $t$, calculate the initial population and the number of days required for the population to reach a threshold. 

", "licence": "None specified"}, "statement": "

The doubling time of a population of flies is $\\var{d}$ days.

\n

$\\var{days[j]}$ days after the start of an experiment, there were $\\var{d1}$ flies in the population.

", "advice": "

a) We know that $\\var{ndays[j]}$ days after the start of the experience there are $\\var{d1}$ flies. We also know that the doubling time is ${\\var{d}}$ days.

\n

In those $\\var{ndays[j]}$ days, the populations would have doubled $\\frac{\\var{ndays[j]}}{\\var{d}}=\\simplify{{ndays[j]}/{d}}$ times. Which means that the initial population, let's call it $n_0$, would have been multiplied by $2^{\\var{int}}$ to result in $\\var{d1}$ flies. So, 

\n

\\[ \\begin{split}  \\simplify[!all]{n_0*2^{ndays[j]/d}}&=\\var{d1} \\\\  \\simplify{n_0*2^{ndays[j]/d}}&=\\var{d1} \\end{split} \\]

\n

If we solve the equation we created, we can find the initial population of flies. Therefore, 

\n

\\[ \\begin{split} \\simplify{n_0*2^{ndays[j]/d}}&=  \\var{d1} \\\\  n_0 &=\\frac{\\var{d1}}{\\var{2^int}}  \\end{split} \\]

\n

Which means that there are $n_0=\\frac{\\var{d1}}{\\var{2^int}}=\\var{n0}~ $ flies at the start of the experiment. 

\n

\n

b) To calculate the number of days for the population to reach $\\var{n1}$ flies, we need an expression that connects the number of days and the size of the population.

\n

Let's say it takes $t$ days for the fly population to reach $\\var{n1}$. Since the populatioin has doubling time of $\\var{d}$ days, this means that in $t$ days the population would have doubled $ \\frac{t}{\\var{d}}$ times. In other words, the initial population will have been multiplied by $2^{\\frac{t}{\\var{d}}}$.

\n

So, we can now substitute this expression into our growth equation:

\n

\\[ \\begin{split} \\var{n0}\\times 2^{\\frac{t}{\\var{d}}} &= \\var{n1}  \\end{split} \\]

\n

Now, if we solve the equaction for t we will find the number of days.

\n

\\[ \\begin{split} \\var{n0}\\times 2^{\\frac{t}{\\var{d}}} &= \\var{n1}  \\\\ 2^{\\frac{t}{\\var{d}}} &= \\frac{ \\var{n1}}{\\var{n0} } \\\\ 2^{\\frac{t}{\\var{d}}} &= \\var{n1divn0} \\end{split}\\]

\n

Taking $log_2()$ of both sides:

\n

\\[ \\begin{split} \\\\ {\\frac{t}{\\var{d}}} &= \\log_2(\\var{n1divn0}) \\\\ t &= \\var{d}\\times\\log_2(\\var{n1divn0}) \\\\ t &= \\var{adviceB} \\end{split}\\].

\n

Therefore, it takes approximately $\\var{ansb}$ days for the population to reach $\\var{n1}$ flies.

\n

\n

\n

Note: Alternatively, you might already know the formula the formula

\n

\\[n=n_0 \\times 2^\\frac{t}{T} \\]

\n

Where, $n$ represents the size of the population (e.g., number of flies) at time $t$, $n_0$ the initial population and $T$ is the length of each time step.

\n

If so, you can use it to find the same results.

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d": {"name": "d", "group": "Ungrouped variables", "definition": "random(10..25 except [11,13,17,19,23])", "description": "", "templateType": "anything", "can_override": false}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "n0*2^int", "description": "", "templateType": "anything", "can_override": false}, "days": {"name": "days", "group": "Ungrouped variables", "definition": "[\"Thirty\", \"Thirty two\", \"Thirty five\", \"Fourty\", \"Fourty two\", \"Fourty five\"]", "description": "", "templateType": "anything", "can_override": false}, "n1": {"name": "n1", "group": "Ungrouped variables", "definition": "random (50..150 #5)", "description": "", "templateType": "anything", "can_override": false}, "Ndays": {"name": "Ndays", "group": "Ungrouped variables", "definition": "[30,32,35,40,42,45]", "description": "", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "Ungrouped variables", "definition": "random(0..5)", "description": "", "templateType": "anything", "can_override": false}, "n0": {"name": "n0", "group": "Ungrouped variables", "definition": "Random (20..50 #2)", "description": "", "templateType": "anything", "can_override": false}, "ansb": {"name": "ansb", "group": "Ungrouped variables", "definition": "round(d*log(n1*n0^(-1),2))", "description": "", "templateType": "anything", "can_override": false}, "int": {"name": "int", "group": "Ungrouped variables", "definition": "ndays[j]*d^(-1)", "description": "", "templateType": "anything", "can_override": false}, "n1divn0": {"name": "n1divn0", "group": "Ungrouped variables", "definition": "precround(n1/n0,2)", "description": "", "templateType": "anything", "can_override": false}, "adviceB": {"name": "adviceB", "group": "Ungrouped variables", "definition": "precround(d*log(n1*n0^(-1),2),3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "d1=int(d1)", "maxRuns": 100}, "ungrouped_variables": ["d", "d1", "days", "n1", "Ndays", "j", "n0", "ansb", "int", "n1divn0", "adviceB"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Calculate the number of flies in the population at the start of the experiment.

\n

There were [[0]]flies.

\n

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{n0}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

How many days after the start of the experiment did the population reach $\\var{n1}$ flies?

\n

The population reached $\\var{n1}$ flies in [[0]] days.

\n

If needed round your answer to the nearest integer.

", "gaps": [{"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{ansb}", "showPreview": true, "checkingType": "absdiff", "checkingAccuracy": 0.001, "failureRate": 1, "vsetRangePoints": 5, "vsetRange": [0, 1], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": []}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}, {"name": "Evi Papadaki", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18113/"}]}]}], "contributors": [{"name": "Ben McGovern", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4872/"}, {"name": "Evi Papadaki", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/18113/"}]}