Discrete Optimization
A new bidirectional search algorithm with shortened postprocessing

https://doi.org/10.1016/j.ejor.2008.09.032Get rights and content

Abstract

For finding a shortest path in a network bidirectional A is a widely known algorithm. This algorithm distinguishes between the main phase and the postprocessing phase. The version of bidirectional A that is considered the most appropriate in literature hitherto, uses a so-called balanced heuristic estimate. This type of heuristic is chosen, as it accounts for a short postprocessing phase. In this paper, we do not restrict ourselves any longer to balanced heuristics. First, we introduce an algorithm containing a new method for the postprocessing phase, reducing this phase considerably for non-balanced heuristics. For a balanced heuristic the new algorithm is nearly equivalent to the existing versions of bidirectional A. An obvious choice for a non-balanced heuristic turns out to be superior in terms of storage space and computation time. Second, we show that the main phase on its own, when using this non-balanced heuristic estimate, is a useful algorithm, which provides us quickly with a feasible approximation.

Introduction

In the past few years large digital road maps have become available, to be used in car navigators. This has given rise to a revival of shortest path algorithms. Digital road maps contain millions of nodes and edges, whereas previous experiments used small artificial networks. We consider the point-to-point instance of the shortest path problem. The best-known algorithms in Operations Research are Bellman-Ford [1], [5] and Dijkstra [3]. In Artificial Intelligence the A algorithm [8], which assumes the availability of a heuristic estimate, is widely known. Both Dijkstra’s algorithm and A start from the origin point and continue their search process until the destination is reached. A new approach, bidirectional search, was introduced by Nicholson [16], who proposed two simultaneous search processes starting from either endpoint. Pohl [19] applied this idea to Dijkstra and A. Several variants of Pohl’s approach were discussed in [2], [10], [13]. The two search spaces meet somewhere in the middle between the endpoints. Before a meeting point is obtained, we are in the so-called main phase. After the processes have met, the remaining steps of bidirectional search are called the postprocessing phase or briefly the post-phase.

For the A algorithm one needs to define some heuristic function estimating the remaining distance from a node to the target. Since there are two processes, two estimates h and h˜ are used, each belonging to one process. The heuristic is called balanced if h(u)+h˜(u) equals a constant value for any node u.

The algorithm that is considered the most efficient of all shortest path solutions hitherto is bidirectional A with a balanced heuristic, cf. [7], [9], [11]. The efficiency of this algorithm is due to a short post-phase. We found that this benefit of a balanced heuristic can be carried over to arbitrary heuristics. A new version of A including new statements for the post-phase is proposed. As a result of the new statements, the post-phase is shortened considerably. Now, for any heuristic a relatively short post-phase is enabled. Using an obvious choice for the heuristic estimate, the new version outperforms the versions with the balanced heuristics. An experimental comparison on a digital road map of the Netherlands is presented.

Moreover, we discovered that the post-phase needs not to be executed at all. Applying the obvious estimate, the main phase on it own provides a tight approximation with a deviation of less 0.2%. This result is also demonstrated by experiments on a real road network.

The outline of this paper is as follows. In Section 2.1 we recall the classical A algorithm along with some properties relevant to bidirectional versions discussed later on. In Section 2.2 the old bidirectional version is treated and a new proof is given for the fact that the post-phase is short for balanced heuristics. Section 3 presents the new bidirectional algorithm. The properties of the search space, also implying the correctness of the algorithm, are studied in Section 4. Section 5 elaborates on the different instances to be used in Section 6, which section presents experimental results comparing old and new methods. In Section 7 we show that the main phase on its own is a feasible method of great practical use. Concluding remarks are given in Section 8.

Section snippets

A and bidirectional A

In this section, we review the A algorithm and its bidirectional version along with some of their properties, which are relevant in view of the new algorithm in Section 3.

Preliminaries. Let a directed graph or network G be given by a pair (V,E) with V the set of nodes and E the set of edges. A path is a sequence of nodes without duplicate elements, such that two consecutive nodes are connected by an edge. We assume that two particular nodes are given, an origin node and a destination node. The

A new bidirectional A algorithm

In order to run the bidirectional implementation of Algorithm 1 with a short post-phase we need a balanced heuristic, as we have shown in Section 2.2. In this section we show that it is possible to run bidirectional A including a short post-phase without being restricted to balanced heuristics. To that end, Algorithm 2 is proposed.

The new algorithm is developed as follows. Let m be any meeting point. The value L=g(m)+g˜(m) equals the length of a path from s to t. Suppose that a node u0S is

The search space

In this section we study the properties of the search space of Algorithm 2. By the search space we mean the set of visited nodes during execution.

Algorithm 2. New bidirectional A algorithm
  • 1:

    for all vV do

  • 2:

     g(v)=;

  • 3:

    end for

  • 4:

    S=;

  • 5:

    L=;

  • 6:

    g(s)=0;// s becomes labeled

  • 7:

    boolean cand-found=true;// stands for ‘candidate found’

  • 8:

    while cand-found==true do

  • 9:

     C={v|v is labeled and g(v)+h(v)-h(t)<L};// C is the set of candidates

  • 10:

     cand-found=false;

  • 11:

    while C and cand-found==false do

  • 12:

     u0=argmin{g(v)+h(v)|vC};

  • 13:

     if u0S and g(u0)+F-h

Comparing old and new

In Section 6 we compare experimentally our new algorithm with the old one. This section is an introduction to the experiments.

In Section 3 we have pointed out the relationship between Algorithm 2 and the traditional algorithm discussed in Section 2.2. From Algorithm 2 the traditional algorithm can be recovered. This is done in the following way. Algorithm 2 remains correct if a new value for L is set, only when a new doubly scanned node is obtained. So we remove line 27 and insert another

Experimental results

Multiple experiments with Algorithm 2 were conducted on the road network of the Netherlands and Belgium, including the border regions of Germany. This network is part of the Multinet version 2007 provided by TeleAtlas. The network is a directed graph consisting of 3,097,648 nodes and 6,559,643 directed edges. When one can drive in a road into two directions, this road corresponds to two edges. So a one-way road corresponds to one edge. In all experiments the euclidean distance acts as heuristic

The main phase on its own

The experiments published in the past ten years were conducted with a balanced heuristic. As we said earlier, this heuristic was chosen because of its beneficial post-phase. Given the fact that, for balanced heuristics, the post-phase is very short compared to the main phase, it does not make sense to skip the post-phase. However, for the symmetric heuristic the situation is different. Although the new algorithm has a shortened post-phase, this phase still accounts for a relatively great

Concluding remarks

As we mentioned in the introduction of this paper, the algorithm that is considered the most efficient algorithm hitherto is bidirectional A with a balanced heuristic. In this paper we have compared this ‘old’ method with a new method consisting of a new algorithm with a non-balanced straightforward heuristic. Section 6 shows that the new method clearly surpasses the old one in running time. In space the new method is slightly better.

While conducting our comparing experiments, we noticed that

Acknowledgement

The authors would like to thank the anonymous referees for their helpful comments.

References (22)

  • T.K. Ikeda, M. Hsu, H. Inai, S. Nishimura, H. Shimoura, T. Hashimoto, K. Tenmoku, K. Mitoh, A fast algorithm for...
  • Cited by (9)

    • MM: A bidirectional search algorithm that is guaranteed to meet in the middle

      2017, Artificial Intelligence
      Citation Excerpt :

      Finally, a more thorough experimental section (including more domains) is provided that supports the theoretical claims. Other selection policies are oblivious to the size and contents of the open lists and have simple switching policies such as strict alternation between the two directions [1,51,58] or switching to maintain a fixed ratio between the number of nodes expanded in the two directions [64]. An extreme policy of this form is perimeter search [13,32,41,44], which begins by doing a fixed amount of search in the backward direction and then does all the remaining search in the forward direction.

    • Note on "a new bidirectional algorithm for shortest paths"

      2010, European Journal of Operational Research
    • A brief history and recent achievements in bidirectional search

      2018, 32nd AAAI Conference on Artificial Intelligence, AAAI 2018
    • Research on path optimization based on improved adaptive genetic algorithm

      2015, Proceedings - 2015 7th International Conference on Intelligent Human-Machine Systems and Cybernetics, IHMSC 2015
    • Cloned vehicle detection approach based on the k shortest paths and license plate recognition algorithms

      2014, 21st World Congress on Intelligent Transport Systems, ITSWC 2014: Reinventing Transportation in Our Connected World
    View all citing articles on Scopus

    This research is part of a Ph.D. project of the second author at Delft University of Technology, department of Electrical Engineering, Mathematics and Computer Science.

    View full text