VIPSolutions logo ✨ VIPSolutions

give answer in 3 step with explanation at the end of each step and final answer at the end:9. SIR/SEIR models (15 points). Suppose there is a vampire apocalypse in 2050. There are four populations: (susceptible), B (bitten), R (recovered), and V (vampire). There are two possible disease trajectories: Trajectory 1 [— \2 s—> 8 Lo, R Trajectory 2 In trajectory 1, a susceptible person who is bitten by a vampire will become a vampire. This portion of the population does not have garlic to prevent infection. In trajectory 2, anyone who is eats garlic immediately after being bitten by a vampire will recover and will not become a vampire. Given: « Avampire bites 3 people per day. A person becomes a vampire 5 days after being bitten. A person who eats the garlic recovers in 2 days. 40% of the total population has prepared for the apocalypse and keeps garlic in a place that is immediately accessible. a. (3) What parameters do you need to solve for each population as a function of time? What are the values of these parameters? ; ) ) a ) b. (3) Write a differential equation (ex: 5) for each population (5, 8, R, V). c. (9) Plot each population fraction as a function of time on a single graph. Set time long enough to show the trajectory. Set the initial conditions for § and V to 0.999 and 0.001, respectively. Show your code from MATLAB (or another program).

Question:

give answer in 3 step with explanation at the end of each step and final answer at the end:Uploaded Image9. SIR/SEIR models (15 points). Suppose there is a vampire apocalypse in 2050. There are four populations: (susceptible), B (bitten), R (recovered), and V (vampire). There are two possible disease trajectories: Trajectory 1 [— \2 s—> 8 Lo, R Trajectory 2 In trajectory 1, a susceptible person who is bitten by a vampire will become a vampire. This portion of the population does not have garlic to prevent infection. In trajectory 2, anyone who is eats garlic immediately after being bitten by a vampire will recover and will not become a vampire. Given: « Avampire bites 3 people per day. A person becomes a vampire 5 days after being bitten. A person who eats the garlic recovers in 2 days. 40% of the total population has prepared for the apocalypse and keeps garlic in a place that is immediately accessible. a. (3) What parameters do you need to solve for each population as a function of time? What are the values of these parameters? ; ) ) a ) b. (3) Write a differential equation (ex: 5) for each population (5, 8, R, V). c. (9) Plot each population fraction as a function of time on a single graph. Set time long enough to show the trajectory. Set the initial conditions for § and V to 0.999 and 0.001, respectively. Show your code from MATLAB (or another program).

This is AI generated Response.
Asked by: Test User 100161
Created at: 2025-05-07 08:41:56

Final Answer:

Rendered Raw Text
Did you like this answer?
Let’s solve the problem step by step: --- ### **Step 1: Identify Parameters and Their Values (Part a)** **Parameters needed:** - **β (beta):** Infection rate (vampire bites per susceptible per day) - **γ<sub>v</sub> (gamma_v):** Rate at which bitten people become vampires (per day) - **γ<sub>r</sub> (gamma_r):** Rate at which bitten people recover (per day) - **p<sub>g</sub>:** Proportion of people with garlic (who recover) **Values from the problem:** - A vampire bites **3 people per day**: β = 3 - Becomes vampire **5 days after bitten**: γ<sub>v</sub> = 1/5 per day - Garlic recovery in **2 days**: γ<sub>r</sub> = 1/2 per day - **40%** of population prepared (has garlic): p<sub>g</sub> = 0.4 **End of Step 1 Explanation:** We identified the rates and proportions that control the flow between the populations: susceptible, bitten, vampire, and recovered. --- ### **Step 2: Write Differential Equations (Part b)** Let: - S = Fraction of susceptible people - B = Fraction of bitten people - V = Fraction of vampires - R = Fraction of recovered people **Flows:** - S → B (via bites, at rate β * S * V) - B → V (those who don’t have garlic, at rate (1 - p<sub>g</sub>) * γ<sub>v</sub> * B) - B → R (those with garlic, at rate p<sub>g</sub> * γ<sub>r</sub> * B) **Equations:** \[ \frac{dS}{dt} = -\beta S V \] \[ \frac{dB}{dt} = \beta S V - (1-p_g)\gamma_v B - p_g\gamma_r B \] \[ \frac{dV}{dt} = (1-p_g)\gamma_v B \] \[ \frac{dR}{dt} = p_g\gamma_r B \] **End of Step 2 Explanation:** These equations describe the rate of change for each population based on the given scenario. --- ### **Step 3: Plot Population Fractions Over Time (Part c)** **Initial conditions:** - S(0) = 0.999 - V(0) = 0.001 - B(0) = 0 - R(0) = 0 **MATLAB/Python Example (using scipy):** ```python import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt # Parameters beta = 3 gamma_v = 1/5 gamma_r = 1/2 p_g = 0.4 # Differential equations def deriv(y, t, beta, gamma_v, gamma_r, p_g): S, B, V, R = y dSdt = -beta * S * V dBdt = beta * S * V - (1 - p_g) * gamma_v * B - p_g * gamma_r * B dVdt = (1 - p_g) * gamma_v * B dRdt = p_g * gamma_r * B return [dSdt, dBdt, dVdt, dRdt] # Initial conditions S0 = 0.999 B0 = 0 V0 = 0.001 R0 = 0 y0 = [S0, B0, V0, R0] # Time grid t = np.linspace(0, 100, 1000) # Integrate equations ret = odeint(deriv, y0, t, args=(beta, gamma_v, gamma_r, p_g)) S, B, V, R = ret.T # Plot plt.figure(figsize=(10,6)) plt.plot(t, S, label='Susceptible') plt.plot(t, B, label='Bitten') plt.plot(t, V, label='Vampire') plt.plot(t, R, label='Recovered') plt.xlabel('Time (days)') plt.ylabel('Fraction of Population') plt.title('Vampire Apocalypse SIR-SEIR Model') plt.legend() plt.show() ``` **End of Step 3 Explanation:** This code numerically solves the system and plots the evolution of the four population fractions over time. --- ### **Final Answer:** **Parameters:** β = 3, γ<sub>v</sub> = 1/5, γ<sub>r</sub> = 1/2, p<sub>g</sub> = 0.4 **Equations:** \[ \frac{dS}{dt} = -\beta S V \\ \frac{dB}{dt} = \beta S V - (1-p_g)\gamma_v B - p_g\gamma_r B \\ \frac{dV}{dt} = (1-p_g)\gamma_v B \\ \frac{dR}{dt} = p_g\gamma_r B \] **Initial conditions:** S(0) = 0.999, B(0) = 0, V(0) = 0.001, R(0) = 0 **Plot:** Use the provided code to see the time evolution of each population. Let me know if you want a plot or explanation of the results!

📢 Instructions:

  • Ask anything relatd to above question only.
  • For new Question goto :

Study Help, Fast Answers

VIPSolutions focuses on clear, step‑by‑step explanations so you can learn quickly. Whether you need an AI‑generated walkthrough or a short hint to get unstuck, each solution is organized for fast reading and easy review later.

Search similar questions, compare approaches, and bookmark the best answers for revision. Our goal is simple: quick, reliable study help that feels natural—not noisy.