The Computational Complexity of Finding Temporal Paths under Waiting Time Constraints

Computing a (short) path between two vertices is one of the most fundamental primitives in graph algorithmics. In recent years, the study of paths in temporal graphs, that is, graphs where the vertex set is fixed but the edge set changes over time, gained more and more attention. A path is time-respecting, or temporal, if it uses edges with non-decreasing time stamps. We investigate a basic constraint for temporal paths, where the time spent at each vertex must not exceed a given duration $\Delta$, referred to as $\Delta$-restless temporal paths. This constraint arises naturally in the modeling of real-world processes like packet routing in communication networks and infection transmission routes of diseases where recovery confers lasting resistance. While finding temporal paths without waiting time restrictions is known to be doable in polynomial time, we show that the"restless variant"of this problem becomes computationally hard even in very restrictive settings. For example, it is W[1]-hard when parameterized by the distance to disjoint path of the underlying graph, which implies W[1]-hardness for many other parameters like feedback vertex number and pathwidth. A natural question is thus whether the problem becomes tractable in some natural settings. We explore several natural parameterizations, presenting FPT algorithms for three kinds of parameters: (1) output-related parameters (here, the maximum length of the path), (2) classical parameters applied to the underlying graph (e.g., feedback edge number), and (3) a new parameter called timed feedback vertex number, which captures finer-grained temporal features of the input temporal graph, and which may be of interest beyond this work.


Introduction
A highly successful strategy to control (or eliminate) outbreaks of infectious diseases is contact tracing [25]-whenever an individual is diagnosed positively, every person who is possibly infected by this individual is put into quarantine. However, the viral spread can be too fast to be traced manually, e.g., if the disease is transmittable in a pre-symptomatic (or asymptomatic) stage, then it seems likely that an individual already caused infection chains when diagnosed positively. Hence, large-scale digital systems are recommended which use physical proximity networks based on location and contact data [29]-this allows fast and precise contact tracing while avoiding the harmful effect of mass quarantines to society [29]. Physical proximity networks can be understood as temporal graphs 1 [19,37,39,46,51], that is, graphs where the vertex set (individuals) remains static but the edge set (physical contacts) may change over time. In this paper, we extend the literature on reachability in temporal graphs [5,7,14,17,10,44,50,61] by a computational complexity analysis of an important variation of one of the most fundamental combinational problems arising in the above mentioned scenario: given a temporal graph and two individuals s and z, is a chain of infection from s to z possible, that is, is there a temporal path from s to z? In particular, we use a reachability concept that captures the standard 3-state SIR-model (Susceptible-Infected-Recovered), a canonical spreading model for diseases where recovery confers lasting resistance [8,45,54].
In temporal graphs, the basic concepts of paths and reachability are defined in a timerespecting way [44]: a (strict) temporal path, also called "journey", is a path that uses edges with non-decreasing (increasing) time steps. To represent infection chains in the SIR-model, we restrict the time of "waiting" or "pausing" at each intermediate vertex to a prescribed duration. We call these paths restless temporal paths. They model infection transmission routes of diseases that grant immunity upon recovery [38]: An infected individual can transmit the disease until it is recovered (reflected by bounded waiting time) and it cannot be infected a second time afterwards since then it is immune (reflected by considering path instead of walk: every vertex can only be visited at most once). Another natural example of restless temporal paths is delay-tolerant networking among mobile entities, where the routing of a packet is performed over time and space by storing the packet for a limited time at intermediate nodes.
In the following we give an example to informally describe our problem setting 2 . In Figure 1 we are given the depicted temporal graph, vertices s and z, and the time bound ∆ = 2. We are asked to decide whether there is a restless temporal path from s to z, that is, a path which visits each vertex at most once and pauses at most ∆ units of time between consecutive hops. Here, (s, d, b, z) is a feasible solution, but (s, b, z) is not because the waiting time at b exceeds ∆. The walk (s, b, c, d, b, z) is not a valid solution because it visits vertex b twice. Finally, (s, a, c, d, b, z) is also a feasible solution.
Related work. Several types of waiting time constraints have been considered in the temporal graph literature. An empirical study by Pan and Saramäki [56] based on phone calls datasets observed a threshold in the correlation between the duration of pauses between calls and the ratio of the network reached over a spreading process. Casteigts et al. [18] showed a dramatic impact of waiting time constraints to the expressivity of a temporal graph, when considering such a graph as an automaton and temporal paths as words. In the context of temporal flows, Akrida et al. [3] considered a concept of "vertex buffers", which however pertains to the quantity of information that a vertex can store, rather than a duration. Enright et al. [26] considered deletion problems for reducing temporal connectivity. More closely related to our work, Himmel et al. [10] studied a variant of restless temporal paths where several visits to the same vertex are allowed, i.e., restless temporal walks. They showed, among other things, that such walks can be computed in polynomial time.
Many path-related problems have been studied in the temporal setting and the nature of temporal paths significantly increases the computational complexity of many of them (compared to their static counterparts). In the temporal setting, reachability is not an equivalence relation among vertices, which makes many problems more complicated. For example, finding a maximum temporally connected component is NP-hard [14]. We further have that in a temporal graph, spanning trees may not exist. In fact, even the existence of sparse spanners (i.e., subgraphs with o(n 2 )-many edges ensuring temporal connectivity) is not guaranteed [7], unless the underlying graph is complete [20], and computing a minimumcardinality spanner is APX-hard [4,50]. Yet another example is the problem of deciding whether there are k disjoint temporal paths between two given vertices. In a seminal article, Kempe et al. [44] showed that this problem, whose classical analogue is (again) polynomialtime solvable, becomes NP-hard. They further investigated the related problem of finding temporal separators, which is also NP-hard [30,44,62]. Deciding whether there exists a separator of a given size that cuts all restless temporal paths is known to be Σ P 2 -complete [52], that is, the problem is located in the second level of the polynomial time hierarchy.
Our contributions. We introduce the problem Restless Temporal Path. To get a finer understanding of the computational complexity of this problem, we turn our attention to its parametrized complexity. In stark contrast to both restless temporal walks and non-restless temporal paths, we show that this problem is NP-hard even in very restricted settings-in particular, even when the lifetime is restricted to only three time steps-and W[1]-hard when parameterized by the (vertex deletion) distance to disjoint paths of the underlying graph, which implies W [1]-hardness with respect to many other parameters like feedback vertex number and pathwidth (Section 3). This is tight in the sense that the problem can be solved in polynomial time when the underlying graph is a forest. On the positive side, we explore parameters of three different natures. First, we show that the problem is fixed-parameter tractable (FPT) for the length (in number of hops) of the temporal path (Section 4). We further show that the problem is FPT when parameterized by the feedback edge number of the underlying graph (Section 5). Additionally, we show that the problem presumably does not admit a polynomial kernel under the previously mentioned parameterizations where the problem is in FPT. Our results provide a fine-grained characterization of the tractability boundary of the computation of restless temporal paths for parameters of the underlying graph, as illustrated by the vicinity of the corresponding parameters in Figure 2. Then, going beyond parameters related to the output and to the underlying graph, we define a novel temporal version of the classic feedback vertex number called timed feedback vertex number. Intuitively, it counts the number of vertex appearances that have to be removed from the temporal graph such that its underlying graph becomes cycle-free. We show that finding restless temporal paths is FPT when parameterized by this parameter (Section 6). We believe that the latter is an interesting turn of events compared to our hardness results.
Strict versus non-strict temporal paths. In this paper, we focus mainly on the case of simple. We call the graph G i (G) = (V, E i (G)) the layer i of G where E i (G) := E i . If E i = ∅, then G i is a trivial layer. We call layers G i and G i+1 consecutive. We call i a time step. If an edge e is present at time i, that is, e ∈ E i , we say that e has time stamp i. We further denote V (G) := V . The underlying graph G ↓ (G) of G is defined as G ↓ (G) := (V, To improve readability, we remove (G) from the introduced notations whenever it is clear from the context. For every v ∈ V and every time step t ∈ [ ], we denote the appearance of vertex v at time t by the pair (v, t). For every t ∈ [ ] and every e ∈ E t we call the pair (e, t) a time edge. For a time edge ({v, w}, t) we call the vertex appearances (v, t) and (w, t) its endpoints. We assume that the size (for example when referring to input sizes in running time analyzes) of G is |G| := |V | + i=1 min{1, |E i |}, that is, we do not assume that we have compact representations of temporal graphs. Finally, we write n for |V |.
A temporal (s, z)-walk (or temporal walk) of length k from vertex s = v 0 to vertex z = v k in a temporal graph G = (V, of triples that we call transitions such that for all i ∈ [k] we have that {v i−1 , v i } ∈ E ti and for all i ∈ [k − 1] we have that t i ≤ t i+1 . Moreover, we call P a temporal (s, z)-path (or temporal path) of length k if v i = v j for all i, j ∈ {0, . . . , k} with i = j. Given a temporal path P = ( A restless temporal path is not allowed to wait an arbitrary amount of time in a vertex, but has to leave any vertex it visits within the next ∆ time steps, for some given value of ∆. Analogously to the non-restless case, a restless temporal walk may visit a vertex multiple times.
. We say that P respects the waiting time ∆.
Having this definition at hand, we are ready to define the main decision problem of this work.

Input:
A temporal graph G = (V, (E i ) i∈[ ] ), two distinct vertices s, z ∈ V , and an integer ∆ ≤ . Question: Is there a ∆-restless temporal (s, z)-path in G?
Note the waiting time at the source vertex s is ignored. This is without loss of generality, since one can add an auxiliary degree one source vertex which is only in the first layer adjacent to s. We also consider a variant, where we want to find ∆-restless paths of a certain maximum length. In the Short Restless Temporal Path problem, we are additionally given a integer k ∈ N and the question is whether there is a ∆-restless temporal path of length at most k from s to z in G? Note that Restless Temporal Path is the special case of Short Restless Temporal Path for k = |V | − 1 and that both problems are in NP.
Parameterized complexity. We use standard notation and terminology from parameterized complexity theory [22] and give here a brief overview of the most important concepts that are used in this paper. A parameterized problem is a language L ⊆ Σ * × N, where Σ is a finite alphabet. We call the second component the parameter of the problem. A parameterized problem is fixed-parameter tractable (in the complexity class FPT) if there is an algorithm that solves each instance (I, r) in f (r) · |I| O(1) time, for some computable function f . A decidable parameterized problem L admits a polynomial kernel if there is a polynomial-time algorithm that transforms each instance (I, r) into an instance (I , r ) such that (I, r) ∈ L if and only if (I , r ) ∈ L and |(I , r )| ∈ r O (1) . If a parameterized problem is hard for the parameterized complexity class W [1], then it is (presumably) not in FPT. The complexity classes W [1] is closed under parameterized reductions, which may run in FPT-time and additionally set the new parameter to a value that exclusively depends on the old parameter.
Basic observations. If there is a ∆-restless temporal (s, z)-path The other direction does not necessarily hold. However, we now show that for any (s, z)path in G ↓ we can decide in linear time whether this path is the support of a ∆-restless temporal (s, z)-path in G. As a consequence, we can decide Restless Temporal Path in linear time for any temporal graph where there exists a unique (s, z)-path in the underlying graph, in particular, if the underlying graph is a forest.
. , e n = {v n−1 , v n }} be the edges of the underlying path. We further define L i as the set of layers of G in which the edge e i ∈ E(G ↓ ) exists, that is, In the following, we construct a dynamic program on the path. We compute for every vertex v i the table entry T [v i ] which is defined as the set of all layers t such that there exists a ∆-restless temporal (s, v i )-path with arrival time t. It holds that T [v 1 ] = L 1 . Then, for all i ∈ [2, ], we compute the table entry T [v i ] by checking for each layer t ∈ L i whether there exists a ∆-restless temporal (s, v i−1 )-path that arrives in a layer t ∈ T [v i−1 ] such that we can extend the path to the vertex v i in layer t without exceeding the maximum waiting time ∆, that is, 0 ≤ t − t ≤ ∆. Formally, we have It is easy to verify that T [v i ] contains all layers t such that there exists a ∆-restless temporal (s, v i )-path with arrival time t. After computing the last entry T [v n ], this entry contains the set A of all layers t such that there exists a ∆-restless temporal (s, z)-path with arrival time t.
In order to compute a Furthermore, it is easy to observe that computational hardness of Restless Temporal Path for some fixed value of ∆ implies hardness for all larger finite values of ∆. This allows us to construct hardness reductions for small fixed values of ∆ and still obtain general hardness results. Observation 3. Given an instance I = (G, s, z, k, ∆) of Short Restless Temporal Path, we can construct in linear time an instance I = (G , s, z, k, ∆ + 1) of Short Restless Temporal Path such that I is a yes-instance if and only if I is a yes-instance.
Proof. The result immediately follows from the observation that a temporal graph G contains a ∆-restless temporal (s, z)-path if and only if the temporal graph G contains a (∆ + 1)restless temporal (s, z)-path, where G is obtained from G by inserting one trivial (edgeless) layer after every ∆ consecutive layers.
However, for some special values of ∆ we can solve Restless Temporal Path in polynomial time. Proof. Considering ∆ = 0 implies that the entirety of a path between s and z must be realized in a single layer. Thus, the problem is equivalent to testing if at least one of the layers G i contains a (static) path between s and z.
If ∆ ≥ , then ∆-restless temporal paths correspond to unrestricted temporal paths, whose computation can be made using any of the (polynomial time) algorithms in Bui-Xuan, Ferreira, and Jarry [17].

Hardness results for restless temporal paths
In this section we present a thorough analysis of the computational hardness of Restless Temporal Path which also transfers to Short Restless Temporal Path. NP-hardness for few layers. We start by showing that Restless Temporal Path is NP-complete even if the lifetime of the input temporal graph is constant. The reduction is similar in spirit to the classic NP-hardness reduction for 2-Disjoint Paths in directed graphs by Fortune et al. [33].

Theorem 5.
Restless Temporal Path is NP-complete for all finite ∆ ≥ 1 and ≥ ∆+2 even if every edge has only one time stamp.
Proof. We show this result by a reduction from the NP-complete Exact (3, 4)-SAT problem [59]. The problem Exact (3, 4)-SAT asks whether a formula φ is satisfiable, assuming that it is given in conjunctive normal form, each clause having exactly three literals and each variable appearing in exactly four clauses.
Let φ be an instance of Exact (3, 4)-SAT with n variables and m clauses. We construct a temporal graph G = (V, (E i ) i∈[ ] ) with = 3 consisting of a series of variable gadgets followed by dedicated vertices s n and s and then a series of clause gadgets. It is constructed in such a way that for ∆ = 1, any ∆-restless temporal (s, z)-path has to visit a vertex s n and each possible ∆-restless temporal (s, s n )-path represents exactly one variable assignment for the formula φ. Further we show that for any ∆-restless temporal (s, s n )-path it holds that it can be extended to a ∆-restless temporal (s, z)-path if and only if the ∆-restless temporal (s, s n )-path represents a satisfying assignment for the formula φ.
Variable Gadget. We start by adding a vertex s to the vertex set V of G. For each variable x i with i ∈ [n] of φ, we add 9 fresh vertices to V : x i , and s i . Each variable x i is represented by a gadget consisting two disjoint path segments of four vertices each. One path segment is formed by x (1) i , x (2) i , x (3) i , and x (4) i in that order and the second path segment is formed byx (1) i ,x (2) i ,x i , andx (4) i in that order. The connecting Figure 3 Illustration of the temporal graph constructed by the reduction in the proof of Theorem 5. An excerpt is shown with variable gadgets for x1, x2, and x3 and the clause gadget for ci = (x1 ∨ x2 ∨ ¬x3), where x1 appears for the fourth time, x2 appears for the third time, and x3 also appears for the third time. Black edges appear at time step one, the blue (dotted) edge {sn, s } appears at time step two, and the red (dashed) edges appear at time step three. edges all appear exclusively at time step one, that is, {x (1) i , x (2) i }, {x (2) i , x (3) i }, and {x (3) i , x (4) i } are added to E 1 . Analogously for the edges connectingx (1) i ,x (2) i ,x (3) i , andx (4) i . Intuitively, if a ∆-restless temporal (s, z)-path passes the first segment, then this corresponds to setting the variable x i to false. If it passes the second segment, then the variable is set to true. For all i ∈ [n − 1] we add the edges {x n , s n }, and {x (4) n , s n } to E 1 . We can observe that there are exactly 2 n different temporal (s, s n )-paths at time step one. Intuitively, each path represents exactly one variable assignment for the formula φ.
Clause Gadget. We add a vertex z to V . For each clause c j with j ∈ [m] we add a fresh vertex c j to V . We further add a vertex s to V and add the edge {s n , s } to E 2 . Let x i (or x i ) be a literal that appears in clause c j and let this be the kth appearance of variable x i in φ. Then, we add the edges {c j , x Hence, there are exactly 3 m different temporal (s , z)-paths at time step three. Each path must visit the clause vertices c 1 , . . . , c m in the given order by construction.
Finally, we set ∆ = 1. This finishes the construction, for a visualization see Figure 3. It is easy to check that every edge in the constructed temporal graph has only one time step and that the temporal graph can be computed in polynomial time.
Correctness. Now we can show that φ is satisfiable if and only if G has a ∆-restless temporal (s, z)-path.
(⇒): Let us assume there is a satisfying assignment for formula φ. Then we construct a ∆-restless temporal path from vertex s to z as follows. Starting from s, for each variable x i of φ the ∆-restless temporal path passes through the variables x i , andx (4) i , if x i is set to true, at time step one. The ∆-restless temporal path arrives at time step one in the vertex s n . In time step two it goes from s n to s . At time step three, the ∆-restless temporal path can be extended to c 1 . In each clause c j for j ∈ [m] there is at least one literal x i (orx i ) that is evaluated to true. Let c j be the kth clause in which x i appears. We have that, depending on whether x i is set to true (or false), the vertex x i ) has not been visited so far. Hence, the ∆-restless temporal path can be extended from c j to c j+1 (or to z for j = m) at time step three via x (⇐): Let us assume that there exists a ∆-restless temporal (s, z)-path in the constructed temporal graph G. Note that any ∆-restless temporal (s, z)-path must reach s n in time step one because the variable gadget has only edges at time step one and the waiting time ∆ = 1 prevents the path to enter the clause gadget (which only has edges at time step three) before using the edge {s n , s } at time step two.
It is easy to see that for the first part of the ∆-restless temporal graph from s to s n it holds that for each i ∈ [n], it visits either vertices x (1) i , x (2) i , x (3) i , and x (4) i , or verticesx (1) i , x (2) i ,x (3) i , andx (4) i . In the former case we set x i to false and in the latter case we set x i to true. We claim that this produces a satisfying assignment for φ.
In time step three, the part of the ∆-restless temporal path from s to z has to pass vertices c 1 , c 2 , . . . , c m to reach z. The ∆-restless temporal path passes exactly one variable vertex x i ) when going from c j to c j+1 (and finally from c m to z) that has not been visited so far and that corresponds to a variable that appears in the clause c j for the kth time. The fact that the variable vertex was not visited implies that we set the corresponding variable to a truth value that makes it satisfy clause c j . This holds for all j ∈ [m]. Hence, each clause is satisfied by the constructed assignment and, consequently, φ is satisfiable.
The reduction used in the proof of Theorem 5 also yields a running time lower bound assuming the Exponential Time Hypothesis (ETH) [40,41]. Furthermore, the reduction behind Theorem 5 can be modified such that it also yields that Restless Temporal Path is NP-hard, even if the underlying graph has constant maximum degree or the underlying graph is a clique where one edge ({s, z}) is missing. Note that in the latter case the underlying graph contains all edges except the one edge which would turn the instance into a trivial yes-instance.

Corollary 7.
Restless Temporal Path is NP-hard, even if the underlying graph has all but one edge or maximum degree six.
Proof. That Restless Temporal Path is NP-hard, even if the underlying graph has maximum degree six follows directly from the construction used in the proof of Theorem 5. To show that that Restless Temporal Path is NP-hard, even if the underlying graph has all edges except {s, z}, we reduce from Restless Temporal Path.
, s, z, ∆) be an instance of Restless Temporal Path with = 3. We construct an instance I : Observe that none of the edges in E 1 ∪ E 5 can be used in temporal (s, z)-path. Hence, I is a yes-instance if and only if I is a yes-instance. Furthermore, E 1 ∪ E 5 contain all possible edges except {s, z}. W[1]-hardness for distance to disjoint paths. In the following, we show that parameterizing Restless Temporal Path with structural graph parameters of the underlying graph of the input temporal graph presumably does not yield fixed-parameter tractability for a large number of popular parameters. In particular, we show that Restless Temporal Path parameterized by the distance to disjoint paths of the underlying graph is W[1]-hard. The distance to disjoint paths of a graph G is the minimum number of vertices we have to remove from G such that the reminder of G is a set of disjoint paths. Many well-known graph parameters can be upper-bounded in the distance to disjoint paths, e.g., pathwidth, treewidth, and feedback vertex number [57]. Hence, the following theorem also implies that Restless Temporal Path is W[1]-hard when parameterized by the pathwidth or the feedback vertex number of the underlying graph. Proof. We present a parameterized reduction from Multicolored Clique where, given a k-partite graph H = (U 1 U 2 . . . U k , F ), we are asked to decide whether H contains a clique of size k. Multicolored Clique is known to be W[1]-hard when parameterized by the clique size k [28,22].
be the set of edges between vertices in U i and U j . We can assume that k ≥ 3, otherwise we can solve the instance in polynomial time. Without loss of generality, we assume that for all i, j, i , j ∈ [k] with i < j and i < j we have that |F i,j | = |F i ,j | = m for some m ∈ N. Note that if this is not the case, we add new vertices and single edges to increase the cardinality of some set F i,j and this does not introduce new cliques since k ≥ 3. We further assume without loss of generality that |U 1 | = |U 2 | = . . . = |U k | = n for some n ∈ N. If this is not the case, we can add additional isolated vertices to increase the cardinality of some set U i . We construct a temporal graph G = (V, (E i ) i∈[ ] ) with two distinct vertices s, z ∈ V such that there is a ∆-restless temporal (s, z)-path in G if and only if H contains a clique of size k. Furthermore, we show that the underlying graph G ↓ of G has a distance to disjoint paths of O(k 2 ).

Vertex Selection Gadgets. For each set
We create a path of length k · n + n + 1 on fresh vertices w . Intuitively, this path contains a segment of length k for each vertex in U i which are separated by the vertices w (i) j , and the construction will allow a ∆-restless temporal (s, z)-path to skip exactly one of these segments, which is going to correspond to selecting this vertex for the clique.
Formally, for each vertex u j,k , which we call the segment corresponding to u (i) j . We further create vertices w x+1 with an edge at time (i − 1) · n + j and we connect w Lastly, we introduce a "skip vertex" s (i) that will allow a ∆-restless temporal (s, z)-path to skip one path segment of length k that corresponds to one of the vertices in U i . For each j ∈ [n + 1], we connect vertices s (i) and w (i) j with an edge at time (i − 1) · n + j. Now we connect the gadgets for all U i 's in sequence, that is, a ∆-restless temporal (s, z)path passes through the gadgets one after another, selecting one vertex of each part U i . Formally, for all i ∈ [k − 1], we connect vertices w with an edge at time i · n + 1. It is easy to check that after the removal of the vertices {s (1) , s (2) , . . . , s (k) }, the vertex selection gadget is a path. The vertex selection gadget is visualized in Figure 4.
Validation Gadgets. A ∆-restless temporal (s, z)-path has to pass through the validation gadgets after it passed through the vertex selection gadgets. Here, we are forced to choose a point in time where we visit two vertices of two different vertex selection gadgets. This Figure 4 Visualization of the vertex selection gadget for U1 from the reduction of Theorem 8. Black edges appear at time step one, red edges (densely dashed) at time step two, blue edges (dashdotted) at time step three, green edges (dotted) at time step n − 1, and orange edges (loosely dashed) at time step n. For the segment corresponding to u (1) 1 ∈ U1 all vertex names are presented, for the other segments the names are analogous but omitted. The auxiliary w n , . . . vertices are colored gray. The "skip vertex" s (1) is depicted as a yellow square. Note that after the removal of s (1) the vertex selection gadget for U1 is a path.
choice corresponds to the selection of an edge. Intuitively, this should only be possible if the selected vertices form a clique. We construct the gadget in the following way.
For each i, j ∈ [k] with i < j let the edges in F i,j be ordered in an arbitrary way, that is, 4 , respectively. Intuitively, the first path selects an edge from U i to U j and the transition to the second path should only be possible if the two endpoints of the selected edge are selected in the corresponding vertex selection gadgets.
Formally, for each edge e h,4 . Furthermore, we introduce three extra vertices s with an edge at time y i,j + 2h − 1, we connect vertices v 3 and v 4 with an edge at time with an edge at time y i,j + 2h − 1, and if h+1,1 with an edge at time y i,j +2h and we connect vertices v 3 with an edge at time y i,j +2h, where y i,j = k·n+2m·(i·j + 1 2 ·i·(i−1)−1) (the value of y i,j can be interpreted as a "time offset" for the validation gadget for F i,j , the value is computed by adding all time steps needed in validation gadget for F i ,j with i < j , i ≤ i, j ≤ j, and (i , j ) = (i, j)). Next, for each edge e b,i (from the vertex selection gadget for U j ) with an edge at time y i,j + 2h − 1, and we connect vertices s Intuitively, the time labels on the edges and the waiting time restrictions enforce that when arriving at s there is only one way to continue to s (i,j) 2 for which is it necessary to visit a vertex in the vertex selection gadget that corresponds to an endpoint of the selected edge. Similarly, from s there is only one way to continue to s for which it is necessary to visit a vertex in the vertex selection gadget that corresponds to the other endpoint of the selected edge. For a visualization of the validation gadget see Figure 5, where the red dashed path corresponds to the selection of an edge. Now we connect the gadgets for all F i,j 's in sequence, that is, a ∆-restless temporal (s, Visualization of the validation gadget for Fi,j from the reduction of Theorem 8. The "first path" of the gadget is depicted vertically on the left, the "second path" on the right. The connections to the vertex selection gadgets for the edge e  4 and v with an edge at time y i,j+1 . It is easy to check that after the removal of 3 · k 2 many vertices {s }, the validation gadgets are a set of disjoint paths, see Figure 5. Finally, we create two new vertices s and z, we connect vertices s and w (1) 1 (the "first" vertex of the vertex selection gadgets) with an edge at time one, we connect vertices s and s (1) (the "skip vertex" of the first vertex selection gadget) with an edge at time one, and we connect z and v (the "last" vertex of the validation gadgets) with an edge at time k · n + m · (3k 2 + 5k + 3). We further connect vertices w (k) n+1 and v (1,2) 1,1 (connecting the vertex selection gadgets and the validation gadgets) with an edge at time k · n. Finally, we set ∆ = 1. This completes the construction. It is easy to check that G can be constructed in polynomial time and that the distance to disjoint paths of G ↓ is at most k + 3 · k 2 and that every edge has only one time stamp.
Correctness. Now we show that H contains a clique of size k if and only if there is a ∆-restless temporal path from s to z in G.
(⇒): Assume that H contains a clique of size k and let X ⊆ V (H) with |X| = k be the set of vertices that form the clique in H. Now we show how to construct a ∆-restless . The temporal path starts at vertex s in G and then first passes through the vertex selection gadgets. If u (i) j ∈ X for some i ∈ [k] and j ∈ [n], then the temporal path skips the segment corresponding to u (i) j in the vertex selection gadget for U i . More formally, the temporal path follows the vertices w It is easy to check that the time labels of the edges in the vertex selection gadget allow for a restless temporal path as described that respects the waiting time ∆.
In the validation gadget for F i,j with i < j, the path "selects" the edge (U i ∩X)∪(U j ∩X) ∈ F i,j that connects the vertices from the parts U i and U j that are contained in the clique X.
b,i have not been used by the path in the vertex selection gadgets, since they appear in the segments that were skipped by the temporal path in the corresponding vertex selection gadgets. Furthermore, since the clique in H only contains one edge that connects vertices from U i and U j , the vertices v (i) a,j and v (j) b,i have not been used by the temporal path in an earlier validation gadget. It is easy to check that the time labels of the edges in the validation gadget allow for a ∆-restless temporal path as described. After the last validation gadget the path arrives at vertex z. Hence, we have found a ∆-restless temporal (s, z)-path in G.
(⇐): Assume that we are given a ∆-restless temporal (s, z)-path in G. We now show that H contains a clique of size k.
After starting at s, the ∆-restless temporal path first passes the vertex selection gadgets. Here, we need to make the important observation, that for each i ∈ [k], any ∆-restless temporal (s, z)-path has to "skip" at least one segment corresponding to one vertex u (i) j ∈ U i in the vertex selection gadget corresponding to U i , otherwise the temporal path cannot traverse the validation gadgets. More formally, assume for contradiction that there is a ∆-restless temporal (s, z)-path and an i ∈ [k] such that the temporal path visits all vertices in the vertex selection gadget corresponding to U i . Let j ∈ [k] with j = i. Assume that i < j (the other case works analogously). We claim that the temporal path cannot traverse the validation gadget for F i,j . For the temporal path to go from s by construction it has to visit at least one vertex from the vertex selection gadget for U i . If all vertices have already been visited, that would mean the ∆-restless temporal (s, z)-path visits one vertex twice-a contradiction.
The waiting time ∆ prevents the temporal path from "skipping" more than one segment. More formally, any ∆-restless temporal (s, z)-path arrives at the "skip vertex" s (i) of the vertex selection gadget for U i at time (i − 1) · n + j, for some j ∈ [k − 1]. By construction this means the path visits w (i) j , then s (i) , and then has to continue with w (i) j+1 since there is only one time edge the path can use without violating the waiting time ∆. It follows that the temporal path skips exactly the segment corresponding to u This implies that any ∆-restless temporal (s, z)-path that traverses the vertex selection gadgets leaves exactly one segment of every vertex selection gadget unvisited. Let the set X = {u 1 is an unvisited vertex.} be the set of vertices corresponding to the segments that are "skipped" by the given ∆-restless temporal (s, z)-path. It is easy to check that |X| = k. We claim that X is a clique in H.
Assume for contradiction that it is not. Then there are two vertices u We show that then the ∆-restless temporal (s, z)-path is not able to pass through the validation gadget for F i,j . By assumption we have that {u Note that the validation gadget is designed in a way that the first path "selects" an edge from F i,j and then the waiting time of one enforces that a ∆-restless temporal (s, z)-path can only move from the first path to the second path of a validation gadget if the two endpoints of the selected edge are vertices whose corresponding segments in the vertex selection gadget were skipped. We have seen that for every U i with i ∈ [k], the path segment corresponding to exactly one vertex of that set was skipped. Since {u we have that for every edge in F i,j that the segment corresponding to at least one of the two endpoints of the edge was not skipped. Hence, we have that the ∆-restless temporal path cannot pass through the validation gadget of F i,j and cannot reach z-a contradiction.

An FPT-algorithm for short restless temporal path
In this section, we discuss how to find short restless temporal paths. Recall that in Short Restless Temporal Path, we are given an additional integer k as input and are asked whether there exists a ∆-restless temporal (s, z)-path that uses at most k time edges. By Theorem 5 this problem is NP-hard. Note that in the contact tracing scenario from the beginning, we can expect to have a small k and a large temporal graph.

Theorem 9. Short Restless Temporal Path is
Note that we can solve Short Restless Temporal Path such that the running time is independent from the lifetime of the temporal graph. To show Theorem 9, we first reduce the problem to a specific path problem in directed graphs. Then, we apply known algebraic tools for multilinear monomials detection. Here, Theorem 9 (i) is based on Williams [60]. To get a deterministic algorithm with a running time almost linear in |G|, we show a different approach based on representative sets [31] which results in Theorem 9 (ii).
Reduction to directed graphs. We introduce a so-called ∆-(s, z)-expansion for two vertices s and z of a temporal graph with waiting times. That is, a time-expanded version of the temporal graph which reduces reachability questions to directed graphs. While similar approaches have been applied several times [3,12,50,61,62], to the best of our knowledge, this is the first time that waiting-times are considered. In a nutshell, the ∆-(s, z)-expansion has for each vertex v at most many copies v 1 , . . . , v and if an (s, z)-dipath visits v i , it means that the corresponding ∆-restless temporal (s, z)-walk visits v at time i.
Next, we show that a ∆-(s, z)-expansion of a temporal graph can be computed efficiently.
Proof. Let V := {s, z} and E be empty in the beginning. We will fill up V and E simultaneously. In order to do that efficiently, we will maintain for each vertex because vertices which are isolated in every layer are irrelevant for the ∆-(s, z)-expansion and can be erased in linear time.
We proceed as follows. For each t ∈ {1, . . . , } (in ascending order), we iterate over E t . For each {v, w} ∈ E t , we distinguish three cases.
Observe that after this procedure the digraph D = (V , E ) is the ∆-(s, z)-expansion of G and that we added at most 2 vertices for each time-edge in G. Hence, V ≤ |G|. This gives a overall running time of O(|G| · ∆).
It is easy to see that there is a ∆-restless temporal (s, z)-walk in the temporal graph if and only if there is an (s, z)-dipath in the ∆-(s, z)-expansion. Next, we identify the necessary side constraint to identify ∆-restless temporal (s, z)-paths in the ∆-(s, z)-expansion.
Thus, P is a ∆-restless temporal (s, z)-path of length k.
Obtaining Theorem 9 (i). We now adapt the algorithm of Williams [60] to our specific needs. To this end, we introduce some standard notation from algebraic theory.
An arithmetic circuit C over a commutative ring R is a simple labelled directed acyclic graph with its internal nodes labeled by + (sum gates) or × (product gates) and its nodes of in-degree zero (input gates) labeled with elements from R ∪ X, where X is a set of variables. There is one node of out-degree zero, called the output gate. The size of C is the number of vertices in the graph. An arithmetic circuit C over R computes a polynomial P (X) over R in the natural way: an input gate represents the polynomial it is labeled by. A sum (product) gate represents the sum (product) of the polynomials represented by its in-degree neighbors. We say C represents P (X) if the polynomial of the output gate of C is equivalent to P (X). The idea of the polynomial is similar to the one of Williams [60], but here instead of having one variable for each vertex we just have one variable for all vertices in one part of the partition of V .

Proof.
We define the polynomial recursively as Note that we can, by simply following (1), construct an arithmetic circuit C which represents Q(X) in O(k(n+|A|)) time such that each product gate has an in-degree of two. Furthermore, observe that Q(X) has no scalar multiplication and is of degree at most k + 1.
The following induction completes the proof: We claim that for all v ∈ V and j ∈   Obtaining Theorem 9 (ii). To show Theorem 9 (ii), we first note that in the (s, z)expansion of an (s, z)-path P in the directed graph describes a ∆-restless temporal (s, z)-path exactly when V (P ) is an independent set of some specific matroid. We then show an algorithm to find such a path P (if there is one). To this end, we introduce a problem, Independent Path, and some standard terminology from matroid theory [55]. A pair (U, I), where U is the ground set and I ⊆ 2 U is a family of independent sets, is a matroid if the following holds: ∅ ∈ I; if A ⊆ A and A ∈ I, then A ∈ I; and if A, B ∈ I and |A| < |B|, then there is an x ∈ B \ A such that A ∪ {x} ∈ I. An inclusion-wise maximal independent set A ∈ I of a matroid M = (U, I) is a basis. The cardinality of the bases of M is called the rank of M . The uniform matroid of rank r on U is the matroid (U, I) with I = {S ⊆ U | |S| ≤ r}. A matroid (U, I) is linear or representable over a field F if there is a matrix A with entries in F and the columns labeled by the elements of U such that S ∈ I if and only if the columns of A with labels in S are linearly independent over F. Such a matrix A is called a representation of (U, I). Now we are ready to state the Independent Path problem.

Input:
A digraph D = (V, E), two distinct vertices s, z ∈ V , a representation A M of a matroid M = (V, I) of rank r over a finite field F. Question: Is there an (s, z)-dipath P of length at most k in D such that V (P ) ∈ I?
For the remainder of this section, whenever we speak about independent sets, these are independent sets of a matroid and not a set of vertices which induce an edgeless graph.
Agrawal et al. [1] studied, independently from us, a similar problem where the edges of the path shall be an independent set of a matroid. To show Theorem 9 (ii), we need a single-exponential algorithm which has only a linear dependency on the input size. To this end, we show the following, based on representative families. The main tool of our algorithm are representative families of independent sets.
Definition 16 (Representative family). Given a matroid (U, I), and a family S ⊆ 2 U , we say that a subfamily S ⊆ S is a q-representative for S if, for each set Y ⊆ U of size at most q, it holds that: if there is a set X ∈ S with X Y ∈ I, then there is a set X ∈ S with X Y ∈ I.
A p-family is a family F such that each set S ∈ F is of size exactly p. For linear matroids, we can compute small representative families efficiently. Formally, the following is known. We are now ready to give the pseudo-code of the algorithm behind Theorem 15 (see Algorithm 4.1).
In Lemma 18. Algorithm 4.1 is correct. 5 Note that we require 2 < ω even though this might be not true. We do this to upper-bound the polynomial part in r. The bound ω < 2.373 is known [6].   (3) and assume that for all j < i we have that T [w, j] is an (r − j)-representative of P w,j , for all w ∈ V . Fix a vertex w ∈ V . We first show that if there is an X ∈ T [i, w], then there is an (s, w)-dipath P w of length i such that X = V (P w ) ∈ I. Observe that in Lines (5)-(7) we look at each possible predecessor v ∈ V of w in an (s, w)-dipath of length i, take each set X ∈ T [v, i − 1] and check whether X ∪ {w} is an independent set of size i + 1. If this is the case, we add it to N w,i . After Line (8), we have that T [w, i] ⊆ N w,i . Since X ∈ T [v, i − 1], we know that there is an (s, v)-dipath P v of length i − 1 with X = V (P ). Thus, if there is an X ∈ T [i, w], then there is an (s, w)-dipath P w of length i such that X = V (P w ) ∈ I Now let X ∈ P w,i and Y ⊆ V (D) be a set of vertices of size at most r − i − 1 such that X ∩ Y = ∅ and X Y ∈ I. Hence, there is an (s, w)-dipath P of length i such that In Lines (5)-(7) we add X ∪ {w} to N w,i . Let X := X ∪ {w} and note that X ∩ Y = ∅ and X Y ∈ I. Since T [w, i] is an (r − i)-representative family of N w,i , we know that there is an Next, we show that Algorithm 4.1 is actually a fixed-parameter algorithm parameterized by the length of a shortest ∆-restless temporal (s, z)-path. Proof. Without loss of generality we assume to have a total ordering on V . We represent a subset of V as a sorted string. Hence, union and intersection of two sets of size at most r takes O(r) time. We can thus look up and store sets of size at most r in a trie (or radix tree) in O(r) time [21]. Note that we do not have the time to completely initialize the arrays of size |V | in each trie node. Instead, we will initialize each array cell of a trie node at its first access. To keep track of the already initialized cells, we use sparse sets over V which allows membership test, insertion, and deletion of elements in constant time [16]. We w∈V R i,w operations over F-that is, the running time respecting the time needed for operations over F. Let i ∈ [r − 1] and w ∈ V . In the i-th iteration of the for-loop in Line (3) for all j < i and v ∈ V , since we used Theorem 17 in prior iterations. Let 2 < ω < 2.373 be an upper-bound for the matrix multiplication exponent. Hence, , because the independence test can be done via matrix multiplication. Thus,

Moreover, by Theorem 17, we have
where the last inclusion is true because we assume 2 < ω.
Thus, we can run Algorithm 4.1 in time of O (2 ωr m) operations over F.

Now Theorem 15 follows from Lemmata 18 and 19.
Observe that by Lemma 12, there is a ∆-restless temporal (s, z)-path in the temporal graph G if and only if there is an (s, z)-path P in the ∆-(s, z)-expansion D = (V , E ) of G such that V (P ) is an independent set in the partition matroid 6 Note that M is of rank |V | and hence too large to show Theorem 9 with Theorem 15.
A k-truncation of a matroid (U, I) is a matroid (U, {X ∈ I | |X| ≤ k}) such that all independent sets are of size at most k. The k-truncation of a linear matroid is also a linear matroid [49]. In our reduction from Short Restless Temporal Path to Independent Path we use a (k + 1)-truncation of matroid M . Two general approaches are known to compute a representation for a k-truncation of a linear matroid-one is randomized [49] and one is deterministic [47]. 7 Both approaches require a large field implying that one operation over that field is rather slow. However, for our specific matroid we employ the Vandermonde matrix to compute a representation over a small finite field. Note that we would not get a running time linear in the input size by applying the algorithm of Lokshtanov et al. [47] or Marx [49] on M .
Lemma 20. Given a universe U of size n, a partition P 1 · · · P q = U , and an integer k ∈ N, we can compute in O(kn) time a representation A M for the matroid M = U, X ⊆ U |X| ≤ k and ∀i ∈ [q] : |X ∩ P i | ≤ 1 , where A M is defined over a finite field F and one operation over F takes constant time.
Proof. For this running time analysis we assume the Word RAM model of computation, introduced by [34], which is similar to the RAM model of computation but one memory cell can store only O(log n) many bits, where n is the input size. This avoids abuse of the unit cost random access machine by for example multiplying very large numbers in constant time.
Without loss of generality we assume that q ≤ n. Let p be a prime number with q ≤ p ≤ 2q. Such a prime exists by the folklore Betrand-Chebyshev Theorem [2] and can be computed in O(n) time using Lagarias-Odlyzko Method [58]. To perform one operation on the prime field F p , one can first perform the primitive operation in Z and them take the result modulo p. Since p ≤ 2q ∈ O(n), each element of F p fits into one cell of the Word RAM model of computation. Thus, we can perform one operation over F p in constant time.
Let x 1 , . . . , x q be pair-wise distinct elements from F p . To compute an (k × n)-matrix A M as representation for M over F p , we compose (column-wise) for each element u ∈ P i the It remains to show that A M is a representation of M . Let X ⊆ U . If there is an i ∈ [p] such that |X ∩ P i | > 1, then the corresponding columns of A M are linearly dependent, because we have the vector v i twice. Now we assume that for all i ∈ [q] we have |X ∩ P i | ≤ 1. Furthermore, if |X| > k, then we know that the corresponding columns of A M are linearly dependent, because A M is an (k × n)-matrix. We can observe that if |X| = k, then the corresponding columns in A M form a Vandermonde matrix, whose determinate is known to be non-zero. Hence, if |X| ≤ k, then the corresponding columns in A M are linearly independent. Thus, A M is a representation of M .
We now show a reduction from Short Restless Temporal Path to Independent Path using Lemmata 11, 12 and 20 in O(k · |G|) time by Lemma 20. Note that M is an (k + 1)-truncated partition matroid and hence has rank k + 1. This completes the construction and gives us an overall running time of O(max{k, ∆} · |G|). We now claim (G, s, z, k, ∆) is a yes-instance if and only if (D, s, z, A M ) is a yes-instance and contains an independent (s, z)-dipath of length at most k.
(⇐): Let P be a ∆-restless temporal (s, z)-path of length k ≤ k in G. Then, by Lemma 12 there is an (s, z)-dipath P of length k such that for all v ∈ V it holds that |V (v)∩V (P )| ≤ 1. Since |V (P )| = k + 1 ≤ k + 1, we know that V (P ) is an independent set of M . Thus, P is a witness of length at most k for (D, s, z, A M ) being a yes-instance. Moreover, from Lemma 21 it is intermediately clear that the lower-bounds of Corollary 6 and Theorem 5 translate to Independent Path.

Corollary 22. Independent Path is NP-hard and unless the ETH fails there is no 2 o(n) -time algorithm for it, where n is the number of vertices.
Note that from Theorem 5 we can further deduce that there is not much hope for fast or early restless temporal paths, that is, restless temporal path that have a small duration or an early arrival time. The instance constructed in the reduction has lifetime = 3 and hence the duration as well as the arrival time of any restless temporal path in this instance is at most three. This implies that we presumably cannot find fast or early restless temporal paths efficiently.

Computational complexity landscape for the underlying graph
In this section we investigate the parameterized computational complexity of Restless Temporal Path when parameterized by structural parameters of the underlying graph. We start by observing that whenever a parametrization forbids path of unbounded length, then we can use Theorem 9 to show fixed-parameter tractability. For example, if we consider the vertex cover number vc ↓ of the underlying graph, then we can deduce that any path in the underlying graph and hence any restless temporal path can have length at most 2vc ↓ + 1. Thus, by Theorem 9, we get fixed-parameter tractability of Restless Temporal Path when parameterized by the vertex cover number of the underlying graph.
Observation 23. Restless Temporal Path parameterized by the vertex cover number vc ↓ of the underlying graph is fixed-parameter tractable.
From a classification standpoint, we can improve this a little further by observing that the length of a path in the underlying graph can be bounded by 2 O(td ↓ ) [53], where td ↓ is the treedepth of the underlying graph.
Observation 24. Restless Temporal Path parameterized by the treedepth td ↓ of the underlying graph is fixed-parameter tractable.
One of the few dark spots of the landscape is the feedback edge number 8 of the underlying graph which is resolved in the following way.

Theorem 25. Restless Temporal Path can be solved in
ffl is the feedback edge number of the underlying graph.
By Corollary 6 we know that Theorem 25 is asymptotically optimal, unless ETH fails. In a nutshell, our algorithm to prove Theorem 25 has the following five steps: 1. Exhaustively remove all degree-1 vertices from G ↓ (except for s and z). 2. Compute a minimum-cardinality feedback edge set F of the graph G ↓ .

Compute a set P of O(
ffl ) many paths in G ↓ − F such that every path in G ↓ − F is a concatenation of some paths in P. 4. "Guess" the feedback edges in F and paths in P of an (s, z)-path in G ↓ . 5. Verify whether the "guessed" (s, z)-path is a ∆-restless temporal (s, z)-path in G. First, we show that we can safely remove all (except s and z) degree-one vertices from the underlying graphs G ↓ .

Lemma 26. Reduction Rule 5.1 is safe and can be applied exhaustively in O(|G|) time.
Proof. Let I = (G = (V, (E i ) i∈[ ] ), s, z, ∆) be an instance of Restless Temporal Path, For the safeness we can observe that a vertex v ∈ V \ {s, z} with deg G ↓ (v) ≤ 1 cannot be visited by any ∆-restless temporal (s, z)-path. To apply Reduction Rule 5.1 exhaustively, we iterate once over the set of time edges to store for each vertex v ∈ V \ {s, z} its degree in a counter c v . Afterwards, we collect all vertices of degree 0 in X and all vertices of degree 1 in V 1 . Now we iterate over each vertex v ∈ V 1 , remove v from V 1 , add v to X, decrement the counter c u of its neighbor u. If c u becomes 1 we add u to V 1 . Note that this procedure ends after O(|V |) time.
Finally, we iterate one last time over the temporal graph G to construct the temporal graph G := G − X. The instance (G , s, z, ∆) of Restless Temporal Path is the resulting instance when we apply Reduction Rule 5.1 exhaustively on I.
Next, we consider a static graph G with no degree-one or degree-zero vertices. Let F be an minimum feedback edge set of G and let V F be the endpoints of the edges in F , that is V F = {v ∈ e | e ∈ F }. Let V ≥3 be the set of all vertices with a degree greater than two in G − F . We can partition the graph G − F into a set P of V F ∪ V ≥3 -connecting paths, that are, all paths in G − F who start and end in V F ∪ V ≥3 and have no internal vertices in that set of vertices. Note that all degree-one vertices of G − F are in V F . Hence, the graph G − F can be partitioned into V F ∪ V ≥3 -connecting paths. We can show that |P| ∈ O( ffl ).

Finding Temporal Paths under Waiting Time Constraints Lemma 27. Let G be a graph with no degree-one vertices and F be an minimum feedback edge set of G. The set P of V F ∪ V ≥3 -connecting paths of G − F has size O(|F |) and can be computed in O(|G|) time.
Proof. We can compute the set P in O(|G|) time as follows. We start with P = ∅ and pick any leaf v ∈ V (G − F ) of degree one. Recall that v ∈ V F and that G − F is cycle-free. There is at most one vertex w ∈ (V ≥3 ∪ V F ) \ {v} such that there is a path P between v and w which does not contain internal vertices from V ≥3 ∪ V F . Note that also P is unique. We add P to P and remove V (P ) \ {w} from the graph. Now we repeat this procedure with the next leaf of degree one until the graph has no edges.
It is easy to verify that the number of paths is bounded by the number of vertices in V ≥3 ∪ V F . We know that |V F | is upper-bounded by 2|F |. It remains to show that |V ≥3 | is in O(|F |).
As shown by Bentert et al. [9,Lemma 2], the number of vertices with degree greater or equal to three is bounded by 3|F | in a graph with no degree-one vertices. Hence, the number of V F ∪ V ≥3 -connecting paths is bounded by 5|F |.
With Lemmata 26 and 27 we can prove Theorem 25.

Proof of Theorem 25. Let
, s, z, ∆) be an instance of Restless Temporal Path and G ↓ be the underlying graph of G. Without loss of generality, we can assume that all vertices in V (G ↓ ) \ {s, z} have a degree greater than one. If this is initially not the case, then we safely remove all degree-one vertices of the underlying graph exhaustively in O(|G|) time by Lemma 26.
First we compute an minimum feedback edge set Lemma 27. Note that the additional vertices s and z can increase the size of P by at most four. Now, for any subset of feedback edges F ⊆ F and P ⊆ P, we check whether F ∪ E(P ) form an (s, z)-path P in G ↓ where E(P ) := P ∈P E(P ). This can be decided in O(|G ↓ |) time by a simple breadth-first search on G ↓ starting at the vertex s and using only edges in F ∪ E(P ). Last, we verify whether P forms a ∆-restless temporal (s, z)-path in G. Therefore, we consider the temporal graph G P = (V, (E i ∩ E(P )) i∈[ ] ) which has P as underlying graph. Note that we can construct G P in O(|G|) time, by iterating once over the set of time edges of G. By Lemma 2 we can decide in O(|G P |) time whether G P has a ∆-restless temporal (s, z)-path.
It is easy to check that the algorithm described above runs in 2 O(|F |) |G| time.
Correctness. It remains to show the correctness of the algorithm.
(⇒): If our algorithm outputs yes, then there is a ∆-restless temporal (s, z)-path in G P . The temporal graph G P contains a subset of the time edges of G, hence the ∆-restless temporal (s, z)-path in G P is also present in G. It follows that I is a yes-instance.
(⇐): Assume I is a yes-instance. Then there exists a ∆-restless temporal (s, z)-path in the temporal graph G. Let P = (v 0 , v 1 , t 1 ), . . . , (v k−1 , v k , t k ) be such a path. Hence, P = {v 0 , v 1 }, . . . , {v n−1 , v n } is an (s, z)-path in the underlying graph G ↓ . Let F = F ∩ E(P ). If we remove the edges in F from P then what remains is a collection of paths where each path is a concatenation of paths in P. Hence, there exists a subset P ⊆ P such that F ∪ E(P ) = E(P ). Thus, we will find P in G ↓ and, by Lemma 2, we will correctly verify that this P forms a ∆-restless temporal (s, z)-path in G.
The results from Sections 3 to 5 provide a good picture of the parameterized complexity landscape for Restless Temporal Path, meaning that for most of the widely known (static) graph parameters we know whether the problem is in FPT or W[1]-hard or para-NP-hard, see Figure 2.
Our understanding of the class of temporal graphs where we can solve Restless Temporal Path efficiently narrows down to the following points. We can check efficiently whether there is a ∆-restless temporal (s, z)-path P in temporal graph G if 1. there is a bounded number of (s, z)-path in G ↓ (cf. Theorem 25 and Lemma 2), 2. there is a bound on the length of P (cf. Theorem 9 and Observations 23 and 24). Apart from that we established with Theorems 5 and 8 and Corollary 7 hardness results for temporal graphs having restricted underlying graphs, see Figure 2.
Finally, we show that we presumably cannot expect to obtain polynomial kernels for all parameters considered so far and most structural parameters of the underlying graph. We employ the OR-cross-composition framework by Bodlaender, Jansen, and Kratsch [15] to refute the existence of a polynomial kernel for a parameterized problem under the assumption that NP ⊆ coNP/poly, the negation of which would cause a collapse of the polynomial-time hierarchy to the third level. In order to formally introduce the framework, we need some definitions.
An equivalence relation R on the instances of some problem L is a polynomial equivalence relation if 1. one can decide for each two instances in time polynomial in their sizes whether they belong to the same equivalence class, and 2. for each finite set S of instances, R partitions the set into at most (max x∈S |x|) O (1) equivalence classes. Using this, we can now define OR-cross-compositions.

Definition 29.
An OR-cross-composition of a problem L ⊆ Σ * into a parameterized problem P (with respect to a polynomial equivalence relation R on the instances of L) is an algorithm that takes n R-equivalent instances x 1 , . . . , x n of L and constructs in time polynomial in n i=1 |x i | an instance (x, k) of P such that 1. k is polynomially upper-bounded in max 1≤i≤n |x i | + log(n) and 2. (x, k) is a yes-instance of P if and only if there is an i ∈ [n] such that x i is a yes-instance of L.
If an NP-hard problem L OR-cross-composes into a parameterized problem P , then P does not admit a polynomial kernel, unless NP ⊆ coNP/poly [15].
Proof of Proposition 28. We provide an OR-cross-composition from Restless Temporal Path onto itself. We define an equivalence relation R as follows: ), s n , z n , ∆) be Requivalent instances of Restless Temporal Path. We construct a temporal graph G = (V , (E i ) i∈[ ] ) as follows. Let |V | = |V 1 | and s , z ∈ V . We identify all vertices s i with i ∈ [n] with each other and with s , that is, s = s 1 = . . . = s n . Analogously, we identify all vertices z i with i ∈ [n] with each other and with z , that is, z = z 1 = . . . = z n . We arbitrarily identify the remaining vertices of the instances with the remaining vertices from V , that is, let V \ {s , z } = V 1 \ {s 1 , z 1 } = . . . = V n \ {s n , z n }. Now let essentially forms the first 1 layers of G . Then we introduce ∆ + 1 trivial layers, that is, Then we continue in the same fashion with the second instance and so on. We have that = i∈[n] i + (n − 1) · (∆ + 1).
This instance can be constructed in polynomial time and the number of vertices is the same as the vertices in the input instances, hence |V | is polynomially upper-bounded by the maximum size of an input instance. Furthermore, it is easy to check that G contains a ∆-restless temporal (s , z )-path if and only if there is an i ∈ [n] such that G i contains a ∆-restless temporal (s i , z i )-path. This follows from the fact that all instances are separated in time by ∆ + 1 trivial layers, hence no ∆-restless temporal (s , z )-path can use time edges from different original instances. Since Restless Temporal Path is NP-hard (Theorem 5) the result follows.

6
Timed feedback vertex number In this section we introduce a new temporal version of the well-studied "feedback vertex number"-parameter. Recall that by Theorem 8 we know that Restless Temporal Path is W[1]-hard when parameterized by the feedback vertex number of the underlying graph. This motivates studying larger parameters with the goal to obtain tractability results. We propose a new parameter called timed feedback vertex number which, intuitively, quantifies the number of vertex appearances that need to be removed from a temporal graph such that its underlying graph becomes cycle-free. Note that having vertex appearances in the deletion set allows us to "guess" when we want to enter and leave the deletion set with a ∆-restless temporal (s, z)-path in addition to guessing in which order the vertex appearances are visited. We remark that there also have been studies of removing (time) edges from temporal graph to destroy temporal cycles [36], that is, temporal paths from a vertex back to itself. Similarly, one also could remove vertex appearances to destroy temporal cycles, resulting in a parameter that is smaller than the timed feedback vertex number and incomparable to the feedback vertex number of the underlying graph. Note that the mentioned parameters aiming at destroying temporal cycles are unbounded in our reductions. We leave the parameterized complexity of Restless Temporal Path with respect to those parameters open for future research.
Before defining timed feedback vertex number formally, we introduce notation for removing vertex appearances from a temporal graph. Intuitively, when we remove a vertex appearance from a temporal graph, we do not change its vertex set, but remove all time edges that have the removed vertex appearance as an endpoint. Let G = (V, (E i ) i∈[ ] ) be a temporal graph and X ⊆ V × [ ] a set of vertex appearances. Then we write G − X : Formally, the timed feedback vertex number is defined as follows.
The timed feedback vertex number of a temporal graph G is the minimum cardinality of a timed feedback vertex set of G.
We can observe that for any temporal graph the timed feedback vertex number is as least as large as the feedback vertex number of the underlying graph and upper-bounded by the product of the feedback vertex number of the underlying graph and the lifetime. We further remark that the timed feedback vertex number is invariant under reordering the layers. At the end of this section we show how a timed feedback vertex set can be computed efficiently.
14 if (G, c) has a multicolored independent set of size x + 1 then return yes.
The main result of this section is that Restless Temporal Path is fixed-parameter tractable when parameterized by the timed feedback vertex number of the input temporal graph. To this end, we show the following. The algorithm we present to show Theorem 31 solves Chordal Multicolored Independent Set, where given a chordal graph 9 G = (V, E) and a vertex coloring c : V → [k], we are asked to decide whether G contains an independent set of size k that contains exactly one vertex of each color. This problem is known to be NP-complete [13,Lemma 2] and solvable in O(3 k · |V | 2 ) time [11,Proposition 5.6]. Our algorithm for Restless Temporal Path roughly follows these computation steps: 1. "Guess" which of and in which order the vertex appearances from the timed feedback vertex set appear in the ∆-restless temporal (s, z)-path.

Compute the path segments between two timed feedback vertex set vertices by solving a
Chordal Multicolored Independent Set instance.
We give a precise description of our algorithm in Algorithm 6.1. Here, a partition O I U of a set of vertex appearances X is valid if we have v = v , for all distinct (v, t), (v , t ) ∈ I and for all distinct (v, t), (v , t ) ∈ O. A vertex appearance (v, t) ∈ I signals that a ∆-restless temporal (s, z)-path arrives in v at time t and (v, t) ∈ O signals that it departs from v at time t.
Moreover, observe that for a vertex appearance (v, t) ∈ I, the ∆-restless temporal (s, z)-path has to depart from v not later than t + ∆ and for vertex appearance (v, t) ∈ O, it has to arrive in v not earlier than t − ∆. To this end, we define the notion of a valid path between two consecutive vertex appearances: If it is clear from context, then we write (t i , t i+1 )-valid.
Note that if there exists a (t i , t i+1 )-valid ∆-restless temporal (v i , v i+1 )-path P i+1 and (t i+1 , t i+2 )-valid ∆-restless temporal (v i+1 , v i+2 )-path P i+2 , then we can "glue" them together and get a (t i , t i+2 )-valid ∆-restless (v i , v i+2 )-walk (not necessarily a path). Thus if there exist a valid ∆-restless temporal path between all consecutive pairs in a ∆-ordering which are pairwise vertex disjoint (except for the endpoints), then there exist a ∆-restless temporal (s, z)-path. The idea of Algorithm 6.1 is that a ∆-restless temporal (s, z)-path P induces a valid partition of the timed feedback vertex set X such that (v, t) according to the traversal of P (from s to z), then this is a ∆-ordering such that a subpath P of P corresponding to consecutive (v, t), (v , t ) ∈ M with v = v is (t, t , I, O)-valid in some temporal graph T of Line (9), see Figure 6.
The algorithm tries all possible partitions of X and all corresponding ∆-orderings. For each of these, we store the vertices V (P i ) ∩ V (T ) in the family P i , for all valid ∆-restless are two consecutive vertex appearances in the ∆-ordering. Here, we assume without loss of generality that no vertex appearance of s, z is in X. More specifically, for each two consecutive vertex appearances (v i−1 , t), (v i , t ) in the ∆-ordering our algorithm iterates over all pairs of time edges leading from (v i−1 , t) into the "forest" and from the "forest" back to (v i , t ). Since this fixes the entry points into the forest in each iteration, any two (t i , t i+1 )-valid ∆-restless temporal (v i , v i+1 )-paths present in the iteration use the same vertices of the underlying graph. Hence it suffices to check whether one exists. Note that, if we have |P i | ≥ 0 for all i ∈ {1, . . . , x + 1}, then there is a ∆-restless (s, z)-walk in G. Hence, to find a ∆-restless temporal (s, z)-path, we have to find x + 1 pair-wise disjoint sets P such that P i ∈ P i . Here, we observe that the intersection graph in Line (12) is chordal [35] and use an algorithm of Bentert et al. [11] for Chordal Multicolored Independent Set as a subroutine to find such pairwise-disjoint P Note that during one iteration of the loop in Line (4) we consider an time edge of G at most two times as e 1 and two times as e 2 in Line (8). Hence, we have O(|G| 2 ) many iteration of the loop in Line (8) be a temporal graph with s, z ∈ V and let X be a timed feedback vertex set of G. We assume without loss of generality that s and z have no vertex appearance in X, that is, s, z ∈ {v | (v, t) ∈ X}. If this is not the case, then we can add a new vertexŝ to G and for each edge {s, v} ∈ E i , we add {ŝ, s} to E i . It is clear that there exists a ∆-restless temporal (s, z)-path P if and only if there exists a ∆-restless temporal (ŝ, z)-pathP . The set X remains a time feedback vertex set becauseŝ has degree one in the underlying graph G ↓ . Hence, we can now ask for a ∆-restless temporal (ŝ, z)-path in G. The same holds for the vertex z by a symmetric argument.
We show now that Algorithm 6.1 outputs yes if and only if there is a ∆-restless temporal (s, z)-path in G. x+1 } be such an multicolored independent set, let (v 0 , t 0 ) ≤ · · · ≤ (v x+1 , t x+1 ) be the respective ∆-ordering when the set D was found, and let I O X be the valid partition of X. Hence, P i represents a (t i−1 , t i , I, O)-valid ∆-restless temporal (v i−1 , v i )-path. Due to D being an independent set, it holds that P Consequently, P 1 · · · P x+1 is a ∆-restless temporal (s, z)-path in G.
(⇐): Assume G contains a ∆-restless temporal (s, z)-path P , then let I O U = X be the partition of X that is induced by P . That is, for all (v, t) ∈ I there exists a time edge (w, v, t) in P , for all (v, t) ∈ O there exists a time edge (v, w, t) in P , and for all (v, t) ∈ U there exist no time edge (v, w, t) or (w, v, t) in P . The partition I O U is a valid partition. Otherwise there exist two distinct vertex appearances (v, t), (v, t ) ∈ O such that there exist two time edges (w, v, t), (u, v, t ) in P indicating that P visits the vertex v twice. The same argument works for two vertex appearances of the same vertex in I. Let (v 1 , t 1 ) ≤ · · · ≤ (v x , t x ) be the vertex appearances in the order in which they are visited by P . It holds that t 1 ≤ . . . ≤ t x and for i < j ∈ [x] if v i = v j , then there cannot exist a vertex appearance between v i and v j (otherwise P would visit v i twice). Thus then it holds that P i is empty and P i = {∅} (Line (7)). Otherwise, It holds that for i = j ∈ [x + 1] the paths P i and P j can intersect only in their endpoints because P does not visit a vertex twice and thus Q i ∩ Q j = ∅. For each P i there exists a vertex P Hence, G has a multicolored independent set D = {P To conclude from Theorem 31 the fixed-parameter tractability of Restless Temporal Path parameterized the timed feedback vertex number, we need to compute a timed feedback vertex set efficiently. This is clearly NP-hard, since it generalizes the NP-complete Feedback Vertex Set problem [43]. However, we establish the following possibilities to compute a Feedback Vertex Set. To prove Theorem 35, we first show that a timed feedback vertex set of a temporal graph can be computed via the following problem.

Input:
Graph G = (V, E), subsets V ∞ , T ⊆ V and integer k ∈ N. Question: Is there a X ⊆ (V \ V ∞ ) of size at most k such that no simple cycle in G − X contains a vertex in T ?
Then the 8-approximation for timed feedback vertex set follows from the 8-approximation of Even et al. [27] for Weighted Subset Feedback Set 10 . Now we see two ways in the literature to deduce a FPT-algorithm for timed feedback vertex set. One is via a reduction from SFVS-UV to the more general problem Group Subset Feedback Vertex Set. The other is through Cygan et al. [23] who claim that SFVS-UV is equivalent (under parameterized reductions for k) to Subset Feedback Vertex Set. The latter is SFVS-UV where V ∞ = ∅. While the arguments of Cygan et al. [23] only work if V ∞ ∩ T = ∅, we here provide the missing arguments to show that the statement itself is true and hence fill a gap in the literature.
We start with the reduction to SFVS-UV.
Finally we set V ∞ := e∈E ∪V e . Consider Figure 7 for an example.
Proof of Lemma 36. Let G = (V, E 1 , . . . , E ) be a temporal graph, x ∈ N, and I = (G, V ∞ , T, x) be the resulting instance from Construction 1. It is easy to check that Construction 1 can be computed in O(|G| + |V | 2 ) time.
We now claim that there is a timed feedback vertex set X of size at most x in G if and only if there is a subset feedback vertex X of size at most x in G such that X ∩ V ∞ = ∅.
(⇒): Let X be a timed feed back vertex for G. Then, set Y : Hence, |Y | ≤ x and Y ∩ V ∞ = ∅. We claim that Y is a subset feedback vertex set for I. Assume towards a contradiction that there is a simple cycle C in G − Y which contains a vertex of T . Furthermore, we assume without loss of generality that there is no shorter cycle in G − Y which contains a vertex of T . Observe that this implies that C does not visit three distinct vertices v a , v b , v c ∈ V v , for any v ∈ V , because otherwise there is a shorter cycle using one of the edges because otherwise there is a shorter cycle using the edge {v a , v b }. Furthermore, for all edge e ∈ E we have that V e ⊆ V (C) or V e ∩ V (C) = ∅, because G[V e ] induces a P 3 and hence using only an endpoint of that P 3 would imply that C visits two vertices v a , v b ∈ V v without the edge {v a , v b }, for some v ∈ V . Since T only contains the middle vertex e (T ) ∈ E e of the P 3 induced by G[V e ], we can observe that C is a subdivision of a cycle in G ↓ (G − X) which contradicts that X is a timed feedback vertex set for G.
Hence, X is of size at most x. We claim that X is a timed feedback vertex set for G. Assume towards a contradiction that this is not the case and there is a cycle C in G ↓ (G − X). We now build a cycle in G − Y containing a vertex from T . Note that for each edge e used in C none of the vertices in V e are in Y , otherwise V ∞ ∩ Y = ∅. Hence, set V C := e∈E(C) E e , where E(C) is the edge set of C. Since any two incident edges e 1 , e 2 ∈ E(C) are in the underlying graph of G − X, we know that there are t 1 , t 2 ∈ [ ] such that (e 1 , t 1 ) and (e 2 , t 2 ) are time edges of G − X. Hence, for two incident edges e 1 , e 2 ∈ E(C) with {v} = e 1 ∩ e 2 we pick t 1 , t 2 ∈ [ ] such that (e 1 , t 1 ) and (e 2 , t 2 ) are time edges of G − X add v t1 , v t2 ∈ V v to V C . Observe that G[V C ] contains a cycle and that V C ∩ T = ∅. Since we constructed V C from a cycle in the underlying graph of G − X we have V C ∩ Y = ∅. This is a contradiction. Now we can use the polynomial-time 8-approximation of Even et al. [27] for Weighted Subset Feedback Vertex Set and Lemma 36 to conclude the following. 11 Corollary 37. There is a polynomial-time 8-approximation for timed feedback vertex set.
In the remainder of this section we prove the following. Note that the running time of the algorithm behind Lemma 38 depends only linearly on the size of the graph. The proof of Lemma 38 is deferred to the end of this section. First, we introduce two data reductions rules and then perform the reduction behind Lemma 38 in two steps. We use these data reduction rules to get an equivalent instance where G[T ∩ V ∞ ] is an independent set. We start by detecting some no-instances. We now show that we can detect in linear-time whether Reduction Rule 6.1 is applicable and that it is safe. The latter means that the application of Reduction Rule 6.1 does not turn a yes-instance into a no-instance or vice versa.

Lemma 39. Reduction Rule 6.1 is safe and can be applied in linear time.
Proof. Since C is a witness that I is a no-instance, Reduction Rule 6.1 is safe. We check whether there is cycle C such that V (C)\(T ∩V ∞ ) = ∅ by simply checking whether G[T ∩V ∞ ] is a forest. Assume that G[T ∩ V ∞ ] is a forest, otherwise we are done and output a trivial no-instance. First, we partition V (G[T ∩ V ∞ ]) = Q 1 · · · Q c such that Q i is a maximal connected component of G[T ∩ V ∞ ]. Clearly, this can be done in linear time. For each connected component Q i of G[T ∩ V ∞ ] we first unmark all vertices in V \ (T ∩ V ∞ ). Then we iterate over all vertices v ∈ Q i and mark all vertices in N G (v) ∩ (V ∞ \ T ). If we find a vertex w ∈ Q i such that there is a vertex u ∈ N G (w) ∩ (V ∞ \ T ) which is already marked, then the path from v to w in Q i together with u is a cycle C where V (C) \ (T ∩ V ∞ ) ⊆ {u} ⊆ V ∞ . Hence, we output a trivial no-instance in this case. Moreover, if there is some simple cycle C where V (C) \ (T ∩ V ∞ ) ⊆ {u} ⊆ V ∞ , then all vertices V (C) \ {u} belong to the same connected component of G[T ∩ V ∞ ]. Thus, the above described procedure will find C. A simple application of the Handshaking Lemma shows that this procedure ends after linear time.
The purpose of the next data reduction rule is to merge undeletable terminal vertices which do share an edge.

Reduction Rule 6.2. Let I = (G, V ∞ , T, k) be an instance of Subset Feedback Vertex Set with Undeletable Vertices such that there is
Note that for each edge in G[T ∩ V ∞ ], either Reduction Rule 6.1 or Reduction Rule 6.2 is applicable. While it is easy to apply Reduction Rule 6.2 exhaustively in polynomial time, more effort is required to do the same in linear time. To this end, we will construct in linear time an equivalent instance such that Reduction Rules 6.1 and 6.2 are not applicable. , we first unmark all vertices. Second, we iterate over all vertices v ∈ Q i and mark all vertices in N G (v) \ (T ∩ V ∞ ). If we find a vertex w ∈ Q i such that a vertex u ∈ N G (w) \ (T ∩ V ∞ ) which is already marked, then we add u to K, because G[Q i ∪ {u}] contains a cycle intersecting T where u is the only (⇐): Let X be a solution for I . We assume without loss of generality that X ∩ {q j i | i ∈ [c], j ∈ [k + 1]} = ∅. Suppose towards a contradiction that X is not a solution for I. Let C be an cycle in G satisfying V (C) ∩ X = ∅ = V (C) ∩ T . We construct a closed walk C in G from C by replacing each maximal consecutive subpath in C containing only vertices from Q i with q 1 i , for all i ∈ [c]. Note that C contains a simple cycle which intersects T but not X-a contradiction. Now we are finally ready to prove Lemma 38.
Proof of Lemma 38. First, we apply Lemma 41 on I and hence assume that V ∞ \ T = ∅. Furthermore, by Lemma 40 we assume that Reduction Rules 6.1 and 6.2 are not applicable. Thus, G[V ∞ ∩ T ] is an independent set. We now create k + 1 copies of each vertex in V ∞ ∩ T such that we cannot remove all of them, even if there are deletable. However, we have to be careful what kind of new cycles this creates. We do the following. Let V ∞ ∩ T = {v 1 , v 2 , . . . , v p } and take a fresh set of vertices Q i := {q j i | j ∈ [k + 1]} for each i ∈ [p]. We construct G := (V , E ), where , j ∈ [k + 1]}| ≤ |V |(k + 1) and we create for each edge at most k + 2 new edges, G is constructed after O(k(|V | + |E|)) time. Together with the preprocessing of Lemma 41 this gives an overall running time of O(k 2 (|V | + |E|)).
We now claim that I is a yes-instance if and only if I is a yes-instance of Subset Feedback Vertex Set.
(⇒): Let X be a solution for I. Observe that X ⊆ V , because V \ V ⊆ V ∞ . Assume towards a contradiction that there is a cycle C in G such that V (C ) ∩ X = ∅. Assume without loss of generality that C is a shortest of the set of cycles satisfying V (C ) ∩ X = ∅. Hence, for each i ∈ [p] we have that |V (C ) ∩ Q i | ≤ 1, and since G[V ∞ ∩ T ] is an independent set, a vertex q j i ∈ V (C ) ∩ Q i has two neighbors w i , u i , where w, u ∈ V . Thus, we can construct a cycle C in G by replacing each subpath w i , q j i , u i with the vertex v i ∈ T ∩ V ∞ , where q j i ∈ V (C ) ∩ Q i and i ∈ [p], j ∈ [k + 1]. This contradicts X being a solution for I. (⇐): Let X be a solution for I . For all i ∈ [p], we assume without loss of generality that X ∩ Q i = ∅: This can be assumed, because |Q i | > k ≥ |X | and all vertices in Q i have the same neighborhood. X ∩ {w i | {v i , w} ∈ E} = ∅: This can be assumed, because these vertices are of degree two and thus a vertex w i can be replaced by its origin w. X ∩ {w i | {v i , w} ∈ E} = ∅: Such a vertex w i can be replaced by its origin w as well, because for each cycle C in G passing through T which does not include w, we know that v i q j i w i q j i u i is a subpath of C for some v, u ∈ V , q j i , q j i ∈ Q i , and j, j ∈ [k + 1]. Hence C − {q j i , w i } is also a cycle in G that contains a vertex from T . Thus, there is V (C ) ∩ (X \ {w i }) = ∅. Hence X ⊆ V \ V ∞ . Now assume towards a contradiction that there is a cycle C in G which does not contain a vertex in X . Hence there v i ∈ V (C) ∩ (T ∩ V ∞ ), otherwise C is also a cycle in G . We construct a cycle C in G from C by replacing each subpath u, v i , w in C with u, u i , u i , v i , w i , w i , w, for all v i ∈ V (C) ∩ (T ∩ V ∞ ). This contradicts X being a solution because u i ∈ T . By using Lemmata 36 and 38 we now can compute a minimum timed feedback vertex set by any known Subset Feedback Vertex Set algorithms. Thus, Lemmata 36 and 38 and Corollary 37 together with the algorithm of Iwata et al. [42] imply Theorem 35.

Conclusion
We have analyzed the (parameterized) computational complexity of Restless Temporal Path, a canonical variant of the problem of finding temporal paths, where the waiting time at every vertex is restricted. Unlike its non-restless counterpart or the "walk-version", this problem turns out to be computationally hard, even in quite restricted cases. On the positive side, we give an efficient algorithm to find short restless temporal paths and we could identify structural parameters of the underlying graph and of the temporal graph itself that allow for fixed-parameter algorithms.