It’s no shocker that the world is rapidly urbanizing. The World Health Organization estimates that 70 percent of the global population will live in cities and towns by 2050, up from just 50 percent today. Predicting exactly where and when those urban migrations will occur, however, has proven difficult in the past, because they’re guided by millions of personal decisions based on factors such as employment opportunities, cost of living, security and politics.

Despite all those individuals acting in a seemingly independent manner, Alberto Hernando de Castro, a physicist with the École Polytechnique Fédérale de Lausanne in Paris, suggests that cities behave as coherent entities. In a study published in the Journal of the Royal Society Interface, Hernando and his colleagues have uncovered what they think are a few simple rules that guide the growth of cities. The results could help local governments predict design, transportation and financial needs as urban areas grow.

The team analyzed population data collected by Spain’s National Statistics Institute from 8,100 Spanish municipalities between 1900 and 2011, using it to build and test a computer model of population dynamics. The model revealed two trends.

First, the way a city will grow in the future depends on how it grew in the past. The model suggests that cities in Spain have, on average, a “memory” of 15 years. That means when a city has at least 10,000 residents and 15 years of data on past growth rates, the model can accurately predict its growth for a few years into the future. Predictions beyond that become gradually less accurate until about 15 years out, when the growth rate stops correlating with the available data.

The second trend was that a city’s growth rate depends on the growth rates of neighboring cities. Cities within about 50 miles of each other are entangled, Hernando says, so that if one of them grows, the other also grows in the same proportion. If one of them drops its population, the other does the same. “What we have measured is that this entanglement decreases with distance,” Hernando says, “so two cities that are close evolve similarly, but cities that are far away evolve independently.”

Hernando says he suspects similar rules will influence the growth of all cities, although the exact length of the “memory” and interaction distance may vary from place to place, depending on factors such as the economy, highways and public transportation.

Although the team managed to quantify what it thinks are universal patterns, it is not clear how or why these patterns emerge. “Right now, how the combination of free and unpredictable choices can generate a collective outcome that follows fundamental rules is a mystery,” Hernando says. “I have moved several times in my life, from Madrid to Barcelona to Toulouse to Lausanne, and every time I did it was for personal and professional reasons. I never thought that I was contributing to some kind of collective mode.”

Up next, the team will test the model in other countries to determine which behaviors are universal and which are local. It also plans on extending the model to encompass specific factors, such as natural disasters, that influence human migration, and wants to use it to study how ideas and traditions diffuse geographically.

“Our long-term goal is to develop a simulation tool including all demographic, social and economic forces in scene,” Hernando said in a statement, “where virtual copies of cities grow and develop in hypothetical situations, mimicking the response of their real-world counterparts.”