Abstract 1 Introduction 2 Related work 3 Results 4 Open Problems References

Brief Announcement: Revisiting the Realizability of Periodic Temporal Graphs with Bounded Stretch

Julia Meusel ORCID Martin Luther University Halle-Wittenberg, Germany    Nils Morawietz ORCID LaBRI, Université de Bordeaux, Talence, France
Institute of Computer Science, Friedrich Schiller University Jena, Germany
   Matthias Müller-Hannemann ORCID Martin Luther University Halle-Wittenberg, Germany    Klaus Reinhardt ORCID Martin Luther University Halle-Wittenberg, Germany
Abstract

In this work, we revisit Stretched Periodic Temporal Graph Realization (STGR) which was recently introduced by Mertzios et al. [MFCS 2025]. Here, the input consists of an undirected graph G=(V,E), a period Δ, and a rational number α1, and the question is, whether there is a labeling λ:E[0,Δ1], such that the stretch is at most α in the Δ-periodic temporal graph (G,λ), that is, the temporal graph, where for each c and each edge e, e appears at time cΔ+i if and only if λ(e)=i. The stretch of (G,λ) is the maximum stretch between any vertex pair (u,v) in (G,λ), where the stretch of a vertex pair (u,v) is defined as the duration of a fastest temporal path from u to v in (G,λ) divided by the distance between these vertices in the underlying graph. We complete the complexity picture for STGR with respect to Δ by investigating the open case of Δ=2. It turns out that STGR is NP-hard for each Δ>1. Moreover, we also answer the open question by Mertzios et al. on whether there are graphs for which the smallest possible stretch is larger than Δ+12. We show not only that such graphs exist, but also that it remains NP-hard to decide whether the optimal stretch is at most Δ+12. Our hardness results for Δ=2 also imply hardness for Δ=2 for the Fastest Periodic Temporal Graph Realization problem that was introduced by Klobas et al. [TCS 2025]. Finally, we show the existence of classes of graphs with small and large stretch.

Keywords and phrases:
fastest temporal path, periodic temporal graphs, graph realization
Funding:
Nils Morawietz: Supported by the French ANR, project ANR-22-CE48-0001 (TEMPOGRAL).
Copyright and License:
[Uncaptioned image] © Julia Meusel, Nils Morawietz, Matthias Müller-Hannemann, and Klaus Reinhardt; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis
; Mathematics of computing Discrete mathematics
Editors:
George B. Mertzios and Andréa W. Richa

1 Introduction

Graph realization problems are a classic and well-researched area of graph theory [2, 8, 10, 12, 17, 18]. The objective is to determine if a graph exists that satisfies certain constraints. Among other restrictions, the following were considered: restrictions on connectivity [10, 18], degrees [2, 12, 16], distances between vertices [3, 17, 29] and eccentricities [21].

Recent research has also addressed such problems for temporal graphs. These are graphs with fixed vertices whose edges are only active at specific points in time, as indicated by the edge labels. The question here is whether the edges of a given graph can be assigned labels in such a way that the resulting temporal graph satisfies certain properties. In this setting, the following were examined, for example: Constraints on connectivity [1, 5, 9, 15, 22, 19], degree sequences [6] and reachability [4, 13, 11].

Periodic temporal graphs are an important subclass of temporal graphs. In these graphs, each edge becomes active once per period and then becomes active again once the period has elapsed. Paths can only traverse active edges, and traversing one edge requires one unit of time. Unlike the non-strict setting, where multiple edges can be traversed in one time step, we only consider the strict setting, in which the times edges are traversed must be strictly increasing. Such models are simplified abstractions of transportation networks, where vertices correspond to destinations and edges connect them periodically. Designing these networks can be seen as follows. We are given a static graph G=(V,E). In public transport, for example, the vertex set V corresponds to stations (or stops) and the edge set E describes which pairs of stations are directly connected based on the available infrastructure. The design task is to decide when each edge should be available, i.e., to assign an integral label from the set [0,Δ1] to each edge defining its periodic activity. The challenge is to find a labeling that achieves certain objectives regarding travel time between pairs of vertices in the resulting periodic temporal graph. The duration of a temporal path P is the travel time needed to traverse it. The fastest paths between vertices are those with the shortest duration. We denote the duration of a fastest temporal path from u to v in a given temporal graph by dur(u,v). The following problem has been considered by Klobas et al. [19] and Erlebach et al. [14]:

Fastest Periodic Temporal Graph Realization

Input: An undirected, connected graph G=(V,E) with V={v1,v2,,vn}, a positive integer Δ and an n×n distance matrix D of non-negative integers.
Question: Does there exist a Δ-periodic labeling λ:E{0,1,,Δ1} such that, for every two vertices vi,vj, the duration of a fastest temporal path from vi to vj in the Δ-periodic temporal graph (G,λ,Δ) is exactly Di,j, that is, dur(vi,vj)=Di,j?

Asking for a such a temporal graph realization is often too restrictive. This motivates to relax the condition of realizing fastest paths between every pair of vertices. Erlebach et al. and Klobas et al. investigated restrictions on the exact duration of the fastest temporal paths in periodic temporal graphs [14, 20], while Mertzios et al. and Meusel et al. focused on upper bounds for durations [23, 24, 25]. The difference of the travel time of a path and the static distance of two vertices is called waiting time. The main focus of previous research has been on additive constraints for waiting times. However, it is well justified to allow for longer waiting times for longer distances. Mertzios et al. [24] defined the stretch, a multiplicative bound on the duration of a fastest path. They introduced the Stretched Temporal Graph Realization problem (STGR), where for some stretch α, the duration of a fastest path must be at most α times the distance of the vertices.

Stretched Periodic Temporal Graph Realization (STGR)

Input: An undirected, connected graph G=(V,E), a positive integer Δ and a rational number α1.
Question: Does there exist a Δ-periodic temporal graph (G,λ,Δ), such that for every two vertices u,v, dur(u,v)αdist(vi,vj)?

Here, dist(u,v) denotes the distance between vertices u and v in the underlying static graph G. In this work, we revisit this problem and address open questions and previous gaps.

2 Related work

Mertzios et al. show that STGR is NP-hard, even if Δ=3, α=1 and the graph has diameter 2 [24]. They also show that STGR is also NP-hard for Δ=3 with α[1,Δ+12) and Δ4 with α[Δ2,Δ+12) even if the diameter is in 𝒪(Δ). They complement this by showing that STGR is FPT when parameterized either (i) by the neighborhood diversity of the input graph and Δ or (ii) by the treewidth and diameter of the input graph and Δ. They further develop a local search algorithm and show that the optimization version of STGR, where the goal is to minimize the stretch, is hard to approximate within a factor of Δ1ϵ or 2nc for each fixed 0<ϵ<1 and c>1, respectively. On the other hand, it is possible to compute a solution with stretch at most ΔΔ1min(rad+1,diam) in polynomial time, where rad and diam denote the radius and diameter of the given input graph, respectively.

3 Results

In this work, we build on the work of Mertzios et al. [24]. Our results are as follows:

  1. 1.

    First, we show that the existence of exact fastest temporal graphs can be efficiently decided for period Δ=2 for a class of underlying static graphs that generalize trees. A graph in which all shortest paths are unique is called geodetic [27, p. 105] or min-unique [28].

    Theorem 3.1.

    Deciding if there is a labeling with stretch α=1 and Δ=2 for a geodetic graph can be solved in polynomial time.

    This follows from Theorem 10 of [25] as the same construction can be used for undirected graphs. This construction uses a reduction to 2-Coloring.

  2. 2.

    Furthermore, we answer an open question from [24]: by providing an instance with period Δ=2 and stretch α>53, we show the existence of instances with stretch α>Δ+12.

    Lemma 3.2.

    For Δ=2, there are instances with stretch α=53>Δ+12=32.

  3. 3.

    This result is then extended to better understand the range of possible stretch values. Note that the stretch can never exceed the period Δ, since for every path a worst-case labeling assigns the same label to all its edges and thereby realizes a stretch factor below Δ. We show that for every period Δ2, there is an instance whose stretch α is arbitrarily close to Δ. This demonstrates that the stretch can approach its theoretical maximum on certain instances.

    Theorem 3.3.

    For every Δ2 and every integral factor c>0, there are instances with stretch α2cΔ+12c+1>Δ+12.

    Corollary 3.4.

    For every Δ2 there are instances with stretch α arbitrarily close to Δ.

  4. 4.

    In many cases fastest paths which match the exact distance in the static graph, i.e. a stretch of α=1, cannot be realized. Therefore, we ask how close we can come to the lower bound of α=1. We complement the previous result by showing that for every period Δ2 there also exist instances whose optimal stretch is larger than 1 but arbitrarily close to 1. This illustrates that the lower end of the spectrum can likewise be approached.

    Theorem 3.5.

    For every Δ2, there are instances with arbitrarily small stretch α>1.

  5. 5.

    Finally, we extend the complexity landscape established in [24] to include the open case Δ=2, which we characterize for both the range addressed in earlier work for larger periods α[1,Δ+12) as well as the newly-established case α[Δ+12,Δ+3Δ+1).

    Theorem 3.6.

    For Δ=2, STGR is NP-hard for each α[1,32).

    Theorem 3.7.

    For each α[32,53), STGR is NP-hard even if Δ=2.

    Corollary 3.8.

    For Δ=2 and each α[1,53=Δ+3Δ+1), STGR is NP-hard.

  6. 6.

    Furthermore, as we showed hardness for α=1, this also implies hardness for Δ=2 for the Fastest Periodic Temporal Graph Realization problem considered by Klobas et al., Erlebach et al., and Cauvi et al. [14, 20, 7]. This case was also left open by all previous works. The hardness result follows by taking an instance of STGR with Δ=2 and α=1, and asking whether the matrix D can be realized, where D is the distance matrix of the underlying graph itself.

    Hence, we complete the following dichotomy for both problems with respect to Δ by combining our hardness results for Δ=2 with the previous hardness results for each Δ3 for STGR [24] and Fastest Periodic Temporal Graph Realization [19, 14]: Both problems are trivial if Δ=1 and become NP-hard for each Δ>1.

    Theorem 3.9.

    STGR and Fastest Periodic Temporal Graph Realization are polynomial time solvable if Δ=1 and NP-hard for each Δ2.

4 Open Problems

For future work, many aspects are worth further consideration. It remains to determine whether STGR is also NP-hard for Δ3 for values of at least α=Δ+12. Furthermore, the case of Δ>3 with α[1,Δ2) has not been considered yet. Meusel et al. [25] showed that there are parameter combinations for the Temporal Tree Realization problem that are hard for undirected graphs but become tractable for bidirected graphs of the same structure. It would be interesting to show whether similar effects occur for STGR.

Another direction is to consider the case of STGR in restricted graph classes. For example, can STGR be solved in polynomial time on planar graphs? Our hardness proofs involve Not-All-Equal 3-Sat, which is known to be solvable in polynomial time if the formula is planar [26]. Finally, it might be worth to consider a multi-label version of the problem, where each edge is allowed up to labels per period.

References

  • [1] Eleni C Akrida, Leszek Gąsieniec, George B Mertzios, and Paul G Spirakis. The complexity of optimal design of temporally connected graphs. Theory of Computing Systems, 61(3):907–944, 2017. doi:10.1007/S00224-017-9757-X.
  • [2] Jamil N. Ayoub and Ivan T. Frisch. Degree realization of undirected graphs in reduced form. Journal of the Franklin Institute, 289(4):303–312, 1970. doi:10.1016/0016-0032(70)90273-5.
  • [3] Amotz Bar-Noy, David Peleg, Mor Perry, and Dror Rawitz. Graph realization of distance sets. Theoretical Computer Science, 1019:114810, 2024. doi:10.1016/j.tcs.2024.114810.
  • [4] Filippo Brunelli, Pierluigi Crescenzi, and Laurent Viennot. Maximizing reachability in a temporal graph obtained by assigning starting times to a collection of walks. Networks, 81(2):177–203, 2023. doi:10.1002/net.22123.
  • [5] Daniele Carnevale, Gianlorenzo D’Angelo, and Martin Olsen. Approximating optimal labelings for temporal connectivity. Proceedings of the AAAI Conference on Artificial Intelligence, 39(25):26490–26497, April 2025. doi:10.1609/aaai.v39i25.34849.
  • [6] Arnaud Casteigts, Michelle Döring, and Nils Morawietz. Realization of Temporally Connected Graphs Based on Degree Sequences. In Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai, editors, 36th International Symposium on Algorithms and Computation (ISAAC 2025), volume 359 of Leibniz International Proceedings in Informatics (LIPIcs), pages 17:1–17:18, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ISAAC.2025.17.
  • [7] Justine Cauvi, Nils Morawietz, and Laurent Viennot. Foremost, Fastest, Shortest: Temporal Graph Realization Under Various Path Metrics. In Meena Mahajan, Florin Manea, Annabelle McIver, and Nguyễn Kim Thang, editors, 43rd International Symposium on Theoretical Aspects of Computer Science (STACS 2026), volume 364 of Leibniz International Proceedings in Informatics (LIPIcs), pages 24:1–24:19, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.STACS.2026.24.
  • [8] Wai-Kai Chen. On the realization of a (p,s)-digraph with prescribed degrees. Journal of the Franklin Institute, 281(5):406–422, 1966. doi:10.1016/0016-0032(66)90301-2.
  • [9] Esteban Christiann, Eric Sanlaville, and Jason Schoeters. On Inefficiently Connecting Temporal Networks. In Arnaud Casteigts and Fabian Kuhn, editors, 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 8:1–8:19, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAND.2024.8.
  • [10] Jack Edmonds. Existence of k-edge connected ordinary graphs with prescribed degrees. J. Res. Nat. Bur. Standards Sect. B, 68:73–74, 1964.
  • [11] Jessica Enright, Kitty Meeks, and Fiona Skerman. Assigning times to minimise reachability in temporal graphs. Journal of Computer and System Sciences, 115:169–186, 2021. doi:10.1016/j.jcss.2020.08.001.
  • [12] Paul Erdős and Tibor Gallai. Graphs with prescribed degrees of vertices. Mat. Lapok, 11:264–274, 1960.
  • [13] Thomas Erlebach, Othon Michail, and Nils Morawietz. Recognizing and Realizing Temporal Reachability Graphs. In Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman, editors, 33rd Annual European Symposium on Algorithms (ESA 2025), volume 351 of Leibniz International Proceedings in Informatics (LIPIcs), pages 93:1–93:18, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2025.93.
  • [14] Thomas Erlebach, Nils Morawietz, and Petra Wolf. Parameterized Algorithms for Multi-Label Periodic Temporal Graph Realization. In Arnaud Casteigts and Fabian Kuhn, editors, 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:16, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAND.2024.12.
  • [15] F. Göbel, Jorge Orestes Cerdeira, and Henk Jan Veldman. Label-connected graphs and the gossip problem. Discrete Mathematics, 87(1):29–40, 1991. doi:10.1016/0012-365X(91)90068-D.
  • [16] S Louis Hakimi. On realizability of a set of integers as degrees of the vertices of a linear graph. i. Journal of the society for industrial and applied mathematics, 10(3):496–506, 1962.
  • [17] S. Louis Hakimi and Stephen S. Yau. Distance matrix of a graph and its realizability. Quarterly of Applied Mathematics, 22:305–317, 1965.
  • [18] Daniel J. Kleitman and D. L. Wang. Decomposition of a graph realizing a degree sequence into disjoint spanning trees. SIAM Journal on Applied Mathematics, 30(2):206–221, 1976.
  • [19] Nina Klobas, George B Mertzios, Hendrik Molter, and Paul G Spirakis. The complexity of computing optimum labelings for temporal connectivity. Journal of Computer and System Sciences, 146:103564, 2024. doi:10.1016/J.JCSS.2024.103564.
  • [20] Nina Klobas, George B. Mertzios, Hendrik Molter, and Paul G. Spirakis. Temporal Graph Realization from Fastest Paths. In Arnaud Casteigts and Fabian Kuhn, editors, 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 16:1–16:18, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAND.2024.16.
  • [21] Linda Lesniak. Eccentric sequences in graphs. Periodica Mathematica Hungarica, 6(4):287–293, December 1975. doi:10.1007/BF02017925.
  • [22] George B. Mertzios, Othon Michail, and Paul G. Spirakis. Temporal network optimization subject to connectivity constraints. Algorithmica, 81(4):1416–1449, April 2019. doi:10.1007/s00453-018-0478-6.
  • [23] George B. Mertzios, Hendrik Molter, Nils Morawietz, and Paul G. Spirakis. Realizing temporal transportation trees, April 2025. Extended abstract to appear in Proceedings of 51st International Workshop on Graph-Theoretic Concepts in Computer Science (WG 2025), LNCS, Springer. doi:10.48550/arXiv.2403.18513.
  • [24] George B. Mertzios, Hendrik Molter, Nils Morawietz, and Paul G. Spirakis. Temporal Graph Realization with Bounded Stretch. In Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak, editors, 50th International Symposium on Mathematical Foundations of Computer Science (MFCS 2025), volume 345 of Leibniz International Proceedings in Informatics (LIPIcs), pages 75:1–75:19, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.MFCS.2025.75.
  • [25] Julia Meusel, Matthias Müller-Hannemann, and Klaus Reinhardt. Directed Temporal Tree Realization for Periodic Public Transport: Easy and Hard Cases. In Jonas Sauer and Marie Schmidt, editors, 25th Symposium on Algorithmic Approaches for Transportation Modelling, Optimization, and Systems (ATMOS 2025), volume 137 of Open Access Series in Informatics (OASIcs), pages 3:1–3:22, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/OASIcs.ATMOS.2025.3.
  • [26] Bernard M. E. Moret. Planar NAE3SAT is in P. SIGACT News, 19(2):51–54, 1988. doi:10.1145/49097.49099.
  • [27] Øystein Ore. Theory of graphs, volume XXXVIII of American Mathematical Society Colloquium Publications. American Mathematical Society, Providence, RI, 1965. Second printing.
  • [28] Klaus Reinhardt and Eric Allender. Making nondeterminism unambiguous. SIAM Journal on Computing, 29(4):1118–1131, 2000. doi:10.1137/S0097539798339041.
  • [29] Hiroshi Tamura, Masakazu Sengoku, Shoji Shinoda, and Takeo Abe. Realization of a network from the upper and lower bounds of the distances (or capacities) between vertices. In 1993 IEEE International Symposium on Circuits and Systems (ISCAS), pages 2545–2548. IEEE, 1993.