Algorithms · Animation

Dijkstra vs bi-directional Dijkstra comparison on sample US Road Network

.. under construction ..

Here, we compare the progression of classical and bi-directional Dijkstra Algorithms as applied to simple 2D rectangular and hexagonal grids as well as more destructured US road network. The road network is intentionally sampled and reduced to a minimum spanning tree for easier visualization. The real connections between nodes can be different than what is shown here.

Note that for this particular set of points and starting and target nodes, the classical Dijkstra takes 493 steps, i.e. 493 nodes are processed in the graph. On the other hand, for the bi-directional Dijkstra it processed 285 nodes which is roughly ~58 percent less number of nodes.


  • Road Network nodes are obtained from:  DIMACS
  • Similar European road network is available here.
  • The visualization is done by the Python’s Basemap library

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s