Rumours on the internet, terrorist attacks and epidemics can all be tracked to their originating points with a new mathematical formula developed by researchers at the Federal Institute of Technology at Lausanne, the school said on Friday.

“Using our method, we can find the source of all kinds of things circulating on a network, just by ‘listening’ to a limited number of members,” said Pedro Pinto, who worked on the algorithm with a team of scientists.

For example, if a story spreads to 500 users of the online social network Facebook, investigators would need to look at messages from only 15 or 20 people to find out who started the rumour.

Pinto’s team was also able to identify the brains behind the September 11, 2001 terrorist attacks in New York in hindsight.

“By reconstructing the message exchange inside the 9/11 terrorist network extracted from publicly released news, our system spit out the names of three potential suspects — one of whom was found to be the mastermind of the attacks, according to the official enquiry,” Pinto said.

The method can also be used to find out where epidemics start, by creating models of rivers and human networks through which a disease spreads. Computer viruses can also be tracked to their originators, the institute said.