Residents of the United Kingdom have plenty of reasons to go out for a pint from the pub these days. Thankfully there are plenty of pubs — 24,727, to be exact — listed on the UK Pub Guide, and now, thanks to an international team of mathematicians, there’s a map of the shortest possible route to hit all of them and end up back at the starting point.
Yes, every single listed pub.
The map solves what’s known as a traveling salesman problem. It’s a classic computer science problem to find the shortest path that stops at each reference point. At over 28,000 miles (the circumference of the Earth is 24,860 miles), the UK Pubs tour map is the largest traveling salesman problem ever solved. There are over 100 times the number of stops any other road-distance example has, making the humanity ending pub crawl from The World’s End look like child’s play.
The end result: An interactive map with enough pins to forget about Brexit for good. Surprisingly, none of the four researchers who completed the task were from the UK. Instead, they hail from the United States, Canada, Chile and Denmark.
Densely pubbed cities aside, it can take a bit of time to get from pub to pub. The average travel time is an hour, and the longest trip is a lengthy 270 miles (but it includes two ferry rides that probably serve beer).
Don’t be fooled into thinking the researchers spent two years creating the perfect pub tour just for heavy drinkers, though.
“We, of course, did not have in mind to bring everything mathematics has to bear in order to improve the lot of a wandering pub aficionado,” William Cook, a researcher from the University of Waterloo in Canada, writes. “Rather, we use the UK pubs problem as a means for developing and testing general-purpose optimization methods.”
Whatever the motivation behind the project, there are few drinking accomplishments that can compare with the completion of the longest pub crawl in the world.