This article has been corrected.

I was at the airport last week, and all I wanted to do was sit down, strap in, and lift off. Of course I couldn't, because there were a bunch of people standing in my way. As the line crept along, I scanned ahead for malingerers, but everyone seemed sufficiently ready to board. I couldn't help but wonder, is there a more efficient way for airlines to put get our butts into our seats, and into the air?

Millions of other people probably have pondered this question. At least one wrote a computer program to find the answer. Jason Steffen is an astrophysicist at Northwestern University, and several years ago he modeled different airline boarding methods to see what made them so slow. He also figured out how airlines could get us on board much faster.

Most airlines board back-to-front, an approach that makes sense, at first glance. But Steffen argues boarding back-to-front is actually one of the worst ways to board a plane. The problem, as he sees it, is this method creates traffic jams as people stuff their stuff into the overhead bins above their seats. Even if the line were perfectly ordered, only one or two people at a time would be able hoist their bags into the bins. Meanwhile, those who share their row wait behind them, blocking the overhead bins for several rows.

In his model, Steffen started with the assumption that people would automatically move ahead until they ran into the person in front of them, or reached their row. Gaps closed fast, but the line moved slowly, as simulated passengers waited for space to load their gear. He says that even if the first people in line were seated in the last two rows of the plane, only a few would be able to put their luggage away at a time. Everybody else would wait. "All you have done is move the line from outside to inside the airplane," Steffen told WIRED. "But the line doesn't move any faster." In fact, it turns out that the boarding time is almost exactly the same as boarding from the front to the back.

Steffen figured people would need to be manipulated in order to leave buffers between themselves and the people blocking their seats. So he started experimenting with rearranging the line by seat number. He ran his simulation ran over and over, and each time it switched the boarding order of two random passengers: If the plane boarded faster, it kept the switch. If the plane boarded more slowly, it switched them back. Then, the program ran again, switching another random pair. And again. And again. Each time, it moved closer to the optimal boarding order.

Skipping a row between each seat to board is the fastest way to get the plane in the air. Jason Steffen

Eventually a pattern emerged. The first person in line should be in the back row, window seat (on either side of the plane). The next person would be in a window seat, two rows up. The line should proceed this way, skipping a row between each window-seated passenger all the way to the front of the plane. It would repeat this on the other side, then start filling the window seats in the empty rows between those already filled. The pattern repeats for the middle seats on each side, then the aisles.

According to Steffen's calculations, his method boards at least five times faster than back-to-front (though this varies based on the size of the plane). And it didn't only work in the model. A few years ago, Steffen's method was tested on the web show This Vs. That, where it beat five other methods (the full episode is behind a paywall).

Airlines have tried a variety of tricks to hasten boarding, and Steffen isn't the first mathy person to offer a promising solution. But to date, Steffen says only Virgin America* has contacted him, and nothing came of it. The problem with his model, he admits, is that it does not account for human nature. For example, it's hard to imagine people who are traveling together who would be willing to split up, just to stand in line (especially if that group contains small children). Add that to language barriers, people running late, and the overall difficulty in getting large groups to follow complicated directions, and it's easy to see why Steffen's idealized boarding model hasn't been adopted. "It does require a bit of control over the passengers that I don’t think airlines really have," he said.

Almost every airline uses some variation on back-to-front, either with or without zones. A few of the other methods are outside-in, used by United Airlines, and the free-for-all boarding of Southwest Airlines. Steffen says Southwest's method is better than back-to-front, but still crippled by the fact people choose their own seats, and therefore create clusters that cause traffic jams. Truly random boarding, he says, would work pretty well.

Having learned this, I've resigned myself to slow, inefficient airplane boarding lines. And maybe this will make your airport waits a little less stressful during the impending holiday season. Steffen is undeterred, and says he is currently mulling over faster ways to move people through TSA checkpoints.

*A previous version of this article said Steffen had been contacted by JetBlue.