This algorithm tracks down the first patient in a disease outbreak

The name that epidemiologists give to the first person to be infected during a disease outbreak is 'patient zero' - that's where it all begins. Identifying that person is often difficult, but a Croatian team has developed an algorithm that might be able to help.

Their work deals with a situation where there's an interconnected network of people, with some infected and some not. Disease outbreaks are one sample, but the same principle could also apply to computer viruses or even the spread of a meme through social media.

Mile Šikic of the University of Zagreb and his colleagues built an algorithm that simulates different ways the infection could have spread through that network, and then compares those simulations with the real data to calculate a probability that an individual is the real 'patient zero'.

The faster the better

A 100% probability means you've found where it all began, but if multiple people have equal probabilities then you need more data to pinpoint the origin. Interestingly, the faster the infection occurs, the easier it is to track down where it began. "With a slower process, you lose some kind of information," Šikic told New Scientist.

To see whether the system worked, the team used STI data from a Brazilian website where sex workers are reviewed by their customers. The algorithm was able to find 'patient zero', or be one hop away, 60 percent of the time. "If we cannot say who is patient zero, we can be in their neighbourhood," says Šikic.

The details of the algorithm were published in Physical Review Letters.