Many may have noticed that various airlines have added new classes of seating to their cabins and new fees for priority boarding — to generate more revenues.

Planes are now fuller than before, and checked-baggage fees push travellers to bring more items in their hand luggage and block the aisles as they try to cram their belongings into any possible space.

Boarding time has doubled over the last decades, according to research by Boeing. It now takes 30 to 40 minutes to board approximately 140 passengers on a US domestic flight, up from around 15 minutes in the 1970s.

Spirit Airlines started charging $20 to $40 per carry-on bag. Since it is $2 cheaper to check a bag, more passengers check their bags, and Spirit claims its “stress-free boarding” saves six minutes on average. Another approach is used by Southwest, which says it can board its planes in around 15 minutes. It says the root of the delays is the practice of assigning seat numbers. Southwest’s passengers are instead assigned to one of three boarding groups and then given a number based on the time they checked in.

A few years ago, Jason H. Steffen, an astrophysicist at Fermilab in Chicago tried to solve this problem with a “Markov chain Monte Carlo optimisation algorithm.” In computing, a Monte Carlo algorithm is a randomised algorithm whose running time is deterministic but whose output may be incorrect with a certain (typically small) probability.

Much to Mr Steffen’s surprise, he found that the common back-to-front method of boarding was amongst the slowest methods: passengers must wait for those ahead of them to stow their bags and sit down. It is far better, it turns out, to let passengers board randomly.