TRS: A New Structure for Shortest Path Query

  • Qi WangEmail author
  • Junting Jin
  • Hong Chen
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 387)


Shortest Path Query is being applied to more and more professional scopes, such as social networks and bioinformatics. But the exponential growth of data makes it much more challenging since traditional BFS-based algorithms are hard to scale due to the requirement of huge memory.

Different from the traditional algorithm such as Dijkstra algorithm, our method is based on Depth-First-Search, which first constructs the DFS tree with interval-based encoding, and then isolates non-tree edges to generate the TRS structure for the graph. Shortest path queries between arbitrary nodes are performed upon this structure. The final result could be a detail path with exact path cost. This algorithm is quite easy to scale to large graphs, since the TRS algorithm automatically divide the graph into a set of connected components, each of which has a single TRS structure. Our experiments has proved that the algorithm fits large sparse graph quite well in real world.


Information network Large graph TRS Shortest path 


  1. 1.
    Wei, F.: TEDI: Efficient shortest path query answering on graphs. In: SIGMOD’10 (2010)Google Scholar
  2. 2.
    Xiao, Y., Wu, W., Pei, J., Wang, W., He, Z.: Efficiently indexing shortest paths by exploiting symmetry in graphs. In: EDBT’09 (2009)Google Scholar
  3. 3.
    Goldberg, A.V., Kaplan, H., Werneck, R.: Reach for A*: efficient point-to-point shortest path algorithms. In: Workshop on Algorithm Engineering and Experiments, pp. 129–143 (2006)Google Scholar
  4. 4.
    Arge, L., Meyer, U., Toma, L.: External memory algorithms for diameter and all-pairs shortest-paths on sparse graphs. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 146–157. Springer, Heidelberg (2004)Google Scholar
  5. 5.
    Gutman, R.: Reach-based routing: a new approach to shortest path algorithms optimized for road networks. In: Proceedings of the 6th International Workshop on Algorithm Engineering and Experiments, pp. 100–111 (2004)Google Scholar
  6. 6.
    Wagner, D., Willhalm, T.: Geometric speed-up techniques for finding shortest paths in large sparse graphs. Konstanzer Schriften in Mathematik und Informatik, pp. 1430–3558 (2003)Google Scholar
  7. 7.
    Chan, E.P.F., Zhang, N.: Finding shortest paths in large network systems. Department of Computer Science, University of Waterloo (2001)Google Scholar
  8. 8.
    Dijkstra, E.W.: A note on two problems in connexion with graphs. Numerische Mathematik (1959)Google Scholar
  9. 9.
    Cormen, T.H., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  10. 10.
    Agrawal, R., Jagadish, H.V.: Algorithms for searching massive graphs. IEEE Trans. Knowl. Data Eng. 6, 225–238 (1994)CrossRefGoogle Scholar
  11. 11.
    Eietz, P., Sleator, D.: Two algorithms for maintaining order in a list. In: Proceeding of the19th Annual ACM Symposium on Theory of Computing (STOC), pp. 365–372 (1987)Google Scholar
  12. 12.
    TRßl, S., Leser, U.: Fast and practical indexing and querying of very large graphs. In: SIGMOD’07 (2007)Google Scholar
  13. 13.
    Wang, H., He, H., Yang, J., Yu, P.S., Yu, J. X.: Dual labeling: answering graph reachability queries in constant time. In: Proceedings of the 22nd International Conference on Data Engineering (ICDE), p. 75 (2006)Google Scholar
  14. 14.
    Lauther, U.: An extremely fast: exact algorithm for finding shortest paths in static networks with geographical background. IfGlprints 22, Institut fuer Geoinformatik, Universitaet Muenster (ISBN 3-936616-22-1), pp. 219–230 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  1. 1.Renmin University of ChinaBeijingChina

Personalised recommendations