Counting Temporal Paths

Authors Jessica Enright, Kitty Meeks , Hendrik Molter

Thumbnail PDF


  • Filesize: 0.8 MB
  • 19 pages

Document Identifiers

Author Details

Jessica Enright
  • School of Computing Science, University of Glasgow, UK
Kitty Meeks
  • School of Computing Science, University of Glasgow, UK
Hendrik Molter
  • Department of Computer Science and Department of Industrial Engineering and Management, Ben-Gurion University of the Negev, Beer-Sheva, Israel


This work was initiated at the Dagstuhl Seminar "Temporal Graphs: Structure, Algorithms, Applications" (Dagstuhl Seminar Nr. 21171).

Cite AsGet BibTex

Jessica Enright, Kitty Meeks, and Hendrik Molter. Counting Temporal Paths. In 40th International Symposium on Theoretical Aspects of Computer Science (STACS 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 254, pp. 30:1-30:19, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)


The betweenness centrality of a vertex v is an important centrality measure that quantifies how many optimal paths between pairs of other vertices visit v. Computing betweenness centrality in a temporal graph, in which the edge set may change over discrete timesteps, requires us to count temporal paths that are optimal with respect to some criterion. For several natural notions of optimality, including foremost or fastest temporal paths, this counting problem reduces to #TEMPORAL PATH, the problem of counting all temporal paths between a fixed pair of vertices; like the problems of counting foremost and fastest temporal paths, #TEMPORAL PATH is #P-hard in general. Motivated by the many applications of this intractable problem, we initiate a systematic study of the parameterised and approximation complexity of #TEMPORAL PATH. We show that the problem presumably does not admit an FPT-algorithm for the feedback vertex number of the static underlying graph, and that it is hard to approximate in general. On the positive side, we prove several exact and approximate FPT-algorithms for special cases.

Subject Classification

ACM Subject Classification
  • Theory of computation → Graph algorithms analysis
  • Theory of computation → Parameterized complexity and exact algorithms
  • Theory of computation → Approximation algorithms analysis
  • Mathematics of computing → Discrete mathematics
  • Temporal Paths
  • Temporal Graphs
  • Parameterised Counting
  • Approximate Counting
  • #P-hard Counting Problems
  • Temporal Betweenness Centrality


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Noga Alon, Phuong Dao, Iman Hajirasouliha, Fereydoun Hormozdiari, and Süleyman Cenk Sahinalp. Biomolecular network motif counting and discovery by color coding. In Proceedings 16th International Conference on Intelligent Systems for Molecular Biology (ISMB '08), pages 241-249, 2008. Google Scholar
  2. Ahmad Alsayed and Desmond J Higham. Betweenness in time dependent networks. Chaos, Solitons & Fractals, 72:35-48, 2015. Google Scholar
  3. Vikraman Arvind and Venkatesh Raman. Approximation algorithms for some parameterized counting problems. In Prosenjit Bose and Pat Morin, editors, Proceedings of the 13th International Symposium on Algorithms and Computation (ISAAC '02), volume 2518 of Lecture Notes in Computer Science, pages 453-464. Springer, 2002. Google Scholar
  4. Matthias Bentert, Alexander Dittmann, Leon Kellerhals, André Nichterlein, and Rolf Niedermeier. An adaptive version of Brandes' algorithm for betweenness centrality. Journal of Graph Algorithms and Applications, 24(3):483-522, 2020. Google Scholar
  5. Matthias Bentert, Anne-Sophie Himmel, André Nichterlein, and Rolf Niedermeier. Efficient computation of optimal temporal walks under waiting-time constraints. Applied Network Science, 5(1):73, 2020. Google Scholar
  6. Matthias Bentert, René van Bevern, and Rolf Niedermeier. Inductive k-independent graphs and c-colorable subgraphs in scheduling: a review. Journal of Scheduling, 22(1):3-20, 2019. Google Scholar
  7. René Bevernvan Bevern, Matthias Mnich, Rolf Niedermeier, and Mathias Weller. Interval scheduling and colorful independent sets. Journal of Scheduling, 18(5):449-469, 2015. Google Scholar
  8. Andreas Björklund, Holger Dell, and Thore Husfeldt. The parity of set systems under random restrictions with applications to exponential time problems. In Proceedings of the 42nd International Colloquium on Automata, Languages, and Programming (ICALP '15), pages 231-242. Springer, 2015. Google Scholar
  9. Ulrik Brandes. A faster algorithm for betweenness centrality. Journal of Mathematical Sociology, 25(2):163-177, 2001. Google Scholar
  10. Binh-Minh Bui-Xuan, Afonso Ferreira, and Aubin Jarry. Computing shortest, fastest, and foremost journeys in dynamic networks. International Journal of Foundations of Computer Science, 14(02):267-285, 2003. Google Scholar
  11. Benjamin Merlin Bumpus and Kitty Meeks. Edge exploration of temporal graphs. In Proceedings of the 32nd International Workshop on Combinatorial Algorithms (IWOCA '21), volume 12757 of Lecture Notes in Computer Science, pages 107-121. Springer, 2021. Google Scholar
  12. S. Buß, H. Molter, R. Niedermeier, and M. Rymar. Algorithmic aspects of temporal betweenness. In Proceedings of the 26th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD '20), pages 2084-2092, 2020. URL:
  13. Arnaud Casteigts, Anne-Sophie Himmel, Hendrik Molter, and Philipp Zschoche. Finding temporal paths under waiting time constraints. Algorithmica, 83(9):2754-2802, 2021. Google Scholar
  14. B. Courcelle, J.A. Makowsky, and U. Rotics. On the fixed parameter complexity of graph enumeration problems definable in monadic second-order logic. Discrete Applied Mathematics, 108(1):23-52, 2001. Google Scholar
  15. Bruno Courcelle and Joost Engelfriet. Graph Structure and Monadic Second-Order Logic: A Language-Theoretic Approach. Encyclopedia of Mathematics and its Applications. Cambridge University Press, 2012. Google Scholar
  16. Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. Google Scholar
  17. Holger Dell, John Lapinskas, and Kitty Meeks. Approximately counting and sampling small witnesses using a colourful decision oracle. In Proceedings of the 31st Annual ACM-SIAM Symposium on Discrete Algorithms (SODA '20), pages 2201-2180. Society for Industrial and Applied Mathematics, 2020. Google Scholar
  18. Rodney G Downey and Michael R Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. Google Scholar
  19. Jessica A. Enright, Kitty Meeks, and Hendrik Molter. Counting temporal paths. CoRR, abs/2202.12055, 2022. URL:
  20. David Eppstein. Parallel recognition of series-parallel graphs. Information and Computation, 98(1):41-55, 1992. Google Scholar
  21. Jörg Flum and Martin Grohe. The parameterized complexity of counting problems. SIAM Journal on Computing, 33(4):892-922, 2004. Google Scholar
  22. Jörg Flum and Martin Grohe. Parameterized Complexity Theory, volume XIV of Texts in Theoretical Computer Science. An EATCS Series. Springer, 2006. Google Scholar
  23. Linton C. Freeman. A set of measures of centrality based on betweenness. Sociometry, 40(1):35-41, 1977. Google Scholar
  24. Eugen Füchsle, Hendrik Molter, Rolf Niedermeier, and Malte Renken. Delay-robust routes in temporal graphs. In Proceedings of the 39th International Symposium on Theoretical Aspects of Computer Science (STACS '22), volume 219 of LIPIcs, pages 30:1-30:15, 2022. Google Scholar
  25. Fǎnicǎ Gavril. The intersection graphs of subtrees in trees are exactly the chordal graphs. Journal of Combinatorial Theory, Series B, 16(1):47-56, 1974. Google Scholar
  26. Martin Grohe and Nicole Schweikardt. First-order query evaluation with cardinality conditions. In Proceedings of the 37th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems (SIGMOD/PODS '18), pages 253-266. ACM, 2018. Google Scholar
  27. Habiba, Chayant Tantipathananandh, and Tanya Y Berger-Wolf. Betweenness centrality measure in dynamic networks. Technical Report 19, Department of Computer Science, University of Illinois at Chicago, Chicago, 2007. DIMACS Technical Report. Google Scholar
  28. Petter Holme. Modern temporal network theory: a colloquium. The European Physical Journal B, 88(9):234:1-234:30, 2015. Google Scholar
  29. Petter Holme and Jari Saramäki. Temporal Network Theory. Springer, 2019. Google Scholar
  30. Mark R. Jerrum, Leslie G. Valiant, and Vijay V. Vazirani. Random generation of combinatorial structures from a uniform distribution. Theoretical Computer Science, 43:169-188, 1986. Google Scholar
  31. Minghui Jiang. On the parameterized complexity of some optimization problems related to multiple-interval graphs. Theoretical Computer Science, 411(49):4253-4262, 2010. Google Scholar
  32. David Kempe, Jon Kleinberg, and Amit Kumar. Connectivity and inference problems for temporal networks. Journal of Computer and System Sciences, 64(4):820-842, 2002. Google Scholar
  33. Hyoungshick Kim and Ross Anderson. Temporal node centrality in complex networks. Physical Review E, 85(2):026107, 2012. Google Scholar
  34. Matthieu Latapy, Tiphaine Viard, and Clémence Magnien. Stream graphs and link streams for the modeling of interactions over time. Social Network Analysis and Mining, 8(1):61:1-61:29, 2018. Google Scholar
  35. Othon Michail. An introduction to temporal graphs: An algorithmic perspective. Internet Mathematics, 12(4):239-280, 2016. Google Scholar
  36. Petra Mutzel and Lutz Oettershagen. On the enumeration of bicriteria temporal paths. In Proceedings of the 15th Annual Conference on Theory and Applications of Models of Computation (TAMC '19), volume 11436 of Lecture Notes in Computer Science, pages 518-535. Springer, 2019. Google Scholar
  37. Jaroslav Nesetril and Patrice Ossona de Mendez. Sparsity - Graphs, Structures, and Algorithms, volume 28 of Algorithms and Combinatorics. Springer, 2012. Google Scholar
  38. Vincenzo Nicosia, John Tang, Cecilia Mascolo, Mirco Musolesi, Giovanni Russo, and Vito Latora. Graph metrics for temporal networks. In Temporal Networks, pages 15-40. Springer, 2013. Google Scholar
  39. Amir Afrasiabi Rad, Paola Flocchini, and Joanne Gaudet. Computation and analysis of temporal betweenness in a knowledge mobilization network. Computational Social Networks, 4(1):5, 2017. Google Scholar
  40. Maciej Rymar, Hendrik Molter, André Nichterlein, and Rolf Niedermeier. Towards classifying the polynomial-time solvability of temporal betweenness centrality. In Proceedings of the 47th International Workshop on Graph-Theoretic Concepts in Computer Science (WG '21), volume 12911 of Lecture Notes in Computer Science, pages 219-231. Springer, 2021. Google Scholar
  41. Frédéric Simard, Clémence Magnien, and Matthieu Latapy. Computing betweenness centrality in link streams. CoRR, abs/2102.06543, 2021. URL:
  42. Alistair Sinclair. Randomised algorithms for counting and generating combinatorial structures. PhD thesis, University of Edinburgh, 1988. Google Scholar
  43. John Tang, Ilias Leontiadis, Salvatore Scellato, Vincenzo Nicosia, Cecilia Mascolo, Mirco Musolesi, and Vito Latora. Applications of temporal graph metrics to real-world networks. In Temporal Networks, pages 135-159. Springer, 2013. Google Scholar
  44. John Tang, Mirco Musolesi, Cecilia Mascolo, Vito Latora, and Vincenzo Nicosia. Analysing information flows and key mediators through temporal centrality metrics. In Proceedings of the 3rd ACM Workshop on Social Network Systems, pages 3:1-3:6. ACM, 2010. Google Scholar
  45. Ioanna Tsalouchidou, Ricardo Baeza-Yates, Francesco Bonchi, Kewen Liao, and Timos Sellis. Temporal betweenness centrality in dynamic graphs. International Journal of Data Science and Analytics, 9(3):257-272, 2020. Google Scholar
  46. Leslie G Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(3):410-421, 1979. Google Scholar
  47. Huanhuan Wu, James Cheng, Yiping Ke, Silu Huang, Yuzhen Huang, and Hejun Wu. Efficient algorithms for temporal path computation. IEEE Transactions on Knowledge and Data Engineering, 28(11):2927-2942, 2016. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail