Blog Feed

Mathematics in Epidemiology with SIR model

When I flick through the blog posts, one thing that I find missing is the content related to epidemics. Yes, it is now April 2020, and COVID-19 is definitely a thing worth paying attention to – you must have been living under the rock if you are not tracking this destructive disease that is wreaking havoc throughout all nations around the world. Of course, a disease of such a scale requires us to bring out some big guns, and mathematics fans would surely enjoy the fact that modeling has played a crucial part in updating the world with the information it needs to effectively combat the dire situation. So today we are going to look at the basics of models related to this field – real-life models would be much more complicated – by analyzing, in my opinion, the simplest one out there that is also the father of more complex variations, the SIR compartmental model.

  1. What is the SIR model?

The SIR (acronym for Susceptible – Infected – Recovered) model is, as mentioned above, arguably the simplest of all the models you can use to predict the statistics related to a specified epidemic. It is classified as a compartmental model, which means that it divides the population into compartments using their respective statuses. In this case, there will be three compartments, three “boxes”, and a person will belong to one of them:

  • The “Susceptible” compartment includes any person who has not caught the disease yet and hence is prone to it. Basically, this equals the entire population minus any person who has caught the disease currently or in the past;
  • The “Infected” compartment includes any person who is currently having the disease;
  • The “Recovered” compartment includes any person which has contracted the disease and has recovered from it.

With such categorization, a person’s status would change in one of the following ways:

  • Stay in the Susceptibles; or
  • Change from Susceptibles to an Infected and stay there; or
  • Change from Susceptibles to Infected and to Recovered.

It is important, however, to note the assumptions, which are also limitations of this model. The model does not account for birth and death rates, which is, for the most part, a tolerable error due to being very minor compared to the disease spreading rates. It also assumes that a Recovered person will not be prone to secondary infections of the disease, and therefore would not return to being a Susceptible. The last assumption would be that no person would die of the disease. Therefore, this model would work best for a rapid, non-fatal disease with no chance of reinfection (via acquired immunity).

  1. Model analysis:

The model measures the number of people in each compartment as a function of time by using a set of 3 differential equations for the rate of change of the three compartments:

\begin{cases} \frac{dS}{dt} = -bI\frac{S}{n},\\ \frac{dI}{dt} = bI\frac{S}{n} - kI,\\ \frac{dR}{dt} = kI \end{cases}

In which:

  • S, I, and R are the number of people in the Susceptible, Infected and Recovered compartments respectively;
  • N is the population. Naturally, N = S + I + R;
  • b is the number of contacts an infected person have per day that carries the disease;
  • k is the rate of recovery.

Surprisingly, for such an important model in science, the differential equations can be easily expressed through common sense. For the first equation:

\frac{dS}{dt} = -bI\frac{S}{n}

It is relatively well-known that the disease spreads through contact between an infected and a susceptible person, and here the model is trying to measure those contacts. Since \frac{S}{n} is the fraction of the population that is susceptible, b\frac{S}{n} would be the number of contacts aimed at Susceptibles for each infected individual. Multiply that by the number of infected people and we would have the number of susceptible-turn-infected people, which is what \frac{dS}{dt} represents (the quantity is negative because the number of susceptibles is reducing).

For the third equation:

\frac{dR}{dt} = kI

it is even more straightforward: the number of recovered individuals would equal the recovery rate multiplied by the number of infected people.

Moreover, since we assume an unchanging population,

\frac{dS}{dt} + \frac{dI}{dt} + \frac{dR}{dt} = \frac{dN}{dt} = 0

then the second equation can be followed from the first two.

  1. Model variations:

As mentioned above, the models have various setbacks of not mentioning natural birth and death rates as well as assuming that the disease is non-fatal and not reinfectious. The majority of the diseases will not possess all three of these traits, and therefore variations have been developed to take into account those factors:

  • The SIRD model tackles fatal diseases by adding another Deceased compartment into the model. The infected person would go into either the Deceased or the Recovered compartment;
  • The SIS model tackles reinfectious diseases by creating a loop: a person, after recovering from the disease, is immediately prone to secondary infection and thus will change the status from Infected back to Susceptible;
  • Vital dynamics (birth/death rates) can be incorporated into the differential equations;
  • All of the aforementioned models can be combined into a complex one.

With that, we would end our discussion of the SIR model and its variations. Until the next time, math on!

Logistic Differential Equations and Population Modelling

So today I want to discuss a little bit about a special type of differential equation – the logistic differential equation, which holds particularly great applications in population modelling. The normal form of the logistic differential equation can be expressed as follows:

f'(x) = r(1- \frac{f(x)}{K})f(x)

And in the simplified case K = 1, then

f' = rf(1-f)

Background of the equation:

The logistic function was introduced by the Belgian mathematician Pierre François Verhulst (1804-1849) in a series of three papers between 1838 and 1847 under the guidance of his tutor at the University of Ghent, Adolphe Quetelet. The function was originally intended to model population growth in the face of obvious limitations in the model currently being used at that time, the exponential growth model. Verhulst devised the function as early as the mid-1930s, but only presented an expanded analysis as well as gave the name of the function in 1944.

The original image of Verhulst’s logistic curve in comparison to a logarithmic curve, or exponential curve in modern language

Mathematical Solution for the Equation:

We start with the equation:

\frac{df}{dx} = r(1- \frac{f(x)}{K})f(x)

which after variables separation turns into

\frac{df}{f(1-\frac{f}{K})} = rdx

and, after simplifying the left side,

\frac{df}{f} + \frac{df}{K-f} = rdx

Integrating both sides yield

ln(f) - ln(K-f) = Ce^{rx}

Replacing x = 0 yield the value of the constant of integration C = \frac{f(0)}{k-f(0)}, and further changes yield the final result

f(x) = \frac{Kf(0)e^{rx}}{K + f(0)(e^{rx}-1)}

Application in Population Modelling

As mentioned above, the exponential model was previously used for population modelling, but it fell out of favor with its long-term inaccuracy (which can easily be observed, as for example if the population of the world has been increasing exponentially than the Earth would have been overpopulated a long time ago). With the introduction of this model, Verhulst for the first time, and correctly so, accounts for the carrying capacity K, which is the maximum population an ecosystem can hold.

The graph can be broken down into 3 phases. The first and second phase is when the population is still small and hence 1- \frac{f(x)}{K} is very close to 1, yielding the rate of f' = rf typical of exponential growth models. The first phase is the “initial” phase in which the population is still very small and increases slowly even with exponential growth. In reality, this is the phase where the population has just started in a new ecosystem and has to adapt to it, which extensively limits its growth.

In the second “booming” phase, the population has completely adapted and has grown enough in numbers to be able to exploit the resources of the ecosystem to its advantage. This period is marked with rapid growth in the population as the resources are still more than enough to fuel the boom. The rate, therefore, increases as the newborns will grow up and add to the reproductive capacity of the population together with already existing individuals.

Of course, resources are not infinite, and the population will soon go to the third phase, the “saturation” phase. It is worth noticing that the factor 1- \frac{f(x)}{K} increases in importance as the population grows and eventually would be enough to start decreasing the growth rate of the population – which ideally is after the rate have reached \frac{rf^{2}}{4} at population \frac{K}{2}. In reality, this is when the resources are no longer enough to support every single individual. Competition will arise in the population, and only the ones with enough nutrition will survive and maintain their reproductive capability, explaining the decrease in the rate.

It can also be pointed out that the three-step model discussed above is only applicable when K is ideally fixed. However, K will never be so, and therefore we can add almost an infinite number of phases according to the changes in the K-value. Catastrophes such as volcano eruptions, storms and tsunamis can destroy the habitat and lower the K-value, sometimes below the existing population and resulting in a negative growth rate. Even without them, the waste from the population itself could be enough to degrade the ecosystem and result in the same phenomenon. On the other hand, positive factors such as technological development can raise the K-value either gradually (for example, soil improvement) or instantly (new agricultural products with better yields). This would more likely to keep the “booming phase” lasting longer, or, sometimes in the case of instant K-value rise, a two-slope development corresponding to two different booming phases.

This concludes my discussion of the logistic equation and arguably its most important application. I just feel that the topic is fascinating enough to deserve a separate blog post; and until my next one, math on!

On the Applications of Calculus

Among the different fields of mathematics, calculus is most probably the one high school students are most often exposed to, and not for no reason. The field itself deals with continuous variables, which by nature occurs more often than discrete variables as a function of time. Therefore, not only studying this assists a lot for Mathematics-specialized students from doing differential equations and finding limits to solving complex Olympiad-level polynomial problems, but it benefits every many other different areas such as Physics and Chemistry as well. I think a short review, despite an incomplete one, of these applications would probably be a very interesting take.

(Physics) Position/Distance vs. Speed vs. Acceleration as a function of Time:

One of the most basic examples given to calculus beginners, this is by far the most easily comprehensible and most representative of integrals and derivatives. Since speed describes the increase in distance over time, and acceleration describes the increase in speed over time, it makes it clear that speed and acceleration is the derivative of distance and speed with respect to time, respectively. This creates the equation for speed provided constant acceleration a:

v = v_{0} + \int adt = v_{0} + at

and for position:

x = x_{0} + \int (v_{0} + at)dt = x_{0} + v_{0}t + \frac{1}{2}at^{2}

This means that if we manage to measure just one of the three variables a, v, or x, the other two variables can be calculated as a consequence with a margin of error only dependent on the original measurement, hence reducing the work needed by a huge margin.

Area and volumetric calculations: 

Sometimes my teacher used to say to me that “the ultimate goal of studying calculus is to calculate the volume of a randomly-shaped object”. Of course, that was only a joke, but it reveals quite a famous application dedicated solely to this field of mathematics. For a fixed shape like the cube or the cylinder, obtaining the appropriate formula for calculation might be possible by experimentation, but for a completely random shape it is almost impossible to do so. That is where calculus comes in handy: by “slicing” the object into cross-sections, we changed the calculation of volume into the calculation of area, and by further dividing the area into lines, we changed again the calculation of area into the calculation of length, which is easily measurable. With this interpretation, the area is the integral of length with respect to a length unit x:

S = \int ldx

and volume is the integral of the area with respect to x as well:

V = \int Sdx = \int (\int ldx)dx

With these formulas, it is possible to approximate the volume of a random object with just length measurements, and the smaller the quantity dxis, the better the accuracy of the volume would be.

 (Chemistry) Rate of reaction:

This is also another very important and heavily studied concept in Chemistry that involves the application of Calculus. The rate of reaction for a particular reactant A is best described as the rate of reduction of the reactant’s concentration, [A], through time, and is portrayed in this formula:

v = \frac {-d[A]}{dt}

but there is more than just that. Normally, the rate of reaction for the nthorder would be:

v = k[A]^{n}

Consider the first-order reaction (n = 1). That would leave the following equation:

k[A]= \frac {-d[A]}{dt}

\frac {-d[A]}{k[A] }= dt

\int_{[A]_{0}}^{[A]} \frac{d[A]}{[A]} = -k\int _{0}^{t} dt

ln [A] - ln [A]_{0} = -kt

which is called the integrated rate law of the first-order reaction.

Similarly, we can also find the integrated rate law of reactions of other order – I will not go into detail here. Next time, I will dive a little bit more on logistic differential equations and its applications, but for now – math on!

Game Theory Part 2 – Asymmetric games

Predator vs. Prey, Nature’s asymmetric game

Following my last post about game theory, I will dig deeper in this post about a type of game that in my opinion, is very common. Asymmetrical games root themselves in real-life situations where the conditions vary greatly and more often than not, two opponents would find themselves on unequal grounds, with each having different strengths, weaknesses, and even motives. A thorough study of this type of game, therefore, proves to be an efficient tool for strategists to calculate the chances of success for different, and more often than not, hardly related players and gives the optimal strategies ranging from pursuing specific targets to negotiating for a potential win-win situation.

Firstly, we would go through the definition of an asymmetric game. Although the definition varies, most of them often carry this phrase or a paraphrase version of it:

“Asymmetric games are games where players have different, and even conflicting, goals and strategies” 

So much is obvious, yet its implications are massive. Although most of the games that are modeled into game theory examples are symmetric games because of their elegance and straightforwardness in strategy-planning, in real life those situations do not often occur. Instead, the diversity in personalities and traits between humans adds so many variables into the picture that the same strategies can hardly work for every single individual. Moreover, humans also possess a rational brain that constantly adapts to the situation and devises appropriate goals and strategies, making symmetric games even more short-termed. In the end, we obtain a truly chaotic reality that can only be best represented by a model of an asymmetric game.

Take a simple example of the stock market – a platform that is constantly updated and operated by millions of investors. Every minute, thousands sell their stocks while others buy in, waiting for a potential rise in the stock’s price. In this example, although the end goals are similar – to maximize profits – the strategies are drastically different, from the invested company to the amount that people buy or sell. With a closer look, the goals can be divided into different subcategories too, like long-term investments, short-term investments, or simply to avoid further losses. This diverse “player base” is responsible for the extremely messy environment of the stock market and hence its nature as an asymmetrical game. 

From this example, we could observe a quite important property of an asymmetrical game. An asymmetric game is likely, though not always, multi-sided, and it is easy to understand why: the more people join the game, the greater the diversity in terms of traits. More often, a game with just 2 players can boil down to fair competition, but asking for such a thing from many players is just too much.

Another noticeable trait for the game is the fact that it often either has many goals or has a goal that can be interpreted in different ways by different players. An online RPG game, for example, is asymmetrical because players can strive for many different targets. A stock market represents the other side: it has a goal – making a profit – that can be interpreted differently by different investors with their resources. On the other hand, asymmetric games like tic-tac-toe have one goal – to win – and one method – to build a string of symbols with predefined length, proving the extent the trait is associated with asymmetric games.

In the end, I would like to present the most interesting example of this type of game, and that is the fight for survival. In nature, the relationship between the predator and the prey makes it a perfect example for an asymmetric game, with clearly differentiated goals – one is to hunt, and one is to escape – and various tactics to adapt to these goals that have for so long captured the attention of animal behavior researchers. In the IMO 2017 contest, Problem 3 illustrates this game using the view of combinatorial geometry and creates a perfect material for thought:

A hunter and an invisible rabbit play a game in the Euclidean plane. The rabbit’s starting point, , and the hunter’s starting point, , are the same. After rounds of the game, the rabbit is at point and the hunter is at point . In the nth round of the game, three things occur in order.

(i) The rabbit moves invisibly to a point such that the distance between and is exactly 1.

(ii) A tracking device reports a point to the hunter. The only guarantee provided by the tracking device is that the distance between and is at most 1.

(iii) The hunter moves visibly to a point such that the distance between and is exactly 1.

Is it always possible, no matter how the rabbit moves, and no matter what points are reported by the tracking device, for the hunter to choose her moves so that after rounds she can ensure that the distance between her and the rabbit is at most 100?

For now, math on!

Game Theory: Overview

So today I am really inspired to write something about game theory in Mathematics, a very much thoroughly researched subject by mathematicians for a very long time, yet are so interesting for even beginners to the field. I would like to review some of the most basic definitions of game theories that I have learned as a student, followed by the review of common categories of games.

We start first with the primitive definition of game theory:

“Game theory is the study of mathematical models of strategic interaction among rational decision-makers.”

As you can see, this definition implemented that game theory is not just limited to the study of games and its mechanics, although this would later be an important part of crafting out the theories. The field focuses more heavily on strategies and logical reasoning, applying its results to model different types of behaviors and outcomes that can occur in real-life situations. This leads to an expansion in the definition of this term as the study of logical thinking among all individuals, but these expansions involve studies of other fields, which we will not focus on today.

Chess – a commonly research game

The question is: Why games?

If we consider games in the context of plays decided by skill, strength, or luck as in “football game”, this indeed can be frustrating. But if we consider the following definition of a game:

“A form of competitive activity played according to rules.”

then things are suddenly much more clear: any given conflict can actually be generalized into a game. The factors needed to form a game – players, rules, competitions – are already present in the conflict itself. Therefore, it is often in the best interests of mathematicians to research and model these situations in the form of games, as in those forms the numbers are much more easy to manage in the lack of context.

We will proceed to a classic example of a simplified real-life situation:

“Mum bought some candies which amount to a multiple of 5 and did not allow the babies to eat them. However, they broke the rules anyway, but each time, each baby can only take a number of candies anywhere from 1 to 4. Assuming that the baby competes for the last candy which is the best candy. Which baby has the strategy to win?”

However, when we rip off the context and generalize the numbers, we obtain the following version:

“A and B take turns to take candies. For each turn, a player would take a number of candies from 1 to n. Assuming that the number of candies is a multiple of (n+1) and the player taking the last candy wins. Which player has a guaranteed strategy to win?”

As you can see, the game is in a relatively generalized form (the number n might be defined as the maximum number of candies a baby can hold, etc.). With this version, we can now define several traits of the game:

  • The game is sequential: players are taking turns;
  • The game is non-cooperative: players may not form a mutual agreement;
  • The game is symmetric: changing players will not affect the overall result;
  • The game is evolutionary: players can change strategies according to recent moves;
  • The game has perfect information: players have exact records of all the events of the game.

which may specify ways of approaching the problem at hand. As of this example, the solution is quite simple:

The second player would have a guaranteed strategy to win by the following method: Whenever the first player picks a number of candies k between 1 and n, the second player would pick a number of candies equal to (n+1)-k. This method not only makes sure that the second player always has a response to the first player, but also means that the number of candies remaining after the second player’s turn will be a multiple of (n+1). As 0 is a multiple of (n+1), the second player would win.

Several portions of the solution can be attributed as a result of the traits. The strategy of the second player would not be possible without the perfect information trait, as it is dependent on knowing the very previous move of the first player. Moreover, the gameplay itself, and hence the strategy, is only feasible in the presence of the sequential and non-cooperative trait, because if the game had been either simultaneous or cooperative, the result would be very different.

Of course, games with traits different from the ones presented above are abundant. I would elaborate more on some of them, followed by examples in my later posts. For now, math on!

Mathematics vs. Physics: The Essentials

Mathematics and Physics, which is better?

Interestingly, I came upon these questions very often. Not only at school but also on the Internet as well. Like the other day when someone posted the very same thing, and boom, two opposite answers.

And surprisingly, both of them have their point. And the opposite of one’s strength is the other’s strength. And of course, none backs down.

As an observer, I find these discussions particularly interesting. It sure did highlight some of the differences between Maths and Physics, but I also believe that the peaceful coexistence of the two subjects is viable and vital through many interdisciplinary roles. Here are some takeaways

Math is more theoretical, while Physics is more practical:

To begin with, Mathematics is not observation-based. Its very nature is to derive conclusions, in this case, theorems, from a layer of other proven theorems, tracing back to a parent axiom which is universally agreed to be true. You just don’t really “observe” the theorems in real life, which leads to experiments holding minimal value in Mathematics, a feature unique to this particular subject. 

On the other hand, Physics, just like virtually any other science subject, is observation-based. In Physics, there is no axiom decided by humans, because nature does that job. This leads to a need to base theories on facts, and the ones which don’t are either rejected or remain hypotheses. Many times, a whole set of theories has to be rewritten because the foundation is proven wrong. And as more phenomena are observed, physics is always in a constant state of renewal to have fitting explanations to observations.

Physics can be relative, but Math has to be absolute:

Physics is a science that tries to explain nature, and nature, unfortunately, does not always operate by pattern. Therefore, no theory of Physics will ever be absolute truth; they are just not disproved yet. To adapt to this nature, physicians will happily accept theories that predict correctly a large number of observations, and will mostly still accept those theories if only a small number of opposing observations are found, only making small changes such as reducing the theories’ scope or adding exceptions. Logic is still needed but to a lesser degree.

Mathematics does not accept that kind of argument, as every one of its elements has to be logically defined. It deals with all things on a linear basis, and no theorem can be considered true while it is still undefined by preexisting theorems. On the other hand, if a theorem has been proven, that theorem will be an eternal truth – Mathematicians do not look back and revise it in any way. 

Mathematics is an abstract language; Physics is a realistic application

Of course, to sum up all characteristics, Mathematics is in itself a universal tool that can be applied to every other discipline. It proposes theorems without the need to depend on whether it would be useful – it just takes a complete analyses of ideas from their roots, which makes it powerful in terms of flexibility, but limited in terms of application. And while historically Mathematics had been devised from observations, modern Mathematics is increasingly turning to abstraction, and most of the researches nowadays cannot yet be utilized anywhere aside from pure Mathematics. This, however, will not deter them from possible applications in the future.

Adversely, Physics is specific in the very procedure of its operation from observation to theorizing to application. And as stated above, it tries to explain the nature, and none of its theory will, or even need to, go out of this bound. The standard practice of Physics, therefore, can be explained wholly by descriptions and patterns, but as this science explores deeper, this kind of approach proves inadequate compared to usage of Mathematics as a powerful tool. As it stands, applications of Mathematics in Physics are blooming, ranging from simple calculations to advanced probability and discrete Mathematics.

Conclusion:

As seen above, Mathematics and Physics can sometimes be polar-opposites, but are always supportive of the other – I have seen a lot of examples for this. Next time I’m talking more specifically on these applications, so stay tuned!

About Me

Hi. I’m the owner of everythingmath.school.blog.

A little bit about myself – I’m Tran Dinh Quan, an 11th grader majoring in Mathematics at Hanoi-Amsterdam High School for the Gifted. Currently, I live in Hanoi, Vietnam.

I have been studying formally Mathematics for over 11 years now. To say that I have a very different journey than my classmates or any students focusing on Math would not be right, but to say that my journey is not diverse is a massive understatement. While I was and still am focusing on theoretical Mathematics, I have had exposure to many scientific disciplines with broad mathematics applications and have taken a liking to quite a few, some of them Astronomy, Physics, and Chemistry. The fact that the influence of Mathematics in our daily lives is increasing is undeniable, and I am looking fondly at its applications and developments that will undeniably impact us greatly in the future. On the other hand, pure Mathematics has never been so extensive, as major innovations are taken in various fields. For the slightest example, it took only 6 years to solve the first of seven Mathematics Millenium Problems, the Poincare Conjecture, which was intended, as its name suggests, to take hundreds of years to complete. As a keen observer, there has never been a better time to indulge in this field of science.

This blog, therefore, serves as a journal for me to document my process of exploring the ever-growing knowledge of Math. I would gladly share my views and ideas of the latest developments, as well as giving my perspectives on preexisting Mathematic concepts and applications. Moreover, by writing this blog, I would love to have feedbacks and discussions with people of similar interests with me. Your opinions remain a vital part of my explorations, without which I would never be able to have a well-rounded opinion on every single subject.

With those things mentioned, once again, I would like to extend my warmest welcome to you readers of my blog!