Mathematics could provide solution to holding large events safely