  In the context of the recent COVID-19 outbreak, quarantine has been used to
"flatten the curve" and slow the spread of the disease. In this paper, we show
that this is not the only benefit of quarantine for the mitigation of an SIR
epidemic spreading on a graph. Indeed, human contact networks exhibit a
powerlaw structure, which means immunizing nodes at random is extremely
ineffective at slowing the epidemic, while immunizing high-degree nodes can
efficiently guarantee herd immunity. We theoretically prove that if quarantines
are declared at the right moment, high-degree nodes are disproportionately in
the Removed state, which is a form of targeted immunization. Even if
quarantines are declared too early, subsequent waves of infection spread slower
than the first waves. This leads us to propose an opening and closing strategy
aiming at immunizing the graph while infecting the minimum number of
individuals, guaranteeing the population is now robust to future infections. To
the best of our knowledge, this is the only strategy that guarantees herd
immunity without requiring vaccines. We extensively verify our results on
simulated and real-life networks.
