Let's say the zombie apocalypse started in New York City. Should you stay and defend your apartment, or should you flee? A simulation developed by graduate students at Cornell University shows that people who want to survive the zombie apocalypse should get out of town—any town—and head for the remotest areas around the Rocky Mountains.

“The places on the map that [the zombie outbreak] took the longest to reach in the U.S. [are] Northwestern Montana and the depths of the desert in Nevada,” says Alex Alemi, a doctoral student in physics at Cornell University. “The full U.S. simulations dynamics were interesting. The zombies would spread very fast in the cities and as soon as you get out of the city and the population density [was less] … the speed in which the infection spread slowed down.”

Alemi and fellow graduate student Matt Bierbaum created a simulation that allowed them to model how fast a zombie outbreak would spread. Alemi thought of the idea while reading the post-zombie apocalypse novel World War Z and learning about epidemiological modeling, and, with his fellow graduate student Matt Bierbaum, created a simulation that would show how fast an outbreak would spread.

If the outbreak starts with one zombie in New York City, within a week, only zombies populate most of the Eastern Seaboard. About 28 days later, after the zombies overtake the cities, the places in between—such as Northeastern Pennsylvania, which doesn’t have high population density—would be where the zombie infection rate would be highest. The same phenomenon happens in California, where the counties between Los Angeles and San Francisco see more zombie infections than the larger population cities. Being located between two cities is a “particularly bad place to be … either way you are doomed … you’re doubly exposed,” Alemi says.

Ordinary diseases would never spread quite like a zombie outbreak: In real life, some people recover from an illness, while others die, and in each case, the disease stops spreading. But zombie outbreaks, as depicted in movies and on TV shows—where zombies are much better at biting humans than humans are at killing zombies—are different. “The only way to stop them is that the human would have to kill [all the zombies],” Alemi says. You have two natural outcomes: Eventually the humans will stop the outbreak [or] eventually everyone will succumb.” Still, despite the differences between real life and the zombie apocalypse, Alemi believes the zombie simulation might serve as a fun educational tool. “Zombies are fun and we also thought [the model] might offer an introduction to these techniques even though [a zombie invasion] is hypothetical,” Alemi says.

People can figure out how a zombie invasion spreads from their hometowns by playing around with this simulation.