Exploration of k-edge-deficient temporal graphs

A temporal graph with lifetime L is a sequence of L graphs G1,…,GL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G_1, \ldots ,G_L$$\end{document}, called layers, all of which have the same vertex set V but can have different edge sets. The underlying graph is the graph with vertex set V that contains all the edges that appear in at least one layer. The temporal graph is always connected if each layer is a connected graph, and it is k-edge-deficient if each layer contains all except at most k edges of the underlying graph. For a given start vertex s, a temporal exploration is a temporal walk that starts at s, traverses at most one edge in each layer, and visits all vertices of the temporal graph. We show that always-connected, k-edge-deficient temporal graphs with sufficient lifetime can always be explored in O(knlogn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(kn \log n)$$\end{document} time steps. We also construct always-connected, k-edge-deficient temporal graphs for which any exploration requires Ω(nlogk)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varOmega (n \log k)$$\end{document} time steps. For always-connected, 1-edge-deficient temporal graphs, we show that O(n) time steps suffice for temporal exploration.


Introduction
Given a simple, connected, undirected graph G and a start vertex s ∈ V (G), the task of exploring G, i.e. computing a sequence of consecutively crossed edges e ∈ E(G) that begins at s and visits every vertex v ∈ V (G) at least once, is both natural and well-understood. A closely related problem was initially considered by Shannon [23], who designed a mechanical maze-solving machine which implemented a depth-first search-type technique in order to locate, within a given maze, a prespecified goal. This 'searching' problem is indeed related to graph exploration: if our task is to simply complete an exploration of G, then a solution can be straightforwardly found by performing a depth-first search (DFS) starting from s and stopping once all vertices have been visited at least once-clearly this requires Θ(n) edge traversals in total, where n = |V (G)|.
The graph exploration problem in the context of temporal graphs (i.e. graphs whose edge set can change over time) has also received significant attention in recent years [1,2,[6][7][8][9]21]. This problem, known as Temporal Exploration (TEXP), but restricted to k-edgedeficient temporal graphs (which we define formally later) is the focus of this paper. Given a temporal graph G, the problem asks that we compute a temporal walk, starting at some prespecified vertex s ∈ V (G), that makes at most a single edge traversal in each time step, and that visits all vertices at least once by the earliest time possible. We formally define the problem and temporal graph model in Sect. 2, but refer the interested reader to [5,20] for more on temporal graphs in general, or [6,21] for more details on TEXP. In a rather general setting, TEXP makes no assumptions about the input temporal graph, aside from the assumption that it is connected in each time step (i.e. always-connected), which ensures exploration is always possible provided the temporal graph has a sufficient lifetime [21]. This general setting allows an arbitrary number of edges from the underlying graph to be missing in each time step, and thus the graphs in different time steps can differ substantially, which leads to pessimistic bounds on the worst-case exploration time: it was shown by Erlebach et al. [6] that there are always-connected temporal graphs with n vertices that require Θ(n 2 ) time steps to be explored. The construction of temporal graphs with such a large exploration time from [6] uses an underlying graph that is dense (it has Θ(n 2 ) edges), whilst the graph in each time step is a star (with n − 1 edges). Thus, in each time step a quadratic number of edges of the underlying graph are missing from the graph of that time step. Therefore, it is interesting to study the question whether better exploration times can be guaranteed if the number of missing edges in each time step is small. To study this question, we also consider always-connected temporal graphs but, in contrast to previous work, we consider k-edgedeficient temporal graphs whose structure in each step is 'close' to that of its underlying graph, in the sense that at most k edges are missing. Such graphs were previously considered by Gotoh et al. [14] in a distributed setting. We assume that the temporal structure of an input temporal graph is known in full to an algorithm prior to it computing a solution, as opposed to a setting in which the structure of the graph in each step is revealed online and over time.

Our contribution
We consider Temporal Exploration on always-connected temporal graphs that are kedge-deficient for some k ∈ N. We define the property formally in Sect. 2, but essentially these are temporal graphs G with underlying graph G such that, during each time step t of G's lifetime, there are at most k edges e ∈ E in the underlying graph that are untraversable in (or 'missing' from) G. Let n = |V (G)|. In Sect. 3, we prove for arbitrary k ∈ N that kedge-deficient always-connected temporal graphs can be explored in O(kn log n) time steps. In Sect. 4, we additionally show that 1-edge-deficient graphs can always be explored in 51n time steps, by giving a recursive exploration algorithm that exploits a number of existing structural/algorithmic results originating from traditional graph theory. In Sect. 5, we present a modification of an existing Ω(n log n) lower bound on the number of time steps required to explore always-connected temporal graphs with planar underlying graph of maximum degree ≤ 4, presented in [6], that allows us to obtain an Ω(n log k) bound on the worst-case time required to explore arbitrary always-connected k-edge-deficient temporal graphs. Finally, we conclude and point to directions for future work in Sect. 6.

Related work
Bui-Xuan et al. [4] propose multiple objectives for optimization when computing temporal walks/paths from one vertex to another: e.g. fastest (fewest steps used) and foremost (arriving at the destination at the earliest time possible). Brodén et al. [3] consider the Temporal Travelling Salesperson Problem on a complete graph with n vertices, with edge costs that can differ between 1 and 2 in each time step. They show that when an edge's cost changes at most k times over the input graph's lifetime, the problem is NP-complete, but provide a (2 − 2 3k )-approximation; for the same problem, Michail and Spirakis [21] prove APX-hardness and provide a (1.7+ )-approximation. They also consider the decision version of the Temporal Exploration problem, which asks whether or not a given temporal graph admits a temporal walk that visits all vertices at least once. They show that the problem is NP-complete when no restrictions are placed on the input; they also propose considering the problem under the always-connected assumption, which ensures that exploration is possible provided the lifetime of the input graph is sufficiently long [21]. Erlebach et al. [6] further consider the optimization variant of the Temporal Exploration problem under the alwaysconnected assumption. They prove an Ω(n 2 ) lower bound on the time needed to explore general always-connected temporal graphs, and provide a proof that temporal graphs within this class can be explored in n 2 steps. They also prove a number of bounds on the number of time steps required to explore temporal graphs from various restricted temporal graph classes. Bodlaender and van der Zanden [2] examine TEXP when restricted to temporal graphs whose underlying graph has pathwidth at most 2, showing that it is NP-complete to decide if a temporal exploration schedule with a given arrival time exists even under this very limiting restriction. In [17,18], Ilcinkas et al. consider TEXP restricted to temporal graphs with underlying cycle or cactus graphs, respectively. Akrida et al. [1] consider Return-To-Base TEXP in which a candidate solution must return to the vertex from which it initially departed. Erlebach et al. [7] prove an O(dn 1.75 ) bound on the number of time steps required to explore any temporal graph with degree bounded by d in each step, a considerable improvement over the previously best known O( n 2 log d log n ) bound [8]. In [9], a non-strict variant of TEXP is studied-here, a computed walk may make an unlimited number of edge traversals in each given time step. Notions of strict/non-strict paths which, respectively, allow for a single edge/unlimited number of edge(s) to be crossed in any time step have been considered before, notably by Kempe et al. [19] and Zschoche et al. [24]. In this paper, we only consider strict temporal walks. Gotoh et al. [15] consider TEXP on temporal graphs with underlying cycle under the so-called (H , S)-view, in which only the availability of edges at most H hops away for at most the next S time steps is known to an algorithm. Exploration of k-edge-deficient temporal graphs is studied by Gotoh et al. [14] in a distributed setting. They prove bounds on the number of cooperating mobile agents required to ensure that temporal graph exploration can be achieved when the vertices of a given k-edge-deficient temporal graph are anonymous (i.e. have no unique identifiers). They consider this problem under two distinct 'agent scheduler' models, one in which all agents are active during each time step (fully synchronous), and one in which an arbitrary subset of the agents are active during each time step (semi-synchronous)-in either model the agents are able to observe, in each time step, their current vertex v along with the vertices that are adjacent to their current vertex, as well as store information about this in a 'notebook'. They are also able to write information to a 'white board' stored at vertex v, that other agents can subsequently observe and write to themselves. In the semi-synchronous case, it is shown that 2k + 1 agents are enough to ensure that exploration can be performed by the mobile agents in a k-edge-deficient graph. For the fully synchronous case, they show that 2k agents are enough as long as the size (i.e. order plus number of edges) of the input temporal graph and the number of cooperating agents is known a priori by all agents.

Preliminaries
For a positive integer i, we use the notation [i] as short-hand for the set {1, 2, . . . , i}.
Definition 1 (Temporal graph) A temporal graph G with lifetime L is a sequence of static graphs G = G 1 , G 2 , . . . , G L that all have the same vertex set V . We let V (G) := V and n := |V (G)|, and say G is of order n. The subscripts t ∈ [L] indexing the graphs in the sequence are the discrete time steps (or simply 'steps') 1 to L. Each G t (which may be referred to as the tth layer) represents the structure of G in time step t. The underlying graph An edge-time pair of G is a pair (e, t) such that t ∈ [L] and e ∈ E(G t ). If ({u, v}, t) is an edge-time pair and an agent is located at u at the start of time step t, the agent can traverse the edge {u, v} in time step t and arrive at v at the end of time step t. Definition 2 (Temporal walk) A temporal walk W in a temporal graph G is a finite sequence of vertices alternating with edge-time pairs The walk starts at vertex v 1 and ends at vertex v l . Its arrival time, denoted by α(W ), is the time step in which it traverses its last edge, i.e. t l−1 .
A temporal walk W = (v 1 , (e 1 , t 1 ), v 2 , . . . , v l−1 , (e l−1 , t l−1 ), v l ) in a temporal graph G is an exploration schedule for start vertex s if v 1 = s and {v 1 , v 2 , . . . , v l } = V (G). In the optimization variant F-TEXP (foremost TEXP) of TEXP, we are interested in determining, for a given temporal graph G and start vertex s, an exploration schedule W for start vertex s with minimum arrival time α(W ).
A temporal graph G = G 1 , . . . , G L is always-connected if and only if G t is connected for all t ∈ [L]. We consider always-connected temporal graphs with lifetime L ≥ (n − 1) 2 . The following lemma from [6] will be useful and implies that such temporal graphs can always be explored in at most (n − 1) 2 steps by repeatedly moving to a previously unvisited vertex in at most n − 1 steps. Lemma 1 (Reachability Lemma; Erlebach et al. [6]) Let G be an arbitrary always-connected temporal graph with vertex set V , n = |V | ≥ 2, and lifetime L. Then, an agent situated at any vertex u ∈ V at the beginning of some time step t ≤ L − n + 2 can reach any other vertex v ∈ V in at most |V | − 1 = n − 1 steps, i.e. by the end of time step t + n − 2.
We now give a formal definition of what it means for a temporal graph G to be k-edgedeficient: In always-connected k-edge-deficient temporal graphs, we have that When constructing a walk in a k-edge-deficient temporal graph G, we may speak of an agent following a walk W in the underlying graph G. By this, we mean that the agent traverses in G the edges in the same order as they are traversed by W , and does this whenever it is possible to do so, i.e. whenever the next edge e traversed by W is present in the current time step t. If that edge is not present, the agent is blocked on e in step t.
Roughly speaking, our approaches to proving exploration results for both k-edge-deficient and 1-edge-deficient temporal graphs involve splitting the lifetime of the input graph into consecutive periods of time steps, then allowing a set of virtual agents to occupy and attempt to explore disjoint substructures of the same temporal graph during each period. We then allow a real agent to follow the 'best' virtual agent (best in the sense that this agent has successfully completed the exploration of their respective substructure) in any such period. Whilst this same generic approach is employed in some sense or another whilst proving both results, the graph-theoretic machinery that enables the approach to work is decidedly different in both cases. We remark that the difference between the multi-agent approach we employ here and the multi-agent approaches of [14] is that, here, we use multiple virtual agents as a conceptual tool for proving the existence (and construction) of a single exploration schedule that can then be followed by a single real agent. In [14], however, the multiple agents are an integral part of the problem, as are the varying levels of information that the agents can retain and share with one another.

Exploration algorithm for k missing edges
We present an algorithm that proceeds in rounds. In each round, it considers a forest consisting of k + 1 edge-disjoint subtrees of a spanning tree of the underlying graph and ensures that all edges of one of these trees can be traversed in the round. The following lemma, shown by Frederickson and Johnson [12, Lemma 1], allows us to split a tree T into a pair of edge-disjoint subtrees (whose union covers E(T )) in a balanced way: Say that a set S of edge-disjoint subtrees T ⊆ F is a subtree cover of a forest F if, for every e ∈ E(F) we have e ∈ E(T ) for some T ∈ S. Call such a subtree cover S balanced if it satisfies the additional property that the largest tree in S contains at most three times the number of edges contained by the smallest. Our exploration method will require maintaining a subtree cover of size k + 1 of the unexplored parts of the temporal graph, as this ensures that in each step at least one of the subtrees does not have a missing edge. The following lemma, which we prove by applying Lemma 2 to the largest tree in a balanced subtree cover, allows us to build a subtree cover of size k + 1 from a spanning tree of the whole underlying graph, and to increase a subtree cover from size k to size k + 1 each time one of the k + 1 subtrees has been explored and thus removed from the subtree cover. Lemma 3 Let S be a balanced subtree cover of some forest F such that |S| = x and |E(F)| ≥ x + 1 hold. Then, one can obtain a balanced subtree cover S of F such that |S | = x + 1.
Proof In this proof we write |T | as short-hand for |E(T )| for any tree T . Consider the largest tree T in S and apply to it Lemma 2 to obtain two edge-disjoint subtrees T and T such that |T |, |T | ∈ [|T |/3, 2|T |/3]. Note that this is possible because |E(F)| ≥ x + 1, and since S contains exactly x subtrees we have that the largest tree in S contains at least two edges, as is required by Lemma 2. Let S = (S − {T }) ∪ {T , T }. We have that S is a subtree cover of F, since S is a subtree cover of F, and since T and T are edge-disjoint and cover E(T ). Furthermore, since S is balanced and T contains the most edges of any tree in S, we have that every tree in S − {T } contains a number of edges in the range [|T |/3, |T |]. Moreover, we have |T |, |T | ∈ [|T |/3, 2|T |/3], and so |T |, |T | ∈ [|T |/3, |T |]. Concluding, we have that the number of edges in each tree of S lies in the range [|T |/3, |T |], and so S is balanced; it is clear from the construction of S that |S | = x + 1.
. . , G L be an always-connected, k-edge-deficient temporal graph (for some integer-valued function k of n) with underlying graph G, lifetime L ≥ (n − 1) 2 and order n. Then, there is a bound τ = O(kn log n) such that, for any start vertex s, there is an exploration schedule W of G that starts at s ∈ V (G) and has arrival time α(W ) ≤ min{τ, (n − 1) 2 }. Moreover, such a schedule can be computed in polynomial-time.
Proof For k ≥ n − 1, the result clearly holds as every always-connected temporal graph can be explored in at most (n − 1) 2 time steps (by repeated application of Lemma 1), so we assume k < n − 1 for the rest of the proof.
Compute an arbitrary spanning tree T of G, and let m = |E(T )| = n − 1. Assume w.l.o.g. that m ≥ 4, otherwise G can be explored in O(1) steps using O(1) applications of Lemma 1. Let S = {T } and note that S is a balanced subtree cover of T . Now apply Lemma 3 to S k times to obtain a balanced subtree cover S * of size k + 1 (this is possible since k ≤ n − 2). In the following, we let F denote a forest (represented as a single graph) containing all edges of T that may not yet have been traversed, initially F = T .
We now specify our algorithm in terms of an agent that explores the graph in consecutive rounds. We denote by t ( j) the first step of the jth round, and by s ( j) the vertex at which the agent is positioned at the beginning of time step t ( j) . The balanced subtree cover at the start of the jth round is denoted by S * ( j) , and the forest made up of edges that may not yet have been explored by (1) = S * is a balanced subtree cover of F (1) (with size k + 1), and m (1) = m. If F ( j) contains more than k + 1 edges, execute the jth round as follows: consider the graph from step t ( j) + n onward, and place a single virtual agent at an arbitrary vertex v i in each of the k + 1 subtrees T i ∈ S * ( j) . Now, for each i ∈ [k + 1], compute a DFS tour in T i starting from v i , then let the agent positioned in T i follow that DFS tour whenever it is possible to do so for the following 6m ( j) steps (i.e. whenever the next edge they are required to traverse is present in the current time step). Since there are k + 1 virtual agents following tours in edge-disjoint subtrees, and since G is k-edge-deficient, it follows that there are no edges missing from at least one subtree T ∈ S * ( j) in every step. Let T i * be the subtree that had no edges missing during the largest number of steps in the considered 6m ( j) -step period.
Then, T i * had no edge missing in at least k+1 steps in which the virtual agent positioned in T i * is able to traverse an edge are enough for that agent to complete their DFS of T i * and arrive back at v i * . Using the steps in the interval [t ( j) , t ( j) + n − 1], move the real agent, using Lemma 1, from s ( j) to the vertex v i * at which the virtual agent began their tour of T i * . Let W * be the tour followed by the virtual agent positioned in T i * ; from step t ( j) + n to step t ( j) = t ( j) + n + 6m ( j) − 1, let the real agent complete W * . Once completed, check if > k + 1 edges of T remain untraversed; if so, consider the set S = S * ( j) − {T i * } and note that |S | = k. Observe that S is balanced since S * ( j) was balanced and removing a tree cannot violate this property. Since we have S = S * ( j) − {T i * }, and since S * ( j) covered T , we have that S covers the forest F obtained from F ( j) by removing the edges of T i * . Apply Lemma 3 to S to obtain a balanced subtree cover S of F such that |S | = k + 1-note that this is valid since |E(F )| > k + 1 = |S | + 1, as is required by Lemma 3. Now, set and start the ( j + 1)th round as above. Once a round is completed and at most k + 1 edges remain, stop and explore the up to 2k + 2 remaining unexplored vertices one by one, using n − 1 steps per vertex by Lemma 1 and thus O(nk) steps for all these up to 2k + 2 vertices together.
Note (1) belongs to an edge of T that was traversed by the algorithm, or (2) was visited via an application of Lemma 1. Hence, the computed walk is an exploration schedule and it remains only to bound its arrival time. In each round j, a subtree containing at least a 1 3(k+1) fraction of the edges of F ( j) is traversed in its entirety. To see this, observe that |S * . A further at most (2k + 2)n steps are sufficient to explore the up to 2k + 2 remaining unvisited vertices. Hence, the constructed exploration schedule, call it W , has an arrival time of α(W ) ≤ O(kn log n) + (2k + 2)n = O(kn log n) as required. If this bound on the arrival time is greater than (n − 1) 2 , use instead the exploration schedule with arrival time (n − 1) 2 that follows from repeated application of Lemma 1.
Finally, it is easy to see that the algorithm for determining the exploration schedule can be implemented to run in polynomial time.
We remark that in Theorem 1 we have assumed that the given temporal graph has lifetime at least (n − 1) 2 as this assumption ensures that an exploration schedule exists for arbitrary always-connected temporal graphs. For values of k for which the bound O(kn log n) of the theorem evaluates to a value λ < (n − 1) 2 , it is of course sufficient to assume that the given temporal graph has lifetime at least λ.
As a consequence of Theorem 1, we get the following corollary: Corollary 1 Let G be an arbitrary, always-connected k-edge-deficient temporal graph with lifetime L = (n − 1) 2 and let k = o( n log n ). Then, for any start vertex s ∈ V (G), G necessarily admits an exploration schedule W that starts at s and has arrival time α(W ) = o(n 2 ).
Let k be an arbitrary function of n and consider the restriction of F-TEXP (the optimization variant of TEXP) to k-edge-deficient temporal graphs. Then, since the algorithm of Theorem 1 is constructive and runs in polynomial time, and since the optimal exploration schedule cannot have arrival time smaller than n − 1, we arrive at the following: Theorem 2 There exists a polynomial-time O(k log n)-approximation algorithm for F-TEXP on k-edge-deficient temporal graphs.

Exploration algorithm for a single missing edge
We now present our algorithm for the case when k = 1. We remark that exploration in this case feels, intuitively speaking, 'close' to exploration in static graphs, since there is just a single edge missing in each time step. This appears to be evidenced by the relative ease (compared to less restrictive cases such as k-edge-deficient for general k or bounded-degree temporal graphs) with which we can employ definitions/results from static graph theory in order to obtain our algorithm. We now provide some preliminary discussion before specifying the main algorithm of this section.
First, we aim to sparsify the given temporal graph because the exploration time of our method increases with the number of edges of the underlying graph. To do so, we will simply ignore some of the edges of the given temporal graph and focus on the subgraph consisting of the remaining edges. As at most one edge of the underlying graph is missing in each time step, the same property also holds for the subgraph consisting of those remaining edges, and we can focus on that subgraph for the purposes of exploration. We only need to be careful to define the subgraph in such a way that it remains connected provided that at most one edge is missing.
For two graphs . This definition extends naturally to the union of a finite collection of graphs.
it is connected and does not contain a bridge. Observe that all bridges of the underlying graph of an always-connected temporal graph are necessarily present in every time step, as otherwise the graph in a time step with a missing bridge would not be connected.
A 2-edge-connected component (abbreviated 2-ecc) of a graph G is a vertex-maximal induced subgraph C ⊆ G such that C is 2-edge-connected. Note that a 2-ecc can also be a single vertex. We say that a spanning subgraph G of G preserves 2-edge-connectivity if it contains all bridges of G and, for every 2-ecc C of G, the subgraph of G induced by V (C) is 2-edge-connected. In order to show that every connected graph G has a spanning subgraph that preserves 2-edge-connectivity and has only a linear number of edges, we make use of the following result by Nagamochi and Ibaraki.

Theorem 3 (Nagamochi and Ibaraki [22]) Every k-connected graph
An induced subgraph G of a graph G is a block (also known as biconnected component) of G if it is biconnected and maximal.
Definition 4 (Modified block-cut tree construction) Let B be the set of blocks of a given graph G. Construct a tree T as follows: (1) For every block B i ∈ B create a vertex b i ∈ V (T ), and for every vertex u ∈ V (G) create a vertex c u ∈ V (T ).
The construction detailed in Definition 4 ensures that T is indeed a tree; it is essentially the same construction that is used to produce the block-cut tree of a given graph, as considered in, for example, [13] and [16]. The construction considered in those studies is well known to have this property, and the only additional vertices produced by the modified construction presented above are the vertices in T that correspond to vertices v ∈ V (G) that are not cut vertices in G. Since these vertices belong to exactly one block, their corresponding vertices in T must have degree one. Hence, the acyclicity of T cannot be violated by their inclusion. By applying Theorem 3 to each block of a given connected graph G, we can show the following: Lemma 4 Let G be an arbitrary connected graph and let C be the set of all 2-eccs of G. Then, G admits a spanning subgraph G * such that (i) the vertices of each 2-ecc C ∈ C form a 2-ecc in G * with at most 4|V (C)| edges, and (ii) Proof Consider the set C containing all maximal, non-trivial (i.e. order ≥ 2), 2-edgeconnected components C i in G. We say that a 2-ecc For every block B of G there is one 2-ecc in C that spans B, because B being biconnected implies that B is 2-edgeconnected and hence a subgraph of a 2-ecc. Hence, each C i in C spans one or more of the blocks of G-let B(i) be the set of all blocks spanned by C i and let Furthermore, since every edge of C i belongs to exactly one block B i, j (otherwise there are 2 vertices in the intersection of two distinct blocks, which contradicts their maximality), we have: exactly as many times as it occurs in unique blocks B i, j . Now, in order to show that v∈V (C i ) |D(v)| ≤ 2|V (C i )|, first apply the construction of Definition 4 to C i so as to produce the modified block-cut tree T i of C i . Consider now step (1) of Definition 4, and notice that it creates a vertex c u ∈ V (T ) for every vertex u ∈ V (C i ) and a vertex, say b j , for every block B i, j ∈ B(i); hence |V (T )| = x i + |V (C i )|. We now claim that x i ≤ |V (C i )|. To see this, note that the following procedure assigns a distinct vertex as representative for each block of C i : pick an arbitrary vertex v in an arbitrary block B i, j ∈ B(i) and let v be the representative of B i, j . Now carry out a DFS of C i starting at v and, whenever the DFS traverses for the first time an edge {u, w} (in the direction from u to w) of a block that does not have a representative yet, let w be the representative of that block (note that u is a cut vertex and w is a vertex that has not been visited before). This shows that x i ≤ |V (C i )|. By step (2) in Definition 4, an edge e = {c u , b j } satisfies e ∈ E(T ) if and only if u ∈ V (C i ) satisfies u ∈ V (B i, j ). In other words, we have Let G * be the graph obtained by taking the union of all C i and all bridge edges in E(G). The above clearly establishes property (i) for G * . Notice that the bridge edges in E(G) are precisely the edges that are not contained in some C i -since G and each C i is connected, and G * includes all bridge edges of G, it is not hard to see that G * is connected. Let x < n denote the number of bridges in G; then, since each edge in G * is either a bridge or belongs to C i for exactly one i ∈ [|C|], we have where the inequality follows from (1) and the final inequality holds since each vertex belongs to exactly one maximal 2-edge-connected component C i , implying that i∈ [|C|] |V (C i )| ≤ n. This establishes property (ii) and the proof is complete.
If G is a 1-edge-deficient, always-connected temporal graph with underlying graph G, and if G * is a spanning subgraph of G that preserves 2-edge-connectivity, then the temporal graph G * with underlying graph G * that is obtained from G by removing all edges that are not in G * is also always-connected and 1-edge-deficient. This also implies that every cycle C of G * induces a connected subgraph in every time step of G * .
A circuit C in a graph G is a closed walk in G that does not repeat edges. In 1-edge-deficient temporal graphs, a circuit in the underlying graph behaves like an always-connected temporal graph with underlying cycle, as at most one edge of the circuit can be missing in each step. Thus, we get the following theorem, which was shown in [6] for always-connected cycles.
Theorem 4 (Erlebach et al. [6]) For every 1-edge-deficient temporal graph G with underlying circuit C, there exists a start vertex from which the graph can be explored in at most |E(C)|−1 steps.
The following theorem of Fan allows us to reduce the exploration of a 2-ecc to the exploration of at most three circuits: Theorem 5 (Fan [11]) The edges of any 2-edge-connected graph G = (V , E) can be covered by at most three circuits. Moreover, such a cover can be computed in O(|E| · |V |)-time.
In the proof of Theorem 6, we will also make use of the following lemma: Lemma 5 Let G be an arbitrary 2-edge-connected graph G with n = |V (G)| ≥ 3 and let u, u ∈ V (G). Then, one can compute a circuit X ⊆ G such that u, u ∈ V (X ) and |E(X )| ≤ 2n.
Proof Let x be the number of blocks B i of G, then consider a shortest path P ⊆ G from u to u . Let x ≤ x be the number of distinct B i visited by P, where we say that a path visits a block B i if the path contains at least one edge in E(B i ). Let B 1 , B 2 . . . , B x be the ordered sequence of blocks visited by P; . W.l.o.g., assume x ≥ 2, since if x = 1 then u and u are contained in the same block and we can simply select a cycle containing u and u . Additionally, To construct a circuit X ⊂ G such that |E(X )| ≤ 2n we select: a cycle containing v x −1,x and u . Note that such cycles are always possible to obtain since each B i is a biconnected subgraph of G. Let D * = i∈[x ] D i . We construct a circuit X in D * in the following way: select one of the two edge-disjoint paths, say P 1 1 , between u and v 1,2 in D 1 ; let P 2 1 ⊆ D 1 be the path that was not selected. For all i ∈ [2, x − 2], select one of the two edge-disjoint paths, say P 1 i , between v i−1,i and v i,i+1 , and let P 2 i ⊆ D i be the path that was not selected. Once v x −1,x is reached, do the same as before but pick a path P 1 x between v x −1,x and u , and let P 2 x ⊂ D x be the path that was not selected. Let X be the walk formed by following all P 1 i (in the direction of u ) in increasing order of index, then following all P 2 i (in the direction of u) in decreasing order of index. Since X begins at u, travels to u and then returns to u, it is clear that X is a closed walk in D * ⊆ G. Furthermore, since all paths P 1 i and P 2 i are pairwise edge-disjoint, it is clear that X does not repeat edges. It follows that X is a circuit in G.
Observe that X visits exactly the vertices in V (D * ) and traverses every edge in E(D * ) exactly once. Hence, to bound the number of edges in E(X ) it suffices to bound the number of edges in E(D * ). Note that, for all i ∈ [x − 1], the degree of v i,i+1 in D * is 4 since v i,i+1 has degree 2 in D i and degree 2 in D i+1 ; also note that the degree of every other vertex in D * is exactly 2 (since these vertices each belong to exactly one D i ). Since there are at most n − x + 1 vertices of degree 2 in D * , we have that the sum of the degrees of all vertices in D * is at most 4(x − 1) + 2(n − x + 1) ≤ 4n; halving this quantity gives that |E(D * )| = |E(X )| ≤ 2n as required.
Note that the edges which belong to no 2-ecc of an arbitrary connected graph G are precisely the bridges of G. Hence, one can represent the structure of G as a tree T , called the 2-ecc tree of G, by identifying each 2-ecc with a vertex, and joining two vertices by an edge in T if and only if their corresponding 2-eccs are connected by a bridge in G. In the proof of Theorem 6, we will therefore reuse standard terminology for trees: we choose a 2-ecc C as the root component. If C and C are 2-eccs such that C lies on the path from C to C in T , then C is a descendant of C . If C and C correspond to neighbouring nodes in T and C is a descendant of C , then C is a child of C and C is the parent of C . The subtree rooted at a 2-ecc C consists of all 2-eccs that are descendants of C , and the subgraph of G consisting of all those 2-eccs and the bridge edges between them is said to correspond to that subtree. For any child C of the root C of the 2-ecc tree, we call the subgraph of G that corresponds to the subtree rooted at C a child subgraph.

Lemma 6
Let G be an arbitrary connected graph on n vertices. Then, there is a 2-ecc C * of G such that rooting the 2-ecc tree of G at C * ensures that the child subgraphs (i.e. the subgraphs of G corresponding to the subtrees rooted at children of C * ) each contain at most n/2 vertices.
Proof Consider the 2-ecc tree T in which each 2-edge-connected component C of G is represented by a vertex v C . Root T at an arbitrary node vĈ , then process the vertices in a bottom up manner, labelling a vertex v C with the integer x C = |{u ∈ V (G) : u ∈ V (C ) for a descendant C of C in T }|. Select a vertex v C * such that x C * ≥ n/2 and such that v C * has the largest depth in T amongst all such vertices. If v C * is already the root of T , we are done. Otherwise, let v C be the parent of v C * and reroot T at v C * to form a 2-ecc tree T * , in which v C is a child of v C * . Note that we have x C < n/2 for every child v C = v C of v C * in T * , because otherwise the algorithm would have picked v C rather than v C * . Furthermore, we have x C * ≥ n/2, and so the total number of vertices in all components C such that v C is a descendant of v C in T * must be ≤ n/2. G = G 1 , . . . , G L be an always-connected, 1-edge-deficient temporal graph with arbitrary underlying graph G and lifetime L ≥ 51n, and let |V (G)| = n. Then, for any start vertex s ∈ V (G), there is an exploration schedule W of G that starts at s and has arrival time α(W ) ≤ 51n. Moreover, such a schedule can be computed in polynomial time.
Apply Lemma 6 to G * to obtain a 2-ecc tree T of G * with a root component C 1 such that the child subgraphs G i ⊆ G * satisfy |V (G i )| ≤ n/2. Let k denote the number of 2-eccs in G * . Let T (n, k) denote the maximum number of time steps required to explore an arbitrary 1-edge-deficient, always-connected temporal graph with n vertices whose underlying graph has k 2-eccs, at most 5n edges, and is such that every 2-ecc C * satisfies |E(C * )| ≤ 4|V (C * )|, starting from an arbitrary vertex s of the graph at time step 1. We now specify our exploration algorithm and prove by induction on k that it produces an exploration schedule with arrival time at most T (n, k) ≤ 51n steps.
Base case (Arbitrary n, k = 1): In this case, G * consists of a single 2-ecc C 1 ; without loss of generality, assume that |V (C 1 )| ≥ 3. Apply Theorem 5 to C 1 , obtaining a circuit cover {X 1 , . . . , X c } of C 1 containing c circuits, where 1 ≤ c ≤ 3. Consider now the following three time intervals, noting that |E(X i )| ≤ |E(C 1 )| ≤ 5n for all i ∈ [c]: I 1 = [n + 1, 6n], I 2 = [7n + 1, 12n] and I 3 = [13n + 1, 18n]. During the steps of I i apply Theorem 4 to X i to determine a vertex v i ∈ X i such that an exploration schedule of X i using at most |E(X i )| − 1 ≤ 5n − 1 time steps begins at v i at the first step of I i . Beginning at the start vertex s ∈ V (G) in time step 1, employ Lemma 1 to move in at most n steps to vertex v 1 , wait until the first step of interval I 1 , then follow the walk obtained by the application of Theorem 4 during interval I 1 . If c > 1, repeat these steps for all remaining circuits X i in the computed circuit cover of C 1 . Once Theorem 4 has been applied to X c , notice that, for all i ∈ [c], all vertices of X i have been visited. Since {X 1 , . . . , X c } covers all edges of C 1 (and also all edges of G * since G * consists only of C 1 ), it follows that all vertices of G * have been visited at least once. The number of time steps taken to achieve this is at most c(n + 5n) ≤ 18n.
Inductive step (Arbitrary n, k > 1): Assume that T (n , k ) ≤ 51n for all n and all k < k and consider the root component C 1 of G * . We now distinguish two cases: Case 1: |C 1 | ≥ 2. Apply Theorem 5 to C 1 and obtain a circuit cover X * = {X 1 , . . . , X c } of C 1 containing c circuits, where 1 ≤ c ≤ 3. Let V = {v ∈ V (C 1 ) : v ∈ e for some bridge e} be the set of vertices in V (C 1 ) that are incident with at least one bridge in G * . Construct a function γ : V → X * by arbitrarily mapping each vertex v ∈ V to some circuit X i ∈ X * such that v ∈ X i . Recall that we root the 2-ecc tree T of G * at C 1 . For each child C i of C 1 in T , we denote by G i the child subgraph of G * corresponding to the subtree of T rooted at C i . Let Br = {e ∈ E(G * ) : e is a bridge and e∩V = ∅}, i.e. Br is the set of bridges of G * that connect C 1 to child subgraphs. For any v ∈ V , let β(v) = {G i : {v, u} ∈ Br for some u ∈ G i }. In other words, β(v) is the set of child subgraphs that are connected to v via a bridge. For . This means that F i is the set of child subgraphs with the property that the bridge that connects the child subgraph to C 1 is incident with a vertex v ∈ V that has been mapped to X i by γ . See Fig. 1 for an illustration of a circuit X i and the child subgraphs in F i that are attached to it via bridges.
For i ∈ [c], let G X i ⊆ G * be the subgraph of G * induced by the vertices of X i and of all the child subgraphs in F i , i.e. by the vertex Our aim is, for each i ∈ [c], to move a real agent from its current vertex to some vertex s i ∈ V (X i ) (by Lemma 1 the agent uses at most n steps when initially moving to V (C 1 ) from s and then at most |V (C 1 )| steps for each of the remaining c − 1 circuits), then construct a closed walk in G X i that will be followed (in opposite directions) by two virtual agents whenever it is possible for them to do so; i.e. whenever they are not blocked on the next edge they need to traverse. We then let the real agent follow the walk of the virtual agent that finishes their walk first. Let t i be the time step after the real agent first reaches s i ∈ V (X i ). Place the virtual agents at s i at the start of time step t i and let them do the Fig. 1 Illustration of a circuit X i and the child subgraphs in F i (indicated as shapes filled in solid grey) that are attached to it via bridges (drawn dashed), as well as the walk followed by agent CW (drawn in red) starting at s i following: move along the edges of X i , one in the clockwise direction (agent CW) and the other in the counterclockwise direction (agent CCW). Whenever an agent A * ∈ {CW, CCW} reaches for the first time a vertex v ∈ V such that γ (v) = X i , that agent processes the subgraphs G j ∈ β(v), in increasing order of indices if A * = CW and in decreasing order otherwise, in the following way (the only exception is with vertex s i : if s i ∈ V and γ (s i ) = X i , then agent CW processes each G j ∈ β(s i ) immediately at the start of the walk before traversing any edge of X i , whilst agent CCW processes them only when it returns to s i after having traversed all edges of X i ): check (1) if the other agent, say A * * ∈ {CW, CCW} − A * , currently occupies some vertex in G j ; if not, then check (2) if A * * is currently positioned at vertex v and needs to process next the same subgraph G j as agent A * .
If neither (1) or (2) hold, then agent A * traverses the bridge connecting G j and v ∈ V (X i ), follows a DFS in G j (i.e. traverses edges of G j in the order of a static DFS in G j , and waits at the current vertex whenever the next edge to be traversed is not available), then re-traverses the connecting bridge towards X i and continues processing the remaining G j ∈ β(v) with j = j in the same way. If (1) holds, then agent A * should ignore G j and continue processing the other G j ∈ β(v). If (2) holds, then arbitrarily select one of the agents to process G j in the same way as when neither (1) nor (2) hold, and let the other agent ignore G j and continue processing the remaining G j ∈ β(v) with j = j. See Fig. 1 for an illustration of the walk followed by agent CW if it is never prevented from entering a child subgraph due to an occurrence of (1) or (2).
Note that neither agent should traverse the next edge of X i until all G j ∈ β(v) have been processed in the above way. Since the two agents process the subgraphs in opposite orders, it is ensured that at most a single subgraph G j ∈ F i is ignored by an agent during the entire execution of the virtual agent procedure on G X i . This is because, after either case (1) or (2) occurs for the first time, the subgraphs G j ∈ F i that remain to be explored by A * are precisely those that have already been explored by A * * , and vice versa. Also note that if either (1) or (2) occurs, then at no point during the remainder of the procedure's execution on G X i will the agents become blocked on the same edge.
Both agents continue in this way until the first time step in which both agents are blocked on the same edge e (if this happens at all). Note that we must have e ∈ E(X i ), since the way the agents process each subgraph G j ensures that they will never be positioned in any subgraph G j ∈ F i during the same time step. Now, if every edge of G * were to be present in every time step, it would take each agent at most Exp(X i ) = |E(X i )| + G j ∈F i 2|V (G j )| steps to carry out their respective walk in G X i : 1 step to traverse each of the edges of X i , 2|V (G j )| − 2 steps spent exploring G j via a DFS, and 2 steps spent traversing each of the bridge edges connecting X i and a G j ∈ F i . Since G * is 1-edge-deficient, it is possible for the agents to both be blocked on the same edge during the same time step. We distinguish two subcases, first recalling that t i denotes the time step in which the exploration of G X i begins. We use t i to denote an upper bound on the time step by which the exploration of G X i (possibly except one subgraph G j * ) is completed by at least one of the two agents. Case 1.1: If the agents are never blocked on the same edge e during any step t in [t i , t i ] for t i = t i + 2Exp(X i ), then, in each time step t ∈ [t i , t i ], at least one of the two agents is able to cross the next edge of their respective walk. In this case, we have that by the end of time step t i , the agent A * that was blocked on an edge in the least number of time steps t ∈ [t i , t i ] will have not been blocked in ≥ Exp(X i ) time steps and, as such, will have arrived again at s i ∈ V (X i ). At this point, A * will have finished an exploration of at least the subgraph of G * induced by V (G X i ) − V (G j ) in at most 2Exp(X i ) steps (for some G j ∈ F i which was possibly ignored by A * when it was about to process G j because the other agent occupied some vertex in V (G j )).

Case 1.2:
The agents are both blocked on the same edge e ∈ X i during a time step Check whether or not e is present during any step t ∈ [t +1, t +|E(X i )|]. If yes, wait until that step, then let both agents cross e. If not, let both agents apply Lemma 1 in X i , using at most |E(X i )| − 1 time steps to move to the opposite endpoint of e, then continue attempting to traverse the next edge of their walk whenever possible. Notice that, during any step t ∈ [t i , t − 1], at least one of the two agents was able to cross the next edge in their respective walk, since t is the first time step in which both agents are blocked on the same edge. When the agents are blocked on e during step t, they either wait at their current vertex for at most |E(X i )| − 1 steps until e is present again, or spend ≤ |E(X i )| − 1 steps reaching the opposite endpoint of e by applying Lemma 1 in X i . In either case, it takes at most |E(X i )| − 1 steps for them to reach the opposite endpoint of e. At this point, observe that the vertices x ∈ V (X i ) and the G j ∈ F i that remain to be explored/processed by agent CW are exactly those that have already been explored/processed by agent CCW (and vice versa). Hence, it follows that the two agents will not be blocked on the same edge again for the remainder of their respective walks. In all the remaining steps, since the sets of vertices unexplored by the walks of the two agents are disjoint, we again have that at least one of the two agents will be able to cross the next edge of their respective walk in all steps t ∈ [t + |E(X i )|, t i ]. Concluding, during the entire time interval [t i , t i ], there are ≤ |E(X i )| steps in which neither of the agents can cross the next edge of their respective walk, and by step t i = t i + 2Exp(X i ) + |E(X i )| ≤ t i + 2Exp(X i ) + 4|V (C 1 )| (where the inequality holds since |E(X i )| ≤ |E(C 1 )| ≤ 4|V (C 1 )| by our application of Lemma 4), it is ensured that the agent who was blocked during the least number of steps since the start of step t i has completed their exploration of G X i in at most 2Exp(X i ) + 4|V (C 1 )| steps. Note that this agent has not skipped any of the child subgraphs in F i , since the two agents were blocked on the same edge of X i and thus it could never happen that one agent skipped a child subgraph because the other was already in that subgraph or wanted to enter it in the same step.
After processing all c circuits X i in this way, there will be at most c subgraphs that have not yet been explored. We next reduce those unexplored subgraphs to at most one: whilst there are two or more unexplored subgraphs, we repeatedly (1) choose a circuit X in C 1 with |E(X )| ≤ 2|V (C 1 )| that contains two vertices of V that have an incident bridge leading to an unexplored subgraph (this is possible by Lemma 5), and then (2) move to a vertex in X in at most |V (C 1 )| steps (by Lemma 1) and process X and 2 of the at most three unexplored subgraphs in the same way that we processed X i for i ∈ [c] (i.e. via the virtual agent procedure). Since we have |E(X )| ≤ 2|V (C 1 )| and there are two subgraphs G j and G j (both satisfying |V (G j )|, |V (G j )| ≤ n/2), we have: Therefore, by the same reasoning that was used in Case 1.1 and Case 1.2, the virtual agent that completes their walk in the subgraph induced by V (C 1 ) ∪ V (G j ) ∪ V (G j ) first will have either explored at least one of G j and G j in ≤ 2Exp(X ) steps, or explored both G j and G j in ≤ 2Exp(X ) + |E(X )| ≤ 2Exp(X ) + 2|V (C 1 )| steps. Note that, since there are at most three subgraphs that remain unexplored by the real agent after applying the virtual agent procedure in all G X i , we can be required to perform the above subgraph reduction procedure at most twice. After doing so, the real agent will have visited all vertices in i∈ [c] [V (G X i )], possibly apart from those that belong to a single subgraph G ∈ F i (for exactly one i ∈ [c]). If such a subgraph G exists then we move the real agent (in |V (C 1 )| − 1 steps using Lemma 1) to the unique vertex v in C 1 such that G ∈ β(v), then use an additional time step to traverse the bridge {v, v } (recall that bridges are always present since the temporal graph is alwaysconnected); this requires |V (C 1 )| steps in total. We then apply the algorithm recursively to G , starting at vertex v . In order to now bound the overall worst-case exploration time of the algorithm, we assume that there does exist a subgraph G that requires a recursive application of the algorithm, and determine the worst-case number of time steps required by the real agent to explore , then reach an arbitrary vertex in V (G ). We can assume w.l.o.g. that our computed circuit cover {X 1 , . . . , X c } has size c = 3 -it is clear that this is the worst-case number of circuits we need to process. Let r = |V (C 1 )|. Recall that in Case 1.1 we have an upper bound of 2Exp(X i ) on the amount of time required to explore all of V (G X i ) − V (G ) for a single subgraph G ∈ F i that was possibly missed by the virtual agent that finished their walk in G X i first; in Case 1.2 we obtained a 2Exp(X i ) + 4r upper bound on the amount of time required to explore all of where the inequality follows from our application of Lemma 4), we have: i∈ [3] 2Exp( and so in the worst case at least 20r + 4n steps are spent exploring all X i (possibly missing a single subgraph G ∈ F i for each i ∈ [3]) and an additional 4r steps may also be needed whilst processing each X i if the virtual agents get blocked on the same edge e ∈ E(X i ) during the same time step. Similarly, in the worst case, we require up to 2Exp(X ) steps whilst processing each of up to two additional circuits X (with two child subgraphs attached to each X ) using the virtual agent procedure. By Eqs. (2)-(4) we have 2Exp(X ) ≤ 4n, so in the worst case at least 4n steps are spent processing each additional circuit, and an additional 2r steps may be needed whilst processing each circuit if the virtual agents get blocked on the same edge of a circuit X .
We now introduce four parameters to be used in order to distinguish the cases that can arise during an execution of the algorithm: let x ∈ {0, . . . , 3} be the number of times we miss a subgraph over all applications of the virtual agent procedure to the circuits in {X 1 , . . . , X 3 }. Let y ∈ {0, . . . , 2} be the number of times we need to compute an additional circuit X and carry out the virtual agent procedure on the subgraph induced by X and two unexplored subgraphs. Let y ∈ {0, . . . , y} be the number of times we do not miss a subgraph across all y applications of the virtual agent procedure on additionally constructed circuits X (note that we have y ≤ 1 because as soon as we explore both unexplored subgraphs attached to some circuit X we either (1) have no unexplored subgraphs remaining and exploration is complete; or (2) have 1 remaining subgraph and we need to recursively apply the algorithm). Let z ∈ {0, 1} be the number of times we recursively apply the algorithm to a final unexplored subgraph.
The worst-case number of time steps required to explore all but at most a single subgraph G (and then be positioned at some vertex in G ) for each possible combination of x, y, y , z can then be upper bounded by the following sum: +y · 4n +y · 2r +(n + (2 + y + z)r ); where 20r +4n steps (and possibly more) are needed to process all circuits X i ; (3− x)4r is an upper bound on the number of additional steps needed to process circuits X i (incurred when the virtual agents become blocked on the same edge of some X i ); y · 4n steps (and possibly more) are needed to process y ≤ 2 additional circuits X with two unexplored subgraphs attached to each; y · 2r is an upper bound on the amount of additional steps needed to process y additional circuits X (incurred when the virtual agents get blocked on the same edge of some X ); and n + (2 + y + z)r is an upper bound on the number of steps spent using the reachability lemma to: (1) reach, in at most n steps, an arbitrary vertex in X 1 from start vertex s; (2) reach, in at most r steps, an arbitrary vertex in each X i with i ∈ [2, 3] from some vertex in V (C 1 ) at which the last application of the virtual agent procedure finished; (3) reach, in at most r steps, each of y additional circuits as part of the unexplored subgraph reduction procedure; and (3) reach, in at most r steps, the final unexplored subgraph should one exist. Next, we enumerate all combinations of values for x, y, y and z attainable during a run of the exploration algorithm, before listing the worst-case exploration time for each case. First note that if x = 0, then no applications of the subgraph reduction procedure or any recursive call are required and so we must have y = y = z = 0 (Case A). If x = 1, then no application of the subgraph reduction procedure is required, so we must have y = y = 0, and we need z = 1 recursive calls to explore the x = 1 missed subgraph (Case B). If x = 2, then we require y = 1 application of the subgraph reduction procedure; after this application, we may either explore both subgraphs and have y = 1 so that z = 0 recursive calls are required (Case C), or have y = 0 and require exactly z = 1 recursive calls (Case D). Note that if x = 3, then we require at least 1 application (and at most two applications) of the subgraph reduction procedure. If we have x = 3 and y = 1, then we must have y = 1 since our single application of the subgraph reduction procedure reduced the number of unexplored subgraphs from 3 to 1, and we require exactly z = 1 recursive calls (Case E). If x = 3 and y = 2, then a subgraph must have been missed during the first application of the subgraph reduction procedure, so we can either have: y = 1 (so that both remaining unexplored subgraphs are explored during the second application) and require z = 0 recursive calls (Case F); or y = 0, so that we miss a subgraph during both applications of the subgraph reduction procedure and require z = 1 recursive calls to explore the final remaining subgraph (Case G).
Case 2: |C 1 | = 1. Let v be the single vertex contained in V (C 1 ). Move the real agent to v in at most n steps using Lemma 1; once arrived at v, we know C 1 has been fully explored. Consider the set β(v) of the child subgraphs that are connected to v via bridges. Again we use a virtual agent approach: the agents CW and CCW process the G j ∈ β(v) in increasing and decreasing order of their indices, respectively. Each time they begin processing a new G j , they (1) check to see if the other agent is situated at a vertex of G j . If so, they ignore G j and continue processing the other G j ∈ β(v) with j = j. Then, if (1) does not hold, they check (2) if the other agent is currently positioned at v and also needs to process G j next.
If neither of (1) or (2) hold, then the agent moves over the bridge edge connecting v and G j ∈ β(v), follows a DFS in G j and then returns to v via the same bridge edge before processing the next G j . If (1) holds, then the agent ignores subgraph G j and the other agent continues their DFS in G j ; if (2) holds, we arbitrarily nominate one of the two agents to explore G j via a DFS and the other agent ignores G j . Note that in this way, the two agents will never both be blocked on the same edge in some time step t-they cannot be blocked on a bridge edge incident to v (since G is always-connected and so bridges in E(G * ) are always present), and they cannot be blocked on an edge e ∈ E(G j ) for any j, since the exploration procedure ensures they are never positioned in G j at the same time.
Since traversing a bridge edge towards a subgraph G j , carrying out a DFS in G j and then re-traversing the bridge towards v again takes 2|V (G j )| steps in total, it would require of an agent completing a static exploration of G * exactly G j ∈β(v) 2|V (G j )| steps to process all G j in this way. Since G is 1-edge-deficient, it is possible for an individual agent to be blocked on an edge during some time step, but not both agents on the same edge in the same time step. Hence, in every time step at least one of the two agents will be able to cross the next edge of their respective walk, and so in the worst case the agent that first finishes processing all subgraphs in the described manner does so in at most 2· G j ∈β(v) 2|V (G j )| ≤ 4|V (G * )| = 4n steps, having missed a single unexplored subgraph G ∈ β(v) which has k < k 2-eccs (since G surely does not contain C 1 ) and satisfies |V (G )| ≤ n/2 (by our application of Lemma 6). In this situation, we move the real agent to an arbitrary vertex in G in 1 step (since G is connected to v by a bridge, and since bridges must be present in every layer of an always-connected temporal graph) and recursively apply the exploration algorithm to G . By the inductive hypothesis, the amount of time required to explore G is at most T (|V (G )|, k − 1)) ≤ T (n/2, k − 1) ≤ 51(n/2) = 25.5n. Therefore, since by Lemma 1 we require ≤ n steps to initially reach vertex v ∈ V (C 1 ) from the start vertex s of the exploration, which can be anywhere in the graph, then ≤ 4n steps to follow the walk of the best agent, 1 step to move from v to a vertex in G over a bridge, and finally another ≤ 25.5n steps to explore all of G , it follows that the entire exploration of G takes ≤ 5n + 1 + 25.5n = 30.5n + 1 steps in total, which is less than 51n for all n ≥ 1, as required.
Finally, we remark that all steps in the construction of the exploration schedule can be implemented to run in polynomial time, and thus we have a polynomial-time algorithm for computing such schedules.
Note that, in Theorem 6, it was sufficient to assume a lifetime of at least 51n since our exploration method ensures that the exploration is completed after at most 51n steps. Furthermore, our upper bound of Theorem 6 together with the obvious lower bound of n − 1 on the arrival time of any exploration schedule implies the following corollary.

Lower bound
To complement the upper bounds from Sects. 3 and 4, we also present a lower bound on the worst-case exploration time of k-edge-deficient temporal graphs. For this, we adapt the construction of a lower bound of Ω(n log n) on the exploration time of temporal graphs with underlying planar graphs of maximum degree 4 from [6, Theorem 4.1]. That construction Fig. 2 Underlying graph of the temporal graph constructed in the proof of Theorem 7 for k = 14. Edges present from time n/2 + 1 to n are drawn solid (with the dotted line representing a longer path of solid edges), the remaining edges are drawn dashed has a time-varying part (in which n/2 edges are missing in each time step) and a fixed part (a static path of n/2 edges). By reducing the size of the time-varying part and increasing the size of the static part, we can show the following theorem.
Theorem 7 For arbitrarily large n and every k with 2 ≤ k ≤ n 2 − 2, there is an alwaysconnected k-edge-deficient temporal graph with n vertices and lifetime (n − 1) 2 for which an optimal exploration takes Ω(n log k) steps.
Proof Assume without loss of generality that k + 2 is a power of two (otherwise, consider the next smaller value of k that satisfies this condition) and that n is even. Consider the following underlying graph G = (V , E) (see Fig. 2): the vertex set V contains k + 2 We describe the first n 2 log 2 h = Θ(n log k) steps of a temporal realization of G and show that it cannot be explored within these steps. For the remaining time steps of the temporal realization of G, we let each layer be equal to the layer in step n 2 log 2 h. Consider the following construction of the first n 2 log 2 h time steps of a temporal realization of G, consisting of log 2 h phases, each of which is n/2 time steps long and consists of n/2 identical layers: the path P is always present. In the first phase of n/2 time steps, the graph additionally contains the horizontal edges of all columns. At the start of the next phase of n/2 time steps, the horizontal edges of column h/2 are replaced by the cross edges (this is the state shown in Fig. 2), and this replacement is permanent until the end of the construction. At the start of the next phase of n/2 time steps, the horizontal edges of columns h/4 and 3h/4 are replaced (permanently) by the cross edges. This continues for a total of log 2 h phases as follows: at the start of each phase, the horizontal edges of the middle column in each stretch of consecutive horizontal edges are permanently replaced by the cross edges. This implies that, throughout the steps of the last of the log 2 h phases, all cross edges but none of the horizontal edges are present.
Let V 0 = V 0 − {t 0 , b 0 }. In each phase, we say that a vertex of V 0 is on the t 0 -side if it is in the same connected component as t 0 in the subgraph induced by V 0 in the layers of that phase, and on the b 0 -side otherwise. Observe that in each of the phases, any algorithm can explore either vertices in V 0 on the t 0 -side or vertices in V 0 on the b 0 -side, but not both (because the path P has n − (k + 2) + 1 ≥ n 2 + 1 edges). If the algorithm visits any vertex of V 0 in a phase and if that vertex is on the t 0 -side, we assume that the algorithm visits all vertices of V 0 on the t 0 -side in that phase, and similarly if it visits a vertex of V 0 on the b 0 -side. This assumption can only decrease the exploration time. No matter which of the two sets of vertices the algorithm visits in a phase, in the next phase half of the unvisited vertices in V 0 will be on the t 0 -side and half on the b 0 -side. Therefore, each phase halves the number of unvisited vertices. At the end of phase log 2 h, the number of unvisited vertices in V 0 is at least 2k/2 log 2 h = 2k/(k + 1 2 ) > 1. Hence, the exploration time is Ω(n log k), independent of the start vertex.
Furthermore, it is easy to see that the constructed temporal graph is k-edge-deficient: in each column i, 1 ≤ i < h, two edges from the underlying graph are missing in each step, so the total number of missing edges in each step is 2(h − 1) = k.

Conclusion
We have shown that always-connected k-edge-deficient temporal graphs admit an exploration schedule with arrival time O(kn log n); if k = 1, the arrival time improves to O(n). The proofs are constructive, yielding polynomial-time algorithms for computing such exploration schedules. As n − 1 steps are necessary to explore any graph, our results also yield O(k log n) and O(1)-approximation algorithms for F-TEXP for the k ∈ N and k = 1 cases, respectively, as well as an O(log n)-approximation if k = O(1). Furthermore, we have given an infinite family of k-edge-deficient temporal graphs that require Ω(n log k) time steps to be explored. It would be interesting to close the gap between the lower and upper bounds. In particular, an interesting question is whether alwaysconnected k-edge-deficient graphs for k = O(1) can be explored in O(n) steps. For k = 1, there is the question of whether (and by how much) the constant factor in our upper bound of 51n on the exploration time can be improved. It is known that there are 1-deficient temporal graphs whose underlying graph is a cycle with n nodes that require 2n − 3 steps for exploration [6], which implies that the constant factor in the upper bound for arbitrary always-connected 1-edge-deficient temporal graphs must be at least 2.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.