Top-k Shortest Paths in Directed Labeled Multigraphs

  • Sven HertlingEmail author
  • Markus Schröder
  • Christian Jilek
  • Andreas Dengel
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 641)


A top-k shortest path algorithm finds the k shortest paths of a given graph ordered by length. Interpreting graphs as RDF may lead to additional constraints, such as special loop restrictions or path patterns. Thus, traditional algorithms such as the ones by Dijkstra, Yen or Eppstein cannot be applied without further ado. We therefore implemented a solution method based on Eppstein’s algorithm which is thoroughly discussed in this paper. Using this method we were able to solve all tasks of the ESWC 2016 Top-k Shortest Path Challenge while achieving only moderate overhead compared to the original version. However, we also identified some potential for improvements. Additionally, a concept for embedding our algorithm into a SPARQL endpoint is provided.


Top-k shortest paths Loop restrictions Eppstein’s algorithm 



This work was partially funded by the BMBF project Multimedia Opinion Mining (MOM: 01WI15002).


  1. 1.
    Aljazzar, H., Leue, S.: K*: a heuristic search algorithm for finding the k shortest paths. Artif. Intell. 175(18), 2129–2154 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Eppstein, D.: Finding the k shortest paths. SIAM J. Comput. 28(2), 652–673 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Gubichev, A., Neumann, T.: Path query processing on very large RDF graphs. In: WebDB. Citeseer (2011)Google Scholar
  4. 4.
    Guo, Y., Pan, Z., Heflin, J.: LUBM: a benchmark for owl knowledge base systems. Web Semant. Sci. Serv. Agents World Wide Web 3(2) (2005)Google Scholar
  5. 5.
    Jiménez, V.M., Marzal, A.: A lazy version of Eppstein’s K shortest paths algorithm. In: Jansen, K., Margraf, M., Mastrolli, M., Rolim, J.D.P. (eds.) WEA 2003. LNCS, vol. 2647, pp. 179–191. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  6. 6.
    Kostylev, E.V., Reutter, J.L., Romero, M., Vrgoč, D.: SPARQL with property paths. In: Arenas, M., et al. (eds.) ISWC 2015. LNCS, vol. 9366, pp. 3–18. Springer International Publishing, Switzerland (2015)CrossRefGoogle Scholar
  7. 7.
    Lehmann, J., Schüppel, J., Auer, S.: Discovering unknown connections-the dbpedia relationship finder. In: CSSW, vol. 113, pp. 99–110 (2007)Google Scholar
  8. 8.
    Losemann, K., Martens, W.: The complexity of evaluating path expressions in SPARQL. In: Proceedings of the 31st Symposium on Principles of Database Systems, pp. 101–112. ACM (2012)Google Scholar
  9. 9.
    Morsey, M., Lehmann, J., Auer, S., Ngonga Ngomo, A.-C.: DBpedia SPARQL benchmark – performance assessment with real queries on real data. In: Aroyo, L., Welty, C., Alani, H., Taylor, J., Bernstein, A., Kagal, L., Noy, N., Blomqvist, E. (eds.) ISWC 2011, Part I. LNCS, vol. 7031, pp. 454–469. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  10. 10.
    Morsey, M., Lehmann, J., Auer, S., Ngonga Ngomo, A.-C.: Usage-centric benchmarking of RDF triple stores. In: Proceedings of the 26th AAAI Conference on Artificial Intelligence (AAAI 2012) (2012)Google Scholar
  11. 11.
    Przyjaciel-Zablocki, M., Schätzle, A., Hornung, T., Lausen, G.: RDFPath: path query processing on large RDF graphs with MapReduce. In: García-Castro, R., Fensel, D., Antoniou, G. (eds.) ESWC 2011. LNCS, vol. 7117, pp. 50–64. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  12. 12.
    Yen, J.Y.: Finding the k shortest loopless paths in a network. Manag. Sci. 17(11), 712–716 (1971)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Sven Hertling
    • 1
    Email author
  • Markus Schröder
    • 1
  • Christian Jilek
    • 1
  • Andreas Dengel
    • 1
    • 2
  1. 1.Knowledge Management GroupGerman Research Center for Artificial Intelligence (DFKI) GmbHKaiserslauternGermany
  2. 2.Knowledge-Based Systems Group, Department of Computer ScienceUniversity of KaiserslauternKaiserslauternGermany

Personalised recommendations