Early Pruning for Public Transport Routing

This paper introduces "Early Pruning," a low-overhead technique that significantly accelerates public transport routing algorithms like RAPTOR by pre-sorting and discarding suboptimal transfer connections, thereby reducing query times by up to 57% without compromising path optimality and enabling more comprehensive multimodal journey planning.

Andrii Rohovyi, Abdallah Abuaisha, Toby Walsh

Published 2026-03-16
📖 4 min read☕ Coffee break read

Imagine you are trying to find the fastest way to get from your home to a friend's house in a busy city. You have a map app that shows you buses, trains, walking paths, bike lanes, and even e-scooter routes.

In the past, these apps had a hard time handling all these options. If you wanted to see every possible way to get there (including walking to a different bus stop, taking a bike, then hopping on a train), the app would get overwhelmed. It would try to check every single path, even the ones that were obviously too slow, causing the app to freeze or take too long to give you an answer.

This paper introduces a clever trick called Early Pruning to fix that. Here is how it works, explained simply:

The Problem: The "Endless Hallway" of Options

Think of a bus stop as a hallway with many doors leading to other stops.

  • Door A leads to a stop 2 minutes away.
  • Door B leads to a stop 5 minutes away.
  • Door C leads to a stop 9 minutes away.

When the computer is trying to find the best route, it usually walks through every single door to see where it leads, even if it already found a path that gets you to your destination in 10 minutes. If it checks Door C (9 minutes) and realizes that adding that time makes the total trip too long, it's too late—it wasted time checking that door in the first place.

The Solution: The "Sorted List" Trick

The authors realized that if you organize the doors by how long they take (shortest time first), you can stop checking as soon as you know it's pointless.

Imagine you are a detective looking for a suspect. You have a list of suspects sorted by height, from shortest to tallest.

  1. You know the suspect is taller than 6 feet.
  2. You check the first person (5 feet). Too short.
  3. You check the second person (5'5"). Too short.
  4. You check the third person (6'1"). Bingo! You found a match.

But here is the magic of Early Pruning:
If you are looking for someone shorter than 5 feet, and you check the first person (5 feet) and realize they are already too tall, you don't need to check the rest of the line. Since the list is sorted, everyone else is even taller! You can just close the list and move on.

How It Works in the App

  1. Preparation (One-time setup): Before you even ask the app for directions, it sorts all the walking and transfer paths at every stop from "fastest" to "slowest." This takes less than a second and only needs to be done once.
  2. The Search: When you ask for a route, the app checks the fastest paths first.
  3. The Cut-off: As soon as the app sees a path that is slower than the best route it has already found, it says, "Okay, I don't need to check any more paths from this stop because they will all be even slower!" It cuts off the rest of the search immediately.

Why This Matters

  • Speed: The paper tested this on real transit networks in London and Switzerland. It made the apps up to 57% faster. That means a 4-second wait becomes a 2-second wait.
  • More Options: Because the app is faster, city planners can finally include more options without making the app slow. They can let you see routes that involve walking further, taking an e-scooter, or transferring in more complex ways.
  • Better for Everyone: This is especially helpful for people living in suburbs or small towns where direct buses are rare. Instead of just saying "No bus here," the app can quickly figure out, "Walk 10 minutes to the next town, take a bike, then catch a train."

The Bottom Line

Early Pruning is like teaching a GPS to stop looking at dead ends the moment it realizes they are dead ends. It doesn't change the destination or the route; it just stops the computer from wasting time on paths that are guaranteed to be too slow. This makes your journey planner faster, smarter, and able to show you more creative ways to get around your city.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →