Skip to main content
Log in

Heuristic search for one-to-many shortest path queries

  • Regular Submission
  • Published:
Annals of Mathematics and Artificial Intelligence Aims and scope Submit manuscript

Abstract

In this paper we study the One-to-Many Shortest Path Problem (OMSPP), which is the problem of solving k shortest path problems that share the same start node. This problem has been studied in the context of routing in road networks. While past work on routing relied on pre-processing the network, which is assumed to be provided explicitly. We explore how OMSPP can be solved with heuristic search techniques, allowing the searched graph to be given either explicitly or implicitly. Two fundamental heuristic search approaches are analyzed: searching for the k goals one at a time, or searching for all k goals as one compound goal. The former approach, denoted k×A, is simpler to implement, but can be computationally inefficient, as it may expand a node multiple times, by the different searches. The latter approach, denoted kA, can resolve this potential inefficiency, but implementing it raises fundamental questions such as how to combine k heuristic estimates, one per goal, and what to do after the shortest path to one of the goals has been found. We propose several ways to implement kA, and characterize the required and sufficient conditions on the available heuristics and how they are aggregated such that the solution is admissible. Then, we analytically compare the runtime and memory requirements of k×A and kA, identifying when each approach should be used. Finally, we compare these approaches experimentally on two representative domains, providing empirical support for our theoretical analysis. These results shed light on when each approach is beneficial.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Abeywickrama, T., Cheema, M.A., Taniar, D. (2016) k-nearest neighbors on road networks: A journey in experimentation and in-memory implementation. Very Large Data Bases Conference (VLDB) Endowment 9(6)

  2. Asai, M., Fukunaga, A.: Tie-breaking strategies for cost-optimal best first search. Journal of Artificial Intelligence Research (JAIR) 58, 67–121 (2017)

    Article  Google Scholar 

  3. Betzalel, O., Felner, A., Shimony, S.E.: Type system based rational lazy IDA. In: the Symposium on Combinatorial Search (SOCS), pp. 151–155 (2015)

  4. Burns, E.A., Hatem, M., Leighton, M.J., Ruml, W.: Implementing Fast Heuristic Search Code. In: SoCS (2012)

  5. Chalupsky, H., Gil, Y., Knoblock, C.A., Lerman, K., Oh, J., Pynadath, D.V., Russ, T.A., Tambe, M.: Electric Elves: Applying Agent Technology to Support Human Organizations. In: IAAI, vol. 1, pp. 51–58 (2001)

  6. Dechter, R., Pearl, J.: Generalized best-first search strategies and the optimality of a*. J. Assoc. Comput. Mach. 32(3), 505–536 (1985)

    Article  MathSciNet  Google Scholar 

  7. Delling, D., Goldberg, A.V., Nowatzyk, A., Werneck, R.F.: PHAST: Hardware-accelerated shortest path trees. In: IEEE International Parallel Distributed Processing Symposium, pp. 921–931 (2011)

  8. Delling, D., Goldberg, A.V., Werneck, R.F.: Faster Batched Shortest Paths in Road Networks. In: Workshop on Algorithmic Approaches for Transportation Modelling. Optimization, and Systems (2011)

  9. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1, 269–271 (1959)

    Article  MathSciNet  Google Scholar 

  10. Dobson, A.J., Bekris, K.E.: Improved heuristic search for sparse motion planning data structures. In: the Annual Symposium on Combinatorial Search (SOCS) (2014)

  11. Domshlak, C., Mirkis, V.: Deterministic oversubscription planning as heuristic search: Abstractions and reformulations. J Artif Intell Res 52, 97–169 (2015)

    Article  MathSciNet  Google Scholar 

  12. Edelkamp, S.: External symbolic heuristic search with pattern databases. In: ICAPS, pp. 51–60 (2005)

  13. Edelkamp, S.: External-memory state space search. In: Algorithm Engineering, Springer, pp. 185–225 (2016)

  14. Eppstein, D.: Finding the k shortest paths. SIAM J. Comput. 28 (2), 652–673 (1998)

    Article  MathSciNet  Google Scholar 

  15. Felner, A., Zahavi, U., Holte, R., Schaeffer, J., Sturtevant, N.R., Zhang, Z.: Inconsistent heuristics in theory and practice. Artif. Intell. 175(9–10), 1570–1603 (2011)

    Article  MathSciNet  Google Scholar 

  16. Flerova, N., Marinescu, R., Dechter, R.: Searching for the M best solutions in graphical models. J Artif Intell Res 55, 889–952 (2016)

    Article  MathSciNet  Google Scholar 

  17. Gilon, D., Felner, A., Stern, R.: Dynamic potential search - A new bounded suboptimal search. In: Proceedings of the Ninth Annual Symposium on Combinatorial Search (SOCS), Tarrytown, pp 36–44. NY, USA (2016)

  18. Goldberg, A.V., Harrelson, C.: Computing the shortest path: A search meets graph theory. In: Annual ACM-SIAM Symposium on Discrete algorithms (SODA), pp. 156–165 (2005)

  19. Goldenberg, M., Sturtevant, N.R., Felner, A., Schaeffer, J.: The Compressed Differential Heuristic. In: AAAI Conference on Artificial Intelligence (AAAI) (2011)

  20. Goldenberg, M., Felner, A., Sturtevant, N., Holte, R.C., Schaeffer, J.: Optimal-Generation Variants of EPEA*. In: Annual Symposium on Combinatorial Search (SoCS) (2013)

  21. Goldenberg, M., Felner, A., Stern, R., Sharon, G., Sturtevant, N.R., Holte, R.C., Schaeffer, J.: Enhanced partial expansion A. Journal of Artificial Intelligence Research (JAIR) 50, 141–187 (2014)

    Article  MathSciNet  Google Scholar 

  22. Hart, P.E., Nilsson, N.J., Raphael, B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics SSC-4(2), pp. 100–107 (1968)

  23. Helmert, M.: Landmark Heuristics for the Pancake Problem. In: Third Annual Symposium on Combinatorial Search (SoCS) (2010)

  24. Hernández, C., Uras, T., Koenig, S., Baier, J.A., Sun, X., Meseguer, P.: Reusing cost-minimal paths for goal-directed navigation in partially known terrains. Auton. Agent. Multi-Agent Syst. 29(5), 850–895 (2015)

    Article  Google Scholar 

  25. Holte, R.C., Zilles, S.: On the optimal efficiency of cost-algebraic a. In: AAAI Conference on Artificial Intelligence, pp. 2288–2295 (2019)

  26. Holte, R.C., Felner, A., Sharon, G., Sturtevant, N.R.: Bidirectional search that is guaranteed to meet in the middle. In: Proceedings of the AAAI Conference on Artificial Intelligence (AAAI) (2016)

  27. Ishida, T., Korf, R.E.: Moving-target search: a real-time search for changing goals. IEEE Trans. Pattern Anal. Mach. Intell. 17(6), 609–619 (1995)

    Article  Google Scholar 

  28. Karpas, E., Domshlak, C.: Optimal Search with Inadmissible Heuristics. In: ICAPS (2012)

  29. Kleitman, D., Kramer, E., Conway, J., Bell, S., Dweighter, H.: Elementary problems: E2564-e2569. Am. Math. Mon. 82(10), 1009–1010 (1975)

    Article  MathSciNet  Google Scholar 

  30. Koenig, S., Likhachev, M.: Fast replanning for navigation in unknown terrain. IEEE Trans. Robot. 21(3), 354–363 (2005)

    Article  Google Scholar 

  31. Koenig, S., Likhachev, M., Furcy, D.: Lifelong planning a*. Artif. Intell. 155(1), 93–146 (2004)

    Article  MathSciNet  Google Scholar 

  32. Koenig, S., Likhachev, M., Sun, X.: Speeding up moving-target search. In: Proceedings of the 6th international joint conference on Autonomous agents and multiagent systems, p 188. ACM, AAMAS (2007)

  33. Korf, R.E.: Best-First Frontier Search with Delayed Duplicate Detection. In: AAAI, vol. 4, pp 650–657 (2004)

  34. Machuca, E: An analysis of multiobjective search algorithms and heuristics. In: International Joint Conference on Artificial Intelligence (IJCAI), pp. 2822–2823 (2011)

  35. Marble, J.D., Bekris, K.E.: Asymptotically near-optimal planning with probabilistic roadmap spanners. IEEE Trans. Robot. 29(2), 432–444 (2013)

    Article  Google Scholar 

  36. Martelli, A.: On the complexity of admissible search algorithms. Artif. Intell. 8(1), 1–13 (1977)

    Article  MathSciNet  Google Scholar 

  37. Myers, K., Berry, P., Blythe, J., Conley, K., Gervasio, M., McGuinness, D.L., Morley, D., Pfeffer, A., Pollack, M., Tambe, M.: An intelligent personal assistant for task and time management. AI Mag. 28(2), 47 (2007)

    Google Scholar 

  38. Ng, T.E., Zhang, H.: Predicting Internet Network Distance with Coordinates-Based Approaches. In: The Joint Conference of the IEEE Computer and Communications Societies (INFOCOM), IEEE, vol. 1, pp 170–179 (2002)

  39. Pollack, M.: Letter to the editor — the k th best route through a network. Oper. Res. 9(4), 578–580 (1961)

    Article  Google Scholar 

  40. Shaham, E., Felner, A., Sturtevant, N.R., Rosenschein, J.S.: Minimizing node expansions in bidirectional search with consistent heuristics. In: the International Symposium on Combinatorial Search (SOCS), pp. 81–98 (2018)

  41. Sturtevant, N.R.: Memory-efficient abstractions for pathfinding. AIIDE 684, 31–36 (2007)

    Google Scholar 

  42. Sturtevant, N.R.: Benchmarks for grid-based pathfinding. IEEE Transactions on Computational Intelligence and AI in Games 4(2), 144–148 (2012)

    Article  Google Scholar 

  43. Sturtevant, N.R., Felner, A.: A brief history and recent achievements in bidirectional search. In: AAAI Conference on Artificial Intelligence, pp. 8000–8007 (2018)

  44. Sturtevant, N.R., Felner, A., Barer, M., Schaeffer, J., Burch, N.: Memory-based heuristics for explicit state spaces. In: IJCAI, pp. 609–614 (2009)

  45. Suurballe, J.W.: Disjoint paths in a network. Networks 4, 125–145 (1974)

    Article  MathSciNet  Google Scholar 

  46. Tolpin, D., Beja, T., Shimony, S.E., Felner, A., Karpas, E.: Toward rational deployment of multiple heuristics in A*. In: the International Joint Conference on Artificial Intelligence (IJCAI), pp. 674–680 (2013)

  47. Zhao, S., Taniar, D., Harabor, D.D.: Fast k-nearest neighbor on a navigation mesh. In: Symposium on Combinatorial Search (SoCS) (2018)

  48. Zhou, R., Hansen, E.A.: Structured duplicate detection in external-memory graph search. In: AAAI, pp. 683–689 (2004)

  49. Zhou, R., Hansen, E.A.: Breadth-first heuristic search. Artif. Intell. 170(4), 385–408 (2006)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Roni Stern.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A: Theorems

Appendix A: Theorems

Proof

First, we assume that Φ is consistent and show that for any OMSPP instance and for any tuple of consistent heuristics h, kA\(^{*}_{{{\varPhi }}}\) is admissible. Assume that kA chooses to expand a goal ti ∈{t1,…tk}) via a path p. Applying Lemma 1 to ti, we obtain that there exists n ∈Open such that g(n) + d(n, ti) = d(s,ti). Since ti is expanded before n, we have

$$ g(t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) = F_{{{\varPhi}}}(t_{i}) \leq F_{{{\varPhi}}}(n) = g(n) + {{\varPhi}}(\mathbf{h}(n)) $$
(8)

Since all heuristics are consistent, we have that

$$ \begin{array}{@{}rcl@{}} \forall j: h_{j}(n) & \leq& d(n, t_{i}) + h_{j}(t_{i}) \end{array} $$
(9)
$$ \begin{array}{@{}rcl@{}} \forall j: h_{j}(n) - h_{j}(t_{i}) & \leq& d(n, t_{i}) \end{array} $$
(10)
$$ \begin{array}{@{}rcl@{}} \max(\mathbf{h}(n) - \mathbf{h}(t_{i})) &\leq& d(n, t_{i}) \end{array} $$
(11)

Now, since Φ is consistent, then

$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n))-{{\varPhi}}(\mathbf{h}(t_{i}))\leq & \max(\mathbf{h}(n)-\mathbf{h}(t_{i})) & \end{array} $$
(12)
$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n))-{{\varPhi}}(\mathbf{h}(t_{i})) \leq & d(n, t_{i}) & \text{ (due to (11))} \end{array} $$
(13)
$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n)) \leq &d(n, t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \end{array} $$
(14)
$$ \begin{array}{@{}rcl@{}} g(n) + {{\varPhi}}(\mathbf{h}(n)) \leq & g(n)+ d(n, t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \end{array} $$
(15)
$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(n) \leq & d(s, t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \text{(by definition of }F_{{{\varPhi}}} \text{ and }\textit{n}) \end{array} $$
(16)
$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(t_{i}) \leq & d(s, t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \text{(due to (8))} \end{array} $$
(17)
$$ \begin{array}{@{}rcl@{}} g(t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) \leq & d(s, t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \text{(by definition of }F_{{{\varPhi}}}) \end{array} $$
(18)
$$ \begin{array}{@{}rcl@{}} g(t_{i}) \leq & d(s, t_{i}) & \end{array} $$
(19)

By definition of d, we know that d(s,ti) ≤ g(ti). Therefore, g(ti) = d(s,ti), as required.

Second, we assume that Φ is not consistent, and show that there exists an OMSPP instance and a tuple of consistent heuristics such that kA\(^{*}_{{{\varPhi }}}\) is not admissible. To do it, we prove that there exists values for u, ui, v, and δ such that: (1) the conditions in Lemma 2 are satisfied, (2) the graph described in Lemma 2 has non-negative edges, and (3) the heuristics in the resulting graph are still consistent.

Step #1. We define the values of u, ui, v, and δ as follows. Since Φ is not consistent, there exists vectors v, u, and an index i such that ui = 0 and \({{\varPhi }}(\mathbf {v}) - {{\varPhi }}(\mathbf {u}) > {\max \limits } (\mathbf {v} - \mathbf {u})\). δ is defined to be a value between Φ(u) and \({\max \limits } (\mathbf {v} - \mathbf {u})\), i.e., \({{\varPhi }}(\mathbf {v}) - {{\varPhi }}(\mathbf {u}) > \delta > {\max \limits } (\mathbf {v} - \mathbf {u})\).

Step #2. All edges in the graph are non-negative: δ > 0 because ui = 0, the domain of Φ is vectors of non-negative values (Definition 5), vi ≥ 0, and hence \({\max \limits } (\mathbf {v} - \mathbf {u}) \geq v_{i} - u_{i} \geq 0\). Also, 𝜖 > 0, by definition of δ.Step #3. To conclude the proof, it remains to observe that the heuristics involved are consistent. This is indeed the case because for all \(i^{\prime }\), we have \(h_{i^{\prime }}(n) - h_{i^{\prime }}(t_{i}) = v_{i^{\prime }} - u_{i^{\prime }} \leq {\max \limits } (\mathbf {v} - \mathbf {u}) < \delta = d(n, t_{i})\) and therefore \(h_{i^{\prime }}(n) \leq d(n, t_{i}) + h_{i^{\prime }}(t_{i})\). □

A subconvex combination of a vector v is a weighted sum \({\sum }_{i} \alpha _{i}\cdot v_{i}\) such that every coefficients αi is non-negative and their sum is at most one, i.e., \({\sum }_{i} \alpha _{i}\leq 1\). The i th order statistic of a vector v is the i th smallest value of v and is denoted v(i). For instance, if v = 〈3, 1, 0, 1〉, then v(1) = v3 = 0, v(2) = v(3) = v2 = v4 = 1 and v(4) = v1 = 3.

Proposition 1

If a heuristic aggregation function Φ can be expressed as a subconvex combination of its input vector and its order statistics, then Φ is consistent.

Proof

Let Φ be a heuristic aggregation function that can be expressed as

$$ {{\varPhi}}(\mathbf{v})=\sum\limits_{i=1}^{k} \alpha_{i} v_{i} + \sum\limits_{i=1}^{k} \alpha_{k+i} v_{(i)} $$
(20)

where (αi)1≤i≤ 2k is a family of non-negative coefficients such that \({\sum }_{i=1}^{2k} \alpha _{i}\leq 1\).

For any two vectors v and w, it is immediate that for any index i, we have \(v_{i} - w_{i} \leq {\max \limits } (\mathbf {v} - \mathbf {w})\). Let us show that \(v_{(i)} - w_{(i)} \leq {\max \limits } (\mathbf {v} - \mathbf {w})\). Define V<i = {j|vj < v(i)} and W>i = {j|wj > w(i)}. By definition of the order statistics, |V<i|≤ i − 1 and |W>i|≤ ki. It follows that |V<iW>i|≤ k − 1. Thus, there exists an index li such that liViWi. By construction of Vi and Wi, deduce that \(v_{(i)} \leq v_{l_{i}}\) and that \(w_{l_{i}} \leq w_{(i)}\) and conclude that \(v_{(i)} - w_{(i)} \leq v_{l_{i}} - w_{l_{i}} \leq {\max \limits } (\mathbf {v} - \mathbf {w})\).

For any two vectors v and w, we have

$$ \begin{array}{@{}rcl@{}} &{{\varPhi}}(\mathbf{v}) - {{\varPhi}}(\mathbf{w}) & = \sum\limits_{i=1}^{k} \alpha_{i} v_{i} + \sum\limits_{i=1}^{k} \alpha_{k+i}v_{(i)} - \sum\limits_{i=1}^{k} \alpha_{i} w_{i} - \sum\limits_{i=1}^{k} \alpha_{k+i} w_{(i)} \end{array} $$
(21)
$$ \begin{array}{@{}rcl@{}} && = \sum\limits_{i=1}^{k} \alpha_{i} (v_{i} - w_{i}) + \alpha_{i+k} (v_{(i)} - w_{(i)}) \end{array} $$
(22)
$$ \begin{array}{@{}rcl@{}} && \leq \sum\limits_{i=1}^{2k} \alpha_{i} \max(\mathbf{v} - \mathbf{w}) (\alpha_{i} \geq 0) \end{array} $$
(23)
$$ \begin{array}{@{}rcl@{}} && \leq \max(\mathbf{v} - \mathbf{w}) \sum\limits_{i=1}^{2k} \alpha_{i} \end{array} $$
(24)
$$ \begin{array}{@{}rcl@{}} & \leq \max(\mathbf{v} - \mathbf{w}) & \left( \sum\limits_{i=1}^{2k} \alpha_{i} \leq 1\right) \end{array} $$
(25)

Therefore, Φ is consistent. □

Proof

Each of these functions can be expressed as a subconvex combination of the input vector and its order statistics: projecting the ith element is Φ(v) = vi; the mean is \({{\varPhi }}(\mathbf {v}) = \frac {v_{1} + {\dots } + v_{k}}{k}\); the median is \({{\varPhi }}(\mathbf {v}) = \frac {1}{2}(v_{(\frac {k}{2})} + v_{(\frac {k+1}{2})})\); the maximum is Φ(v) = v(k); and the minimum is Φ(v) = v(1). Thus, according to Theorem 3 they are all consistent. □

Proposition 2

A heuristic aggregation function Φ is not consistent if it can be expressed as \({{\varPhi }}(\mathbf {v})={\sum }_{i} \alpha _{i} v_{i}\) where all coefficients αi are non-negative and their sum is larger than one.

Proof

Consider the vectors v = 1 and u = 0. Their difference \(\mathbf {v} - \mathbf {u} = {\sum }_{i} \alpha _{i} (1 - 0) = {\sum }_{i} \alpha _{i} > 1 = {\max \limits } (\mathbf {v} - \mathbf {w})\). Thus, Φ is not consistent. □

Corollary 1

Sum is not a consistent heuristic aggregation functions.

Proof

The sum can be expressed as \({{\varPhi }}(\mathbf {v})={\sum }_{i} v_{i}\), i.e., all the coefficients are one. Therefore, their sum is over one and due to Observation 4, this means sum is not consistent. □

Lemma 1 (Generic example of inadmissible kA)

For the OMSPP instance defined by the graph depicted in Fig. 9, a start vertex s, and goals ti and tj, if (1) ui = 0, (2) δ > 0, (3) Φ(v) > Φ(u) + δ, and (4) \(\epsilon = \frac {{{\varPhi }}(\mathbf {v}) - {{\varPhi }}(\mathbf {u}) - \delta }{3} > 0\), then running kA\(^{*}_{{{\varPhi }}}\) will find a suboptimal path to ti.

Proof

In the first iteration of kA\(^{*}_{{{\varPhi }}}\), the vertex s will be expanded, adding to Open the vertices n, ti, and tj, with g values 𝜖, δ + 2𝜖, and Φ(v), respectively, and FΦ values 𝜖 + Φ(v), δ + 2𝜖 + Φ(u), and Φ(v), respectively. To prove Lemma 2, we show below that kA\(^{*}_{{{\varPhi }}}\) will expand ti first and then tj, halting afterwards without expanding n. The optimal path to ti goes through n, and thus it will not be found by kA\(^{*}_{{{\varPhi }}}\), as required. To show that ti is expanded first, we express FΦ(ti) in terms of 𝜖 and Φ(v) as follows:

$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(t_{i})&=&\delta+2\epsilon+{{\varPhi}}(\mathbf{u}) \end{array} $$
(26)
$$ \begin{array}{@{}rcl@{}} &=&\delta+3\epsilon-\epsilon+{{\varPhi}}(\mathbf{u}) \end{array} $$
(27)
$$ \begin{array}{@{}rcl@{}} &=&\delta+{{\varPhi}}(\mathbf{v})-{{\varPhi}}(\mathbf{u})-\delta -\epsilon+{{\varPhi}}(\mathbf{u}) \end{array} $$
(28)
$$ \begin{array}{@{}rcl@{}} &=&{{\varPhi}}(\mathbf{v})-\epsilon \end{array} $$
(29)

The table in the righthand side of Fig. 9 lists the FΦ values of n, ti, and tj expressing only with Φ(v) and 𝜖, showing that indeed kA\(^{*}_{{{\varPhi }}}\) will halt before expanding n, as required. □

Fig. 9
figure 9

A generic counter-example for kA\(^{*}_{{{\varPhi }}}\). The start is s, nodes ti and tj are goals where ij. For any v, u, i, δ, and 𝜖 such that (1) ui = 0, (2) δ > 0, (3) Φ(v) > Φ(u) + δ, and (4) \(\epsilon = \frac {{{\varPhi }}(\mathbf {v}) - {{\varPhi }}(\mathbf {u}) - \delta }{3} > 0\), running kA\(^{*}_{{{\varPhi }}}\) will return a suboptimal path to ti. To see this, the table on the right shows the g, Φ(h), and FΦ values for n, ti, and tj after expanding s. The optimal path to ti is through n and costs δ + 𝜖, but kA\(^{*}_{{{\varPhi }}}\) will expand ti before n, returning a path of length δ + 2𝜖 to ti, which is suboptimal

Proof

Assume that kA chooses to expand a node m ∈Open. Applying Lemma 1 to m, we obtain that there exists n ∈Open such that g(n) + d(n,m) = d(s,m). Since m is expanded before n, we have

$$ g(m) + {{\varPhi}}(\mathbf{h}(m)) = F_{{{\varPhi}}}(m) \leq F_{{{\varPhi}}}(n) = g(n) + {{\varPhi}}(\mathbf{h}(n)) $$
(30)

Since all heuristics are consistent, we have that

$$ \begin{array}{@{}rcl@{}} \forall j: h_{j}(n) & \leq& d(n, m) + h_{j}(m) \end{array} $$
(31)
$$ \begin{array}{@{}rcl@{}} \forall j: h_{j}(n) - h_{j}(m) & \leq& d(n, m) \end{array} $$
(32)
$$ \begin{array}{@{}rcl@{}} \max(\mathbf{h}(n) - \mathbf{h}(m)) & \leq& d(n, m) \end{array} $$
(33)

Now, since Φ is re-expansion-avoiding, then

$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n)) - {{\varPhi}}(\mathbf{h}(m))&\leq & \max(|\mathbf{h}(n)-\mathbf{h}(m)|) \end{array} $$
(34)
$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n)) &\leq & d(n, m) + {{\varPhi}}(\mathbf{h}(m)) {\kern84pt}\text{ (due to (33))} \end{array} $$
(35)
$$ \begin{array}{@{}rcl@{}} g(n) + {{\varPhi}}(\mathbf{h}(n)) &\leq & g(n)+ d(n, m) + {{\varPhi}}(\mathbf{h}(m)) \end{array} $$
(36)
$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(n) &\leq & d(s, m) + {{\varPhi}}(\mathbf{h}(m)) {\kern32pt}\text{(by definition of }F_{{{\varPhi}}}\text{ and }n)\qquad \end{array} $$
(37)
$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(m) &\leq & d(s, m) + {{\varPhi}}(\mathbf{h}(m)) {\kern87.5pt}\text{(due to (30))} \end{array} $$
(38)
$$ \begin{array}{@{}rcl@{}} g(m) + {{\varPhi}}(\mathbf{h}(m)) &\leq & d(s, m) + {{\varPhi}}(\mathbf{h}(m)) {\kern56pt} \text{(by definition of }F_{{{\varPhi}}}) \end{array} $$
(39)
$$ \begin{array}{@{}rcl@{}} g(m) &\leq & d(s, m) \end{array} $$
(40)

By definition of d, we know that d(s,m) ≤ g(m). Therefore, g(m) = d(s,m), as required. □

Proof

First, we assume that Φ is admissible and show that for any OMSPP instance and for any tuple of admissible heuristics h, kA\(^{*}_{{{\varPhi }}}\) is admissible. Assume that kA\(^{*}_{{{\varPhi }}}\) chooses to expand a goal ti ∈{t1,…tk}. Due to Lemma 1, there exists n ∈Open such that g(n) + d(n,ti) = d(s,ti).

$$ \begin{array}{@{}rcl@{}} h_{i}(n) & \leq& d(n,t_{i}) {\kern106pt}(h_{i}\text{ is admissible)} \end{array} $$
(41)
$$ \begin{array}{@{}rcl@{}} {{\varPhi}}(\mathbf{h}(n)) \leq \min_{j} h_{j}(n) & \leq& d(n, t_{i}) {\kern106.5pt}({{\varPhi}}\text{ is admissible)} \end{array} $$
(42)
$$ \begin{array}{@{}rcl@{}} g(n) + {{\varPhi}}(\mathbf{h}(n)) & \leq& g(n) + d(n, t_{i}) = d(s, t_{i}) {\kern31pt}\text{(by definition of }n) \end{array} $$
(43)
$$ \begin{array}{@{}rcl@{}} F_{{{\varPhi}}}(t_{i}) \leq F_{{{\varPhi}}}(n) & \leq& d(s, t_{i}) {\kern80pt}(t_{i}\text{ is expanded before }n)\qquad \end{array} $$
(44)
$$ \begin{array}{@{}rcl@{}} g(t_{i}) + {{\varPhi}}(\mathbf{h}(t_{i})) & \leq& d(s, t_{i}) {\kern99.25pt}\text{(by definition of }F) \end{array} $$
(45)
$$ \begin{array}{@{}rcl@{}} g(t_{i}) & \leq& d(s, t_{i}) {\kern99pt}({{\varPhi}}\text{ is non-negative)} \end{array} $$
(46)

By definition of d, we know that d(s,ti) ≤ g(ti). Therefore, g(ti) = d(s,ti), as required.

Second, we assume that Φ is not admissible, and show that there exists an OMSPP instance and a tuple of admissible heuristics such that kA\(^{*}_{{{\varPhi }}}\) is not admissible. This part relies again on Lemma 2. To do it, we prove that there exists values for u, ui, v, and δ such that: (1) the conditions in Lemma 2 are satisfied, (2) the graph described in Lemma 2 has non-negative edges, and (3) the heuristics in the resulting graph are still admissible.

Step #1. We define the values of u, ui, v, and δ as follows. Let u = 0 and \(i = \arg \!{\min \limits } \mathbf {v}\). δ is defined to be a value between Φ(v) and \({\min \limits } \mathbf {v} = v_{i}\), i.e., \({{\varPhi }}(\mathbf {v}) > \delta > {\min \limits } \mathbf {v}\).Step #2.δ > 0 since \(\delta > {\min \limits } \mathbf {v}\), and all vectors are non-negative. Following, 𝜖 > 0 by definition and Φ(v) > δ 0.

Step #3. To conclude the proof, it remains to observe that the heuristics involved are admissible. This is indeed the case because we have \(h_{t_{i}}(A) \leq {\min \limits } \mathbf {v} \leq \delta = d(A, B)\) and therefore \(h_{t_{i}}(A) \leq d(A, B)\). □

Proof

This proof follows the same format as the proofs of Theorems 1 and 3. We rely on Lemma 2, showing that if there exists hi that is not admissible and Φ is not always zero then there exists values for u, ui, v, and δ such that: (1) the conditions in Lemma 2 are satisfied, and (2) the graph described in Lemma 2 has non-negative edges.

Step #1. We define the values of u, ui, v, and δ as follows. Since Φ is not the constant function 0, there exists a vector v, such that Φ(v) > 0, Let u = 0 and δ be a value between Φ(v) and 0, i.e., Φ(v) > δ > 0.

Step #2. It trivially holds that Φ(v), δ, and 𝜖 are all non-zero. □

Proof

First, we prove that kA\(^{*}_{\min \limits }\) does not expand any surplus node. Let n be a node expanded by kA\(^{*}_{\min \limits }\) in some OMSPP instance. Let ti be such that \(h_{t_{i}}(n) = {\min \limits } h_{t_{i}}(n)\). Applying Lemma 1 to ti, we obtain ni ∈Open such that g(ni) + d(ni,ti) = d(s,ti). For any node p on the path from s to n, we have the following derivation.

$$ \begin{array}{@{}rcl@{}} h_{t_{i}}(p) & \leq& d(p, n) + h_{t_{i}}(n) {\kern88.5pt} (h_{t_{i}} \text{ is consistent)} \end{array} $$
(47)
$$ \begin{array}{@{}rcl@{}} h_{t_{i}}(p) & \leq& d(p, n) + {{\varPhi}}(\mathbf{h}(n)) {\kern61pt}\text{(from the choice of }t_{i}) \end{array} $$
(48)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& g(p) + d(p, n) + {{\varPhi}}(\mathbf{h}(n)) \quad \end{array} $$
(49)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& g(n) + {{\varPhi}}(\mathbf{h}(n)) {\kern83pt}\text{(by definition of }p) \end{array} $$
(50)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& F(n) {\kern124pt}\text{(by definition of }F) \end{array} $$
(51)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& F(n_{i}) = g(n_{i}) + {{\varPhi}}(\mathbf{h}(n_{i})) {\kern55pt}(n\text{ is expanded)} \end{array} $$
(52)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& g(n_{i}) + h_{i}(n_{i}) {\kern87pt}\text{(by definition of }{{\varPhi}}) \end{array} $$
(53)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& g(n_{i}) + d(n_{i}, t_{i}) {\kern86pt}(h_{t_{i}}\text{ is admissible)} \end{array} $$
(54)
$$ \begin{array}{@{}rcl@{}} g(p) + h_{t_{i}}(p) & \leq& d(s, t_{i}) {\kern86pt}(n_{i}\text{ is chosen via Lemma~1)} \end{array} $$
(55)

Thus, n is not surplus w.r.t πi. Therefore, n is not surplus for the OMSPP.

Second, we prove that if there exists v such that \({{\varPhi }}(\mathbf {v}) < {\min \limits } \mathbf {v}\), then there is an OMSPP instance, a tuple of consistent heuristics, and a surplus node A such that kA\(^{*}_{{{\varPhi }}}\) explores A. Let v such that \({{\varPhi }}(\mathbf {v}) < {\min \limits } \mathbf {v}\). Assume without loss of generality that \(v_{1} = {\min \limits } \mathbf {v}\) and \(v_{2} = \max \limits \mathbf {v}\). Let 𝜖 = Φ(v) − v1 < 0. Consider the OMSPP on Fig. 10. Since 𝜖 < 0, we have F(A) < F(t2) < F(t1). Therefore, kA\(^{*}_{{{\varPhi }}}\) expands A. On the other hand, f1(A) > f1(t1) and f2(A) > f2(t2), so A is a surplus node. Thus kA\(^{*}_{{{\varPhi }}}\) expands a surplus node.

Fig. 10
figure 10

Generic example with consistent heuristics. We assume that v1v2 and 𝜖 is defined as 𝜖 = Φ(v) − v1. The vector of heuristic values is displayed next to each node

Third, if \({{\varPhi }} = \max \limits \) then we provide an OMSPP instance, a tuple of consistent heuristics, and a surplus node A such that kA\(^{*}_{{{\varPhi }}}\) explores A. Consider the instance in Fig. 11. □

Fig. 11
figure 11

Max example with consistent heuristics where kA\(^{*}_{\max \limits }\) expands a surplus node

Proof

First, we assume that Φ is admissible and show that for any OMSPP instance and for any tuple of admissible heuristics h, kA\(^{*}_{{{\varPhi }}}\) expands all surely expanded nodes. Let n be a node that is surely expanded w.r.t. some goal ti. That is, n is reachable from s by a path of nodes with fi values lower than d(s,ti) and fi(n) < d(s,ti). Φ is admissible so for any node m along this path we have \({{\varPhi }}(\mathbf {h}(m)) \leq {\min \limits } \mathbf {h}(m) \leq h_{t_{i}}(m)\). Thus, the F values of the nodes along this path must also be lower than d(s,ti). As all edges in the underlying graph have non-negative cost, \(h_{t_{i}}(t_{i}) = 0\) and therefore F(ti) = d(s,ti). Hence, the minimal F value in Open is d(s,ti) when ti is expanded. Thus, all the nodes along the path to n and n itself must have already been expanded, as all of them have F values smaller than d(s,ti) = F(ti).

Second, we assume that Φ is not admissible, and show that there exists an OMSPP instance, a tuple of consistent heuristics, and a surely expanded node A such that kA\(^{*}_{{{\varPhi }}}\) does not expand A. Assume that Φ is not admissible, then \(\exists \mathbf {v}, {{\varPhi }}(\mathbf {v}) > \min \limits (\mathbf {v})\). Assume without loss of generality that \(v_{1} = {\min \limits } \mathbf {v}\) and \(v_{2} = \max \limits \mathbf {v}\). Let 𝜖 = Φ(v) − v1. Consider the OMSPP on Fig. 10. On the one hand, since 𝜖 > O, the F-value for A is larger than the F value for t1 and t2. Thus, A is not expanded by kA\(^{*}_{{{\varPhi }}}\). On the other hand, A is a surely expanded node in the SPP instance with goal t1, so it is a surely expanded node in the OMSPP instance. Therefore kA\(^{*}_{{{\varPhi }}}\) does not expand all surely expanded nodes. □

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Stern, R., Goldenberg, M., Saffidine, A. et al. Heuristic search for one-to-many shortest path queries. Ann Math Artif Intell 89, 1175–1214 (2021). https://doi.org/10.1007/s10472-021-09775-x

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10472-021-09775-x

Keywords

Mathematics Subject Classification (2010)

Navigation