Manuscript Offprint
arXiv:2611.06387Partially Dynamic Algorithms for Single-Source Temporal Paths
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 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 , where 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 , where 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 total update time, query time, and space, where 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 in constant time per edge once the earliest arrival time at 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 amortized update time and 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 and , one asks whether there exists a temporal path from to . 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 and supports updates in amortized time, where is the number of vertices and is the lifetime of the temporal graph, i.e., the number of distinct labels. Given vertices and times , it can determine whether there exists a temporal path from to departing no earlier than and arriving no later than . Queries require 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 whenever is temporally reachable from . 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 worst-case time, where is the total number of time labels associated with all the edges of the forest. Temporal reachability queries are answered in worst-case time, while earliest arrival and latest departure queries require time, where is the maximum number of labels on a single edge. For temporal paths with fixed topology, the latter bound improves to . The same asymptotic guarantees were also extended to temporal forests with uniform latencies, while for arbitrary latencies incremental and decremental variants with -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 , a data structure of size that answers fastest-path queries in time, where is the maximum number of labels on an edge and 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 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 , where 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 , where denotes the number of arcs in the initial graph. In both settings, once the earliest arrival time at a queried vertex is known, an earliest-arrival path from the source to 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 time, with total update time and space, where 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 and amortized query time , for any constant , 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.
A temporal path is a sequence of arcs with their time labels and latencies
such that for every we have . We call the departure time of and the arrival time of . The departure time of is the time at which we depart from in , while the arrival time of is the time at which we arrive at . So, in the rest of the paper, we will say also that is a path with departure time (resp., arrival time) of (resp., ) from (resp., ).
Given two vertices and and a temporal interval , with , we say that is reachable from within if there exists a temporal path from to whose departure time and arrival time are both contained in the interval . When there exists such that is reachable from within , we simply say that is reachable from . Moreover, we say that is the earliest arrival time from to w.r.t. if is reachable from in the interval , but is not reachable from in the time interval . When , we will simply say that is the earliest arrival time from to .
Balanced binary search trees. All our algorithms use balanced binary search trees storing arcs in the form of tuples , keyed by some function of and , denoted as key(a). A balanced binary search tree , implemented for instance as an AVL tree, supports the following operations:
-
: initializes the structure with an empty set of arcs;
-
: returns true if there is no arc in and false otherwise.
-
: inserts arc into ;
-
: removes arc from ;
-
: finds the arc with the smallest key such that ; if there is no such arc, return ;
-
: finds the arc with the greatest key such that ; if there is no such arc, return ;
-
: returns the arc with the smallest key in ; if is empty, return ;
-
: returns an arc that is a direct successor of in the order of keys; if there is no such successor, return .
Implementation as AVL trees supports the constant time for operation and time for other operations, while also providing linear space.
3 Incremental algorithm
In this section, we design an incremental data structure that is capable of answering single-source earliest-arrival-time queries in constant time. The data structure is also capable of reporting an earliest arrival temporal path from the source to the queried vertex in constant time per arc. We observe that the same construction allows us to report earliest-arrival times from the source to w.r.t. some fixed value , for every vertex as we can simply ignore the addition of the arcs whose corresponding time labels are strictly smaller than as these arcs cannot be used in any temporal path whose departure time is or larger.
Theorem 3.1. Let be a temporal arc-less digraph with vertices and let be a vertex of . There is an incremental data structure that maintains earliest arrival paths from to every other vertex of by supporting the following operations:
-
INIT() – initializes the data structure with a temporal digraph having no arcs in time;
-
ADDARC(vu, t, l) – adds arc (vu, t, l) to ; the total time of adding arcs is ;
-
EA(v) – returns the earliest arrival time from to in the current digraph , or if is not reachable from , in worst case time;
-
EAPATH(v) – returns an earliest arrival path from to in the current digraph , or if is not reachable from , in time linear in the size of the returned path.
It is well known that there exists a directed tree rooted at , a.k.a. earliest-arrival tree, such that, for every vertex that is reachable from in , the unique path from to in is an earliest arrival path. The idea is to dynamically maintain an earliest-arrival tree rooted at .
The data structure internally maintains the following invariant information for every vertex of :
-
ea[v] – the earliest arrival time from to in the current temporal digraph or if is not reachable from in .
-
parent[v] – the arc (uv, t, l) preceding on its earliest arrival path in the earliest-arrival tree in the current temporal digraph rooted at , or if is not reachable from in or ;
-
N[v] – the set of all arcs outgoing from whose time labels are strictly smaller than ea[v] w.r.t. the current temporal digraph .
All the ea and the parent values are stored in an array, while each N[v] is stored as an AVL tree whose keys are the time labels.
Initialization. We assume that initially has no arcs. As no vertex apart from is reachable from , we set ea[v] = for every and ea[s] = 0. Moreover, parent[v] = , for every vertex . As there are no arcs, all N[v]'s are initialized to be empty AVLs. This requires time per vertex. Therefore, the initialization of the data structure requires time. We observe that all the invariants are maintained.
Adding an arc. The ADDARC() procedure is presented in ?? 1 and in Figure 1; here we describe it in more detail and argue about its correctness and its running time.
We check whether . If this is the case, the added arc cannot be used at the moment by a temporal path, as the earliest arrival time at is currently higher than the time label of this arc. However, as the values 's are monotonically non-increasing when we add new arcs to the graph, we need to keep track of the arc , so we add it to and return. This arc cannot be included now in any temporal path starting from .
If , we first check whether the value can be improved: if then we set and create a queue that contains ; otherwise the procedure ends.
Then as long as there is a vertex in , we pick any of them from , say it , and immediately remove from . Now we iterate through all arcs belonging to with time labels greater than or equal to . More precisely we check them in the following way: for every arc , if , we set , and we add to . The arc is deleted from .
Our procedure ends when becomes empty. Note that improving the value of ea of one vertex may cause further changes in the structure, and more vertices may be affected as a consequence.
We now show that, at the end of the procedure, all the invariants of our data structure are maintained. Note that the values are monotonically non-increasing, and that when the value decreases, is always added to and is modified accordingly. So, for every vertex not in , the set contains exactly the arcs of the current temporal digraph whose corresponding time labels are strictly smaller than .
We now show that, for every vertex , is the earliest arrival time at from in the current temporal digraph. For the sake of contradiction, suppose that there exists a vertex such that is reachable by time from in the current temporal digraph and . Let be an earliest-arrival tree rooted at for the current temporal digraph . Among all possible choices of , we pick the vertex that is closest to in w.r.t. its hop distance from . Let be the predecessor of in and let be the arc in . By the choice of , equals the earliest arrival time at . Moreover, . As , the arc cannot belong to . Thus this arc must have already been checked in our procedure and thus , which is a contradiction. Note that for any vertex is also updated accordingly. Thus, all invariants are maintained after the completion of the ADDARC procedure.
Queries. When we query for the earliest arrival time at in the current temporal digraph , the query algorithm returns . This operation requires time . Moreover, if , the earliest arrival path from to stored in the data structure can be returned in asymptotical linear time w.r.t. its number of edges using the array parent.
Analysis of the total update time. Let be the overall number of ADDARC operations throughout the lifetime of the data structure. Observe also that an arc is added at most once into the AVL tree and never added to the AVL trees of other vertices. Therefore, the total number of edges stored in all the AVL trees is . Hence, each operation on the AVL takes time. Each of the arcs stored in the AVL trees is checked at most once throughout the lifetime of the procedure, as it is only checked after being deleted from the AVL tree containing it. This means that each arc is checked at most once, for a total number of checks. Thus we need total time for all operations ADDARC.
Algorithm 1: The procedure for adding arcs. The set is here initialized to be an empty queue.
function ADDARC(vu, t, l); Input : An arc (vu, t, l) if then N[v].Insert(vu, t, l); return; Q.Init(); if ea[u] > t + l then ea[u] ← t + l; parent[u] ← (vu, t, l); Q.push(u);
while do w ← Q.Pop(); while N[w].Successor(ea[w]) ≠ ⊥ do (wz, t', l') ← N[w].Successor(ea[w]); N[w].Remove(wz, t', l'); if then ea[z] ← t' + l'; parent[z] ← (wz, t', l'); Q.Push(z); end

Figure 1: The evolution of the data structure after adding the red arc. The number shown inside each vertex is ea[v] while the arcs outgoing from are those stored inside N[v]. The numbers associated with each arc are respectively its time label and latency. For clarity, we omit here the information about the parent. When the red arc is added, we call our procedure to add arcs. Vertices colored yellow are the ones belonging to the queue at the moment.
4 Decremental algorithm
In this section, we design a decremental data structure that is capable of answering single-source earliest-arrival-time queries in constant time. The data structure is also capable of reporting an earliest arrival temporal path from the source to the queried vertex in constant time per arc. As already observed in Section 3, the same construction allows us to report single-source earliest arrival times w.r.t. some fixed value . Indeed, we can preprocess the digraph by removing all arcs having a time label strictly smaller than from it. More precisely, we prove the following theorem.
Theorem 4.1. Let be a temporal digraph with vertices and arcs, and let be a vertex of . There is a decremental data structure that maintains earliest arrival times from to every other vertex of by supporting the following operations:
-
INIT() – initializes the data structure with the input temporal digraph in time;
-
REMOVEARC() – removes the arc from ; the total time of removing all arcs is ;
-
EA() – returns the earliest arrival time from to in the current digraph , or if is not reachable from , in worst case time;
-
EAPATH() – returns an earliest arrival path from to in the current digraph , or if is not reachable from , in time linear in the size of the returned path.
The data structure maintains the following information satisfying the invariants:
-
ea[v] – the earliest arrival time from to in the current temporal digraph or if is not reachable from in .
-
parent[v] – the arc preceding on its earliest arrival path in the earliest arrival tree in the current temporal digraph rooted at , or if is not reachable from in or ;
-
– the set of all arcs entering for which such that there exists a temporal path from to using ;
-
– the set of all arcs leaving whose time labels are greater than or equal to ea[v].
All the ea and the parent values are stored in an array and there are two distinct AVL trees per vertex of , one for and one for . The keys of are the time labels triples, while the keys of are the sums of time label and latency.
Initialization. The data structure starts with our initial temporal digraph that is given as input. First, we use we designed for the incremental scenario to compute the values of ea[v] and parent[v] for every vertex . Then we scan all the arcs of to initialize all AVL trees correctly. More precisely, we add the arc to and to if (then we also have ). Note that each arc is stored in at most two AVL trees. There can be arcs which are stored in no such sets. Then we know that there are no temporal paths from using them, as they have too small time labels. Moreover, through the lifetime of the structure, the value of ea[v] for any vertex is monotonically non-decreasing; thus there will be no temporal paths using the edges we already discarded during initialization.

Figure 2: The evolution of the data structure after removing the red arc. The number shown inside each vertex is and the arcs ingoing and out going belong to and respectively. The incoming thick arc is a parent . Red edges are marked to be removed and green vertices have just their value of changed.
As we checked each arc, all invariants above are maintained. The total time required for the initialization is , as this is the time required to set the value of all eas and later to add arcs to appropriate AVL trees.
Queries. For every vertex , our data structure maintains the invariant that is the earliest arrival time such that vertex is reachable from in the current temporal digraph . Thus, given vertex , we return . This operation requires time. Moreover, if , the earliest arrival path from to stored in the data structure can be returned in asymptotical linear time w.r.t. its number of arcs using the array parent.
Removing an arc. The REMOVEARC() procedure is presented in ?? 2 and in Figure 2; here we describe it in more detail. First, we remove the arc from and . Next, we check is connected to by parent . If this is not the case, we finish the procedure here.
If is empty now, the vertex is no longer reachable from the source . Thus we set parent , and we call REMOVEARC operation for all arcs belonging to .
If is not empty, we pick the arc with the smallest sum of the time label and the latency from the set . Then we update parent , set . We need now to update all vertices for which the time label of the arc is smaller than current
Algorithm 2: The procedure for removing arcs.
function REMOVEARC(uv, t, l); Input : An arc (uv, t, l) Nout[u].Remove(uv, t, l); Nin[v].Remove(uv, t, l); if (uv, t, l) ≠ parent[v] then return; if Nin[v].Empty() = true then parent[v] ← ⊥; ea[v] ← ∞; while Nout[v].Empty() = false do REMOVEARC(Nout[v].Smallest()); return; (wv, t', l') ← Nin[v].Smallest(); parent[v] ← (wv, t', l'); ea[v] = t' + l'; while Nout[v].Predecessor(ea[v]) ≠ ⊥ do REMOVEARC(Nout[v].Smallest());
ea[v]. Therefore we perform REMOVEARC operation on all arcs belonging to Nout[v] with time labels smaller than ea[v].
Note that similarly to the incremental case, removing one arc may lead to the removal of many edges as the consequence.
First, note that after removal of each edge and each change to ea[v] for any vertex v, we always update Nin[v] and Nout[v]. With this change we also ensure that the equality ea[v] = t + l for some arc a with time label t and latency l with a being parent[v].
We need to show that for every vertex ea[v] is indeed the earliest arrival time at which v is reachable from s starting at time t₀. Suppose not, and let w be a vertex with the smallest earliest arrival time among such vertices; we know that its earlier arrival time is strictly smaller than ea[w]. Let P be a path witnessing the arrival time in w smaller than ea[w]. We can assume that P witnesses the earliest arrival time for every vertex on it, but w. Let x be a predecessor of w on P and let xw be the arc on P with time label t' and latency l'. By the assumption, we know that ea[x] is the earliest arrival time that we can reach x from s starting at time t₀ and that ea[x] < ea[w]. Thus the earliest arrival time that we can reach w from s starting at time t₀ is equal to t' + l' < ea[w]. As we know the invariant was fulfilled after the initialization step, we know that ea[w] must have changed. Let ea'[w] be the value of ea[w] just after the initialization step. We have ea'(w) ≤ t' + l', as by the assumption ea'[w] is the earliest arrival time that we can reach w in the starting graph. Thus the arc xw belonged to Nin[w]. As now we have t' + l' < ea[w], some arc adjacent to w was deleted. In that step we updated ea[w] for the smallest value inside Nin(w), which is ≤ t' + l'. Thus we get a contradiction.
Analysis of the total update time. We recall that m is the number of arcs in the initial temporal digraph G. Then all operations on sets Nin[v] and Nout[v] at any moment take at most O(log m) time. Each arc is considered and removed at most once in the lifetime of the structure, thus we need in total O(m log m) operations.
5 Bounded time window
In this section we present a refined incremental algorithm that reports earliest arrival times from a source to every other vertex, where we can additionally provide the departure time from to the query, instead of having it fixed for the lifetime of the data structure. The refined algorithm incurs an extra factor of (the final number of possible departure times from the source) in the total update running time. In Section 6 we show that this extra factor is likely unavoidable. The precise theorem that we prove is the following.
Theorem 5.1. Let be a temporal digraph on vertices, let be a source vertex. There is an incremental data structure maintaining that offers the following arc updates and queries:
-
INIT() – initializes the data structure with an empty temporal digraph on vertices in time;
-
ADDARC(vu, t, l) – adds arc (vu, t, l) to ; the total time of adding arcs is , where stands for the number of different time labels among the outgoing arcs of in the final graph;
-
EA(v, t_0) – returns the earliest arrival time from to with respect to . The worst case time is .
-
EAPATH(v, t_0) – returns an earliest arrival path from to with respect to , or if is not reachable from , in time plus linear time in the size of the returned path.
The data structure uses space.
Proof. Let us denote, for every vertex , by the set of arcs currently leaving , and by the set of arcs currently entering . For every vertex , we also denote by the set (without repetitions) of possible departure times from and by the set of possible arrival times at . All of the above sets change as the updates arrive, so they always refer to the current state of the temporal graph . For an arc , let denote . Over the sequence of updates, the algorithm maintains the following information:
-
For each arc we store – the latest departure time from such that there is a temporal path whose last arc is and whose departure time from is ;
-
For every arc we store parent[] – the predecessor of on the path starting from at time , or if or is the first edge of such path.
-
For each vertex we store – the balanced binary search tree storing , keyed by ; every node is augmented with maximum in the subtree; this allows querying for the arc with maximum of all the arcs with , let us denote this query by . Whenever the value of an arc changes, the augmented information in the corresponding tree is updated in time.
-
For every vertex we store out[] – the balanced search tree storing , keyed by time labels.
Algorithm 3: Insertion of an arc and propagation.
function ADDARC(vu, t, l); Input : An arc out[v].Insert(a); // keyed by in[u].Insert(a); // keyed by if then 1d[a] ← t; parent[a] ← ⊥; else b = in[v].PREFLD(t); // : arr(b) ≤ t and 1d[b] is maximum if then | 1d[a] ← 1d[b] else ⊥ 1d[a] ← parent[a] ← b; Q ← {a}; while not Q.Emptyy() do b = (xy, t_b, l_b) ← Q.Pop(); d ← 1d[b]; // current value if or then continue; a' ← out[y].Successor(arr(b)); while a' ≠ ⊥ and 1d[a'] < d do | 1d[a'] ← d; parent[a'] ← b; if then Q.Push(a'); a' ← out[y].Next(a');
Initialization. We initialize on an edgeless graph , so no values 1d are assigned to the arcs upfront. Balanced trees in[v] and out[v] are initialized as empty for every vertex . Thus, the total initialization time is .
Query. Upon query EA(v, t_0), the data structure inspects in[v] sorted by arrival times. The goal is to find the earliest arc in in[v] whose 1d[a] ≥ t_0. This can be done by traversing the tree in[v] from the root, and following the leftmost path towards the leaf such that 1d in the subtree is at least t_0. Such a search takes worst case time of . For the EAPATH(v, t_0) query, once is located in time, we follow the parent pointers to reconstruct the path.
Update. The ADDARC(vu, t, l) operation is presented in Algorithm 3, and we describe it here in more detail. When a new arc is added to , the algorithm first updates out[v] and in[u] accordingly by inserting . Clearly, if then we can set 1d[a] = t, as to use arc in a one edge temporal path we have to depart from at time . We set parent[a] = ⊥ as this is the first edge of all temporal paths using this edge.
Otherwise, if , we have to find the value 1d[a] and assign it. For that, we consider all edges with arr(b) ≤ t, so that they can be combined in a temporal path with arc . Among those, we choose the one with maximum 1d value by issuing PREFLD(t) query. We assign the 1d value of this edge to 1d[a]. In the case PREFLD(t) returns ⊥, the arc cannot be reached from the source so we set 1d[a] = -∞. We update parent[a] accordingly.
Next, we need to change 1d values of other arcs that may have been affected by the inser-tion of the new arc . We add to the FIFO queue , which stores the arcs whose value changed, and this change needs to be propagated further. We then process the arcs in until is empty, i.e., there is no further propagation needed. In each iteration we pop one arc from . If the arc we popped is entering , or , then we do not need to propagate as does not affect any further arcs. Otherwise we inspect out[y] (sorted by time label). Observe that the edges that may directly profit from the change in are the edges of whose time label is at least , as these are the edges that can follow in the temporal path. Thus, we let be the first such edge, which we can find by issuing Successor() query to out[y]. Using we iterate through out[y] as long as : in that case we improve whose new value is . values are monotone with time labels, so once this stops being the case cannot affect any more edges of out[y] and we can stop the iteration. This completes the description of the procedure.
Time analysis. For the initialization we pay time. For the analysis of the total update time consider that every arc is pushed onto at most times. Each time an arc is pushed to , a constant number of balanced search tree operations are issued, each costing at most time. As a consequence, the total update time is . It was already argued that the worst case query time is .
It is worth noting that the total update time of Theorem 5.1 can also be achieved by maintaining copies of the data structure of Theorem 3.1, albeit at the cost of increased space usage.
Finally, in the chronological setting, where edges are inserted in increasing order of their time labels, the data structure of Theorem 5.1 requires no propagation. Consequently, its total update time is , matching that of Theorem 3.1.
6 Lower bounds
In this section we prove conditional lower bounds for the dynamic single-source temporal path reachability problem, i.e., the problem in which we only want to understand whether a queried vertex is reachable from the source by some temporal path (not necessarily an earliest-arrival temporal path) or not. In the following, we denote by the set . Our reductions are based on the Online Boolean Matrix-Vector Multiplication (OMv) conjecture of Henzinger, Krinninger, Nanongkai and Saranurak [19]. In OMv, one is given an Boolean matrix that may be preprocessed in polynomial time. Afterwards, the algorithm receives Boolean column vectors one by one and, before seeing , must output for each . A straightforward algorithm runs in total time after reading . Although the problem admits an algorithm with running time [23, 24], no -time algorithm is known for any . The OMv conjecture asserts that no such algorithm exists.
Conjecture 6.1 (OMv-conjecture, cf., Conjecture 1.1 in [19]). For any , there is no algorithm with polynomial preprocessing time and total running time that solves OMv with error probability at most .
For our reductions, it is convenient to work with the OuMv problem. In this variant, we are additionally given Boolean row vectors , and the task is to compute for each before seeing the next pair .
Lemma 6.2 (cf., Corollary 2.8 and Theorem 2.13 in [19]). Assuming the OMv conjecture, for any there is no algorithm with polynomial preprocessing time and computation time that solves OuMv with error probability at most . This holds even if the initial matrix is symmetric.
All lower bounds below are stated for undirected temporal graphs and can be easily extended to work on temporal digraphs as well.
Lemma 6.3. Assuming the OMv conjecture, for any there is no partially dynamic algorithm solving the Single Source Temporal Path Reachability (SSTP) problem on undirected graphs with vertices, with:
-
polynomial time preprocessing,
-
update in amortized time, and
-
query in amortized time.
This lower bound holds even if the algorithm is allowed to output incorrect answers with probability at most .
Proof. We reduce OuMv to SSTP. The reduction uses vertices, updates, and queries. Hence, together with Lemma 6.2, any SSTP algorithm with sublinear amortized update time and subquadratic amortized query time would yield an -time algorithm for OuMv. We first describe the incremental reduction and then its decremental analogue.
Incremental model. We initialize the structure with a graph on vertices: , , , . For every such that , we add temporal edges with time labels and latency 1. Note that we construct this graph in polynomial time, as required for the pre-processing phase.
We maintain the invariant that at the beginning of the th round all edges incident to have time label at least ; this condition holds initially, as there are no edges incident to . Given a pair of vectors and for , we perform the following insertions:
-
for every such that , update with
-
for every such that , update with
Suppose that after these updates there exists a temporal path from to . Then the predecessor of on is reached by time at most . Since all edges incident to have time labels at least and all edges in the graph have latency 1, this predecessor is reachable from by a path of at most two edges. Hence must be of the form , , for some , with time labels , , , respectively.
We now query to check whether is reachable from , that is, whether the value returned by the structure is different from . If this happens, then by the argument above the witnessing path must be of the form , , for some with time labels , , , respectively. Hence , , and , so .
Conversely, if , then for some there are edges , , with time labels , , , respectively. Thus is reachable from . The invariant is preserved, since every newly inserted edge incident to has time label , while all older such edges have larger time labels. In each round we perform at most updates and one query.
Decremental model. We initialize the structure similarly, with a graph on vertices . For every such that , we add temporal edges with time labels and latency 1. Moreover, for every we add temporal edges with time labels and latency 1, and for every we add temporal edges with time label and latency 1. Note that we construct this graph in polynomial time, as required for the pre-processing phase.
We maintain the invariant that at the beginning of the th round all edges incident to have time label at least . Then, in each round, given a pair of vectors and for , we perform the following deletions:
-
for every such that , we update with REMOVEEDGE((s, x_i), k, 1)
-
for every such that , we update with REMOVEEDGE((y_j, t_k), k + 2, 1)
As before, we first describe the structure of any temporal path from to . The predecessor of is reached on by time at most . Since all edges incident to have time labels at least and all edges in the graph have latency 1, the path must be of the form with time labels , respectively.
We query EA() to check whether is reachable from , that is, whether the value returned by the structure is different from . If so, then the temporal path witnessing reachability is of the form . Therefore , and .
Conversely, if , then for some there exist edges with time labels , respectively, and therefore is reachable from . At the end of each round, we call REMOVEEDGE((s, x_i), k, 1) for all such that . Then every edge incident to has time label at least , so the invariant is preserved. In each round we perform at most updates and one query.
Corollary 6.4. Assuming the OMv conjecture, for any there is no fully dynamic algorithm solving the Single Source Temporal Path Reachability problem on undirected graphs with vertices, with:
-
polynomial time preprocessing,
-
update in amortized time, and
-
query in amortized time.
This lower bound holds even if the algorithm is allowed to output incorrect answers with probability at most .
Proof. This is an immediate consequence of Lemma 6.3, since every fully dynamic algorithm is, in particular, a partially dynamic algorithm when the update sequence is restricted either to insertions only or to deletions only.
In the constructions above, every temporal edge has latency 1. The same constructions also work when every latency is equal to 0, provided that we restrict attention to strict temporal paths, i.e., temporal paths whose time labels are strictly increasing.
Lemma 6.5. Assuming the OMv conjecture, for every there is no incremental algorithm for EA (even only deciding whether EA) with polynomial preprocessing, and total running time, on instances with arcs and different departure times from the source. In particular, total update time together with query time is impossible. This holds even if all latencies are equal to 1, and even with error probability .
Proof. Let us consider and let us create vertices , . Let .
Preprocessing. For every with insert the single arc . This gives at most arcs.
Round (for ). On input :
• for every with insert ;
• for every with insert ;
• query EA and output 1 iff the answer is finite.
Correctness. Consider a temporal path from to departing at time . Its first arc leaves with label ; arcs leaving inserted in rounds have label , and later rounds have not happened yet, so the first arc is with . The only arcs entering are with ; the only arcs entering any are matrix arcs ; the only arcs entering any leave ; vertices have no outgoing arcs. Hence with . Conversely, for such the path using labels is temporal, since and ; it arrives at time . Thus .
Analysis. There are arcs, updates and queries. By the OMv conjecture, there is no algorithm with polynomial preprocessing and running time solving the OuMv problem. Since an algorithm with running time implies an algorithm with for the OuMv problem, its existence is ruled out if we assume the OMv conjecture. The instance we construct has arcs and different departure times from .
Use of generative AI
We used Chat GPT-6 to proofread the manuscript. All ideas, proofs and the write-up is due to the authors, except of the last lower bound for the bounded time window, which was suggested by Chat GPT during the proofreading of the paper.
References
[1] Eleni C. Akrida, George B. Mertzios, Sotiris E. Nikoletseas, Christoforos L. Raptopoulos, Paul G. Spirakis, and Viktor Zamaraev. How fast can we reach a target vertex in stochastic temporal graphs? J. Comput. Syst. Sci., 114:65–83, 2020. URL: https://doi.org/10.1016/j.jcss.2020.05.005, doi:10.1016/J.JCSS.2020.05.005.
[2] Eleni C. Akrida, George B. Mertzios, Paul G. Spirakis, and Viktor Zamaraev. Temporal vertex cover with a sliding time window. J. Comput. Syst. Sci., 107:108–123, 2020. URL: https://doi.org/10.1016/j.jcss.2019.08.002, doi: 10.1016/J.JCSS.2019.08.002.
[3] Matthieu Barjon, Arnaud Casteigts, Serge Chaumette, Colette Johnen, and Yessin M. Neggaz. Testing temporal connectivity in sparse dynamic graphs. CoRR, abs/1404.7634, 2014. URL: http://arxiv.org/abs/1404.7634, arXiv:1404.7634.
[4] Davide Bilò, Sarel Cohen, Tobias Friedrich, Hans Gawendowicz, Nicolas Klodt, Pascal Lenzner, and George Skretas. Temporal network creation games. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 2023, 19th-25th August 2023, Macao, SAR, China, pages 2511–2519. ijcai.org, 2023. URL: https://doi.org/10.24963/ijcai.2023/279, doi:10.24963/IJCAI.2023/279.
[5] Davide Bilò, Sarel Cohen, Tobias Friedrich, Hans Gawendowicz, Nicolas Klodt, Pascal Lenzner, and George Skretas. Temporal network creation games: The impact of non-locality and terminals. In Sanmay Das, Ann Nowé, and Yevgeniy Vorobeychik, editors, Proceedings of the 24th International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2025, Detroit, MI, USA, May 19-23, 2025, pages 334-342. International Foundation for Autonomous Agents and Multiagent Systems / ACM, 2025. URL: https://dl.acm.org/doi/10.5555/3709347.3743547, doi:10.5555/3709347.3743547.
[6] Davide Bilò, Gianlorenzo D'Angelo, Luciano Gualà, Stefano Leucci, and Mirko Rossi. Sparse temporal spanners with low stretch. In Shiri Chechik, Gonzalo Navarro, Eva Rotenberg, and Grzegorz Herman, editors, 30th Annual European Symposium on Algorithms, ESA 2022, September 5-9, 2022, Berlin/Potsdam, Germany, volume 244 of LIPIcs, pages 19:1-19:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL: https://doi.org/10.4230/LIPics.ESA.2022.19, doi:10.4230/LIPICS.ESA.2022.19.
[7] Davide Bilò, Gianlorenzo D'Angelo, Luciano Gualà, Stefano Leucci, and Mirko Rossi. Blackout-tolerant temporal spanners. J. Comput. Syst. Sci., 141:103495, 2024. URL: https://doi.org/10.1016/j.jcss.2023.103495, doi:10.1016/J.JCSS.2023.103495.
[8] Davide Bilò, Luciano Gualà, Stefano Leucci, Guido Proietti, and Alessandro Straziota. Temporal queries for dynamic temporal forests. In Julián Mestre and Anthony Wirth, editors, 35th International Symposium on Algorithms and Computation, ISAAC 2024, Sydney, Australia, December 8-11, 2024, LIPIcs, pages 11:1-11:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024. URL: https://doi.org/10.4230/LIPIcs.ISAAC.2024.11, doi:10.4230/LIPICS.ISAAC.2024.11.
[9] Davide Bilò, Luciano Gualà, Stefano Leucci, Guido Proietti, and Alessandro Straziota. Almost tight oracles for fastest-path queries on temporal trees. In Othon Michail and Giuseppe Prencipe, editors, Algorithmics of Wireless Networks - 21st International Symposium, ALGOWIN 2025, Warsaw, Poland, September 18-19, 2025, Proceedings, Lecture Notes in Computer Science, pages 61-75. Springer, 2025. doi:10.1007/978-3-032-09120-8_5.
[10] Luiz F. Afra Brito, Marcelo Keese Albertini, Arnaud Casteigts, and Bruno Augusto Nassif Travençolo. A dynamic data structure for temporal reachability with unsorted contact insertions. Social Network Analysis and Mining, 12, 2021. URL: https://api.semanticscholar.org/CorpusID:231847148.
[11] Arnaud Casteigts, Paola Flocchini, Walter Quattrociocchi, and Nicola Santoro. Time-varying graphs and dynamic networks. Int. J. Parallel Emergent Distributed Syst., 27(5):387-408, 2012. doi:10.1080/17445760.2012.668546.
[12] Arnaud Casteigts, Anne-Sophie Himmel, Hendrik Molter, and Philipp Zschoche. Finding temporal paths under waiting time constraints. Algorithmica, 83(9):2754–2802, 2021. URL: https://doi.org/10.1007/s00453-021-00831-w, doi: 10.1007/S00453-021-00831-W.
[13] Arnaud Casteigts, Joseph G. Peters, and Jason Schoeters. Temporal cliques admit sparse spanners. J. Comput. Syst. Sci., 121:1–17, 2021. URL: https://doi.org/10.1016/j.jcss.2021.04.004, doi:10.1016/J.JCSS.2021.04.004.
[14] Arnaud Casteigts, Michael Raskin, Malte Renken, and Viktor Zamaraev. Sharp thresholds in random simple temporal graphs. SIAM J. Comput., 53(2):346–388, 2024. URL: https://doi.org/10.1137/22m1511916, doi:10.1137/22M1511916.
[15] Thomas Erlebach, Frank Kammer, Kelin Luo, Andrej Sajenko, and Jakob T. Spooner. Two moves per time step make a difference. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, volume 132 of LIPIcs, pages 141:1–141:14. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL: https://doi.org/10.4230/LIPIcs.ICALP.2019.141, doi:10.4230/LIPICS.ICALP.2019.141.
[16] Thomas Erlebach and Jakob T. Spooner. Parameterised temporal exploration problems. J. Comput. Syst. Sci., 135:73–88, 2023. URL: https://doi.org/10.1016/j.jcss.2023.01.003, doi:10.1016/J.JCSS.2023.01.003.
[17] Thekla Hamm, Nina Klobas, George B. Mertzios, and Paul G. Spirakis. The complexity of temporal vertex cover in small-degree graphs. In Thirty-Sixth AAAI Conference on Artificial Intelligence, AAAI 2022, Thirty-Fourth Conference on Innovative Applications of Artificial Intelligence, IAAI 2022, The Twelfth Symposium on Educational Advances in Artificial Intelligence, EAAI 2022 Virtual Event, February 22 - March 1, 2022, pages 10193–10201. AAAI Press, 2022. URL: https://doi.org/10.1609/aaai.v36i9.21259, doi:10.1609/AAAI.V36I9.21259.
[18] Kathrin Hanauer, Monika Henzinger, and Christian Schulz. Recent advances in fully dynamic graph algorithms - A quick reference guide. ACM J. Exp. Algorithms, 27:1.11:1–1.11:45, 2022. doi:10.1145/3555806.
[19] Monika Henzinger, Sebastian Krinningger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proceedings of the Forty-Seventh Annual ACM Symposium on Theory of Computing, STOC '15, page 21–30, New York, NY, USA, 2015. Association for Computing Machinery. doi:10.1145/2746539.2746609.
[20] Petter Holme. Temporal Networks, pages 3053–3062. Springer New York, New York, NY, 2018. doi:10.1007/978-1-4939-7131-2_42.
[21] Shang-En Huang, Dawei Huang, Tsvi Kopelowitz, Seth Pettie, and Mikkel Thorup. Fully dynamic connectivity in o(log n(loglog n)²) amortized expected time. TheoretiCS, 2, 2023. URL: https://doi.org/10.46298/theoretics.23.6, doi:10.46298/THEORETICS.23.6.
[22] 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. URL: https://www.sciencedirect.com/science/article/pii/S0022000002918295, doi:10.1006/jcss.2002.1829.
[23] Kasper Green Larsen and R. Ryan Williams. Faster online matrix-vector multiplication. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 2182-2189. SIAM, 2017. doi:10.1137/1.9781611974782.142.
[24] Ryan Williams. Matrix-vector multiplication in sub-quadratic time: (some preprocessing required). In Nikhil Bansal, Kirk Pruhs, and Clifford Stein, editors, Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2007, New Orleans, Louisiana, USA, January 7-9, 2007, pages 995-1001. SIAM, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283490.
[25] Huanhuan Wu, James Cheng, Silu Huang, Yiping Ke, Yi Lu, and Yanyan Xu. Path problems in temporal graphs. Proc. VLDB Endow., 7(9):721-732, 2014. URL: http://www.vldb.org/pvldb/vol7/p721-wu.pdf, doi:10.14778/2732939.2732945.