There are at least five big patches of garbage floating around the planet's oceans and some are as big as the state of Texas, scientists said in a new study, published Tuesday in the journal Chaos. And now, there's an algorithm to track their movements.

Researchers from the University of New South Wales, or UNSW, in Sydney, Australia, described a mathematical model to determine which countries are contributing the most to the garbage patches, each of which is located in the center of large, circular ocean currents called gyres that suck in and trap floating debris. Ocean garbage patches formed due to these rotating ocean currents have raised serious environmental concerns because broken plastic, which constitutes a huge chunk of the trash, spreads easily and is toxic to marine life.

“In some cases, you can have a country far away from a garbage patch that's unexpectedly contributing directly to the patch," Gary Froyland, a mathematician at UNSW and a co-author of the study said, in a statement. He added that because all oceans are interconnected, garbage from one corner of the globe could travel to the other, riding on ocean currents.

Based on observations using the new model, Froyland said, ocean debris from East African countries like Madagascar and Mozambique would most likely flow into the south Atlantic, even though their coastlines border the Indian Ocean.  

The model can also help determine how quickly garbage from one patch leaks into another. “We can use the new model to explore, for example, how quickly trash from Australia ends up in the north Pacific,” study co-author Erik van Sebille said, in the statement.

The main purpose of the research, the authors said, was to find out how well surface waters of different oceans mixed together. In doing so, Sebille added, “we have redefined the borders of the ocean basins according to how the water moves,” as opposed to “artificial” ocean boundaries created based on a flawed perception of how ocean circulation works.

The researchers also said that the new model could yield important insight into the distribution of ocean ecology in addition to keeping track of pollutants, including large-scale oil spills.