Finding the best route from point A to point B is a solved problem. But what if you need to stop at a grocery store, then a pharmacy, and finally a coffee shop—in that specific order—before reaching home? This is the Optimal Sequenced Route (OSR) problem. This paper takes it a step further: instead of just finding the single best route, it tackles finding the top-$k$ optimal sequenced routes (KOSR) on large-scale, real-world road networks.
TL;DR
The authors propose two novel algorithms, PruningKOSR and StarKOSR, to efficiently find the $k$ best routes that visit a specific sequence of point-of-interest (POI) categories. By leveraging a new route dominance relationship and a target-directed A* search powered by advanced 2-hop labeling indices, they achieve speedups of up to two orders of magnitude over baseline methods on massive graphs.
What Problem Does This Paper Address?
While OSR algorithms exist, they typically return only the single "best" (least-cost) route. However, users often have personal preferences—perhaps they prefer a specific restaurant chain or a shopping mall currently having a sale—that a simple "shortest path" algorithm can't capture. Returning the top-$k$ routes gives users meaningful choices.
The technical challenge lies in the search space. In a large city graph with thousands of restaurants and shops, the number of possible sequenced routes explodes exponentially. Furthermore, the authors focus on general graphs where edge weights (like travel time) might not satisfy the triangle inequality, rendering many Euclidean-space optimizations useless.
Methods
The authors introduce two primary algorithms:
PruningKOSR: This algorithm introduces a dominance relationship. If two partially explored routes end at the same vertex and have visited the same categories in the same order, the more expensive one is "dominated." The algorithm postpones extending dominated routes, significantly narrowing the search space.StarKOSR: This builds on the pruning approach by adding a target-directed A* search. It uses a heuristic to estimate the remaining cost to the destination. If the estimated total cost of a partial route is already worse than the $k$-th best complete route found so far, it can be safely ignored.
To make these algorithms work on large graphs, the authors solve a critical bottleneck: finding the "$i$-th nearest neighbor" in a specific category. Instead of repeated, expensive Dijkstra searches, they utilize 2-hop labeling (specifically Pruned Landmark Labeling) to pre-compute distances. They then build a specialized inverted label index for each POI category, allowing them to identify the next-best POI in a category almost instantly.
Datasets
The algorithms were evaluated on five real-world datasets:
- Road Networks: California (CAL), New York City (NYC), Colorado (COL), and Florida (FLA). These vary in size from ~68k to ~1M vertices.
- Social Network: Google+ (G+), used as a non-Euclidean directed graph benchmark (~107k vertices, ~13.6M edges).
- POI Data: Real POI categories were mapped for NYC and CAL; synthetic distributions (uniform and Zipfian) were used for the others.
Key Insights and Ideas
- Dominance is Powerful: The realization that a sub-optimal partial path to a specific node can never lead to a top-$k$ global path before its superior counterpart is found allows for massive pruning.
- Heuristics for General Graphs: While A is standard, designing an admissible* heuristic (one that never overestimates the cost) for general graphs where triangle inequality fails is tricky. The authors use the simple
dis(current_node, destination)as a safe, effective lower bound. - Indexing the "Next Best": The most significant "aha moment" is the inverted label index. By restructuring 2-hop labels by category, the core operation of the search—"find the next closest restaurant"—becomes a simple list traversal rather than a graph search.
Key Results
The experimental results demonstrate significant performance gains:
- Efficiency:
StarKOSRis nearly two orders of magnitude faster than the pruning-only baseline on large graphs like Colorado and Florida. - Scalability: While baseline methods (like KPNE) failed to return results within an hour on large graphs, the proposed methods handled them in seconds.
- Beating the State-of-the-Art: Even when $k=1$ (reducing the problem to standard OSR),
StarKOSRoutperformed the previous state-of-the-art algorithm (GSP) because its target-directed search is more focused. - Search Space Reduction: Figure 2 in the paper visually demonstrates how
StarKOSRshrinks the search area from a massive circle (baseline) to a series of tight rings focused toward the destination.
Limitations and Future Work
The authors acknowledge a few areas for expansion:
- Fixed Ordering: The current work assumes the category sequence order is strictly fixed (e.g., A then B then C).
- Future Directions: They plan to explore KOSR queries where the category order is flexible (arbitrary or partial orders) and incorporate more complex user preference models directly into the search.
For more details, see the full paper: "Finding Top-k Optimal Sequenced Routes - Full Version" by Huiping Liu, Cheqing Jin, Bin Yang, and Aoying Zhou (2018).
Summary updated