Controlling a novel epidemic can be extremely difficult: there may be little standing immunity within the population, and the disease itself may be poorly understood. Such a disease can infect a large portion of the population and, if symptoms are severe, as in the ongoing COVID-19 pandemic, healthcare systems may be strained to the breaking point. It can take months to develop drugs, and years to develop vaccines [4] . Initial control efforts therefore rely heavily on "non-pharmaceutical interventions" [5] such as "physical distancing" (also called "social distancing") measures designed to reduce rates of disease-transmitting contact. These measures carry social and economic costs, and so policymakers may be unable to maintain them for more than a short period of time.
Here we derive the optimal strategy for limiting the peak prevalence of a novel disease using a time-limited intervention. We consider classes of easier-to-implement but less efficient strategies, and show that they perform nearly as well as the globally optimal strategy if they are themselves optimized. Importantly, neither the optimal strategy nor any of these near-optimal strategies is robust to implementation error: small errors in timing of the intervention produce large increases in peak prevalence.
However, we show that layering a short, strong intervention on top of a sustained weak intervention mitigates the risks of mistiming the strong intervention. Our results show that policymakers should be wary of trying to finesse an explosive epidemic of a novel pathogen by attempting the optimal intervention without any other controls. To avoid disasters born of implementation error, a strong, early, and ideally sustained response is required.
Non-pharmaceutical control of an infectious disease is socially and economically costly, and it may be difficult to maintain due to political pressure and public non-compliance. A policymaker might be tempted to optimize, intending to maximize the benefits from a timelimited, highly efficacious intervention. To assess the prospects of this approach, including the risks of mis-implementing such a strategy, we first specify the goal to be achieved and determine a provably optimal intervention given that goal. We then analyze the costs incurred by errors in implementation of the optimal strategy.
In this article, we study strategies aimed at epidemic mitigation rather than at epidemic eradication. This makes our work particularly relevant for the study of a novel, emerging pathogen. For such a pathogen, the effective reproduction number R e (the average number of new cases produced by each infectious individual prior to recovery) is often much larger than one in the absence of control. To eradicate the pathogen, we must sustain R e < 1 (so that each currently infectious person tends to produce less than one subsequent infection) for sufficient time to eliminate all cases. That may not be feasible, particularly during a global pandemic when re-introductions of cases from other regions and other countries can occur after the disease has been locally eradicated.
Since this work focuses on interventions that are constrained to be short, limited in efficacy, or both, we will assume policymakers are aiming at mitigation: "flattening the curve" [1] . We assume that vaccination and other control strategies that render individuals immune without having been infected are not yet available to our policymaker. Instead, interventions are limited to transmission-reducing measures such as physical distancing [7, 3] : temporary reductions in the rates of contacts that might cause transmission.
Our principal criterion for the success of an intervention will be minimizing the highest peak of the epidemic. The peak is the largest single quantity of infectious individuals at any one time. This quantity is critical because it is the point at which and health services will be most strained. An overwhelmed system can dramatically increase case-fatality rates and lead to increased rates of complications from infection [7, 3] .
All else equal, a policymaker would also like to minimize the total cases during the epidemic, but for an explosively spreading novel virus, this consideration is secondary to minimizing peak incidence. Avoiding collapse of the healthcare system is the most valuable goal. What is more, among non-eradicative interventions, those that reduce the highest epidemic peak (almost) necessarily reduce the total case count (or "final size") of the epidemic, though they may not do so as efficiently as interventions specifically targeted at final size reduction [2] .
There have been relatively few modeling studies on time-limited strategies for peak reduction. One known result establishes that time-limited peak reduction interventions should start earlier than final size reduction interventions, all else equal [2] . But the optimal strategy to reduce the peak not known, nor is the robustness of such a strategy to implementation error.
Given perfect and complete information, what would be the optimal time-limited intervention for reducing the height of the epidemic peak?
The peak incidence occurs when the R e = 1, that is, when new infections exactly balance recoveries. This point can be hastened-and the number of infections at that point thereby reduced-if the number of susceptible individuals in the population is depleted. This is why time-limited intensive interventions cannot begin too early if they are to minimize the peak. Locking down transmission too early and too aggressively slows the depletion of susceptibles. If controls are then relaxed too soon, there will be a large second epidemic peak [2] . This gives us some intuition for the importance of timing, and for the properties of the optimal intervention: it must trade off depletion of susceptible pool against reduction in the rate at which people become infectious. We formalize this by finding a provably optimal peak-reduction strategy for the standard susceptible-infectious-recovered (SIR) epidemic model [6] . We also analyze near-optimal, but more realistic, intervention strategies; and we assess the robustness of interventions to implementation error.
We consider the standard normalized SIR model, which describes the fractions of susceptible S(t), infectious I(t), and recovered R(t) individuals in the population at time t, where S(t)+I(t)+R(t) = 1 and 1 ≥ S(t), I(t), R(t) ≥ 0. Each infectious individual has potentially disease-transmitting contacts at rate β ≥ 0, and recovers at rate γ > 0. In a large, wellmixed population the fractions of these individuals individuals change according to the ordinary differential equations:
We note that such a model has a basic reproduction number R 0 = β γ and an effective reproduction number R e = β γ S(t). We will parameterize epidemics in terms of their R 0 and γ, which together determine β. We analyze interventions that seek to minimize the peak prevalence (maximum fraction infected at any point in time during the epidemic). We will call this quantity I max .
We consider interventions that reduce the effective rate of disease-transmitting contacts β. This is the impact of physical distancing measures like those that have been imposed in many countries in an attempt to curb the growth of the ongoing COVID-19 pandemic. Many other non-pharmaceutical interventions-as well as some pharmaceutical ones, such as antivirals that reduce "shedding"-also work by reducing β.
We permit interventions that operate on β only for some limited duration τ . We impose this constraint in light of political, social, and economic impediments to maintaining an aggressive intervention indefinitely.
We model an intervention by defining a transmission reduction function b(t), such that:
If the intervention is initiated at some time t = t i , it must stop at time
we permit b(t) to assume any value between 0 and 1, inclusive. This restriction assumes that we cannot intervene to "raise" β and thus R 0 above their values of in the absence of intervention, but also optimistically assumes that b(t) can be adjusted instantaneously, and that R 0 can be reduced all the way to zero, at least for a limited time. In formal mathematical terms (see section C.3 of the Appendix), we require only that the intervention function b(t) output values in the interval [0, 1] and that it be right-continuous except for finitely many points of discontinuity.
We pose the following optimization problem: given the epidemiological parameters β and γ and the finite duration τ , what is the optimal choice of b(t) for minimizing I max ? Such an optimal intervention is of interest for two main reasons. It provides a standard point of comparison for evaluating other possible interventions. And it will allow us to show that optimized, time-limited responses have inherent risks and shortcomings-even in the best case scenario.
We prove (see Theorem 1 in the Appendix; all references to Theorems, Corollaries, and Lemmas are to the Appendix) that for any R 0 , γ, and τ there is a unique, globally optimal intervention b(t) that starts at an optimal time t opt i and is given by:
The optimal approach to reducing I max is to "maintain and then suppress". We first spend a fraction f of our intervention time τ in a "maintain" phase: we choose b(t) so that R e = 1. This maintains the epidemic at a constant number of infectious individuals equal to I(t opt i ), while susceptibles are depleted at a rate γI(t opt i ). We then spend the remaining fraction 1 − f in a "suppress" phase, setting R e = 0 so that infectious individuals are depleted at a rate γI.
The effectiveness of the intervention, when it should commence, and the balance between maintenance and suppression all depend on τ : the total duration of the intervention. The longer we can intervene (larger τ ), the more we can reduce the peak (smaller I max ), the earlier we should optimally act (smaller t opt i ), and longer we should spend maintaining versus suppressing (larger f ) (Fig. 1 (G, H) Effect of the duration τ on the infectious prevalence peak (G) and intervention starting times (H) for the optimal intervention (green), the optimized fixed control intervention (blue), and the optimized full suppression intervention (red). Dotted red line shows the critical value τ crit below which full suppression is the globally optimal intervention. Parameters as in Table 1 .
Although optimal and theoretically enlightening, the intervention described above is unfeasible in practice. Its implementation would require policies flexible enough to fine-tune transmission rates continuously, imposing ever changing social behaviors. Implementation would also require instantaneous and perfect information about the current state of the epidemic in the population. We therefore also consider other families of potential interventions, and see how they perform compared to the optimal intervention.
Real-world interventions typically consist of simple rules that are fixed for some period of time (quarantines, restaurant closures, physical distancing). We model such fixed control strategies (previously investigated by di Lauro and colleagues [2] ) as interventions of the form:
These fixed control interventions are fully determined by two parameters: the starting time t i and the strictness σ ∈ [0, 1]. For any intervention duration τ we can then numerically optimize t i and σ to minimize I max .
For a given R 0 , γ, and τ , an optimized fixed control intervention yields an epidemic time course that is remarkably similar to the one obtained under the globally optimal intervention strategy. Peak prevalence I max is only slightly lower in the optimal intervention than in an optimized fixed intervention ( Fig. 1 B G) . Notably, the effectiveness of a fixed intervention depends on τ in a similar manner to that of the optimal intervention: longer interventions are more effective, should start earlier, and are less strict (Fig. 1 E, G, H) .
The similarities between fixed control and optimal interventions can be understood by inspecting the time course of R e during the intervention. A constant σ > 0 causes R e to drop throughout the intervention. In this way, a fixed intervention initially depletes the susceptible fraction, but gradually starts depleting the infectious fraction as R e falls. And so fixed control interventions are qualitatively similar to the "maintain-suppress" phases of the optimal intervention. As τ increases, the optimal σ decreases, promoting interventions that have longer "maintenance"-like periods characterized by susceptible depletion. That is, optimizing a fixed control strategy has the effect of choosing σ and t i that emulate the optimal strategy. This emulation is in fact very successful, and leads an optimized fixed control intervention to perform nearly as well as the optimal intervention across a large range of durations τ (Fig. 1, G) .
To further investigate the importance of the "maintenance" phases of these interventions, we consider a third class of interventions: the full suppression interventions defined by
These interventions are fully determined by the starting time t i . They can be optimized for any intervention duration τ by choosing t i appropriately. Such interventions emulate extremely strict quarantines. They are characterized by the complete absence of susceptible depletion during the intervention.
Note that the full suppression intervention is a limiting case both of the optimal intervention with vanishing short "maintenance" phase (f → 0) and of the fixed control intervention with maximal strictness (σ = 0). Accordingly, the full suppression intervention performs similarly to the optimal intervention and to the fixed intervention for short durations, when those favor a relatively short "maintenance" phase and a high strictness ( Fig. 1 C) . For longer interventions, the effectiveness of full suppression rapidly plateaus at I max = 1 2 + 1 2R0 log 1 R0 −1 ( Fig. 1 G, Corollary 6) . Accordingly, the starting time of a full suppression intervention with increasing duration also plateaus: there is no benefit in fully suppressing too early ( Fig. 1 H, Corollary 6 ).
Taken together, these results show that the most efficient way for long interventions to decrease peak prevalence I max is to cause susceptible depletion while limiting how much the number of infectious individuals can grow. For short interventions, it is most efficient simply to reduce the number of infectious individuals.
Optimizing an intervention trades off cases now against cases later. We prove (Theorems 2, 3) that optimal and optimized interventions cause the epidemic to achieve the peak prevalence exactly twice: once during the intervention and once strictly afterward. All optimized maintain-suppress interventions of duration τ and maintenance fraction f have this property; this includes the globally optimal intervention and the optimized full suppression intervention. The optimal fixed intervention for any duration τ also has this property.
The optimized interventions we have described are extremely powerful. For the COVIDlike parameters shown, 28-day optimal or fixed control intervention can reduce the peak prevalence from about 30% of the population to under 15%. Even the full suppression intervention reduces peak prevalence to well under 20%. These are massive and potentially health system-saving reductions.
But interventions are not automatically triggered at a certain number of infectious individuals or a certain point in time. They are made by policymakers, who must estimate the current quantity of infectious individuals I(t), often from very limited data, must begin roll-out of an intervention without certainty about how long that roll-out will take, and must also estimate the epidemiological parameters R 0 and γ. These tasks are difficult, and so policymakers may fail to intervene precisely at the optimal moment t opt i . Indeed, the COVID-19 pandemic has highlighted how difficult real-time epidemiological inference and response can be. Large numbers of asymptomatic and mildly symptomatic cases [8] , as well as difficulties with testing, particularly in the United States [10] , have left the public health community with substantial uncertainty both regarding the virus's epidemiological parameters and regarding case numbers in many locations.
All of this means that even if we grant our policymaker the capacity to tune b(t) instantaneously and with infinite precision so as to maintain the optimal intervention, the policymaker will still intervene with some timing error. The realized t i will be either greater or smaller than t opt i . To study this, we will consider errors in both directions, though there are reasons to believe that lateness might be more common than earliness, due to political and regulatory difficulties in intervening, or unexpected delays in implementation once the go signal is given.
How costly is mistiming a time-limited optimized intervention?
We find that even a single week of separation between the time of intervention and t opt i can be enormously costly, for realistic epidemic parameters (Fig. 2 ). While the optimal intervention achieves a dramatic reduction in the height of the peak, mistiming the intervention can be disastrous. Intervening too early produces a resurgent peak, but it is even worse to intervene too late. For example, if the intervention is initiated one week later than the optimal time, then I max is barely reduced compared to the absence of any intervention whatsoever, particularly in the case of a full suppression intervention.
The extreme costs of mistiming arise from the steepness of the I(t) curve at t opt i . Optimized interventions permit some cases now in order to reduce cases later. Both infectious depletion and susceptible depletion require the presence of currently infectious individuals in order to be effective peak reduction mechanisms. This means that, except for interventions of very long duration τ , the optimal start time t opt i is during a period of rapid, near-exponential growth in the fraction infectious I(t). Indeed, for epidemics that have faster dynamics, the consequences of mistiming interventions are increasingly stark (Fig. 4, B) .
The problem with this is intuitive: because S(t) and I(t) are so steep at S(t opt i ), I(t opt i ), small errors in timing produce large errors in terms of S(t i ), I(t i ). But the error is also asymmetric: being late is costlier than being early ( Fig. 4 B-D) . The early intervention is strongly sub-optimal and allows a large resurgent second peak, but that resurgence is still slower and smaller (thanks to susceptible depletion during the too-early intervention) than the prolonged uncontrolled growth period that is permitted by a late intervention (Fig. 2 , A-C, G-I, Fig. 4 ).
Importantly, Theorems 2 and 3 imply that the late implementation of an optimized intervention leads to an immediate epidemic peak, whereas the early implementation of such an intervention postpones the peak (Fig 2, A-C) . In practice this means that early interventions allow for course correction. Interestingly, the optimal intervention displays a partial self correction for early implementation even-in fact, especially-for very fast epidemics. This occurs because during the initial phase of the optimal intervention, the strictness actually decreases in time (see equation 12), which allows for some growth of the infectious fraction and improved depletion of the susceptible fraction. An intriguing side effect of this automatic course-correction is that for relatively fast epidemics, some premature interventions outperform others that are less early (note the branching in Fig 4, B) .
Are there any sustained measures that can improve the robustness with respect to timing of the optimized interventions? Because the severity of mistiming is governed by the steepness of I(t), measures that reduce such steepness should alleviate the impact of mistiming an intervention. We propose using less strict measures of a longer duration to achieve this. Even though these measures by themselves might not strongly affect I max , they might buffer timing mistakes when used in combination with stricter, time-limited interventions.
We consider both a sustained control intervention, modeled as a constant reduction of R 0 throughout the entire epidemic, as well as a time-limited intervention layered on top, during the same epidemic (Fig. 2 , D-F). If perfectly timed, the limited interventions by themselves outperform the sustained intervention. Moreover, the addition of a sustained intervention to a perfectly timed limited intervention provides little extra benefit in terms of reduction of I max (Fig. 2 G-H) . However, even a slight mistiming of time-limited interventions makes them worse than a sustained intervention on its own. Most importantly, if both sustained and time-limited interventions are adopted, the time sensitivity of the time-limited interventions is reduced. This is particularly pertinent for interventions that are later than optimal (Fig. 2 D-I ).
The SIR model is nearly a century old [6] , and to this day it is used to inform policy, including the ongoing response to COVID-19. COVID-19 has also thrown into relief the importance not merely of minimizing total cases but of "flattening the curve". Our work establishes a provably optimal approach to curve-flattening in an SIR, given a limited intervention duration. We also show that coarser time-limited interventions can closely approximate the optimal intervention, suggesting a tantalizing policy opportunity. For a policymaker looking to minimize social and economic disruption during disease control, swallowing the bitter pill of an intensive intervention but otherwise being able to maintain business as usual might seem extremely attractive.
But we have also seen the costs that optimization can bring in practice, when timing errors will surely occur. Missing the optimal moment t opt i leads to a dramatic peak incidence. It is particularly costly to be too late; a high peak is achieved rapidly and immediately, before the health system has time to prepare.
There are many reasons a policymaker could miss t opt i even in the (already unrealistic) case that the underlying epidemiological parameters are perfectly known. For example, one must estimate the current number of cases in order to know the effective value of t itself, and thus how far away t opt i is. One must also introduce and enforce control measures-full compliance could easily take longer to achieve than planned.
For respiratory viruses, another concern is that R 0 is not truly fixed in time even in the absence of intervention. R 0 for a respiratory virus tends to exhibit "seasonality": rising in temperate zone winters, falling in temperate zone summers. Influenza is the classic example: the Northern Hemisphere has a winter "flu season". Poor estimates of seasonal variation could also disrupt attempts to optimize b(t).
Future studies can work to address the problem of disease control under uncertainty, by coupling our intervention approaches with an analysis of epidemiological inference. If one must determine and act at t opt i based on noisy epidemiological data, how well can one do, and how are errors of inference magnified by the subsequent intervention mistiming?
We have assumed that b(t) can be chosen at will, provided 0 ≤ b(t) ≤ 1. But in practice b(t) can be tuned at best coarsely; even the fixed interventions are not truly enforceable in their idealized form. Moreover, in practice more severe interventions will carry greater costs. An explicitly control-theoretic approach to the problem that trades off the costs of severe time-averaged interventions against their peak-reducing benefits would also be of substantial interest, and could also benefit from an analysis of robustness to implementation error.
Our work carries with it a number of other caveats, and leaves a great body of other important questions for additional investigations. While the epidemic peak is a good proxy for demands on healthcare system capacity, an even better metric would be the total persondays over healthcare capacity: the area A between the I(t) curve and the line (or curve) of maximal system capacity c. Any intervention that brings I max < c necessarily sets that area to 0, but when choosing among strategies that cannot reduce I max below c, the strategy that minimizes I max will not necessarily minimize A. It might be preferable to permit a slightly higher peak but then take a full suppression approach, leading to a spike with small area above healthcare capacity. In general, however, we observe that as c approaches I max , the problem of minimizing the area A becomes almost identical to the problem of minimizing I max . When c is far from I max , it is closer to the problem of minimizing the final size of the outbreak, and strategies designed for final size reduction [2] may be superior to strategies designed for peak reduction.
We have also seen (Fig. 2 ) that despite their suboptimality from the point of view of reducing I max , premature interventions substantially delay the time until I max is achieved. Peak delay may in some cases be a more pressing aim than peak reduction, if, for instance, healthcare capacity can be increased in the interim. In those situations, our results suggest that an early response weighted more toward suppression than maintenance is desired, but strategies targeted specifically at peak delay should be analyzed in their own right. We also note that peak delay is another benefit of sustained control, even when sustained control is relatively weak.
Despite these caveats, our results, though simple, offer several robust and practicable principles for policymakers:
There is an asymmetry between reacting "too early" and reacting too late. The optimal intervention time t opt i is poised at a cliff's edge. As γ increases that cliff only steepens; there is an sharper transition between doing optimally and doing terribly (Fig. 4 B) . The costs of being early increase more slowly with the degree of error. Moreover, while we do not model this, early action leaves time for a course correction if it is too strong, and delays the higher second peak that it permits. Finally, our analysis shows that early intervention is to a degree self-correcting: the higher-than-expected stock of susceptibles when the intervention begins permits the epidemic to grow more or less rapidly up to the intended I(t i ).
It is easier to time a less steep exponential. Implementing moderate physical distancing measures can slow case growth, which allows for robustly timed aggressive interventions when they are needed. We also suspect that slowing the growth curve will make the inference of epidemiological parameters easier and more accurate, improving one's chance of hitting t opt i even as it reduces the costs of missing it. We will study this in future work.
The remarkable success of the crude full suppression interventions in reducing peaks and delaying what they cannot reduce suggests that a policymaker who has evidence that they may be acting late should bear down as soon as possible with a policy as close to full suppression as is achievable. For a disease like COVID-19, in which today's case data is in fact a snapshot of the situation one to two weeks earlier, what feels right on time may in fact be too late, and what feels late may be disastrously late. With that in mind, a policymaker looking to salvage matters should take a full suppression approach. In fact, full suppression is good as any other strategy at minimizing I max whenever t i > t 0 i > t opt i , where t 0 i is the optimal t i for a full suppression intervention (Corollary 7), since I max will simply be I(t i ). Moreover, if we are seeking to minimize total person-days above capacity, full suppression will be first among equals, as it is by definition the fastest way to reduce I(t) and get down off the peak.
Optimized time-limited interventions are extremely effective and efficient ways to reduce the peak of an epidemic. Deriving the form of optimal strategies is illuminating. It highlights the fundamental materials-susceptible depletion and infectious depletion-of any epidemic mitigation strategy. But these interventions are not robust to implementation error, and that is reason to rethink reliance on them alone, particularly when limited to incomplete information and combating a novel, poorly understood disease. Real-world policy must emphasize not efficiency but robustness.
All code needed to reproduce numerical results and figures is archived on Github (https: //github.com/dylanhmorris/optimal-sir-intervention) and on OSF (https://osf. io/rq5ct/), and licensed for reuse, with appropriate attribution/citation, under a BSD 3-Clause Revised License.
We thank Ada W. Yan, Amandine Gamble, Corina E. Tarnita, Elizabeth N. Blackmore, James O. Lloyd-Smith, and Judith Miller for helpful comments on previous versions of this work. We thank Juan Bonachela for helpful discussions.
DHM and SAL gratefully acknowledge financial support from NSF grant CCF 1917819.
We have no competing interests to declare. 
When we ask what it means for a maintain-contain style intervention to be mistimed, we need a model of how the intervention is implemented. One possibility is that the policymaker directly observes S(t) throughout the intervention and chooses b(t) = γ βS(t) based on the directly observed S(t). We call this a state-tuned intervention. Alternatively, the policymaker plans to intervene at some value S i predicted to occur at t i and chooses the values b(t) knowing that if the intervention does indeed begin at S i = S(t i ), S(t) will equal S i − γI i (t − t i ) during the maintenance phase. The policymaker then chooses b(t) according to that predicted S(t). We call this a time-tuned intervention. When we study mistimed interventions in the main text, we use time-tuned intervention; we see time-tuned interventions as a more realistic model of how a maintain-suppress intervention, if possible at all, would in fact be implemented, since instantaneous epidemiological observation is not possible. If it were possible, it could in fact permit a timing error to be better mitigated than state-tuning itself allows-by choosing the optimal strategy conditional on intervening at the true (S i , I i ). Indeed, it can be seen that time-tuned interventions are in fact slightly more robust to mistiming than state-tuned interventions, as they are partially self-correcting where the state-tuned interventions are not (see main text section 6).
We define S crit for an SIR model to be the critical fraction susceptible at which R e = 1 and dI dt = 0 (in the absence of intervention), i.e. S crit ≡ 1 R0 .
Define I max (t) for an SIR system as the maximum value of I(x) achieved during the interval x ∈ [t, ∞). Notice that I max (0) = I max , where I max is the global maximum value of I(x), which we are seeking to minimize with our intervention.
A known result that is immediate from the original work of Kermack and McKendrick [6, pp. 712-715] (see [11] for an explicit derivation) holds that for S(t) ≥ S crit : 1] , and therefore also a continuous function of t, Proof. There are three cases.
Case 1: I x (t x ) = 0. In this case, I max
, with equality only if I max y (t y ) = 0, which can only occur if I y (t y ) = 0.
Case 2: S x (t x ) = S y (t y ) < S crit . In this case, I max x (t x ) = I x (t x ) and I max y (t y ) = I y (t y ), so our result holds.
In this case, we can apply equation 6. Fixing S(t) > S crit , I max (t) is an increasing function of I(t) (there is a single, positive I(t) term in the sum), so the result must hold.
Lemma 2: The more fuel, the bigger the blaze. If I x (t x ) = I y (t y ) > 0 and S x (t y ) ≤ S y (t y ) for two SIR systems x and y with identical parameters R 0 and γ at possibly distinct times t x , t y ∈ [0, ∞] then I max tx ≤ I max ty , with equality only if S x (t x ) = S y (t y ) or S y (t y ) < S crit Proof. There are three cases.
Case 1: S y (t y ) ≤ S crit . If S y (t y ) ≤ S crit , then S x (t x ) ≤ S crit , and neither epidemic will grow after t x or t y , respectively. It follows that I max tx = I x (t y ) = I max ty = I y (t y ) Case 2: S y (t y ) > S crit , S x (t x ) < S crit . In this case, I max tx = I x (t y ) but I max ty > I y (t y ), since dIy dt > 0 if I y (t) > 0 and S y (t) > S crit . So we have I max tx < I max ty Case 3: S x (t x ), S y (t y ) > S crit . The result in this case follows immediately from the fact that, fixing I(t), I max (t) is an increasing function of S(t) when S(t) > S crit . We can see that it is by taking the partial derivative the expression from equation 6 with respect to S:
If S > S crit , 1 R0S < 1, so ∂ ∂S I max (t) > 0, and I max (t) is an increasing function of S(t).
We say that a right-continuous function with finite discontinuity points b(t) :
The SIR model under such an intervention will then take the form
We wish to show that for every τ there exists an intervention that minimizes I max and that such an optimal intervention must be identical except at a finite set of times {t j | t j ∈ (t i , t i + τ )} to one of the form:
For some value of t i ∈ R and f ∈ (0, 1]. We divide the proof into a series of lemmas. Lemma 3: More fire, less fuel. Let b x (t) and b y (t) be two interventions beginning at the same t i and lasting until t f = t i + τ . Let I x (t) and S x (t) be I(t) and S(t), respectively, for the SIR model under intervention b x (t). Let I y (t) and S y (t) likewise by I(t) and S(t) for the SIR under intervention b y (t).
allows only a finite number of discontinuities, the resulting I(t) is continuous. And so there is an such that I x (t) − I y (t) > 0 for all t ∈ [t − ,t + ]. Therefore ∆R xy (t) must be strictly increasing during [t − ,t + ].
Because ∆R xy (t) never decreases and sometimes increases during [t i , t f ], it follows that ∆R xy (t i ) < ∆R xy (t f ), but ∆R xy (t i ) = 0 so ∆R xy (t f ) > 0 and R x (t f ) > R y (t f ). But I x (t f ) ≥ I y (t f ) and S = 1 − (I + R), so S x (t f ) < S y (t f ). Lemma 4: Do nothing for a bigger blaze. Let b 1 (t) ≡ 1 be the null intervention and take t max such that I 1 (t max ) = I max 1 . Let b x (t) be an intervention that satisfies b x (t) < 1 for almost all t ∈ [t − ,t + ] for some and somet < t max . Then I x (t) < I 1 (t) for all t ∈ [t, t max ].
Proof. Let the time of divergence of the interventions be given by t d = inf{t ∈ (t i , t max ) | b x (t) < 1}. Note that this infimum must exist because it is taken over a bounded and non-empty set. It is easy to see that b x (t) = 1 and that I x (t) = I 1 (t) for all t < t d . Also, by the right continuity of b x , there exists an interval (t d , t d + ) such that I 1 > I x and b 1 βS 1 I 1 > b x βS x I x . Suppose there exists a minimal t e ∈ (t d , t max ) such that I x (t e ) = I 1 (t e ). We will find a contradiction. Note that I x < I 1 in (t d , t e ). Because I 1 is monotonic and continuous in (−∞, t max ), we can invert I 1 and definet = I −1 1 (I x (t)) for all t ∈ (−∞, t max ). We can see that dI1 dt (t) is the growth rate of the infectious class under the null intervention when I 1 = I x (t). It follows that dI1 dt (t) < dIx dt (t) for some value of t, otherwise I 1 would always dominate I x , and t e would not exist. Let t inf = inf{t ∈ (t d , t e ) | dI1 dt (t) < dIx dt (t)}. This implies that S 1 (t) ≤ S x (t) for some interval including t inf that can be maximally extended to the left as (t min , t inf ]. By continuity of S, S 1 (t min ) = S x (t min ).
If t min = t d , then t min >t min , and R 1 (t min ) = R x (t min ), but this is impossible because by construction dI1
Lemma 5: Wait, maintain, suppress. Let b x be any intervention, and I max x = max{I x (t)}. There exists an intervention b y with same beginning and duration as b x of the form
For some g < f and g, f ∈ (0, 1], such that I max
Following lemma 4, take g such that t i + gτ =
Ix(t f ) . From lemma 4 it is clear that
, and therefore the inequality remains true. Finally, for t ∈ [t i + f τ, t i + τ ], because I y (t) decays faster than I x (t), then if I y (t) < I x (t) at any time, then I y (t f ) < I x (t f ), but by construction I y (t f ) = I x (t f ). By lemma 3, S y (t f ) < S x (t f ), and by lemma 2, I max
It is possible however that this proposed b y is not a viable intervention if S y (t crit y ) = S crit for some t crit y ∈ [t i + gτ, t i + f τ ), as this would require b y to assume values larger than 1. If that is the case we can define bȳ, by taking f such that t i + f τ = t crit y . Note that because by the end of the intervention bȳ the infectious class will monotonically decrease because Sȳ ≤ S crit . This implies that I max
Theorem 1: Maintain, then suppress. An intervention b opt (t) such that I max opt ≤ I max x for any intervention b x (t) must take the form
For some value of t i ∈ R and f ∈ (0, 1].
Proof 
For S ti = S(t i ) and I ti = I(t i ).
It follows that, given an optimal intervention b of duration τ and depletion fraction f begun at time t i and ending at t f = t i + τ :
In an SIR system without intervention that begins with a wholly susceptible population, we have the relation:
And so:
And we can likewise write S(t f ) and I(t f ) in terms of S(t i ):
This in turn allows us to express I max (t f ) purely in terms of S(t i ) and the parameters, though the expression is long:
Remark 3: Continuity of I(t i ), I max (t f ). Notice that both I(t i ) and I max (t f ) are continuous functions of S(t i ), since they are both linear combinations of continuous functions of S(t i ) and since S(t) is continuous in t i , they are continuous functions of t i . Lemma 6: Don't be late. Let t p be the infimum of times such that I(t) = I max , and let t i be the start of an optimal intervention. Then t p ≥ t i . That is, I max cannot occur before the intervention begins for an optimal intervention.
Proof. Since b(t) = 1 for t < t i t p < t i necessarily implies that S(t i ) < S crit , that is, the epidemic is already declining when the intervention begins and will never grow again, regardless of the intervention approach (since b(t) ≤ 1, we cannot force a declining epidemic to grow). That in turn implies I max = I peak , which we can with certainty improve upon. So I max must occur during or after the intervention.
Corollary 1: Start with fuel. It is immediate that S(t i ) > S crit . Corollary 2: Peak early. Since I(t) ≤ I(t i ) for t ∈ [t i , t i + τ ] during an optimal intervention, if I max occurs during the intervention, I max = I(t i ) Theorem 2: Twin Peaks. Let b x (t) be an optimal intervention, then I x (t) ≤ I max x for all t ∈ (−∞, t f ], with equality for t ∈ [t i , t i + τ f ], and furthermore I x (t p ) = I max
That is, if 0 < f < 1, there will be a plateau during the intervention followed by a peak of equal height that occurs strictly after the intervention finishes. If f = 0, there will be two peaks of equal height, one at the start of the intervention and one strictly after it finishes, and if f = 1 there will be a plateau during the intervention with no subsequent peak.
Proof. Let b x be an optimal intervention of the form given by equation 3. By Lemma 6, I max x must occur during or after the intervention. First let us assume that the I max x occurs during the intervention and is never again attained after the intervention. If f = 1, this implies that the whole intervention is a plateau and no further peaks occur. For f < 1 we can build a new intervention b y of the same form as b x but that starts at t i − rather than at t i . From the continuity of I max in t i for any intervention, it follows that for some small enough, I max y post intervention must still be smaller than I max y during the intervention, but because I(t i − ) < I(t i ), corollary 2 implies that our new b y outperforms b x , which contradicts the optimality of b x . Now let us assume that I max x occurs after the intervention and is larger than any value of I x during the intervention. If f > 0, we can once again build a new intervention function
With f y chosen such that (1−f y )τ = 1 γ log Ix(ti+ ) Ix(t f ) . For sufficiently small , I y (t i + ) < I max x . Also, following lemma 5, I max y < I max x and therefore b y outperforms b x , which once again contradicts the optimality of b x .
Finally, if f = 0, we build yet another b y of the same form as b x but that starts at t i + rather than at t i . Because intervention b y starts out with a smaller susceptible fraction than intervention b x , and an increase in the infected fraction that is smaller than the susceptible fraction decrease, it follows from equation 6 that I max y < I max x and therefore b y outperforms b x , which once again contradicts the optimality of b x .
Corollary 3: The longer the intervention, the earlier it starts. If t opt i (τ ) is the starting time of the optimal intervention with duration τ , let S opt i (τ ) = S(t opt i (τ )). Then S opt i (τ ) is a non-decreasing function of τ .
Proof. Trivially a longer optimal intervention must outperform a shorter optimal intervention. But by Theorem 2 I opt i = I max for any optimal intervention, which implies that I opt i (τ ) is a non-increasing function of τ and S opt i (τ ) is a non-decreasing function of τ . Corollary 4: If you don't have much gunpowder, don't shoot until you see the whites of their eyes. Given the optimal intervention of duration τ referred to as b τ opt , let the initial time of such an intervention be referred to as t τ i . As τ → 0, t τ i → t crit .
Proof. From equation 19 we can see that I max opt is a continuous function of τ , and that as τ → 0, the effect of intervention defined as I max 1 − I max opt → 0. We know from Theorem 2 that I opt (t i ) = I max opt , and therefore, as τ → 0, I opt (t i ) → I max 1 , which implies t τ i → t crit . Corollary 5: No need to burn all the fuel. After an optimal intervention, S(t f ) ≥ S crit , with equality if and only if f = 1.
Proof. By Theorem 2, I(t i ) = I max (t f ) = I max . If f < 1, we must have I(t f ) < I(t i ) = I max , so in order for the epidemic to reach I max (t f ) = I max , we must have S(t f ) > S crit . If f = 1, then I(t f ) = I(t i ) = I max , so then must have S(t f ) = S crit , otherwise the epidemic would grow to a peak above I(t i ) = I(t f ), which would be a contradiction of Theorem 2.
Corollary 6: Putting out existing fire can only do so much. Consider a full suppression intervention of duration τ defined by b 0 (t) = 0 for all t ∈ [t i , t i + τ ]. For every τ there is a t i that minimizes I max 0 . Consider these optimized full suppression interventions. Then, as τ → ∞, the maximum infectious prevalence I max
In other words, full suppression interventions have a limit in how much they can reduce I max .
Proof. From the proof of Theorem 2 for f = 0, it follows that full suppression interventions have an optimal start time t i , and that I 0 (t i ) = I max 0 . Also, because no new infections occur during a full suppression intervention, S 0 (t i ) = S 0 (t f ) so substituting into equation 6
We the further use equation 15 to substitute S 0 (t i ) and take τ → ∞ such that I 0 (t f ) → 0 which finally yields
Corollary 7: But when in doubt, put out the fire. Let b 0 be the optimized full suppression intervention with duration τ and starting time t 0 i . For a full suppression intervention b0 that also has duration τ but that has a starting time t0 i ∈ [t 0 i , t crit ], the infected fraction peak is I max 0 = I0(t0 i ), moreover no intervention starting at that same time can attain a lower peak.
Proof. It suffices to show that delaying a full suppression intervention by an infinitesimal diminishes the secondary peak. From equation 26 with f = 0, it is clear that
But I (t i ) > 0 for t i < t crit and (e −γτ −1) < 0 which means that delaying the full suppression decreases the post intervention peak. Trivially no intervention can attain a peak lower than its initial condition, which concludes the proof.
Theorem 3: Twin peaks for fixed control. Let b x be an optimized fixed control intervention of duration τ that starts at some time t i and has strictness σ. That is, b x outperforms any other fixed control intervention of duration τ regardless of their t i or σ. Then I x = I max x at exactly two time points, one during the intervention (t ∈ [t i , t i + τ ]) and one after the intervention (t ∈ (t i + τ, ∞)).
Proof. Because during the intervention and after the intervention, the time course is that of an SIR (albeit with a modified R 0 during the intervention), it is clear that there can be at most one local I maximum during the intervention and at most one after the intervention.
First let us assume that the infectious peak during the intervention is higher than any peak after the intervention. By continuity it is possible to construct a new fixed control intervention that starts a little earlier and is a bit more stricter but such that the peak during the intervention is reduced but the peak after the intervention is still below the intervention peak. This new intervention outperforms b x which contradicts the optimality of b x . Now let us assume that the infectious peak during the intervention is lower than any peak after the intervention. We will show that a small change in the t i of the intervention will lower the post intervention peak. It suffices to show that ∂ ∂ti I max = 0. For a fixed control intervention we have
Which when set to 0 implies ∂ ∂ti S x (t f ) = 0. This in turn can be substituted into the equation that relates I to S under a fixed control intervention
Which leads to ∂ ∂ti I x (t f ) = 0 and finally ∂ ∂ti R x (t f ) = 0 but this is impossible because the fraction of recovered individuals by the end of a fixed control intervention must decrease as the intervention starts earlier. This completes the proof.
Applying equations 13, 14, the partial derivatives of I max (t f ) with respect to f and t i are given by:
Substituting the values of dS dt , dI dt :
Setting equal to zero and simplifying:
Lemma 7: If you have lots of gunpowder, shoot early. For an optimal intervention b τ opt acting on a SIR with full susceptibility as initial condition, as τ → ∞, S τ opt (t i ) → 1; that is, we intervene almost immediately, when almost all the population is fully susceptible.
with t x = I −1
). It is clear that such an intervention has a duration of τ or less, and that by the end of such an intervention S x ≤ S crit . Therefore I max . Combining with corollary 2, I τ opt (t i ) ≤ 1−Scrit γτ so as τ → ∞ both I τ opt (t i ) → 0 and S τ opt (t i ) → 1. Theorem 4: Sometimes maintain, always suppress. For an SIR with full susceptibility as initial condition, it is the case that any optimal intervention with positive duration as defined by equation 3 has f < 1. In other words, the optimal intervention for an emerging pathogen (S(0) → 1, I(0) → 0) always has a total suppression phase. Also, For any R 0 ∈ (1, ∞) there is a τ crit such that the optimal intervention is always a full suppression intervention (f = 0) if τ < τ crit . Moreover, lim R0→1 τ crit = ∞ and lim R0→∞ τ crit = 0.
Proof. Suppose f = 1. From equation 28, 1 R 0 S i − γτ I i + γτ − 1 = 0 (33) But following corollary 5, S i − γτ I i = S crit , which substituting in the previous equation implies that γτ = 0, which is impossible. Therefore f cannot be 1. Now let us investigate if f = 0 can be a local minimum. Once again, from the first order condition expressed in equation 28 we require that
The second order condition for an extremum to be a minimum is given by
Note that the condition is always satisfied, and therefore any extremum is always a minimum. This also insures that any minimum must be unique and that I max grows monotonically as f moves away from f opt .
From Theorem 2 we have I i = I max . Substituting this and equations 34 and 15 into equation 19, we get an implicit function for x (and therefore for τ ) such that f = 0 is a minimum:
We now show that R 0 ∈ (1, ∞) implies x ∈ (0, 1) which in turn implies a τ crit that satisfies the relation.
From equation 36 it is easy to see that as R 0 → 1, then x → 1, and as R 0 → ∞, then x → 0. So showing that x(R 0 ) is a continuous, decreasing function of R 0 on R 0 ∈ (1, ∞) will establish the existence of τ crit .
By implicit differentiation we have that
For positive x the numerator is positive and the denominator is always negative if x ∈ (0, 1). Therefore, for R 0 ∈ (1, ∞) there exists x ∈ (0, 1) that satisfies equation 36.
To complete the proof, it suffices to show that f opt is an increasing function of τ when f = 0, as this implies that f opt (τ crit ) = 0 and cannot go above 0 for τ < τ crit . We start by letting f opt , S opt i , and I opt i be functions of τ , applying equation 28, implicitly differentiating with respect to τ , and setting f = 0. After a bit of algebra we obtain τ e −γτ + τ I opt
Note that ∂ ∂τ f opt is being multiplied by a strictly positive quantity on the left-hand side of the equation. On the right-hand side of the equation there is a positive quantity (e −γτ ) added to ∂ ∂τ S opt i multiplied by another positive quantity ( 
From equation 6 it is clear that there are two fundamental methods of reducing the peak of an epidemic: depleting the infected fraction and depleting the susceptible fraction. We have shown that different interventions achieve peak reduction with different combinations of those methods. Our optimal intervention, for example, is characterized by a pure susceptible depletion phase followed by a pure infected depletion phase. Full suppression interventions, in contrast, operate solely by depleting the infected fraction. We observe that interventions can be classified in terms of how much they rely on depleting the susceptible fraction versus depleting the infected fraction.
The effect of an intervention can be understood as the infectious peak if no intervention were to take place minus the infectious peak given the intervention. In a more formal notation, an intervention b x has an effect I max − I max
, S x (t f )) = ∆ x (t f ). By applying equation 6 we obtain
we can say that the intervention b x overall relies more on infected depletion, whereas if the opposite is true we can say that it relies more on susceptible depletion. Moreover, by applying the fundamental theorem of calculus, we obtain
Which allows us to look at a certain time t ∈ [t i , t f ] and say that if
Then at that moment t, the intervention b x acts more by depleting the infected fraction than by depleting the susceptible fraction. The condition can be simplified to