Population dynamics: Difference between revisions

From Puella Magi Wiki
Jump to navigation Jump to search
mNo edit summary
Line 4: Line 4:
As Kyouko alluded, the relationship between [[magical girl]]s, [[witch]]es, and the general population resembles a food chains in nature.  However, magical girls and witches shares a unique relationship not typical of predators and preys in nature: when a magical girl's [[soul gem]] darkens completely, she reborns as a witch (as revealed in [[Episode 8]]).  This relationship leads to a more complicated interdependence between the two populations, one unaccounted for in standard [[wikipedia:population modeling|population modeling]].  Due to this, a new population model needs to be developed specifically for these [[Magic#magical_creatures|magical creatures]] to properly analyze their [[wikipedia:population dynamics|population dynamics]].
As Kyouko alluded, the relationship between [[magical girl]]s, [[witch]]es, and the general population resembles a food chains in nature.  However, magical girls and witches shares a unique relationship not typical of predators and preys in nature: when a magical girl's [[soul gem]] darkens completely, she reborns as a witch (as revealed in [[Episode 8]]).  This relationship leads to a more complicated interdependence between the two populations, one unaccounted for in standard [[wikipedia:population modeling|population modeling]].  Due to this, a new population model needs to be developed specifically for these [[Magic#magical_creatures|magical creatures]] to properly analyze their [[wikipedia:population dynamics|population dynamics]].


=Simple Population Modeling=
=Model assumptions=
Both the [[magical girl]] and [[witch]] populations draw their numbers from the general human population.  For this population model we assume that both are in a vast minority in comparison to the overall human population, and the loses that result from magical activities contribute insignificant changes to it.
[[file:Population model.png|350px|thumb|Graphical representation of population model used.]]
Both the [[magical girl]] and [[witch]] populations draw their numbers from the general human population.  To simplify calculations, we assume that both populations are many magnitudes smaller in comparison to the overall human population, and human loses that result from magical activities contribute insignificant changes to it.


This is the first model that came out. It has inconsistencies in that the amount of girls getting killed or becoming magical girls is constant, and not variable in the amount of fights. The next model proposed corrected that.
The magical girl population increases by the number of new girls [[Kyuubey]] contracted and decreases by the rate of them dying or becoming witches. The Witch population increase by the number of matured [[familiar|familiars]] per witch as well as the rate of magic girls that became witch, but decreases by the reate magic girls hunt and kill them. We can summarize these premises as the following variables:


==The Model==
*'''M(t)''': the number of magical girls at the time ''t'' (a natural number)
[[file:Population model.png|350px|thumb|Graphical representation of population model used.]]
*'''W(t)''': the number of witches at the time ''t'' (a natural number)
The magical girl population increases by the number of new girls QB contracted, and decreases by the rate of them dying or becoming witches. The Witch population increase by the number of matured  [[familiar|familiars]] per witch as well as the rate of magic girls that became witch, but decreases when magic girls hunt and kill them. We can summarize these remises as follow:
*'''C''': the number of girls Kyubey contracts at each iteration (a natural number)
*'''D''': the proportion of magical girls dying at each iteration (a percentage)
*'''B''': the proportion of magical girls becoming witches (a percentage)
*'''K''': the proportion of witches killed at each iteration (positive rational number)
*'''F''': the number of familiars per witch that mature into witches (a positive rational number)
 
=The simple model=
A simple mathematical model was initially proposed but later refined (see below).  In the simple model, the rate of magical girls dying, becoming witch, and witch-killing are assumed to be independent of the witch population.  This have an effect of simplifying calculations and allows for a closed-form solution to the differential equations. Under this assumption, the populations can be defined as following:


*Let
**'''M(t)''' be an integer representing the amount of magical girls at the time ''t''
**'''W(t)''' be an integer representing the amount of witches at the time ''t''
**'''C''' be the number of girls Kyubey contracts at each iteration
**'''D''' be the proportion of girls dying at each iteration (''D'' is hence a value in [0,1])
**'''B''' be the proportion of girls becoming witches (same remark)
**'''F''' be the number of familiars turning into witches (it's a positive rational number)
**'''K''' be the proportion of witches getting killed at each iteration (positive rational number)
* The system then becomes
**[[File:Formula for Basic Population, M part.png]]
**[[File:Formula for Basic Population, M part.png]]
**[[File:Formula for Basic Population, W part.png]]
**[[File:Formula for Basic Population, W part.png]]


==The Results==
==Simulation==
When pasting these equations into Matlab and plotting the results, we get the following graph:
One iteration of the simple model with Matlab, using a set of reasonable values for the variables:
 
[[File:Matlab witches-MG population 2.png|thumb|left|500px|One possible scenario for changes in magical girls and witches over time]]
[[File:Matlab witches-MG population 2.png|thumb|left|500px|One possible scenario for changes in magical girls and witches over time]]


{{-}}
{{-}}
'''Observations''':
==Population at Equilibrium==
*Every dead magic girl is one that did not become a witchFor [[Kyuubey]], whose goal is to harvest energy from the magic girl-to-witch transformation, every death meant time wasted contracting the girl.  It makes sense for him to design a system where most Witches are weaker than Magic Girls in order to reduce magic girl casualty rate. ['''B > D''']
If both populations are in equilibrium, then there is no changes to both the witch and magical girl population ['''ΔM(t)''' = 0 & '''ΔW(t)''' = 0]It follows that the number of magic girls contracted need to balance the number that died or become witch in the same period ['''C = (D + B) M(t)''']; and the number of witches matured from minions balances out numbers contributed by magic girls ['''N * W(t) = (K - B) M(t)'''].  
*If magic girls are stronger than witches, it follows that the typical Magic Girl will kill multiple Witches before becoming one ['''K - B''' > 0].  Because of this, there's a need for an alternative source for creating witches.  This explains why while Kyuubey cares only of the energy from Magic Girl-Witches transformation, the supplementary system of witch growth from familiars exist.
*At equilibrium, the magic girl population is equal to '''C / (D + B)'''.
*At equilibrium, the magic girl population is equal to '''C / (D + B)'''.
*At equilibrium, the witch population is '''(B - K) M(t)'''.  If the Magic Girl population is also in equilibrium, then the witch population is '''C*(B - K)/(D + B)'''.
*At equilibrium, the witch population is '''(B - K) M(t)'''.  If the Magic Girl population is also in equilibrium, then the witch population is '''C*(B - K)/(D + B)'''.
*The magic girl population will always reach equilibrium at '''C / (D + B),'''  regardless of initial number of magical girls or actual values of '''C, D, or B'''.  This restrain by Kyuubey's ability to contract new girls may explain why there seems to be so few magical girls around.
*Even when a significant number of magic girl is introduced initially, their numbers will eventually whithered down to sustainable population level of '''C/ (D + B)'''.  This is a natural consequence of limited linear growth rate and independent of environmental or crowding stresses.
*In contrast, the witch population never reach equilibrium.  The number of witches will fluctuate minutely at the initial period, but inevitably the minion growth ['''e^Nt'''] will outpace all other variables, and the population will explode into exponential growth.  The growth may be capped due to human depopulation from witch activities, but at this point the initial premises of the model breaks down.
*Due to the above, any planet with this magic girl and witch system in place is inevitably doomed to extinction.  It is not possible to save the human population, with exception of exterminating all witches and magic girls.  This may explain why Kyuubey simply abandoned Earth rather than attempt sustainable farming of the planet.
{{-}}
==Population at Equilibrium==
If both populations are in equilibrium, then there is no changes to both the witch and magical girl population ['''ΔM(t)''' = 0 & '''ΔW(t)''' = 0].  It follows that the number of magic girls contracted need to balance the number that died or become witch in the same period ['''C = (D + B) M(t)''']; and the number of witches matured from minions balances out numbers contributed by magic girls ['''N * W(t) = (K - B) M(t)'''].


==General Solution==
==General Solution==
Line 51: Line 41:
*[[File:Closed form of M(t) at M(0)=0.png]]
*[[File:Closed form of M(t) at M(0)=0.png]]
*[[File:Closed form of W(t) at W(0)=0.png]]
*[[File:Closed form of W(t) at W(0)=0.png]]
==Conclusions and observations==
*Every dead magic girl is one that did not become a witch.  For [[Kyuubey]], whose goal is to harvest energy from the magic girl-to-witch transformation, every death meant wasted time contracting the girl.  It makes sense for him to design a system where most Witches are weaker than Magic Girls in order to reduce magic girl casualty rate. ['''B > D''']
*If magic girls are stronger than witches, it follows that the typical Magic Girl will kill multiple Witches before becoming one ['''K - B''' > 0].  Because of this, there's a need for an alternative source for creating witches.  This explains why while Kyuubey cares only of the energy from Magic Girl-Witches transformation, the supplementary system of witch growth from familiars exist.
*The magic girl population will always reach equilibrium at '''C / (D + B),'''  regardless of initial number of magical girls or actual values of '''C, D, or B'''.  This restrain by Kyuubey's ability to contract new girls may explain why there seems to be so few magical girls around.
*Even when a significant number of magic girl is introduced initially, their numbers will eventually whithered down to sustainable population level of '''C/ (D + B)'''.  This is a natural consequence of limited linear growth rate and independent of environmental or crowding stresses.
*In contrast, the witch population never reach equilibrium.  The number of witches will fluctuate minutely at the initial period, but inevitably the minion growth ['''e^Nt'''] will outpace all other variables, and the population will explode into exponential growth.  The growth may be capped due to human depopulation from witch activities, but at this point the initial premises of the model breaks down.
*Due to the above, any planet with this magic girl and witch system in place is inevitably doomed to extinction.  It is not possible to save the human population, with exception of exterminating all witches and magic girls.  This may explain why Kyuubey simply abandoned Earth rather than attempt sustainable farming of the planet.
{{-}}


=Refined model=
=Refined model=

Revision as of 12:36, 19 March 2011

"You know about the food chain, right? I'm sure you learned about it in school. The witches eat the weak humans. And we eat those witches. That's the way stuff works, right?"
-Kyouko in Episode 5

File:Food chain.jpg
Kyouko's food chain.

As Kyouko alluded, the relationship between magical girls, witches, and the general population resembles a food chains in nature. However, magical girls and witches shares a unique relationship not typical of predators and preys in nature: when a magical girl's soul gem darkens completely, she reborns as a witch (as revealed in Episode 8). This relationship leads to a more complicated interdependence between the two populations, one unaccounted for in standard population modeling. Due to this, a new population model needs to be developed specifically for these magical creatures to properly analyze their population dynamics.

Model assumptions

File:Population model.png
Graphical representation of population model used.

Both the magical girl and witch populations draw their numbers from the general human population. To simplify calculations, we assume that both populations are many magnitudes smaller in comparison to the overall human population, and human loses that result from magical activities contribute insignificant changes to it.

The magical girl population increases by the number of new girls Kyuubey contracted and decreases by the rate of them dying or becoming witches. The Witch population increase by the number of matured familiars per witch as well as the rate of magic girls that became witch, but decreases by the reate magic girls hunt and kill them. We can summarize these premises as the following variables:

  • M(t): the number of magical girls at the time t (a natural number)
  • W(t): the number of witches at the time t (a natural number)
  • C: the number of girls Kyubey contracts at each iteration (a natural number)
  • D: the proportion of magical girls dying at each iteration (a percentage)
  • B: the proportion of magical girls becoming witches (a percentage)
  • K: the proportion of witches killed at each iteration (positive rational number)
  • F: the number of familiars per witch that mature into witches (a positive rational number)

The simple model

A simple mathematical model was initially proposed but later refined (see below). In the simple model, the rate of magical girls dying, becoming witch, and witch-killing are assumed to be independent of the witch population. This have an effect of simplifying calculations and allows for a closed-form solution to the differential equations. Under this assumption, the populations can be defined as following:

    • Formula for Basic Population, M part.png
    • Formula for Basic Population, W part.png

Simulation

One iteration of the simple model with Matlab, using a set of reasonable values for the variables:

One possible scenario for changes in magical girls and witches over time


Population at Equilibrium

If both populations are in equilibrium, then there is no changes to both the witch and magical girl population [ΔM(t) = 0 & ΔW(t) = 0]. It follows that the number of magic girls contracted need to balance the number that died or become witch in the same period [C = (D + B) M(t)]; and the number of witches matured from minions balances out numbers contributed by magic girls [N * W(t) = (K - B) M(t)].

  • At equilibrium, the magic girl population is equal to C / (D + B).
  • At equilibrium, the witch population is (B - K) M(t). If the Magic Girl population is also in equilibrium, then the witch population is C*(B - K)/(D + B).

General Solution

The general solution for the witch and magic girl populations are:

  • Closed form for M(t).png
  • Closed form for W(t).png

for some constant α and β. If we assume witches and magic girls are introduced by QB's civilization, thus initial population of both at the system's introduction were zero [M(0)=0 W(0)=0]. W(t) and M(t) becomes:

  • Closed form of M(t) at M(0)=0.png
  • Closed form of W(t) at W(0)=0.png

Conclusions and observations

  • Every dead magic girl is one that did not become a witch. For Kyuubey, whose goal is to harvest energy from the magic girl-to-witch transformation, every death meant wasted time contracting the girl. It makes sense for him to design a system where most Witches are weaker than Magic Girls in order to reduce magic girl casualty rate. [B > D]
  • If magic girls are stronger than witches, it follows that the typical Magic Girl will kill multiple Witches before becoming one [K - B > 0]. Because of this, there's a need for an alternative source for creating witches. This explains why while Kyuubey cares only of the energy from Magic Girl-Witches transformation, the supplementary system of witch growth from familiars exist.
  • The magic girl population will always reach equilibrium at C / (D + B), regardless of initial number of magical girls or actual values of C, D, or B. This restrain by Kyuubey's ability to contract new girls may explain why there seems to be so few magical girls around.
  • Even when a significant number of magic girl is introduced initially, their numbers will eventually whithered down to sustainable population level of C/ (D + B). This is a natural consequence of limited linear growth rate and independent of environmental or crowding stresses.
  • In contrast, the witch population never reach equilibrium. The number of witches will fluctuate minutely at the initial period, but inevitably the minion growth [e^Nt] will outpace all other variables, and the population will explode into exponential growth. The growth may be capped due to human depopulation from witch activities, but at this point the initial premises of the model breaks down.
  • Due to the above, any planet with this magic girl and witch system in place is inevitably doomed to extinction. It is not possible to save the human population, with exception of exterminating all witches and magic girls. This may explain why Kyuubey simply abandoned Earth rather than attempt sustainable farming of the planet.


Refined model

File:Modified population model.png
The refined model, in terms of cute girls doing cute things

As stated above, the main flaw with the simple model is that the amount of magical girls getting killed doesn't vary with the amount of witches, which leads to an inconsistent behavior. We can change this model as follows:

  • We assume in this model that magical girls fight witches one-on-one.
  • When magical girls are outnumbered by witches, we assume a certain proportion of said magical girls goes to fight the witches at each iteration, the others are supposed to rest, heal from previous fights, or just live a normal life.
  • When the amount of magical girls is superior of the amount of witches, only a certain amount of magical girls fight witches. Hence, both B (the proportion of girls becoming witches) and D (the proportion of magical girls dying) are variable with the amount of witches.
  • We assume one can turn into a witch only by using magical powers (the soul gem doesn't dim over time), and that magical girls only use magical powers against witches (they don't fight each other)
  • We assume there was at least one witch when t=0. If not, then no magical girl would turn into a witch; W(t) would always equal zero, and M(t) would be linear (or rather, logistic if we want to be realistic).

The Model

All that's left is to put that into a mathematical formalism. Here goes:

The Results

When executing this code in Matlab, we get the following result:

Evolution of the populations with the refined model


Observations:

  • At first, the number of magical girls grows in a quasi-linear trend. Since there is almost no witch, only a few Magical Girls get killed, but Kyubey contracts them on a regular basis, so naturally the number grows.
  • At a certain point (around t=350 on the graph), the proportion of witch becomes significant. Witches start having an effect on magical girls: their growth stabilize then drops, while the amount of witches increase.
  • After a while, the amount of magical girls reach its equilibrium. The number of witches grows exponentially since they can self-reproduct (familiars becoming witches, parameter F) and they're not restricted by ressources (we assume witches are immortal).

Matlab Scripts

You can find the Matlab scripts for the two models presented above here: