arXiv:2611.06387cs.DSNov 2026

Manuscript Offprint

arXiv:2611.06387

Partially Dynamic Algorithms for Single-Source Temporal Paths

Davide Bilò, Bartłomiej Bosek, Jadwiga Czyżewska, Evangelos Kipouridis, Karol Węgrzycki, Anna Zych-Pawlewicz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We present efficient partially dynamic algorithms for maintaining earliest arrival times from a fixed source in temporal digraphs with nn vertices, possibly with parallel arcs, where each arc is associated with a time label and a latency.

For the incremental scenario where updates are arc insertions, our algorithm has a constant query time and requires a total update time of O(n+mlog⁡m)\mathcal{O}(n+m\log m), where mm is the total number of arcs added to the arc-less graph. For the decremental scenario where updates are arc removals, our algorithm has a constant query time and requires a total update time of O(n+mlog⁡m)\mathcal{O}(n+m\log m), where mm is the number of arcs in the graph upon its initialization. We also consider earliest-arrival queries with an arbitrary departure-time threshold and develop an incremental algorithm with O(n+Δsmlog⁡m)O(n+\Delta_s m\log m) total update time, O(log⁡m)O(\log m) query time, and O(n+m)O(n+m) space, where Δs\Delta_s is the number of distinct departure times of arcs leaving the source. All of our algorithms are also capable of reporting an earliest arrival path from the source to the queried vertex vv in constant time per edge once the earliest arrival time at vv is known.

We complement our positive results with conditional lower bounds based on the On-line Boolean Matrix-Vector Multiplication conjecture (a.k.a. OMv conjecture). For both the incremental and the decremental scenarios, we show the non-existence of an algorithm with O(n1−ε)\mathcal{O}(n^{1-\varepsilon}) amortized update time and O(n2−ε)\mathcal{O}(n^{2-\varepsilon}) amortized query time, even if the algorithm is randomized and latencies on the arcs are uniform. For arbitrary departure-time queries, we also establish an OMv-based conditional lower bound showing that our incremental algorithm is optimal up to logarithmic factors on dense temporal graphs. Thus, efficient total running time is essentially the best outcome we can get. Our conditional lower bounds hold also for the case of undirected temporal graphs.

*Department of Information Engineering, Computer Science, and Mathematics, University of L'Aquila, Italy, davide.bilo@univaq.it. Supported by the project SOS-TG: Spanners and Oracles for Static and Temporal Graphs, funded by Università degli Studi dell'Aquila under the Call for Proposals for Fundamental Research and Early-Career Research Grants – Year 2026. †Institute of Theoretical Computer Science, Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland. bartlomiej.bosek@uj.edu.pl ‡University of Warsaw, Poland. j.czyzewska@mimuw.edu.pl. Supported by Polish National Science Centre SONATA BIS-12 grant number 2022/46/E/ST6/00143. §Max Planck Institute for Informatics, Saarland Informatics Campus, Germany. kipouridis@mpi-inf.mpg.de. ¶Max Planck Institute for Informatics, Saarland Informatics Campus, Germany. kwegrzyc@mpi-inf.mpg.de. Supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) grant number 559177164. ‡University of Warsaw, Poland anka@mimuw.edu.pl. Supported by the project BOBR that received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme, grant agreement No. 948057.

1 Introduction

Temporal graphs are graphs in which edges are available only at specific time instants. They are a standard model for networks whose interactions change over time, such as communication networks, transportation systems, social networks, and contact networks. In these settings, the time at which an interaction occurs is often essential, and cannot be ignored without losing important information.

The most basic model of a temporal graph was introduced by Kempe, Kleinberg, and Kumar [22]. In this model, a temporal graph consists of an underlying graph together with a set of integer labels assigned to each edge, representing the times at which the edge is available. As movement through the network must respect time, the basic notion is that of a temporal path, i.e., a path whose edge labels appear in non-decreasing order. Several variants of this model have been studied, including strict temporal paths, paths with waiting constraints, continuous-time models, and stochastic models; see, e.g., [11, 20].

Many algorithmic problems on temporal graphs have been considered in the literature. These include the computation of temporal paths optimizing different objectives, such as earliest arrival, minimum duration, or minimum number of hops [1, 25, 12]; sparsification and temporal spanners [6, 7, 13, 14, 22]; exploration problems [15, 16]; temporal versions of covering problems [2, 17]; and network creation games [4, 5]. Among these topics, temporal reachability is one of the most basic. Given two vertices uu and vv, one asks whether there exists a temporal path from uu to vv. Unlike the static case, the answer may depend on the starting time, the allowed waiting time, and the chosen path model. Moreover, temporal reachability is in general not symmetric, and its behavior is often more complex than standard graph connectivity.

Dynamic maintenance of reachability information is well studied for static graphs (see, e.g., [18, 21] and the references therein). In contrast, the temporal case has only recently received attention. Brito, Albertini, Casteigts, and Travençolo [10] gave a data structure for temporal reachability in the incremental setting, where updates consist of inserting new edges or new labels on existing edges. Their structure has size O(n2τ)O(n^2\tau) and supports updates in amortized O(n2log⁡τ)O(n^2 \log \tau) time, where nn is the number of vertices and τ\tau is the lifetime of the temporal graph, i.e., the number of distinct labels. Given vertices u,vu, v and times t,t′t, t', it can determine whether there exists a temporal path from uu to vv departing no earlier than tt and arriving no later than t′t'. Queries require O(log⁡τ)O(\log \tau) worst-case time, and a witness path can also be reported efficiently.

Another related problem is to maintain the time-transitive closure, namely the directed graph containing an arc (u,v)(u, v) whenever vv is temporally reachable from uu. In [3], this problem was studied in the restricted chronological incremental setting, where inserted labels must be non-decreasing over time.

More recently, fully dynamic temporal reachability has been studied for restricted graph classes. In particular, Bilò, Gualà, Leucci, Proietti, and Straziota [8] considered temporal forests and designed linear-space data structures supporting insertions and deletions of edge labels, together with temporal reachability, earliest arrival, and latest departure queries. Their main structure is also dynamic with respect to the topology of the forest: besides label updates, it supports insertion and deletion of singleton vertices, as well as link and cut operations that merge or split rooted trees. Updates are handled in O(log⁡M)O(\log M) worst-case time, where MM is the total number of time labels associated with all the edges of the forest. Temporal reachability queries are answered in O(log⁡M)O(\log M) worst-case time, while earliest arrival and latest departure queries require O(log⁡L⋅log⁡M)O(\log L \cdot \log M) time, where LL is the maximum number of labels on a single edge. For temporal paths with fixed topology, the latter bound improves to O(log⁡M)O(\log M). The same asymptotic guarantees were also extended to temporal forests with uniform latencies, while for arbitrary latencies incremental and decremental variants with O(log⁡M)O(\log M)-amortized update bounds were obtained. More precisely, the incremental scenario supports the addition of new labels to existing edges, the addition of singleton vertices, and the link operation, while the decremental scenario only involves label/singleton deletions and cut operations.

Related trade-offs between space and query time were later investigated by Bilò, Gualà, Leucci, Proietti, and Straziota [9] for fastest path oracles in static temporal trees. They presented, for any parameter t⩾1t \geqslant 1, a data structure of size O(M+M2/t2)O(M + M^2/t^2) that answers fastest-path queries in O(tlog⁡(1+L))O(t \log(1 + L)) time, where LL is the maximum number of labels on an edge and MM is the total number of labels in the tree. Their queries can also enforce a prescribed time window. Moreover, they proved conditional lower bounds showing that these trade-offs are essentially optimal, up to polylogarithmic factors. The same work also provided evidence that extending such oracle results to general temporal graphs is significantly more difficult, even for temporal reachability queries without time constraints.

Our results In this paper, we design partially dynamic algorithms for maintaining earliest arrival times from a fixed source to all vertices in a temporal digraph with nn vertices, possibly with parallel arcs, where each arc has a time label and a positive latency (a traversal time of the arc).

For the incremental setting, in which updates consist of arc insertions, we give a data structure with constant query time and total update time O(n+mlog⁡m)\mathcal{O}(n + m \log m), where mm is the total number of inserted arcs to an arc-less graph. For the decremental setting, where updates consist of arc deletions, we obtain the same query bound and total update time O(n+mlog⁡m)\mathcal{O}(n+m \log m), where mm denotes the number of arcs in the initial graph. In both settings, once the earliest arrival time at a queried vertex vv is known, an earliest-arrival path from the source to vv can be reported in constant time per edge. We further consider the setting in which the departure-time threshold can be specified at query time. For this problem, we develop an incremental data structure supporting earliest-arrival queries in O(log⁡m)O(\log m) time, with O(n+Δsmlog⁡m)O(n + \Delta_s m \log m) total update time and O(n+m)O(n + m) space, where Δs\Delta_s denotes the number of distinct departure times of arcs leaving the source. The linear-space bound improves upon the straightforward approach of maintaining a separate data structure for each departure-time threshold.

We also prove conditional lower bounds under the Online Boolean Matrix-Vector Multiplication conjecture (a.k.a. the OMv conjecture). In both the incremental and decremental settings, there is no (possibly randomized) algorithm with amortized update time O(n1−ε)\mathcal{O}(n^{1-\varepsilon}) and amortized query time O(n2−ε)\mathcal{O}(n^{2-\varepsilon}), for any constant ε>0\varepsilon > 0, even if we assume uniform latencies on the arcs. Therefore, up to these trade-offs, efficient total update time is essentially the strongest guarantee achievable. For the setting with arbitrary departure-time thresholds, we additionally prove an OMv-based conditional lower bound showing that our incremental algorithm is optimal up to logarithmic factors for dense temporal graphs. Our conditional lower bounds hold also for the case of undirected temporal graphs.

Organization of the paper The next section provides some preliminary notions. In Section 3 we present our algorithm for the incremental setting and in Section 4 our algorithm for the decremental one. In Section 6 we present our results about lower bounds for reachability problems in temporal graphs.