Scientists at the University of Aberdeen have developed a mathematical method to prevent epidemics by vaccinating fewer people than ever before.