 there are still people in the waiting room, so let's wait a few seconds to start. So, has the live stream started? Okay, yes. Okay, great. So, well, this second day of lectures has a program that is very similar to the one of yesterday, so we'll start with Leonardo Pacciani-Morri who is giving the second part of the tutorial on non-linear dynamics. So, without saying anything further, please, Leonardo, you can share the screen. Okay. So, you can see my slides, right? Yes. So, hi everyone, welcome back. So, before I get started on the second part of this tutorial, are there any questions about what I've showed yesterday? Please, again, if you have any questions, please raise the end with the Zoom feature. You have to go on participants. There are three dots and then you can place them. No one is doing that, so I think you can... Okay, I prefer. So, I will start right where we stopped yesterday. So, yesterday we were talking about Lyapunov functions. So, in general, we were talking about how to study the stability of equilibria in non-linear systems, and I was introducing the use of Lyapunov functions as a tool to do that. In particular, let me just repeat Lyapunov's second theorem so that we get on the same page we were yesterday. So, if you remember, I told you that if we have a generic non-linear differential equation with x star and equilibrium, and we suppose that in a neighborhood of x star, we can define a function w such that this function here has a minimum on the equilibrium, then the stability of the equilibrium can be studied by looking at how this function w behaves along the trajectories of the system. So, for example, if we find out that the time derivative of this function along the trajectory is zero, so if this function is constant along the trajectories of the system, then x star will be an equilibrium stable at all times. On the other hand, if the time derivative is non-positive, so either negative or equal to zero, the equilibrium is simply stable. If the time derivative is strictly negative, so if the function is decreasing along the trajectories, the equilibrium is asymptotically stable, and if the time derivative is strictly positive, so if the function is increasing along the trajectories, the equilibrium is unstable, and then any function w defined with this property here is called the Lyapunov function for the equilibrium. Is everything clear? Okay, so we talked about this a little bit already yesterday, but I just want to highlight the pros and the cons of using this approach. Now, you see that this is actually a very powerful approach, because it can basically give us an almost complete information about an equilibrium, and it gives conditions for stability that are sufficient but not necessary, meaning that of course we can have that an equilibrium is stable or unstable or anything else without necessarily having a defined Lyapunov function. So finding Lyapunov function is not necessary for determining the stability of an equilibrium, but it's sufficient. The price that we have to pay for having such a powerful tool, unfortunately, is that we can't use it always. So it's not easy to find Lyapunov functions in general in nonlinear systems, with, as I told you yesterday, the notable exception of conserved quantities. So if we have a system, if we know that a system has a conserved quantity, generally that quantity is a good first choice for that Lyapunov function, sorry for the ambulance in the background. But if we don't know if the system has a conserved quantity, we can't, I mean, we have to use our intuition to find a Lyapunov function. So let me show you a concrete example to see how we can use the Lyapunov functions. And I want to show that using the Lotka Volterra equations. Now, Professor Weitz yesterday in his lecture mentioned that the Lyapunov, sorry, the Lotka Volterra equations actually have a conserved quantity. So let me show you how we can find it. So these are the equations of our system. Again, I'm going to do some very simple computations, but they are very non-rigorous. So again, I'm sorry if you're a mathematician, but what we can do here is basically let's try dividing the first question, sorry the first equation for the second. So we get the x or the y and notice that this is not a general method. So what I'm doing here is just trying something and then see if I can find a conserved quantity. This is not like a general technique that can be used always. But in this case we can write, we can rewrite the equations in this way. So here I'm just factorizing x and y. So now that we have written this, we can separate the variables. So I bring on one side everything that depends on x and on the other everything that depends on y. So you see that we can write the x times delta x minus gamma over x equal to dy alpha minus beta y over y. Okay, so we simply rewrite this as follows. So we divide by x or y on the two sides. So we have delta minus gamma over x equal to dy alpha over y minus beta. But these are very simple functions that we can integrate very easily because integrating this constant here we get delta x plus a constant. This here gives minus gamma times the logarithm of x. This here plus a constant of course. This here gives the alpha logarithm of y plus a constant and this here gives minus beta y. So in the end basically we have that delta x minus gamma logarithm of x plus beta y minus alpha logarithm of y which we call w is a constant. So indeed we have found a conserved quantity for the log-cable-terra system. So sorry let me just jump here. So again this is not a general a general technique. Every time we have to see how our system behaves and do some trial and errors but in this case we are lucky. So we have a conserved quantity. Can we use it as a liapunov function to study the stability of the two equilibria that we know the log-cable-terra system has? So let's see. Let me write this down again sorry. Okay so we have the w is delta x minus gamma logarithm of x plus beta y minus alpha logarithm of y. Okay so in order to see if this is a liapunov we can use this function as a liapunov function we first have to see if the two equilibria that we know the log-cable-terra system has which are this one that I'm writing here are actually minima of this function. So let's compute the partial derivatives of this function here. You see that they are very easy to compute and so for example the partial derivative with respect to x will be delta minus gamma over x and the partial derivative with respect to y will be beta minus alpha over y. So the first thing that you can see is that these derivatives are not defined in the origin in this equilibrium here because of course they diverge for x and y equal to zero. So the first thing that we can see is that we cannot use w as a liapunov function for the origin in this case. However you can see very easily that if we substitute the coordinates of this equilibrium here in both cases we get zero. So this non-trivial equilibrium is indeed an extremum let's say for this function but then you see that if we compute the second derivatives of this function we get functions that are always positive. So we are sure that this non-trivial equilibrium is not only a minimum of the function but a global minimum because it's the only one. So we can use this function we can try to use this function as a liapunov function for the non-trivial equilibrium. So what we have to do now is compute the time derivative of the function along the trajectories. So simply if we compute the time derivative of this function again I can just write it down here. You see it's very easy that in this case we have delta x dot, x dot over x gamma, y dot and alpha y dot over y. So in order to see how this behaves along the trajectories of the log-cabal-thera system we just have to substitute the expression of y dot and x dot from the log-cabal-thera system. Now this is a very simple computation so you see that if we substitute here we have delta x alpha minus delta beta xy minus here we have gamma alpha plus gamma beta y plus beta delta xy minus beta gamma and then we have minus alpha delta x yes sorry I'm for plus alpha gamma I am probably forgetting something of course no okay that's everything so you see that for example this term here and this term here cancel out then this term here and this term here cancel out this term and this term cancel out and then this term and this term sorry here I forgot to remove a y this term and this term cancel out so in the end this quantity is equal to zero now we could have guessed that from the fact that we know that w is a conserved quantity of the system but still we have computed this explicitly so if we look at the definitions that even before in the Lyapunov theorem what we have now is that the non-trivial equilibrium of the log-cabal-thera system is actually stable at all times while again remember that we can say anything in this case on the origin because this function here is not defined for x and y equal to zero is everything clear for now are there any questions I think we can take the silences okay okay so let's go on now professor Weitz yesterday showed us how the trajectories of the log-cabal-thera look like but I just want you to show that again so for this particular choice of the parameters you see that indeed we have these solutions oscillating anti-clockwise around this stable equilibrium here and this is just an example of the oscillations that we've seen also yesterday where you see that the prey population peaks before the predator population okay so this is more or less how we can use the apunov functions to come to study sorry the stability of equilibria in a linear system the other tool that I've told you we can use in this sense is spectral analysis now spectral analysis is actually a simpler tools and basically consists in linearizing a non-linear system around an equilibrium the basic idea that is behind spectral analysis is the fact that we can approximate a non-linear system with a linear one if we restrict to let's say a neighborhood of an equilibrium so what we would like to do in general is given our non-linear system we tailor expand this function f around an equilibrium so we will have this term here which is of course equal to zero because x star is an equilibrium then we will have a linear term a quadratic term and then all other source of terms and what we would like to do is basically approximate our non-linear system with the linearized the linear one where this j here is called the Jacobian matrix and it's basically the matrix of the partial derivatives of this function computed in the equilibrium of course this is a matrix if we are considering a system in more than one dimension but if we have just if we have that x is just a simple one-dimensional variable this is just the partial derivative of the function the basically how this approach works is basically by studying the eigenvalues of this matrix because if we know this matrix then its eigenvalues can give us some information about the stability of the equilibrium in particular what we can do in this case is given by the so-called liapunov's first first theorem which basically states the following if again we have a generic non-linear system and x star is an equilibrium then if all the eigenvalues of this Jacobian matrix have negative real part the equilibrium is asymptotically stable on the other hand if at least one of them has a positive real part then the equilibrium is unstable is that clear I mean I'm going to explain there is a question okay by who asks if this concept is similar to PCA I mean yes PCA in general is something that you do with rectangular matrices so matrices which doesn't don't have the same number of rows and columns in this case however you always have square matrices because I mean if x is a vector of dimension n of course also f will have to be a dimension in sorry a function in n dimensions and so this will be an n times n matrix and so in this case we use directly eigenvalues because we know that eigenvalues and eigenvectors are defined for rectangular matrices sorry for square matrices PCA is something that we do in with rectangular matrices but this is just not in this case is that clear so you see that compared to using the opponent functions this approach is actually much simpler because it can be applied to any non-linear system so as long as we know explicitly how this function is defined we can always apply this approach and this theorem actually is quite powerful in the sense that it tells us that the stability properties of the equilibrium of a non-linear system sorry are exactly the same of the linearized system so we can use this approach to study equilibria in non-linear system the price that we have to pay for having an approach that is simpler and easier to apply is that it doesn't necessarily always give us all the information on an equilibrium now you see already that it can only only tell us if an equilibrium is either asymptotically stable or unstable but there are also cases where this approach can't tell us anything about an equilibrium because you see that if we have at least one eigenvalue with no real part and all other eigenvalues with strictly negative real part we are neither in these two cases and so we cannot say anything in this in this case what we can do in this situation is just for example using other tools drawing stream plots or seeing how the equation behaves at higher orders and try to guess something about this equilibrium now I want to introduce another type of stability that we can find in dynamical system and that is also relevant sometimes in ecology which is marginal stability now in general an equilibrium is defined as marginally stable if it is neither asymptotically stable neither unstable but in particular it is marginally stable when all the eigenvalues of this Jacobian matrix here are purely imaginary so it is a particular case of an equilibrium being neither asymptotically stable nor unstable because you see that the case in this third point here is one of these cases but in this case we can't say anything on the on the equilibrium if on the other hand all the eigenvalues are purely imaginary the equilibrium is marginally stable okay if there are no questions okay so let's move on and let's see a couple of okay can you give an example of marginally stable yes I will I will give you an example in a few slides okay thank you so so let's see first a couple of uh concrete okay actually uh two uh so one is asked by one so it's saying whether this approach cannot say whether an equilibrium stable uh at all times okay actually no the only thing that this that this approach can say if is an equilibrium asymptotically stable this is the only the only thing that you can say and Miguel is asking what's the advantage of spectral analysis over stream plot the advantage of spectral analysis is just that it seems I mean you just have to compute derivatives and evaluate them so it's something that you can always do very easily even in very complicated system in very in a very high number of dimensions with very complicated functions stream plots I mean are not always easy to draw because if you go above three dimension I mean I don't know how to draw in four dimensions so it's not it would be easy to to draw the stream plot on a system in more than three dimensions so the visibility of the advantage of spectral analysis yes okay okay yeah hello so my question is from the third point if we get the case that when one eigenvalue is zero and all others are negative so can you suggest any method that which you can consider sorry I didn't hear correctly I have some problem with all this can you repeat the question please yeah so question is regarding to the third point pros and cons okay when one one eigenvalue has non real part and all others are negative real part so if we arise to a system which shows this kind of nature then do you can you suggest that what will be the next step how to deal with this kind of system well it actually depends on the system I'm going to give you an example again in a few slides where we are actually in in this case here okay okay thank you no problem so if there are no other questions okay okay so let's see yeah I mean the the the the result I mean the main message of this theorem is exactly this I mean that if you have that the linearized version of a system close to an equilibrium is stable then also the the real system let's say the equilibrium in the non-linear system is stable so what this theorem is saying is that as long as we are close to an equilibrium we can use the I mean we can use the linear stability to induce stability in non-linear systems and the same is true also for instability okay okay so let's see a couple of practical examples so I first want to show you again the very first example I've given you yesterday so this non-linear system with this cubic function and just to remind ourselves this is what we did when we drew the stream plot of the system so now I want to show you what spectral analysis would say in this case so now we are we are in a one-dimensional system so the Jacobian in this case is simply the derivative so we simply have to derive this cubic function so we get a parabola in general and then we have to evaluate this parabola in these three points here so you see that if we evaluate this derivative in minus one and in two we get positive values while if we evaluate evaluate it in zero we get a negative value so in this case we can conclude by using spectral analysis that zero is an asymptotically stable equilibrium while minus one and two are unstable again because this is what the theorem says and in this case since we are in one dimension the Jacobian is simply the derivative and the value of the derivative is the eigen the only eigenvalue basically of the system in this case okay if there are no other questions I go on with other examples okay so this is another interesting example so we have a system in two dimensions x dot equal minus x and y dot equal k y to the third with k a positive parameter so this is the function that we have to start now you see that the only equilibrium of the system is the origin because this is the only point where both the first and the second components here are equal to zero now let's use spectral analysis now let me write this down x minus x and k y to the third now spectral analysis tells us tells us let's compute the Jacobian matrix so the Jacobian matrix in this case if we call these components f1 and f2 the Jacobian matrix looks like this y f1 sorry dx f2 and dy f2 so this is the matrix of all the partial derivatives of the components of this function so in this case this matrix looks like minus one zero zero and three k y squared okay so you see that this component here I mean doesn't depend on x while this component does depend on one if we compute this matrix in the only equilibrium of the system so the origin you see that we get this matrix here which is basically a diagonal matrix with minus one and zero on the diagonal so in this case the two eigenvalues of the system are minus one and zero so you see that we are exactly in the third case that I've shown you before in which this system cannot tell us anything about this equilibrium because one eigenvalue here has strictly negative real part and the other one has zero real part so what can we do in this case let's try using some tools that we have already seen so let's try drawing the stream plot of the system so in this case the state space of the system is the whole b-dimensional plane and here we have our equilibrium the origin so let's try for example to see what happens to the trajectories on the axis here so let me write this down so you see that let me rewrite the equations minus x and k y to the third okay so you see for example that if we start with x zero equal to zero so if we start on the y-axis let me write this here so that it is a little bit more clear so if we start from the y-axis basically our system becomes x dot y dot equal to zero k y to the third so basically if we start on the y-axis the system will always move on the y-axis and you see that y dot will be positive when y is positive and negative when y is negative because k we are assuming that k is positive so the solutions on the y-axis will move in this direction okay similarly if we start on the x-axis so if y zero in in the initial condition is zero our system will become x dot y dot equal minus x zero so if we start on the x-axis the solutions will move on the x-axis and in particular x dot will be negative when x is positive so the solutions will move in this way and it will be positive when x is negative so in this case the solutions will move like this so you see that on the axis the stream plot look like this so from this we can see that actually the origin is an unstable equilibrium because you see that here the solutions are moving away from this point now if we want to do something a little bit more we can do exactly the same thing that i've shown you yesterday when we drew the stream plot of the lot cavolterra system so we can look at when this function here and this function here is positive so that we know basically the general direction of the solutions of the system so we don't know exactly with this approach how these curves here move but we know that the point in this direction to show you that what i am doing here actually makes sense this is basically the the aspect of the stream plot of the system computed numerically so this is a numerical computation of the stream so you see that indeed in this direction we have that the solutions are going toward the origin in this direction here they are moving away and so the origin is unstable and in in the four quadrants you see that the solutions are moving along these curves but they are pointing in the right directions okay now finally in this case the origin is also called a saddle point because it when it when it happens that an equilibrium is let's say asymptotically stable along a direction but unstable in the other often it is called a saddle point so is everything clear here okay so let's go on with other examples okay let's see now for example okay sorry an interesting exercise that i invite you to do or maybe if we have enough time at the end of this lecture i can show you is see what happens to this equilibrium where k is negative or equal to zero equal to zero is a little bit less interesting case but at least what happens to this system with k is becomes negative okay so let's see now what can spectrum analysis tell us when we study the logistic equation and the lot-cable-terrain system so in particular if we take the logistic equation we have a very simple unidimensional system so if we want to use spectrum analysis we first have to compute the derivative of the of the function then for example if we compute this derivative in the non-trivial equilibrium so k you see that we get minus r which is negative because remember that these two parameters r and k are always positive and so looking at the theorem that i've shown you before this means that the non-trivial equilibrium k is asymptotically stable on the other hand if we compute this derivative in zero which is the other equilibrium of the logistic equation we get r which is positive and so we can again conclude that zero in this case is an unstable equilibrium on the other hand let's see what we can say for the lot-cable-terrain equation so this again is our system we do exactly what we did before so we compute the matrix of the partial derivatives of these functions with respect to the two variables so this is the partial derivative of the first component with respect to x this is the partial derivative of the first component with respect to y etc now if we complete this matrix in the trivial let's say equilibrium of the lot-cable-terrain system so no prey and no predators you see that we get this matrix here so again a diagonal matrix with alpha and minus gamma on the diagonal so the eigenvalues in this case are alpha and minus gamma and since alpha is a positive parameter we have that one of the eigenvalues is positive so spectral analysis in this case tells us that the origin is unstable and if you remember yesterday when we have drawn the stream plot of the lot-cable-terrain system we saw that along the x-axis the solutions were actually moving in this direction and so we I mean we already saw yesterday that this was an unstable equilibrium okay so let's see what's happened what happens in the non-trivial equilibrium so again we have the same matrix here but this time we have to compute it in this non-trivial point and if we substitute this we we get this matrix now this is a very easy matrix so let's let's see let's compute the eigenvalues now let me just write it down beta gamma over delta and delta alpha over beta okay so just to remind ourselves the eigenvalues of a square matrix are computed by setting to zero the determinant of the matrix minus lambda times the identity matrix so let's do this we have to compute the determinant of minus lambda minus beta gamma over delta delta alpha over beta minus lambda which is lambda squared minus delta alpha over beta times minus beta gamma over delta so you see that here we have delta and beta that cancel out and this must be equal to zero so in the end we have lambda squared equal minus gamma alpha so lambda will be plus minus the imaginary unit time gamma alpha so basically this means that the Jacobian matrix of the Lotka-Volterra equations in the non-trivial equilibrium has only purely imaginary eigenvalue so this means that if you look at what I've told you before that this equilibrium here is actually marginally stable is everything clear here okay perfect so let's move on let's see some other example in particular I want to show you this example here so now we have again a cubic function but a slightly different one so if we apply also what we seen yesterday you see that the equilibria of this function of the system are three and are zero and plus minus one now let's use a spectrum analysis well let's first draw the stream plot of this system so if we draw the stream plot you see that we get something okay yeah there is a question by Pablo Lechon please Is a marginally stable or asymptotically stable or is it just a different category sorry is either a stable or or asymptotically stable okay yeah I mean they are two different kind of stability I mean they are similar but not equal because asymptotic stability let me let me draw this here so if we are for example in a unidimensional system and this is our equilibrium asymptotic stability means that we know that the solutions are actually moving towards the equilibrium so if we look for example at how the solution behave over time like this for example here we have x star so if x star is an asymptotic asymptotically stable equilibrium we know it means that we know that the solutions are doing something like this so they are actually going towards this value but if if we just if we are just saying that x star is a stable equilibrium this is not necessarily true and we just need that the solutions remain close to the equilibrium so for example if we see that something like this happens then x and we see that the the solution never goes away so it never does something like like this for example then we know that the equilibrium is stable so asymptotically stable is just a particular case of stable yeah and I was asking about marginally oh sorry marginally stable in this case basically means that there are in the definitions that I've given you before means that there are oscillations because from linear theory you may know that if the Jacobian matrix of a linear system has all purely imaginary eigenvalue this means that the solution is doing something like this without without actually tending towards the value so for example if we had like damped oscillations so something like this this would be an asymptotically stable equilibrium well if we had these sustained oscillations that never damped never get damped then the equilibrium is marginally stable thank you no problem so okay so in this case if we draw the stream plot you see again just to remind ourselves for example in this interval the function f is positive so the solutions will be increasing x will be increasing in the solutions on the other hand in this interval the function is negative the function f here is negative and so the x in the solutions will be decreasing so you see that the stream plot suggests that this equilibrium here is unstable where this and this here are actually stable now let's see what we can say with spectrum analysis so here we have a cubic function so we just have to derive this function and compute it in these three points so you see that in zero the derivative is positive and in plus minus one the function is negative so in this case we have one unstable equilibrium and two asymptotically stable equilibrium this is a very the simplest case in which a system can exhibit uh be stability now we have seen an example of uh by stability yesterday with the lecture of professor starboard but in generally uh we can we say that a system is by stable or even multi-stable if it has two or more alternative stable states let me show you how we can reinterpret this this problem I mean and this will probably make things a little bit more clear so let's uh rewrite this same system as a particle in a potential so in this case we will have an equation of motion like this so that the acceleration of x is minus the derivative of a given potential and we choose this potential simply because it's the one that uh once derived and the sign is changed gives us the function that we were using before so in this case it means that our system is a particle moving in this energy potential so you see that the equilibria are the minima of the potential and there are two uh alternative stable states now the interesting thing about by stable or multi-stable systems as we saw yesterday is that external perturbations can move the system from one equilibrium to the other so for example if we again are considering the uh particle in the potential suppose for example that the particle is in minus one if we give it enough kinetic energy and by enough I mean at least the difference between this value and this value here what happens is that our particle will go in this direction will override this will go over this potential wall and then it will fall back in this other stable equilibrium and if we do that in the other direction of course the same happens so you see that external perturbations can switch the stable state in which the system uh lies and this for example we have seen a concrete example yesterday with the savanna and forest switch in patch of of of lands uh so this is something that can happen and anytime we have uh more than one alternative stable equilibrium uh is this clear are the question okay so the last okay yeah tell me is this potential the Lyapunov function for this system sorry is the potential uh the Lyapunov function yes in this case in this case we can use the the potential as a Lyapunov function but only for these two equilibria because you see that in a neighborhood of these two points indeed we have that this function has a a minima in this point but this is not true so we cannot use this potential as a Lyapunov function for this equilibrium here because the function has a maximum or again we could do that if we do the trick that we talked about yesterday so if you remember there was a question yesterday that asked what if we define a Lyapunov function that instead of having a minimum in an equilibrium has a maximum then in this case we have to be careful that the definition of stability and instability are are switched so in this case for example if we find out that the function is decreasing along the trajectories then the equilibrium will be unstable but in general yes since this is an energy potential for example we assume that we are in a frictionless system with no dissipation and so this quantity is conserved we can use it as a Lyapunov function so there is a follow-up question so if this is not a strict Lyapunov function what is the Lyapunov function for this system it depends I mean it depends in in this case I mean for these two equilibrium we can use the function as a Lyapunov function in this case we cannot and so we have to use other tools so we can use spectral analysis we can try to draw the stream plot so whenever we perhaps is not fully clear that one can cannot always construct a Lyapunov function yeah exactly this is not true in general I mean this is a particular case because we know that there is a conserved quantity if I write any random random let's say non-linear function with strange function signs cosines powers exponential in general it is not always possible to find a conserved quantity and not even a Lyapunov function so that that's the I mean that's the big downside of using the Lyapunov function they can tell us a lot about an equilibrium but they are not always easy to find it's useful if you can find it yeah exactly if you can't you shouldn't lose your sleep on finding a Lyapunov function okay okay so the last topic I would like to talk about goes a little bit beyond studying the stability of equilibria and is called timescale separation now this is basically a tool that can be used often to simplify the study of non-linear systems now let me show you in abstract in a general case what I mean and then I will show you two concrete examples to show you how we can use this timescale separation so this approach can be used when a non-linear system can be described by two different sets of variables x i and y j not necessarily of the same number so they can be of different number and each one of them has their own non-linear function which can be different for this too sorry I think was not a question okay so we have a we can have different non-linear functions here now what happens often not only say this depends on our knowledge on the system is that we can say for example that the timescale of these variables is very different from this timescale of this one for example if we are describing a large ecosystem where x is the population of elephants and y is the population of rats for example we know for example that the reproduction time of rats is much much faster than the reproduction time of elephants so we we can distinguish basically between slow variables and fast variables in the system again I'm going to give you a couple of concrete examples afterwards now if we can do this so if we can distinguish between slow and fast variables for example let's assume in this general case that x i are the slow variables and y j are the fast ones so what we can do in this case is I mean what happens in this case is that the fast variables so the y j in this case will reach their stationary values very quickly since they are the fast variables of course so what we can do in this case is assuming that y dot j is always equal to zero again let me repeat that in case it is not clear if we assume that we can distinguish the system between the slow variables the x and fast variables the y this means that as the system changes the y variables will almost instantly reach their stationary values so we can assume we can approximate the behavior of these variables by assuming that y dot is always equal to zero is that clear okay so what we can do in this case is basically setting this equation equal to zero so you see that here we can now invert these functions g here to write the fast variables as a function of the slow variables if we then plug this expression into the equation for the slow variables we basically have reduced let's say the number of variables so that we can describe our system only through the slow variables okay there is a question yes by Washington yes hi thanks question are you assuming that the y j's have a stable equilibrium or something like that like if the y j's are oscillating I am not I am not assuming anything about the equilibrium right now I am just assuming something on the speed let's say on which the this this variable change so I it is sufficient that these for example set of variables are faster than the other I'm not assuming anything on the stability or on the existence even of equilibrium I guess I'm wondering if the y j's don't have a stationary value in other words they're oscillatory on their own yeah that is a case in which you probably can do you in which you can't apply this this approach I would say okay but you might be able to use some mean values yeah you can you probably can use some mean value particularly for example if these oscillations are not particularly wide then you can you can I don't think I have understood if that was a question or or not okay okay so again let me repeat that this is an approximation that cannot be done always in any case but it depends on our knowledge of the system so in the example I've given you before of rats and elephants I mean we have to know already that rats reproduce much faster than than than elephants on in any case we need some phenomenological knowledge on the system to justify this approximation so let me show you two examples practical examples in which this happens now one class of nonlinear system with this approximation is actually done quite often are chemical reactions for example let me introduce this nonlinear system this is called Gierer and Meinhardt activator inhibitor equations these are nonlinear systems donator equations as you can say and these basically describe the abundance of two chemical substances x and y which are an activator and an inhibitor for example to make some practical example x and y could be two proteins that either activate or inhibit particular metabolic pathway or a particular metabolic reaction so let's assume for example that we can tell that the activator is much faster than the inhibitor for example let's assume that we know how these molecules are made and we can tell we know that for example if we raise the temperature of the system then the activity of this molecule is much larger than the activity of the inhibitor so we have that x the activator becomes much faster than the inhibitor then what we can do in this case is set x dot equal to zero so that here we can use this equation to write x square as a function of y then we plug this into the equation for y dot and we obtain this which basically becomes let's say the approximated equation of the system for high temperatures because in this case these variables are the slow one and so we can describe the system only through this equation the it is variable solving on the other hand let's assume that we know that the inhibitor is much faster than the activator for example we know how the again we know how these molecules are made and we know that if for example we lower the temperature then the inhibitor the activity of the inhibitor molecule because much larger than that of the activator then in this case we can set y dot equal to zero here so we can write y as a function of x square like this we plug it back into the this equation and we get in this hypothetical example the approximated equation of our system for lower temperatures is that clear okay so the other example which is actually more relevant for ecology that I wanted to show you is the so-called mekkartur consumer resource model now this model basically describes a system of microbiota species competing for some common resources in particular this year is a schematic representation of the model we have a set of resources we have a set of species we assume for now I mean it's not mandatory but for simplicity now we assume that the resources are supplied with constant rates so this si here are the supply rates of the resources and that this species here can only uptake these resources so we are not modeling any other kind of interaction between the species now in microbiota communities there are lots of phenomena that can happen we can have biological warfare so species producing antibiotics for other species or species producing actually resources so excreting metabolic byproducts that can be used by other species so we are excluding all these cases and we are only describing a system where the species can only uptake the resources and grow now if we build the system it's not necessary for what I want to show you but if you want if we have time I can show you how this model is built but in the end the equations of this model look like this where this here is the set of equation that describes the dynamics of the species population and this here on the other hand is the set of equations that describes the resource the dynamics of the resources concentrations here I have just called r i this nonlinear function so you see that these are indeed coupled nonlinear differential equations now what people often do but I mean this is not something that people always do is assuming that the dynamics of the resources is actually much faster than the dynamics of the microbiome populations now this generally is justified by the fact that for example the molecular dynamics that underlies the uptake and the metabolization of resources which takes place generally in fractions of seconds or few seconds each actually much faster than the timescale over which the species grow because microbiome species take at least several minutes if not hours or days to grow so in this case you see that we know from experiments for for example that we can define this as the fast variables of our system and this as the slow variables so if we can do that we can set ci dot equal to zero here and we can write as you can see this function r i as a function of a sum of all the populations if we plug it back to the first set of couple differential equations you see that in the end we can describe the system by only using the species populations without considering the resources concentrations now an interesting case is basically this model that I mean there is an interesting case if we consider the same model in a slightly different setting in particular these here are the consumer resource equations with two differences with respect to before here I am not writing the non-linear function r i that I was using before but I am just using ci but on the other hand the resources now are not be supplied with constant rate but I have written as you can see a logistic term a logistic equation for the growth so if we do this so for example I mean one case in which this could be a good description of the system could be for example a system with phytoplankton where the resources would be phytoplankton and the populations here would be zooplankton of course we still have to be sure that the other assumptions of the model are true so the zooplankton are only eating the phytoplankton and not eating other species but as long as these assumptions are true we can use this model if we now assume for example that in a particular system we know that phytoplankton is growing much faster than zooplankton so we can assume that the ci here again are the first variable so we can set ci dot equal to zero and write ci as a function of all the rest if we now plug this back into this equation and do some rearranging I mean I'm not going to show you just because it's just very boring computations and we have only five minutes left but in the end we get these equations here where here I'm showing you the definitions of these parameters this is actually an interesting result because these equations here are called the generalized lot-cavolterra equations these are basically our generalized version of the lot-cavolterra equations for system with more than one species and so you see that by doing this time scale separation approximation and not considering the equations for the resources we can actually simplify this model basically to the generalized lot-cavolterra equations okay with that I have finished all the things that I wanted to tell you in this tutorial so I will be happy to take questions in this last few minutes yes so we have a few minutes for questions I'm sorry to ask Leonardo any doubt you might have please raise your hand with the zoom future question I hope this means that I was clear I will take that as a proof of that as evidence of that okay okay great I your volume is very low yeah your volume is very low I cannot hear you I can maybe if you write in the chat because I really cannot hear what you're saying thank you um so I I did understand very well why so if the resources are fast um how can you make the derivative equal to zero wouldn't that mean that the resource dynamics are slow compared to the population flow so that we can consider it constant and therefore the derivative equals zero not necessarily I mean what what would that mean basically I mean let me draw this here probably this is going to be clearer so in general if we didn't make this assumption let me write okay we would have a solution for the populations and a solution for the resources so in general we would have that here I don't know we would have a general behavior let's assume that the populations at a certain point converge to a value and even here we would have something like that so some oscillation some strange behavior and then um these these functions here tend to a stationary value setting ci dot equal to zero in that case means basically assuming that these variables here are so fast that since the beginning they are already equal to their stationary values so in in this sense they would be they would not change but they are already in the stationary values I mean it it it can seem like a strange approximation in most case can be a strange approximation but there can be cases in which this actually is a a good approximation so again this depends on our knowledge of the system and what we know about it it's not something that we can do in general okay thank you thank you so there is a question at the what the question is when do we have to deal with the diapunov exponents when when do we have sorry to deal with the diapunov exponents again probably it's not going to be a satisfactory answer but it depends on the system I mean if if you see that you have a system where you can easily find a function with all the property that the diapunov function must have then that is a case where you can deal with the with the apunov functions but if you see that you can't and you don't find an easy way to to to look for the apunov functions and I'm sorry I mean it's not my fault but this is purely driven by intuition then in that case it's better to just use other tools use linear stability draw the stream plots make some numerical simulations so any kind of other tools that we can use that can help us understand something about the stability of the equilibrium I hope this was clear there is another question by Zeni yes sir I just want to clarify my understanding so basically we just we can use time scale separation then hopefully then we can get to a lot of alter equations and then after which we can just use the second theorem of the apunov to study the stability yeah yeah if we are in one in one of the cases where the the timescale separation approximation actually makes sense yes we can do that and I mean this is something that people something do they start from a consumer reduced model then they assume the separation of timescale and then they work with a lot of alter equations I mean the if you want this can also give you an a different interpretation of this generalized lot of alter equations because they they basically come from a competitive system so I mean you can also interpret them in in a different light but yes I mean this is something that that can be done of course and sorry if I continue to repeat myself if we know that we are in a case where we can do this timescale separation and again this depends only on the knowledge that we have of the system so if we have some empirical some experimental knowledge that these two set of sets of variable are actually very fast or very low or if we have any other kind of intuition that can justify us to do so this does that answer your question yes sir thank you no problem there is another question in the chat from Sir Mas so she's asking again about the timescale separation so without the timescale difference is it impossible to find a single equation for a two system yes if you don't I mean for sure there will be cases particular cases in which you can do that but in general if you are in the in the situation where you can describe the system with two sets of variables and you can't justify the timescale separation you just have to study the equations with all the the the variables all together again there can be particular cases that I am not aware of in which this could happen but the general rule is is this I hope this answers the the question there is a okay there is a question by Davos hello so I just want to know that what is the broader sense of applying timescale separation so suppose my system I know that it can go through the it has slow and fast variables but what is the output I will be expecting after applying this method the simply a simplification of the system so assume for example that in in let's consider this case so assume that we have a system with 80 species and 50 resources these are large numbers but if you compare them with what you can see in natural microbial communities these are not so large numbers so if we have 80 equations here and 50 equation here without timescale separation you would have to solve 130 different non-linear differential equations if you can apply timescale separation you reduce this number basically to back to 80 because you are eliminating more or less you are reducing the number of equations for 130 to 80 so the advantage in this sense is simply the fact that you are simplifying a very complicated model a very complicated system okay thank you so much no problem great so is there any other question we have in principle five minutes yes there is another one by Seria Rama please yeah thank you for the talk it's wonderful thank you I have one small question in this time scale dynamics can we have this what is that we can take normal resource consumer system and we assume initially one one is faster another one is slower and repeat reverse it can we get some boundedness of these solutions I wouldn't know in general probably again I am sorry if again this is not a satisfactory answer but I think that you would have to go in on a case by case approach in this case so looking at actually for example how the parameter how large or how small the parameters are and see if you can get intuitively any bound in this case because initially if you instead of solving the original system can we get a bound for the original system for something like that by using timescale I think that would be possible but again I I wouldn't say always again sorry sorry again if this is not a satisfactory answer no thank you thank you so much no linear dynamics is full of questions that don't have a satisfactory answer yeah exactly so is there any other question great so I think we can go in I mean take a break for three four minutes we're gonna be again randomly assigned to breaking rooms feel free to chat with others or to take a break and stretch your legs get a cup of coffee some water etc so we will be back in three minutes thank you thank you very much no problem thank you okay so we are almost ready to start so we are back on youtube and I'm waiting all the participants to get back from the breakout rooms and then we can start I think everybody's back so let me welcome again Joshua Weitz who is giving the second of three lectures today so please again if you have questions use the raise hand button or ask the question in the chat and if you're following from youtube you can ask question in the chat of youtube so with that thanks again Joshua for being with us and okay thank you Jacobo I have a different audio today I don't know if it's okay can you hear me yes yes I can hear you well good and hopefully that also works yes yes it does great okay well welcome back everyone for the second lecture after also your tutorial this morning and the second lecture in this three-part series that I will be providing as part of this course on virus micro dynamics and focusing on as I mentioned yesterday on principles ecology and therapeutics and in order to get some continuity I will do a much briefer introduction but each one of these is meant to be self-contained but obviously abbreviate what I covered yesterday and then go into new material so just to give folks again a context what I tried to do yesterday was to explain principles of how to think about virus micro dynamics through this predator prey lens and take that forward not just at the level of the individual cell but think about the consequences of how a viral infection of a bacteria the micro might lead to the death of that individual cell but not necessarily the death of the population and how that could lead to novel changes in eco evolutionary dynamics what I will try to aim at today is to think more broadly about the fates of these cells and how that too can change population evolutionary dynamics and even ecosystem dynamics so that's still ongoing work and then on Thursday I will get to the application side focusing at least on one application that of bacteriophage therapy and again I'm going to try to mix theory modeling throughout and allude to certain pieces of theory if some of this is covered in my book some of it goes well beyond the book and you can go to the primary source material for reference okay so just to make sure folks have the the sort of arc in mind you have a sense already that virus host interactions modify the fate of cells on the timescale similar to division times but that doesn't necessarily mean the death of the population I've shown in our review just very briefly today how infection license can lead to lockable ptero like dynamics at the population scale and obviously new dynamics as well and then these sorts of processes iterated again and again whether it's in microbiome the global oceans can have potentially large-scale ecosystem effects and just to remind folks that viruses are embedded and virus micro dynamics are embedded as part of complex ecosystems so the death of for example an autotrope or a heterotrope means that those microbes aren't necessarily consumed by grazers which would allow that organic material to go up to higher trophic levels but instead are redirected in what is called a viral shunt back into the dissolved organic and particular organic pools where they can then be retaken up in other words shunting organic material back into the microbial loop and keeping organic matter small so obviously when this starts to happen as already described with hundreds of millions potentially of bacteria per mil often tens of millions per mil is a typical level then that obviously is going to compound over time but do viruses of microbes I've been focusing a lot on this lytic wrap in the oceans and elsewhere do more than just kill or prepare to kill are they doing other things of course the answer is yes and I'll really focus today on this alternative pathway okay so this talks premise and and really the lecture here and a large body of work that we're trying to work on starts with what I would say is it seems to be a simple question what is a virus and when you think about a virus I already gave some examples yesterday you often think about the charismatic version again if I had said SARS-CoV-2 you would imagine this particular corona like virus particle here's this virus particle but I've given some other alternative answers here this is what is termed a lysogen in which the viral genetic material is integrated and here inside the genetic material of that of the microbial host it could also be extrachromously and still passed on and there could be other alternatives including lytically infected cells we're here we have viruses but now they're inside cells rather than outside cells so in some basic sense although we often whenever we're ascribing the word virus we use it really about this virus particle this particle isn't necessarily the thing under selection I would argue that this entire set ABC all the above are what constitute a virus and I'll try to get through in today's talk thinking about viral fitness across the entire viral life cycle whether it's inside or outside hosts and thinking about viruses in a different way can really lead to new challenges for theory experiments in field work so I'm going to try to get towards that vista offering a different perspective which is much more the parasite host perspective in three parts I'm going to again ground ourselves in these little models via a very brief recap of what I did yesterday and then spend the bulk of time in parts two and three talking about mechanisms and patterns having to do with the cellular level mechanism of lysogeny and lysis and how that relates to potential patterns and then try to explain how we might understand the benefits of lysogeny and strategies that include this alternative pathway in which the viral genome is integrated into the host instead of killing the host that it's infected and releasing new virus particles okay so let me just do this brief recap and hopefully this will reinforce what I described yesterday again as you recall we have these bacterial viruses that are diffusing randomly come in contact with cells injecting their genetic material into the cell taking over the cellular machinery having a self assembly process and eventually these new virus particles are released and as I described already this is the basis for these essentially lockable terra like models of virus microbe dynamics in which the death of the host cell does not necessarily mean the death of the population and just to remind folks I will be using similar models today here I have a simplified system of resources cells and viruses where media is coming in resources cells and viruses are leaving the cells take up nutrients and then lead to new cellular biomass and new cells these are then infected and then with a birth size beta new virus particles are released and I've already explained how that can lead to these counterclockwise cycles where we have a large number of available hosts many viruses which drive down cell densities leading to decay and viral densities leading to recovery of cell densities and so on and we get these lockable terra like cycles which we can then see in experimental work and in this experiment as I already explained this is about 10 days between phage t-40 coli b we get these large-scale endogenous oscillations despite the fact that this is a chemostat experiment without any variability in the resource supply so again the viral lysis isn't leading to the death of the population for other oscillations and over longer time scales there can be evolution and you can see here as I explained the other day there can be things like cryptic dynamics and the cryptic dynamics are a result of the fact that hosts are evolved okay so I went through this yesterday and just trying to refresh everyone with the basis for what is often the canonical predator prey view of virus micro dynamics and so this means in general as I described yesterday I won't go through all the details this is the brief recap which is that in the absence of evolution we have a notion that virus micro dynamics should expect to lead to this pattern of population scale counterclockwise cycle which we've seen but when there's evolution in place we can get antiphase or cryptic cycles where you can see the system seems to double back on itself and I'll just give a note for those who are somewhat new to nonlinear dynamics this implies that this system must not be two dimensional because we can't have it go in two directions via the same place in phase space so we must be missing some feature of the system and here of course that's evolution we're taking the three-dimensional system and projecting it down into 2d and in a co-evolutionary case there actually can be clockwise cycle as I went over on Monday so the takeaway here for the purposes of today's lecture is that population dynamic patterns have been used to infuse and furiputative mechanisms meaning seeing these cryptic cycles whether it's in prey systems or virus micro systems usually imputes the fact that evolution is going on at the same time scale as these population dynamics but can we take this same approach more generally to non-lytic interactions right so I spent a lot of time on Monday on these lytic interactions let's change our perspective and think about non-lytic interactions okay so now that I just did that brief recap and I don't know if I should pause Jaco but that was really meant as kind of an introduction and summary of what I did on Monday I don't know if there are any questions that have already popped up or I can go in the chat so if anyone wants to ask a question please raise your hand that's that's fine I can keep going if there are more there is one by Pablo yeah yeah super quickly um you've said sometime and endogenous oscillations could you clarify what that is? Sure I'm trying to use the word endogenous ENDO versus exogenous EXO to imply that the oscillations are arising because of feedback in the system not because I'm driving the system with some external oscillator right so that's the that's what I mean that those we're driving with a constant input of resources yet the response is oscillatory thank you good okay so let me now talk and expand our view of these virus micro systems by looking at alternative outcomes of cellular level infection to do that I have to expand our view of the fate of this infected cell which I've said a few times we have this infection and then soon after the injection of genetic material this can lead to the death of this cell and the release of new virus particles that's called the lytic pathway but for certain phage specifically that are called temperate phage there's an alternative pathway in which the genetic materials integrated into the chromosome of the bacteria as the bacteria divide then the daughter cells also have the viral genetic material and this integrated form is called a prophage and later either by chance or through sometimes a sensing process related to stress or other features this prophage can be induced re-initiating the lytic pathway the key point here is that in this pathway the lytic pathway the virus leads to the death of the cell and the release of new virus particles and the other there's not a death of the cell and in fact even though the virus has say gotten or obtained or found this bacterial cell it is not actively killing it at least not yet and this study of lysogeny is also quite old and dates back to really the origins of thinking about both molecular biology and gene regulation but also in terms of basic virus microbe dynamics this study has been revitalized in many ways there's a beautiful book by potassium a genetic switch focusing on phage lambda in particular and a number of studies in the past that say 15 years or so really have leveraged new techniques to label and look at these same problems not in the population scale but at these individual cell or phage levels and here's an example from the work of Edel Golding in which they have these labeled phage so the capsids are labeled and you can actually see singly infected or absorbing cells or those in which there are more than one phage absorbing and infecting an individual cell but they've labeled the system as this capsid with green but also included a promoter that will express this red fluorescent reporter in so far as the lysogeny pathway is an issue so what you can see is that some of the cells and it's not actually a coincidence that this multiply infected cell ends up expressing red because that tends to be the case but you can see that some of the cells express this red and some as you can see here are producing new phage and then they've burst and released new progeny phage whereas others as you can see divide inherit the property of the mother cell okay what's interesting is that these are not just stochastic outcomes there is elements of stochasticity but they're also driven in part by the state of the system so for example the viral concentration we're thinking about it in the single cell level as the multiplicity of infection the probability of lysogeny actually goes up so counterintuitively maybe if a cell is infected by more viruses this would seem to lead to a more virulent outcome would you rather have a larger small dose of a particular infection you'd probably prefer a small dose and imagine that the outcome will be less virulent for temperate phage lambda and this happens in a number of circumstances the outcomes are less virulent the more multiple infection the more phage are infecting the same cell so here you can see the probability of lysogeny this option here in which the cell is not lys goes up as a function of the multiplicity infection from here you have one to about 20 to something like 80 so it's not deterministic it's not zero or one but it actually changes as a function of this multiplicity of infection and this actually goes back to wonderful work by Philipp Kurilski in the early 1970s and just as there is this probabilistic decision which is driven by some ecological dynamics so too the induction probability also depends on stress in this nice way depending on the uv dose there's a much higher chance of being induced whereas depending on the other dose only a smaller fraction will be induced so you can see here that we have these like history traits associated with the fate of individual cells that can vary and that also can lead to certain feedbacks in the system that is the how question in other words there's a whole field built around how this works how does a phage have these alternative outcomes and today's lecture is not focused on this how question and you can read more potassium for it and recent work by the golden group our group many other groups have been asking trying to address this how question which has to do with gene regulation but today I want to focus on the why question why be temper why not if this is a virus that's acting like a predator the simple predator there's a cell why not take advantage of this opportunity kill it and release many new virus particles so Frank Stewart and Bruce Levin in a in a wonderful paper back in the mid 80s asked this question of why be temperate and to do so they also use simple coupled nonlinear dynamic models of the kind that you're hearing about in your tutorials also I've introduced here which describe in some sense what happens to cells and to viruses with time and I'll elaborate on a sort of modern version of these same models but their premise was one that they call this feast or famine hypothesis that temperate phage would presumably do better when few hosts are available and extra cellular mortality is high in other words it would seem to in order to explain this phenomenon that phage cannot to kill is that if there's very few hosts left if a phage got in and killed that host then there would be no host left for its progeny to infect a that is a bit of group or even multi-level selection right if it's in the advantage of the virus to do it why doesn't it just do it and also they were never able to obtain solutions consistent with it it was a nice hypothesis but it was hard to actually figure out a solution for so they would introduce these exogenous oscillations but there didn't seem to a way to actually make a kind of proof or demonstration that this was in fact the evolution rationale for why to be tempted this is not just a question and let me just hold here for a moment this is also consistent with a lot of the phage lambda work in the sense that if multiple phage are infecting the same host that also indicates that are probably not many uninfected hosts left and so again it seems with this feast or famine hypothesis at that point hosts may be relatively non-abundant and if they were to be killed because that was where the temperate strategy seemed to go that would imply that maybe the host would go away but that's not what we find we find the opposite this is not just a question of phage lambda but it also became the paradigm in marine systems which is known in through this moniker of the seasonal time bombs in other words lysogen is prevalent given low productivity and lysis is elevated high productivity you can see this here in the study looking at the fraction of infected cells during essentially low productive periods and high productive periods and also shown here is the fraction of bacteria that are lysogens and they can figure this out by trying to induce them through a inducing agent for example mitomycin C and what you can see is that low productive periods there are very few visibly infected cells whereas in the high productive high density environments and I want to make sure that we separate those two concepts there seems to be a lot of visibly infected cells and likewise there seems to be a switch in which there seem to be many lysogens in other words phage that are integrated but not actively infecting or producing viruses in the low productive periods and very few in the high productive periods okay and this became certainly a dogma for many years until a few years ago when an alternative hypothesis was introduced and that is called piggyback the winner which is literally the opposite of what I just described to you and this is that lysogen should be positively correlated with increases in host density and productivity in other words as there are more bacteria and things get more productive there should be more lysogeny and less lysis and the opposite which is again the opposite of the phage lambda story and the steward and leaven hypothesis when there are fewer cells and less productive environments there should be more lysis and this was meant in part to explain patterns between virus like particles viruses and microbes in ocean systems this is one particular example where you have viruses on the y-axis microbes bacteria largely on the x-axis log scale so we have a straight line here which denotes a linear relationship and the data although scattered implies a slope that is less than one in other words the ratio of virus to microbes seems to decrease as microbes increase okay so that was a claim and this was the putative mechanism so now let me try to disentangle those two claims first of all the idea that there is a fixed ratio between virus and microbes which you'll often see in the literature and you'll often see it ascribed as 10 to 1 it's just not the case it is a decent median but we in a totally independent study and there's even a third group who did something around the same time looked at this question and found that here are all these individual relationships by study and what you can see is that the best fit for the entire data is a power law with an exponent less than one implying exactly that the ratio of virus the microbes decreases as microbes increase but it can be offset you can have higher numbers you can have lower numbers but certainly it seems as if this pattern holds right on the abundant side but the challenge is whether or not this idea is enough to explain that pattern meaning it's one thing to have the model explain the pattern but the question is it unique can many models explain that same pattern in the piggyback the winner model they used again these system of nonlinear differential equations of microbes and viruses but notably no lysogens instead what they had is that the uh that the viral efficiency so here you have lysis and the viral efficiency scaled with n over k so even though the idea is that activity of lysosactivity goes down in fact their model has it going up so here you can see this is a standard model but it goes the other way it's true that if you look at the outcome of the model it finds this pattern and this is the result of our reanalysis of this work but it is also true if you just vary parameters because of parameter entanglement entanglement in the steady state outcomes you can also get this feature that the virus microbe to ratio virus micro ratio goes down as microbial density goes up and you don't need to invoke this mechanism in order to see the same relations so that implies that this pattern alone may be insufficient to make the claim that this is a piggyback the winner mechanism however they then look directly at metagenomic evidence and try to see in the viral fraction so those are virus particles outside cells what fraction of them had things indicative of pro virus like reads in other words indicating that there may be the possibility of being temperate and claim that this went up which is what their hypothesis is this is our reanalysis of this data and as you can see there's not much of a relationship in the pro virus like reads in the integrases this is and the excision ages all these are hallmarks of being temperate and in our view neither the metagenomics nor the abundance data support directly this evidence of piggyback the winner but notably it doesn't go down either right so there seems to be an absence of evidence for a particular relationship nonetheless this idea that one can go from a pattern to a mechanism is enticing and in fact the following year a separate study concluded that the findings of a decline of a ratio of viruses to microbes here i'm showing again virus to micro ratio microbes you'll notice again and again in this separate metagenomics study of linking viruses to host that it seems like this pattern is ubiquitous and because that was claimed to be a proof of feedback the winner they say it corroborates the proposed theory having already worked in this space a little bit i saw this paper and was a bit concerned and again maybe we're together i would ask to see if you are concerned but you'll notice that these lines which denote virus micro abundances or metagenomic inferred abundance for different virus host pairs all seem to have parallel slopes i hope that's clear right and if you can look at it you'll see that if we started about negative two to two something about this would be a slope of negative one and i was worried that these parallel slopes all look a bit too much like negative one here is our replot of the same data with a negative one slope as a guide to your eye and you can understand that this y-axis is not something independent but it's a ratio of virus to microbes plotted against microbes in other words this is a plot of y over x versus x but if y over x goes like x to the minus one this implies that if we just look at the virus abundance to the host abundance you can see that almost all of these lines are statistically not significantly different than zero in other words an absence of a slope which means that it appears to be unrelated to host abundances or at least we don't have the evidence they they're related and frankly that's a counter indicator for piggyback the winner which implies viruses are going up in density as hosts go up in density just not as quickly which is why the ratio goes down so again the takeaway here is that we feel there's an absence of evidence for positive correlation whether you're looking at lysogeny proxies or examining ratio of virus to microbes as a proxy but it does raise some interesting questions because we don't see the opposite relationship we're not seeing the sort of inverse relationship as one might expect so i'll try now in this third part to provide some thoughts about how we might think about the benefits of lysogeny and when we might expect to see more or less of that strategy both in experimental systems and natural systems and now it's probably a good holding point let me get one thing my clock was on the wrong side of the room so yes so there is any question please okay there is a question from ronardo please yes hi can you can you hear me yep okay thank you thank you professor that's this is a very interesting lecture i was just curious about what are the mechanisms that trigger lyses from lysogeny you said that stress and sensing could be factors but i was just curious if you could give some examples on when do cells with the viral genome included in their own genome start the leitic cycle right so there is a regulatory mechanism that keeps a prophage stably integrated inside a cell and it's true that we know about some of these largely from a few model systems so i'm sure there are many things left to discover but the idea is that for example if there is DNA damage to the cell then there's a repair mechanism that is going to be activated it turns out that the repressor system which keeps the prophage stably integrated can then those repressor proteins can then be cleaved by the same DNA repair mechanism which then leads to an induction event so a typical way to think about a natural systems is DNA damage some sort of damage agent or stress whether it's UV or mitomycin C are all experimentally standard ways to induce because you're leveraging this sort of evolved system there may be other mechanisms when we think about the way out there are really two decision switches there in and out and going in there's all sorts of interesting questions to be raised which i didn't go into today on the how side because if we have multiple phage that are affecting the same cell in some ways we have a gene dosage question that that we need to ask because now you have more copies of this phage genome and you might think well how would that change in outcome but these are systems with nonlinear feedback so if we're increasing the rates of everything but there's a nonlinear feedback we can actually preferentially end up in one kind of fate rather than the other but from the induction side there's also a switch and again as i said that is controlled by a coupling between the regulatory mechanism for example the C1 repressor and the status of the DNA repair enzymes and those two together can lead to induction there may also be queued into quorum sensing and there are other systems too for example the Arbitrium system which is quite interesting from the Sorak group and that has its own mechanisms of integrating in those decision switches so i think as we begin to see more of these model systems we'll have more of these examples okay thank you thank you very much great any other question oh yes there is a question by Ravi please um hi um just a quick question uh the are there any fitness costs while the virus is inside the phage is inside the the before lysis are there uh physiological costs to the bacteria or anything anything like that so i will be talking about some of the ways in which there could be fitness benefits and fitness costs right because certainly a fitness benefit if the virus brings with it a gene that is somehow beneficial then in fact there's an entanglement and the reproduction of the cell is also reproducing the virus and it's sort of their mutual interest and i will talk about that next there could be costs though it seems given the size of bacterial genomes and viral genomes relatively speaking that replication cost may be small but there may be other costs with a respected expression of repressor proteins there may be other costs that they're bringing in genes that are not beneficial right so there can be all sorts of ways yeah i'll talk more about that in the next section yeah sounds good thank you right there is another question by mites yes hi Joshua just a clarification so basically that last slide that you showed us the what i understood is that virus abundance is essentially invariant to the abundance of host in this particular let me clarify in this particular study which tried to use a metagenomic based approach right okay if we look at direct particle counts and microbial particle counts of the population level of the community level excuse me then we see a positive relationship yes sub sub one all right okay thank you yeah should i continue yes i think okay good and i think i'm still on track on time so it's looking good so let me go back and ask this question again because despite the disagreement and some of the debate and i want to point out that debate in science is usually a good thing right we're trying to clarify ideas and we have an intent a shared intent to try to increase our own understanding shedding light on complicated hard problems and so i think this question of what environmental conditions should favor lysage rather than lysis is a good one and i can imagine there are circumstances in which there may not be one monolithic answer to this question but nonetheless i'm going to try at least build a conceptual foundation for how we could begin to address it and i'll try to do this by making an analogy and i realize this is a very international group so in english this is saying a bird in the hand is worth two in the bush which i will try to translate because uh you know certain times sayings may not always be immediately understandable i hope you get the idea that you have something it's in your hand and you might be willing to trade it for something uncertain because it's out there but if you're going to do that you better get more because those things are uncertain i'm not going to trade my bird in the hand for one in the bush i should get at least two and certain cultures have similar sayings i was told in in spain there's a similar saying but a bird in the hand is worth a hundred in the bush or something similar uh so you can tell me about uncertainty in cultures and the number of the trade that you have to make but i will try to make a new puzzle here that a virus is in the cell and it's worth n in the bloom meaning the virus is inside the cell and you can put out all these virus particles but what is n and also how many cells is it or need to be out there and how uncertain does the situation have to be for it to be worth giving up the cell that you found that the virus has found and then going back out into the environment this uncertain environment okay so to do this i'm going to move away for a moment from the population view and take an individual view and again i've already described this notion of this encounter and i'm going to use an anchor i'm thinking in terms of a lytic cycle in which we start with the virus that injects its genetic material into the host but i'm going to call this the mother virus it lysis leading potentially to hundreds of virus particles but i will claim that this is not the fitness that we should talk about because many of these if not most of these virus particles maybe they're defective they don't ever find a host only a very few in this example three end up infecting a new host and we'll call these progeny viruses and i would call the fitness at the individual level here as our h or for horizontal as three and in contrast if i think about tempered phage yes they can do this but they might instead integrate my ask question well why there's no production of viruses viruses are these particles how can you have fitness and how do i account for the fact that a strategy is avoiding making itself right this virus particle that's what we think of viruses but instead if i think about the life cycle is being under selection then here we have a mother virus it divides three times each of these have their own fitness these we can arbitrarily call these daughter viruses as progeny and eventually the cell dies so here by initiating lysogen i would say that the fitness at the individual level of this virus is three three new progeny viruses and i've called this v er for vertical and yet no virus particles were produced my point here is that it seems that two vastly different strategies can have the same fitness at the individual level i put that in quotes for intentional reasons and how does this depend on cell densities on the environment because we want to connect this back to the ecological context okay so let's go revisit this population dynamics of litig viruses i've given you this individual perspective but we can think about the population perspective as having a population of susceptibles infected and virus particles susceptible cells grow logistically they're infected lead to new infected cells which over a time period one over eight of this latent period lead to a litig event all of these things may die or decay and we could get essentially conditions by which a susceptible population may be infectable by a virus such that the viruses increase in abundance and proliferate and this is nothing other than looking again as i mentioned before about a essentially searching for a positive eigenvalue of this otherwise uh is stable system the absence of viruses but unstable given a small introduction of viruses and you can see here viruses should increase in population within these cells using exclusively horizontal transmission only through the litig pathway whenever this criteria is met and again i don't want to delay my interpretation i've chosen this calligraphic r because i mean intentionally to evoke this notion of a basic reproduction number and now since everyone is an armchair epidemiologist some of us are actually doing this kind of stuff but you will obviously recognize what i mean by that and why the condition is greater than one and let me unpack this let's take the perspective of an infected cell an infected cell will lice eta over eta plus d prime of the time because it could either die via some other mechanism or through viral lysis so a fraction of an infected cell a fraction of time will lead to a burst event producing beta viruses of these only a fraction will infect cells which as you can see depends on cell densities alternatively i could start with a virus particle and starting with a virus particle ask how many virus particles are produced in this life cycle well a fraction of those virus particles right denoted here will find cells of those a fraction of infected cells were burst times the number of new virus particles produced and either way when i think of a life cycle from in a cell sense or in a virus particle sense i get this same number and again i've written it here out in words when this is greater than one we have the increase of this virus population notably though it is not inevitable it depends on the susceptible population because as you can see here the chance of actually finding a host is going to saturate as we increase susceptible populations obviously go down as we have fewer cells so if we have a fixed burst size it means that you have to have a sufficient number of susceptible cells for there to be invasion and here i've written out the are not criteria here's this breakpoint and below this point this virus will be unable to invade even if it has a very high burst size again showing you that it's not just about how well the cell the virus exploits the cell but the ecological context and clearly in all of these cases as we add more cells this seems to be enabling a larger state space of potential invasion scenarios for this horizontally transmitted virus so the takeaway here is that ecological conditions with more susceptible cells and viral trace with more efficient infections favor this lytic antagonistic moment let's now do the same thing for latent viruses including temperate phage and focusing again only on this exclusive route in terms of our calculation but here we have susceptible cells lysogens which can also divide and i'll just note that n is s plus l so it's the total number of cells in the system and here we have infection but some of these cells may lice and this this fraction p and another fraction q may be dividing and when there's a lysis event we get production of new virus particles i'm going to focus on the case where p is zero just look at this exclusive lysis growth via lysogeny and ask the question how can viruses increase and proliferate this population they can do so using exclusively vertical transmission when this number is greater than one and we can think of this as essentially the average number of new lysogens produced given one lysogen in the population and to do that we see that the lysogens will persist on average one over d prime which is why we have this one over d prime and they will have a division rate b prime and it'll modulated by density so if we have a rare lysogen and the susceptible cells are high abundance relative to their carrying capacity it will be very hard to proliferate so you can see this is in essence division rate times cell lifespan what this also implies and this goes back to a question that was anticipated near the end of the second part is that the benefits or costs the direct benefits or costs are going to modulate the conditions by which this vertical transmission pathways could be favored when the susceptible population is relatively low compared to this carrying capacity then you can see depending on the benefits this b prime relative to b if there are high benefits and even low fitness benefits there's a large regime in which this rare lysogen can proliferate but when there are fitness costs well it doesn't ever seem to be good it can't ever do it alone notably that irrespective of the fitness benefit or cost you can see that this r knot level is going down so there can be a transition depending on the level of fitness benefits at which point low densities are actually more likely to yield the proliferation of a lysogen rather than high densities so now we're getting some direct evidence rather than having to appeal to this idea that they should not kill their host because that would be bad for them in the future but rather saying it's good for them now as you can see here if these viruses were to try to kill these hosts at low host densities this is not a viable strategy whereas it can be a viable strategy to forego killing a host and proliferate along with it as a profige so the takeaway here is ecological conditions with the reduced niche competition direct cell benefits or low variant survivorship can favor latent strategies we can even start to do intermediate cases there are not just these dichotomous outcomes but also other forms of infections including chronic infections and most notably this is through filamentous phage which bud rather than burst in which case these infected cells are dividing but you'll notice that there's a production rate of viruses from infected cells and that doesn't include the death of the cell and here in my individual example you'll see that this cell divides once but buds twice buzz has more than two budding viruses but two of these budding viruses infect horizontally so we have a basic reproduction which is the sum of the horizontal and vertical components and so when we actually do the analysis in full we identify precisely the sum for the reasons I've just explained that we have this vertical average number of new infected cells vertically and here there's an average duration during which there's alpha new viruses produced and there's a fraction of them that find new cells so we have the same rationale when we put all this together you can see that these intermediate cases although this is a chronic mode I'll go explain the temperate version in a moment can end up being invasible across the entire spectrum of densities where these dichotomous outcomes will eventually fail at these other extremes this particular case we have the highest basic reproduction number in the middle but I want to point out that that is not Malthusian fitness so we have to think carefully about feedbacks which is what I'm going to start talking about in a moment okay so let me just do this takeaway and then maybe there'll be a few questions before I get to the final part here just to say that again that these temperate or chronic modes can be favored when susceptible populations are low so now we have really beginnings of answers to why be temperate because on the other hand this virulent strategy it's not just that it's bad for the host population it's bad for the virus it's not evolutionary beneficial to kill the host because you simply don't propagate there are not enough susceptible cells in order to produce more than one infected cell on average and this means that this range in which this non-horizontal mode is favored could be much greater range than we have expected and suggest that we might find this in far more cases than we've thought about before so to answer this question I think believes requires a unified metric at least to answer the question of invasion the long-term question remains open in a challenge for the field thinking about virus host dynamics if we want to understand integration I think we have to go beyond the predator prey dynamic because you can't account for there's not an apples to apples way to compare but if you use this epidemiological notion and think about this parasite host infection is transmitting horizontally horizontally or vertically we do have a unified way that we can compare temperate strategies with these litic or virulent strategies okay so I should pause there before I do a few more slides and wrap up okay so there are a few questions from the chat so perhaps I can start reading them so the first one is from Egar and is the following is there any impact of microbial viral coevolution to the disogyny level of the phage and is there any benefit for the microbes to keep the viral gene kept kept integrated to their genome so yes there is coevolution there's been very limited work on the evolution in the lab of lysogeny I'll in the next stage I'm going to talk about some of this within temperate phage and also to point out that one of the benefits of having a prophage not only can there be the shift of genes though of course the danger for the virus if it doesn't get out is that it's under most of the genome is under neutral selection which then can drift away into inactivity but also an active prophage can protect a I don't think that's my computer can protect a a host against infection by certain kinds of viruses so it's not universally protected but there can be things like super immunity and in other words it helps protect the virus from the bacteria from infection by the virus that is a benefit great there is a second question and these are the progenies from leaky cycles identical because obviously the progenies from lysogeny would undergo several mutations especially as the cause plasmid generation well people have asked this question no is every is there are any two snowflakes the same right each one is a little bit different I think it's a fair question about viruses both in terms of their assembly obviously they're going to be slightly different but in terms of their genome you can do the math and you ask the question with something about 50,000 base pairs and an error rate that's typical for double stranded viruses you know we I imagine that maybe some of them have precisely the same genome but many might not and so the lytic cycle and I have to think through that a little bit more carefully I want to be careful about whether I really believe that I'll let me think more about that whether I think that they're on average you expect differences you probably do but remember that there is an error correction mechanism so if it's going through a few generations we can ask the question is that going to be any different than maybe a slightly higher rate in the the replication cycle during lysis but yes you do expect that the project are slightly different and that's the grist for evolution that can happen for the virus both because of the accumulation during the integrated phase but also in the event of the induction during the lytic production phase great there is one last question which I think is going to be short so is is there any assessment on how many many of the phases are temperate or what how many are temperate how many are temperate being how if we go out to a natural system and we were to ask the question is that virus that we've identified pretend have the ability to be temperate is that the question in some sense yeah I don't think we have a great answer to that that's in fact the interest of a number of groups of it's hard right now to figure out in some sense the potential or conditions where something may be temperate there are certain hallmark genes people have been working on this the past few years of looking for omics based methods to identify hallmark genes associated with lysology it doesn't mean that that's going to be fulfilled in a particular system there may be other mechanisms so I don't I think we probably have an undercount and it's probably more like more ubiquitous than we expect but I don't have a fraction that I can say that fraction of natural systems is absolutely temperate and the other fraction is not in the absence of integration excision aids are probably good sign but we're again still looking for the things we know I don't have a good number yet as a as a firm estimate great so there are no other questions so let me let me just wrap up here I only have a few more slides left yeah okay so the problem when we I've given this notion of this initial invasion the problem though going back in time is that the models are actually quite different Frank Stewart and Bruce Levin's model included resources but didn't include an explicit infected state there's another model which I'll talk about which has lysogens but again doesn't include some of the other features like resources we've built these more complicated models in which there's an active switch between lysogen in this active state and an active state of induction with or without resources so it gets to be a little bit confusing with respect to whether or not these these findings hold and this means that you really have very different model structures or what appear to be different model structures and how much of what we just found transcends these details I will just point out that we think that this does transcend details and in a paper that just came out a few months ago though who knows how many months ago it was because this year has been very long so I've lost all track of time we have found the same structure for our knot here for all of these models and I've shown a diagrammatic view which I know this looks crazy but we actually can use this to calculate and I'll just point out that the basic reproduction all of these models can be written in this diagrammatic form where we have essentially loops which are a lytic loop a lysogenic loop or what we call a lysolytic loop but notably the form involves things with a square root which I will also note have been observed before algebraically because you get these conditions and are noted as complicated what we've interpreted these as the first generation and second generation loops and because our knot is the average number of infected cells produced in a generation here when we take the second generation we have to discount them by a square root because we're essentially multiplying these together I'll also note that it gets discounted by impossible second generation loops where we hop from one lysogenic loop to the lytic loop it turns out that when we actually want to calculate these things we can use this formula but of course the values here are simply the basic reproduction number of these horizontal and vertical loops and those will depend on the model details but the qualitative form is precisely this okay so you can write crazy formulas I won't make you just to point out that you can actually do this for all these models but they all reduce even though the algebra is complicated the same fundamental form and what this means is that we end up getting the same kind of answers whether we look at the implicit model of infection with the explicit model and the takeaway point is that when profage provide a benefit to cellular growth what we see is that this vertical strategy is always good when they impose a cost it always seems to be bad the horizontal strategy obviously gets better as there are more hosts available and there are intermediate strategies as I mentioned before that can get the kind of best of both worlds and be have a positive invasion fitness irrespective of cell density but we still raise this question of what happens here at low cell densities because it seems like then we could have a problem where there are regimes in which none of these strategies seem to work as you notice here none of them seem to be invasible and just to point out different model structures some quantitative differences but qualitatively the same answers to think about this really does require a long-term framework and I know I'm at the end of my time just to point out that berngruber and gendon in a beautiful paper from 2013 analyzed this by looking at the ratio of these virulent and non-virulent types showing that there was evolution happening in terms of these strategies at the time scale of the epidemic right so that you have changes in the ratios just like I alluded to in my first lecture at the time scale of invasion but let me try to unpack it here in a different way what we've done here in this simulation is ask the question can temperate viruses that impose a direct fitness cost invade a system in the event that they have an indirect or ecological context benefit which is they provide immunity to infection by lidic viruses so they hurt the host in terms of growth but help in terms of immunity what we see is that when we start the system here are cells here's the resources we add these tempered viruses they go away they can't invade there's many hosts that are available but actually this this favors the rare type that imposes the cost on growth but this is an ideal time for lidic viruses to invade so if we add them at some low densities they immediately shoot up reducing cellular densities and now we add the very same temperate virus that we tried to add before that failed it can invade it's competing with fewer cells and also it's protecting those cells that are infected from infection and lysis and what we find is that depending on the probability of lysogeny these different colors denote the degree of immunity no benefits and complete protection from infection we see that as long as there's some benefit of infection we have a temper phase that can invade when it's invading not a fully naive population but one in which lidic virus already there which implies that in some sense lidic viruses can help tempered viruses invade even if they impose a fitness cost in a growth sense but not in so far as they provide some contextual benefit what i hope to take you take away from this is to say that if we want to think about the long term we're going to have to think about coexistence not just the viruses and hosts but of different kinds of viral strategies and there may be cases where in fact these lidic virus strategies make a template and restructure reshape the environment so that temperate and lidic or virulent strategies can coexist together so to close and i think on just that time what is a virus i would argue it's really all of the above that we should be thinking about viral fitness across the entire viral life cycle and in doing so i hope that we get some new ideas not just for theory but also for ways to probe invasion and experiments and interpret including really at these marine systems we're finding more evidence of non lidic infections and trying to understand both when they arise how they interact with these lidic infections how ubiquitous they are these remain truly open questions for the field and with that just to point out a lot of this has come out in the past few years goes well beyond what is described in this book and i've given you just a few examples of ongoing work and happy to take some questions before you go into your break great so thanks josh for the fantastic talk so if there is any question please write it in the chat or raise your hand any question we took a number during the talk so i think it's fine that we if there is no okay so i think we can stop here and josh oh there is a question okay so please go ahead with the question please if you want to ask the question monday i think you are muted monday maybe you can type the question into the chat because we can't hear you or you can write to me afterwards i think we're having a technical discussion yes okay so there in josh will be with us in two days from now so if you have questions you can also ask today after tomorrow so thank you again everybody so we'll resume tomorrow at the same time as today okay so keep in mind to always check the program because there are changes and thanks again for everyone bye bye