Optimal Vaccine Allocation to Control Epidemic Outbreaks in Arbitrary Networks