Pandemics are nothing new and have been afflicting humankind since prehistoric times. Rather than starting with the obligatory references to the Black Death, In this article, we present a detailed and rich epidemiological multi-factor model. Our model accounts for different phases of the disease, potential aquisition of the herd immunity,multiple groups in the populations, and the interaction between individuals belonging to various groups. Our model treats the health system as given and accounts for such aspects as the availability of extra hospital beds and intensive care units (ICU) to accommodate the pent-up demand due to the pandemic. We use the most recent research data to calibrate the model. The model allows simulating lockdowns and quarantines of each specific group and the response of different groups to mandatory social behavior in public.
First, we need to agree on the ultimate purpose of the lockdowns. If they are implemented to buy time until pharmaceutical companies find a vaccine or medical professionals introduce efficient treatments, they can potentially protect people from dying of COVID-19. However, such an approach will lead to economic mayhem, with many people dying from the consequences of economic and financial destruction.
If, on the other hand, the purpose of the lockdowns is to ensure that the pandemic spreads slowly, with a reduced epidemic peak (flattening the curve), then a very different strategy is needed. Flattening the curve is particularly important if the healthcare system has limited capacity (especially in terms of medical personnel and intensive care units, ICUs.) Such an approach can lead to reduced mortality, even if the total number of infections remains the same.
In either case, the critical point is to set a goal and develop a strategy of achieving it. Merely being on the safe side does not represent a viable approach because the objective function of policymakers should include other health issues, as well as society as a whole.
Our conclusion is predicated on the widespread implementation of sensible pandemic response measures, such as wearing face masks, following strict hygiene routine, social distancing, paid self-quarantine, and ongoing surveillance via testing and possibly phone tracking. Authorities can enforce such measures by imposing fines for violations of the regime and help employers to provide paid leave related to quarantines.
Moreover, to reduce transmission of the disease, readily available reliable testing comes to the fore. This sensible approach is especially appropriate for such essential parts of the infrastructure, like healthcare, police, food processing, and the likes. Fast and efficient tests improve the detection of infected people and prevent further SARS-CoV-2 transmission, reducing, thereby, the reproductive number, see Section 2.
Of course, testing for antibodies and issuing a clean bill of health (provided that the virus immunity is real) to the individuals, who have recovered from the virus, can also be of great help.
Besides, in many metropolitan areas, transportation, especially during the rush hour, is one of the biggest, if not the biggest, source of infection. To alleviate the transportation burden and prevent crowding during lunch breaks, staggering work hours, extending the workweek, allowing people to work from home on alternating days, and other similar measures, are obviously helpful.
The main conclusion of this paper is that in countries where the majority of the population abides by the sensible rules and regulations, the economy can continue functioning. At the same time, the health system can expand to manage the additional patient load. The rest of the paper is organized as follows. In Section 2, we introduce a Kgroup version of the basic Kermack-McKendrick model with a generic preferred mixing matrix. We specify the model for the most important case of two groups (the high-risk and low-risk groups) in Section 3. An a priori choice of the model parameters is hard to accomplish because the actual number of people infected by the virus is unknown due to the prevalence of asymptomatic cases. To address this problem, we do "implied" calibration of the model by choosing parameters in such a way that observable quantities, such as the number of hospitalizations, including ICU admissions, and, deaths rates are reproduced with reasonable accuracy. This calibration is described in Section 4. In Section 5 we formulate and graphically illustrate our main results. We draw our main conclusions in Section 6.
The famous Kermack-McKendrick model is the prime working horse of epidemiology, see, e.g., [1, 2] . Depending on the particulars of the disease under consideration, one can use either susceptible-infected-removed (SIR), or susceptibleexposed-infected-removed (SEIR), or a more complex model. The salient features of COVID-19, however, make it imperative to use a more advanced version of the model, which, at the very least, should account for two groups of susceptibles -a high-risk group, and a low-risk group, see, e.g., [4] . This separation is a must because the average mortality rate, which is of the order of 0.4 percent or so, see, [10] , is not a good representation of actual mortality, which is manifestly bimodal. Besides, the model should involve the all-important feedback loop, which accounts for the fact that mortality increases when the demand for intensive care outstrips its supply so that rationing becomes inevitable and results in elevated mortality.
We separate the population in K groups. Let N k be the number of people in the k-th group, and a k is the average number of contacts per person per unit of time. Conditional on data availability, this approach allows us to model the pandemic on a more granular level, accounting for varying vulnerability levels, different population densities in metropolitan areas within a country or different areas within a given city, demographics, and the likes.
The critical assumption is that the number of contacts between members of the k-th and k -th group, per unit of time is given by
where δ kk is the Kronecker symbol. Here π = (π 1 , ..., π K ), 0 ≤ π k ≤ 1, is a vector, which characterizes the relative size of interactions within and outside of the k-th group. The matrix C = (C kl ) has rank one when π k = 0, which corresponds to proportional mixing, while it has a diagonal form for π k = 1, which corresponds to no mixing between the groups, caused, for example, by cultural preferences, or a lockdown. The matrix C is called the preferred mixing matrix. A given group is subdivided into susceptibles, exposed, infected, hospitalized, moved to the intesive care unit (and put on ventilator), recovered, and dead,
In what follows, we use the data points from [8, 9] .
The population in the k-th class, which is not infected at time t forms the susceptible group; with the number of susceptible individuals denoted by S k . The first phase of the disease starts when a susceptible individual becomes exposed via a contact with an infectious individual, but does not show symptoms and cannot yet infect others. We assume that, on average, a representative individual is exposed for τ E days until she can infect others. Typically, τ E = 4.6 days. We denote the number of exposed people in the k-th class at time t by E k (t).
The next phase begins when an exposed individual becomes infected. We denote the number of infected individuals in the k-th class k as I k (t). Every exposed individual stays infected τ I days. Typically, τ I = 4 days. At this stage, infected people transmit the disease, regardless of exhibiting symptoms or being asymptomatic.
During the next phase, a certain percentage of the infected individuals requires hospitalizations, depending on their risk group. Without hospitalization, the probability of recovery or death is β (R) k and β (D) k , respectively. We denote the number of hospitalized individuals in the k-th class at time t as H k (t) and the probability of hospitalization β (H) k . On average, an individual stays in the hospital for τ H days before they are either moved to the ICU or recover. Typically, τ H = 7 days. The probability of recovery or death without being moved to intensive care is γ (R) k and γ (D) k , respectively. A certain percentage of severely ill hospitalized individuals must be moved to an ICU; this percentage depends on the class (risk group) they belong to. The number of individuals from the k-th class staying at the ICU is V k (t) and the probability that a hospitalized individual requires the ICU treatment is γ
The average time in the ICU is τ V days. Typically, τ V = 10 days. For individuals receiving the ICU treatment, the probability to return to the regular hospital is δ (H) k , and the probability of dying is δ (D) k , respectively. We denote by R k (t) and D k (t) the numbers of individuals in the k-th class who have recovered or died until time t, respectively.
The corresponding ODEs have the form
Here the transitional coefficients are inversely proportional to the average time spent by a representative individual in different states,
The all-important quantity in Eqs (2)Θ k depends on vector π = (π 1 , ..., π K ), which characterizes the intensity of interactions for the members of the k-th group and is given by
(
It is chosen to be in agreement with Eq. (1). By construction, Eqs (2) satisfy the conservation law
Eqs (2) have to be supplied with the initial conditions. We choose these conditions in the form
where N k is the initial number of individuals in their respecitve class, while ξ k is the fraction of the population initially exposed to the virus. In principle, it can be as small as 1/N k -the proverbial "patient zero." The flowchart for Eqs (2) is shown in Figure 1 . We note in passing that by choosing values independent of k for all the relevant quantities and putting π k = 0, we can convert the model into the particular case of the single group.
According to [8, 9] , the rough estimates for timing parameters are as follows τ E = 4.6 days, τ I = 4 days, τ H = 7 days, τ V = 10 days.
The actual process in assigning population to varous risk groups is relatively involved. We discuss it in the Section 3 for the most relevant and practical case of high-and low-risk groups, K = 2.
We note in passing that the way Eqs (2), (3) are manifestly scale-invariant. In other words, the increase in the overall population leads to a proportional increase in the number of beds and deaths.However, in large metropolitan centers, it is more appropriate to choose Θ k in the form which violates scaling symmetry:
where is the factor accounting for the size of the metropolitan area of interest and modes of human interactions that are specific to large urban areas, such as an extensive public transportation system. A detailed analysis will be presented elsewhere.
It is critical to realize that the ICU capacity is finite, and model it as such, hence
where H (.) is the Heaviside step function. The celebrated reproductive number R k is defined as
This number represents a measure of transmissibility but has no clear theoretical meaning. Therefore, instead, we use common sense and calibrate it to the available data. Eq. (9) shows that reproductive number for the k-th class is proportional to the number of contacts per unit of time, a k over the duration of the infectious stage. In other words, a k represents the tendency of infected individuals from the k-th class to infect other individuals either from their own class or other classes. We model the lockdown by the proportional reduction of the coefficients R k (t), where the time-dependence represents seasonality and potential switching of lockdowns on and off:
Here we assume that R (0) k is the "natural" reproductive number specific to COVID-19, ρ k corresponds to its seasonal variations, T 0 = 0, T 1 ...T L−1 , T L = T , T is the terminal time for the calculation, e.g. T = 365 days, and T 1 ...T L−1 are times when lockdown policies are changed. In the simplest case of a one-time lockdown, we have L = 3; T 1 is the time when the quarantine is imposed, T 2 is the time when it is lifted, T 3 = T . More generally, there can be several rounds of switching the quarantine policies on and off.
Expressed in terms of R k (t), Eqs (3), (9) become
Assuming that the reproductive number is constant, R k (t) =R k , so that there is no seasonality and no interventions, we can calculate the asymptotic fractions of the population, which is unaffected by the pandemic by the time it runs its course. To put it differently, this is the level at which the herd immunity plays its magic. Let s k = S k (∞) /S k (0). When k = 1 (one group), it is a well-known fact that s 1 satisfies the following transcendent equation
see, e.g., [1, 2] . When k = 2 (two groups), a similar result can be found in [4] , see below. Finally, in the general case, the transcendent equations for the vector s = (s 1 , ..., s K ) have the form:
where
The asymptotic values (s 1 , ..., s K ) can be used to get an estimate of the total number of deaths for a given set of reproductive numbers R 1 , ...,R K and mortality rates (µ 1 , ..., µ K ), provided that authorities do not apply mitigating measures:
For our purposes, it is natural to divide the population into high-and low-risk groups defined by their reaction to infection, K = 2. These groups have completely different probabilities of being exposed, hospitalized, moved to the ICU, and dying. The two groups are healthy (low-risk, LR, k = 1) and vulnerable (high-risk, HR, k = 2) populations. Age is an important, but not the only, determinant of the group. Other factors, such as pre-exising conditions, obesity, etc. are also essential.
In the two-group case, original Eqs (2) can be simplified as follows
where
(21) Thus, Eqs (18), (19) are connected via Θ 1 , Θ 2 , and V = V 1 + V 2 .
The two-factor version of Eq. (15), which can be used to calculate the asymptotic fractions of the population, which is unaffected by the pandemic has the form:
whereÑ k = (1 − π k ) N k , k = 1, 2. We show (s 1 , s 2 ) as functions of R 1 ,R 2 for representative (π 1 = 0.9, π 2 = 0.7) in Figure 2 . 
We calibrate the model to recent clinical data and mortality statistics, [8, 9, 11] . The idea is that some parameters of the model, such as the reproductive rates R, and the specific times τ E (possibly), τ I , τ H , τ V , can be observed from clinical observations. This is also true for γ and δ. Finding β is more difficult because its proper evaluation is predicated on knowing the number of infected individuals, which is unobservable. Our strategy is to calibrate it to observables, such as the number of hospitalizations, ICU hospitalizations, and deaths. For example, given our previous discussion, we can choose the coefficients β, γ, δ, π for Sweden as follows: 
Although these estimates are a little lower than some of the current projections, they fit the actual pattern on the ground well.
In Figure 3 , we show the dynamic of the disease in Sweden corresponding to parameters given by Eq (23) and
so that there is no seasonality. It is clear from Figure 3 (a) that the asymptotic fractions of the population, which is unaffected by the pandemic, given by Eqs (22) agree with our calculations entirely. In Figure 4 , we show the dynamic of the disease in Sweden corresponding to the same parameters, but with seasonality accounted for: 
No quarantine is imposed. The number of ICU units is sufficient to satisfy the entire demand. Figure 4 near here.
In this section, we use parameters given by Eq (23) with the reproductive numbers R 1 (t), R 2 (t) corresponding to the situation in Israel, and analyze several different strategies for dealing with the pandemic. In Figure 5 we show the dynamic of the disease in Israel, with the quarantine imposed after 30 days and kept for 45 days. The "natural" reproductive numbers for both groups are given by
It is reduced by 30% during the quarantine period. The number of ICU beds is 1250 is sufficient to satisfy the demand. In Figure 6 we show the dynamic of the disease with the same parameters as before, but with 600 ICU beds. The spike in mortality caused by the ICU rationing is visible. Figure 6 near here.
In Figures 7, 8, 9 , we analyze three approaches to exiting the quarantine. In Figure 7 , we assume that the HR group is left in the quarantine indefinitely, while the LR group is not restricted. Figure 8 , we assume that both groups are left in the quarantine indefinitely (however improbable such an assumption is). Finally, in the most promising 9, we show what happens when both groups are released from the quarantine. Still, strict disease mitigation is pursued, allowing to reduce the reproductive numbers by 20%. In Figures 10, 11 , we show the hospital and ICU utilization with the same parameters as in Figure 5 , for different choices of the reproductive numbers. Similarly, in Figure 11 , we present the total number of deaths. 
In this article, we develop a flexible multi-group framework for analyzing the consequences of pandemics with various quarantine regimes. We compute the extra capacity of the healthcare system, which is required to absorb all ill and severely ill patients. Our analysis can easily include several interacting groups.
However, to achieve our goal in the most efficient way, we focus on the case of two groups only -the high-risk and low-risk populations -and examine the dynamics of the infection spread. We also study the impact of transmission on the overall healthcare system and demonstrate that the result varies quite dramatically depending on the chosen strategies.
For a given level of parameters of the pandemic and the size of the health care system, we define the dynamics of the disease, including the number of infections, hospitalizations, ICU admissions, recoveries and deaths.
We extend the SEIR model to incorporate the two population groups. We demonstrate that treating two groups as the same brings no additional benefit (at least in the case of Israel) while causing significant economic suffering.
Assuming that the population abides by pandemic public health countermeasures, thereby effectively reducing transmission of the disease, and given the health system capacity at or above the threshold, the country can impose no quarantine at all. Examples include Singapore, Hong Kong, Taiwan, and Sweden. None of them enforced any lockdown, which is consistent with our results.
Social distancing reducing the reproductive number in big cities can be enforced by making changes in the work hours and practicing staggering. These changes naturally lessen the burden on public transportation during rush hours and reduce crowding during lunch breaks. For example, even offices and schools can operate in shifts, while weekends can become floating.
Our analysis is useful in countries with high levels of compliance with hygienic and social distance measures. If the capacity of the health system is large enough, and the number of hospital or ICU beds is at or above the threshold level, then no quarantine is required. If the number of ICU beds is below the threshold, then quarantine of the HR population only can allow the country to slow the spread of disease and flatten the curve. In the meantime, the LR group can support the economy while maintaining pandemic interventions. 