On Efficiently Finding Small Separators in Temporal Graphs
Abstract
Vertex separators, that is, vertex sets whose deletion disconnects two distinguished vertices in a graph, play a pivotal role in algorithmic graph theory. For many realistic models of the real world it is necessary to consider graphs whose edge set changes with time. More specifically, the edges are labeled with time stamps. In the literature, these graphs are referred to as temporal graphs, temporal networks, timevarying networks, edgescheduled networks, etc. While there is an extensive literature on separators in “static” graphs, much less is known for the temporal setting. Building on previous work, we study the problem of finding a small vertex set (the separator) in a temporal graph with two designated terminal vertices such that the removal of the set breaks all temporal paths connecting one terminal to the other. Herein, we consider two models of temporal paths: paths that contain arbitrarily many hops per time step (nonstrict) and paths that contain at most one hop per time step (strict). We settle the hardness dichotomy (NPhardness versus polynomialtime solvability) of both problem variants regarding the number of time steps of a temporal graph. Moreover we prove both problem variants to be NPcomplete even on temporal graphs whose underlying graph is planar. We show that on temporal graphs whose underlying graph is planar, if additionally the number of time steps is constant then the problem variant for strict paths is solvable in quasi linear time. Finally, for general temporal graphs we introduce the notion of a temporal core (vertices whose incident edges change over time). We prove that on temporal graphs with constantsized temporal core, the nonstrict variant is solvable in polynomial time, where the degree of the polynomial is independent of the size of the temporal core, while the strict variant remains NPcomplete.
>\SplitArgument1;m \setargsaux#1 \NewDocumentCommand\setargsauxmm \IfNoValueTF#2#1 #1 \delimsize #2
1 Introduction
In complex network analysis, nowadays it is very common to have access and process graph data where the interactions in the data set are timestamped. When using static graphs as a mathematical model for problem instances, the dynamics of interactions are not reflected and important information of the data might not be captured. A straightforward approach to incorporate the dynamics of interactions into the model is to use temporal graphs. A temporal graph is, informally speaking, a graph where the edge set may change over a discrete time interval. Having the dynamics of interactions represented in the model, it is essential to adapt definitions of connectivity and paths to respect the temporal nature of the model. This directly affects the notion of separators in the temporal setting. Vertex separators are a fundamental primitive in static network analysis and it is folklore that they can be computed in polynomial time. In contrast to the static case, Kempe et al. [23] showed that the temporal analogue of this problem is NPhard.
Temporal graphs are a wellestablished concept in the literature and are also referred to as evolving [15] and timevarying [24] graphs, temporal networks [22, 23, 27], multidimensional networks [7], link streams [33], and edgescheduled networks [6]. In this work, we use the wellestablished model in which each edge has a time stamp [7, 22, 1, 20, 23, 27]. Assuming discrete time steps, this is equivalent to a sequence of static graphs over a fixed set of vertices [28]. Formally, we define a temporal graph as follows.
Definition 1.1 (Temporal Graph).
An undirected temporal graph is an ordered triple consisting of a set of vertices, a set of timeedges, and a maximal time label .
See Figure 1 for an example with , that is, a temporal graph with four time steps also referred to as layers. The static graph obtained from a temporal graph by removing the time stamps from all timeedges we call the underlying graph of .
Many realworld applications have temporal graphs as underlying mathematical models. Consider for instance a public transportation network where the edges correspond to bus or train connections between stations (vertices). It is natural to model these connections with time stamps. Other examples include information spreading in social networks, communication in social networks, biological pathways or spread of diseases [22].
A fundamental question in temporal graphs, addressing issues such as
connectivity [4, 27], survivability [24],
and robustness [31],
is whether there is a “timerespecting” path from a
distinguished start vertex to a distinguished target
vertex .
The two models.
We start with the introduction of the “nonstrict” model [23]. Given a temporal graph with two distinct vertices , a temporal path of length in is a sequence of timeedges in , where for all with and for all . A vertex set is a temporal separator if there is no temporal path in . We can now state the central problem of our paper.
Temporal Separation Input: A temporal graph , two distinct vertices , and . Question: Does admit a temporal separator of size at most ?Our second model is the “strict” variant. A temporal path is called strict if for all . In the literature, strict temporal paths are also known as journeys [1, 2, 28, 27]. A vertex set is a strict temporal separator if there is no strict temporal path in . Thus, our second main problem, Strict Temporal Separation, is defined in complete analogy to Temporal Separation, just replacing (nonstrict) temporal separators by strict ones.
While the strict variant appears natural, the nonstrict variant can be viewed as a more conservative version of the problem. For instance, in a diseasespreading scenario the spreading speed might be unclear. To ensure containment of the spreading by separating patient zero () from a certain target (), a temporal separator might be the safer choice.
Our contributions.
General  Planar with  Temporal core  
Separation  general  const.  const. size  
Temporal  NPcomplete  NPc.  open  
Strict Temporal  NPc.  NPc.  NPc. 
(Prop 3.1) (Section 4) (Cor 3.5) (Thm 4.6) (Thm 5.3) (Obs 5.2)
In the following we summarize our results; see Table 1 for a survey.

In Section 3, we investigate the computational hardness of both problems under restrictions of the number of layers and under the restriction that the underlying graph is planar. We prove that both Temporal Separation and Strict Temporal Separation are NPcomplete for all and , respectively, strengthening a result by Kempe et al. [23] (they show NPhardness for all ). Moreover, we prove that both problems are NPcomplete on temporal graphs that have a planar underlying graph. To this end, we prove that LengthBounded Separation (for the problem definition, see Section 3) is NPhard on planar graphs.

In Section 4, we identify tractable cases of both problems on temporal graphs with few layers. For the nonstrict problem, our hardness result is already tight.
^{2} For the strict variant, we identify a dichotomy in the computational complexity by proving polynomialtime solvability of Strict Temporal Separation for . As a side product, we give a lineartime algorithm for the SingleSource Shortest Strict Temporal Paths problem, improving the best known running time [34] by a factor. Moreover, we prove that for constantly many layers, Strict Temporal Separation on planar graphs is solvable in time. 
In Section 5, we introduce the notion of temporal cores in temporal graphs. Informally, the temporal core of a temporal graph is the set of vertices whose edgeincidences change over time. We prove that on temporal graphs with temporal core of constant size, Temporal Separation is solvable in time, where is some fixed constant being independent of the size of the temporal core, while Strict Temporal Separation remains NPcomplete even if the temporal core is empty.
A particular virtue of our work is that our results point out that the choice of the model (strict versus nonstrict) for a problem can have a crucial impact on the computational complexity of said problem. This is noticeable since the literature so far used both models without discussing the subtle differences in computational complexity.
Related work.
Our main reference is the work of Kempe et al. [23] who proved that Temporal Separation is NPhard. In contrast, Berman [6] proved that computing temporal cuts (edge deletion instead of vertex deletion) is polynomialtime solvable. In the context of survivability of temporal graphs, Liang and Modiano [24] studied cuts where an edge deletion only last for consecutive time stamps. Moreover, they studied a temporal maximum flow defined as the maximum number of sets of journeys where each two journeys in a set do not use a temporal edge within some time steps. A different notion of temporal flows on temporal graphs was introduced by Akrida et al. [2]. They showed how to compute in polynomial time the maximum amount of flow passing from a source vertex to a sink vertex until a given point in time.
The vertexvariant of Menger’s Theorem [26] states that the maximum number of vertexdisjoint paths from to equals the size of a minimumcardinality separator. In static graphs, Menger’s Theorem allows for finding a minimumcardinality separator via maximum flow computations. However, Berman [6] proved that the vertexvariant of an analogue to Menger’s Theorem for temporal graphs, asking for the maximum number of (strict) temporal paths instead, does not hold. Kempe et al. [23] proved that the vertexvariant of the former analogue to Menger’s Theorem holds true if the underlying graph excludes a fixed minor. Mertzios et al. [27] proved another analogue of Menger’s Theorem: the maximum number of strict temporal path which never leave the same vertex at the same time equals the minimum number of node departure times needed to separate from , where a node departure time is the vertex at time point .
Michail and Spirakis [29] introduced the timeanalogue of the famous Traveling Salesperson problem and studied the problem on temporal graphs of dynamic diameter , that is, informally speaking, on temporal graphs where every two vertices can reach each other in at most time steps at any time. Erlebach et al. [14] studied the same problem on temporal graphs where the underlying graph has bounded degree, bounded treewidth, or is planar. Additionally, they introduced a class of temporal graphs with regularly present edges, that is, temporal graphs where each edge is associated with two integers upper and lowerbounding consecutive time steps of absence of the edge. Axiotis and Fotakis [4] studied the problem of finding the smallest temporal subgraph of a temporal graph such that singlesource temporal connectivity is preserved on temporal graphs where the underlying graph has bounded treewidth.
2 Preliminaries
As a convention, denotes the natural numbers without zero. For , we use .
Static graphs.
We use basic notations from (static) graph theory [13]. Let be an undirected, simple graph. We use and to denote the set of vertices and set of edges of , respectively. We denote by the graph without the vertices in . For , denotes the induced subgraph of by . A path of length is sequence of edges where for all with . We set . Path is an path if and . A set of vertices is an separator if there is no path in .
Temporal graphs.
Let be a temporal graph. The graph is called layer of the temporal graph if and only if . The underlying graph of a temporal graph is defined as , where . (We write , , , and for short if is clear from the context.) For we define the induced temporal subgraph of by . We say that is connected if its underlying graph is connected. Let . The vertices visited by are denoted by . For surveys concerning temporal graphs we refer to [8, 28, 22, 21].
Strict and nonstrict temporal separators.
Throughout the whole paper we assume that the underlying graph of the temporal input graph is connected and that there is no timeedge between and . Furthermore, in accordance with Wu et al. [34] we assume that the timeedge set is ordered by ascending labels. Moreover, we can assume that the number of layers is at most the number of timeedges:
Lemma 2.1.
Let be an instance of (Strict) Temporal Separation. There is an algorithm which computes in time an instance of (Strict) Temporal Separation which is equivalent to , where .
Observe that a layer of a temporal graph that contains no edge is irrelevant for Temporal Separation. This also holds true for the strict case. Hence, we can delete such a layer from the temporal graph. This observation is formalized in the following two data reduction rules.
Reduction Rule 2.1.
Let be a temporal graph and let be an interval where for all the layer is an edgeless graph. Then for all where replace with in .
Reduction Rule 2.2.
Let be a temporal graph. If there is a nonempty interval where for all the layer is an edgeless graph, then set to .
We prove next that both reduction rules are exhaustively applicable in linear time.
Lemma 2.2.
Reduction Rules 2.2 and 2.1 do not remove or add any temporal path from/to the temporal graph and can be exhaustively applied in time.
Proof.
First we discuss Reduction Rule 2.1. Let be a temporal graph, , be an interval where for all the layer is an edgeless graph. Let be a temporal path, and let be the graph after we applied Reduction Rule 2.1 once on . We distinguish three cases.

If , then no timeedge of is touched by Reduction Rule 2.1. Hence, also exists in .

If , then there is a temporal path in , because .

If , then there is clearly a temporal path in
The other direction works analogously. We look at a temporal path in and compute the corresponding temporal path in .
Reduction Rule 2.1 can be exhaustively applied by iterating over the by timeedges in the timeedge set ordered by ascending labels until the first with the given requirement appear. Set . Then we iterate further over and replace each timeedge with until the next with the given requirement appear. Then we set and iterate further over and replace each timeedge with . We repeat this procedure until the end of is reached. Since we iterate over only once, this can be done in time.
Reduction Rule 2.2 can be executed in linear time by iterating over all edges and taking the maximum label as . Note that the sets and remain untouched by Reduction Rule 2.2. Hence, the application of Reduction Rule 2.2 does not add or remove any temporal path. ∎
A consequence of Lemma 2.2 is that the maximum label can be upperbounded by the number of timeedges and hence the input size.
Proof of Lemma 2.1.
Let be a temporal graph, where Reduction Rules 2.2 and 2.1 are not applicable. Then for each there is a timeedge . Thus, . ∎
Regarding our two models, we have the following connection:
Lemma 2.3.
There is a lineartime computable manyone reduction from Strict Temporal Separation to Temporal Separation that maps any instance to an instance with and .
Proof.
Let be an instance of Strict Temporal Separation. We construct an equivalent instance in lineartime. Set , where is called the set of edgevertices. Next, let be initially empty. For each , add the timeedges to . This completes the construction of . Note that this can be done in time. It holds that and that .
We claim that is a yesinstance if and only if is a yesinstance.
: Let be a temporal separator in of size at most . We claim that is also a temporal separator in . Suppose towards a contradiction that this is not the case. Then there is a temporal path in . Note that the vertices on alternated between vertices in and . As each vertex in corresponds to an edge, there is a temporal path in induced by the vertices of . This is a contradiction.
: Observe that from any temporal separator, we can obtain a temporal separator of not larger size that only contains vertices in . Let be a temporal separator in of size at most only containing vertices in . We claim that is also a temporal separator in . Suppose towards a contradiction that this is not the case. Then there is a temporal path in . Note that we can obtain a temporal path in by adding for all consecutive vertices , , where appears before at timestep on , the vertex . This is a contradiction. ∎
3 Hardness Results
In this section we establish some preliminary hardness results. We observe that both Temporal Separation and Strict Temporal Separation are strongly related to the NPcomplete LengthBounded Separation (LBS) problem [9, 32]: Given an undirected graph , two distinct vertices , and two integers , is there a subset such that and there is no path in of length at most ? We get the following straightforward reduction.
observationlbstostrprob There is a polynomialtime reduction from LBS to Strict Temporal Separation that maps any instance of LBS to an instance with for all of Strict Temporal Separation.
Baier et al. [5] showed that LengthBounded Separation is NPcomplete, even if the lower bound for the path length is five, and hence Strict Temporal Separation is NPcomplete for all . This at hand, Lemma 2.3 implies that Temporal Separation is NPcomplete for all . However, through closer inspection we get that the nonstrict variant is already NPcomplete for all . This improves a previous result by Kempe et al. [23] who showed NPcompleteness of Temporal Separation and Strict Temporal Separation for all . We summarize in the following.
Proposition 3.1.
Temporal Separation is NPcomplete for all and Strict Temporal Separation is NPcomplete for all .
Proof.
We will make use of the NPcomplete Vertex Cover problem.
Vertex Cover Input: A graph and . Question: Is there a subset of size at most such that for all it holds ?Let be an instance of Vertex Cover. We say that is a vertex cover in of size if and is a solution to . We refine the gadget of Baier et al. [5, Theorem 3.9] and reduce from Vertex Cover to Temporal Separation. Let be a Vertex Cover instance and . We construct a Temporal Separation instance , where are the vertices and the timeedges are defined as
Note that , , and can be computed in polynomial time. For each vertex there is a vertex gadget which consists of three vertices and six vertexedges. In addition, for each edge there is an edge gadget which consists of two edgeedges and . See Figure 3 for an example.
We prove that is a yesinstance if and only if is a yesinstance.
: Let be a vertex cover of size for . We claim that is a temporal separator. There are vertices not in the vertex cover and for each of them there is exactly one vertex in . For each vertex in the vertex cover there are two vertices in . Hence, .
First, we consider the vertexgadget of a vertex . Note that in the vertexgadget of , there are two distinct temporal separators and . Hence, every temporal path in contains an edgeedge. Second, let and let and be the temporal paths which contain the edgeedges of edgegadget of such that and . Since is a vertex cover of we know that at least one element of is in . Thus, or , and hence neither nor exist in . It follows that is a temporal separator in of size at most , as there are no other temporal path in .
: Let be a temporal separator in of size and let . Recall that there are two distinct temporal separators in the vertex gadget of , namely and , and that all vertices in are from a vertex gadget. Hence, is of the form . We start with a preprocessing to ensure that for vertex gadget only one of these two separators are in . Let . We iterate over for each :

If or then we do nothing.

If then we remove from and decrease by one. One can observe that all temporal paths which are visiting are still separated by or .

If then we remove from and add . One can observe that is still a temporal separator of size in .

If then we remove from and add . One can observe that is still a temporal separator of size in .
That is a complete case distinction because neither nor separate all temporal paths in the vertex gadget in . Now we construct a vertex cover for by taking into if both and are in . Since there are vertex gadgets in each containing either one or two vertices from , it follows that ,
Assume towards a contradiction that is not a vertex cover of . Then there is an edge where . Hence, and . This contradicts the fact that is a temporal separator in , because is a temporal path in . It follows that is a vertex cover of of size at most . ∎
In the next section we prove that the bound on is tight in the strict case (note that for the nonstrict case the tightness is obvious). This is the first case where we can observe a significant difference between the strict and the nonstrict variant of our separation problem.
Since LengthBounded Separation is W[1]hard with respect to the postulated separator size [19], from Lemmata 2.3 and 3 we obtain the following.
Corollary 3.2.
Both Temporal Separation and Strict Temporal Separation are W[1]hard with respect to .
Furthermore, we show NPcompleteness of Temporal Separation and Strict Temporal Separation for the restricted class of planar temporal graphs, that is, temporal graphs that have a planar underlying graph. To this end, we prove NPhardness for LengthBounded Separation on planar graphs—a result which we consider to be of independent interest; note that NPcompleteness on planar graphs was only known for the edgedeletion variant of LBS on undirected graphs [17] and weighted directed graphs [30].
Theorem 3.3.
LengthBounded Separation on planar graphs is NPhard.
Roughly, the idea behind Theorem 3.3 is to reduce from an NPcomplete planar edgeweighted edgedeletion variant of LengthBounded Separation which has constant vertex degree. Since the degree is constant, one can replace a vertex with a gridlike gadget.
Proof.
We give a manyone reduction from the NPcomplete [17] edgeweighted variant of LengthBounded Cut, referred to as Planar LengthBounded Cut, where the input graph is planar, has edge costs , has maximum degree , the degree of and is three, and and are incident to the outerface, to LengthBounded Separation.
Let be an instance of Planar LengthBounded Cut, and we assume to be even
Construction.
For each vertex , we introduce a vertexgadget which is a grid of size , that is, a graph with vertex set and edge set . There are six pairwise disjoint subsets of size that we refer to as connector sets. As we fix and orientation of such that is in the topleft, there are two connector sets are on the top of , two on the bottom of , one on the left of , and one on the right of . Formally, , , , ,, and .
Note that all paths are of length at most , for all , because there are only vertices in .
Let be a plane embedding of . We say that an edge incident with vertex is at position on if is th edge incident with when counted clockwise with respect to .
For each edge , we introduce an edgegadget that differs on the weight of , as follows. Let be at position on and at position on . If , then is constructed as follows. Add a path consisting of vertices and connect one endpoint with each vertex in by an edge and connect the other endpoint with each vertex in by an edge. If , then is constructed as follows. We introduce a planar matching between the vertices in and . That is, for instance, we connect vertex with for each , if , or we connect vertex with for each , if and (we omit the remaining cases). Then, replace each edge by a path of length at least where its endpoints are identified with the endpoints of the replaced edge. Hence, a path between two vertexgadgets has length at least .
Next, we choose connector sets and such that no vertex is adjacent to a vertex from an edgegadget. Such and always exist because the degree of and is three. Now, we add two special vertices and and edges between and each vertex in , as well as between and each vertex in .
Finally, we set Note that can be computed in polynomial time. Moreover, one can observe that is planar by obtaining an embedding from .
Correctness.
We claim that is a yesinstance if and only if is a yesinstance.
: Let be a yesinstance. Thus, there is a solution with such that there is no path of length at most in . We construct a set of size at most by taking for each one arbitrary vertex from the edgegadget into . Note that since , each edge in is of cost one.
Assume towards a contradiction that there is a shortest path of length at most in . Since a path between two vertexgadgets has length at least , we know that goes through at most edgegadgets. Otherwise would be of length at least Now, we reconstruct an path in corresponding to by taking an edge into if goes through the edgegadget . Hence, the length of is at most . This contradicts that there is no path of length at most in . Consequently, there is no path of length at most in and is a yesinstance.
: Let be a yesinstance. Thus, there is a solution of minimum size (at most ) such that there is no path of length at most in . Since is of minimum size, it follows from the following claim that for all .
Claim 3.4.
Let be a vertexgadget and with . Then, for each vertex set of size at most it holds that there are and such that there is a path of length at most in .
Proof of Claim 3.4.
Let be a vertexgadget and two connector sets of , where and . We add vertices and and edges and to , where and . There are different cases in which . It is not difficult to see that in each case there are vertexdisjoint paths. The claim then follows by Menger’s Theorem [26]. ∎
Note that by minimality of , it holds that for all with . We construct an edge set of cost at most by taking into if there is a .
Assume towards a contradiction that there is a shortest path of length at most in . We reconstruct an path in which corresponds to as follows. First, we take an edge such that . Such a always exists, because and . Let be the first edge of and at position on . Then we add a path in , such that . Due to Claim 3.4, such a path always exists in and is of length at most .
We take an edgegadget into if is in . Recall, that an edgegadget is a path of length . Due to Claim 3.4, we can connect the edgegadgets of two consecutive edges in by a path of length at most in . Let be the last edge in , be at position on , , and . We add a path of length in (Claim 3.4). Note that visits at most vertexgadgets and edgegadgets. The length of is at most This contradicts that forms a solution for . It follows that there is no path of length at most in and is a yesinstance. ∎
As Lemmata 2.3 and 3 are planarity preserving, we get the following:
Corollary 3.5.
Both Temporal Separation and Strict Temporal Separation on planar temporal graphs is NPcomplete.
4 On Temporal Graphs with Few Layers
Consider the situation where a commuter wants to reach her working place () from home () by public transport. There is a certain time when she needs to be at work and a certain time span that she is willing to spend traveling from her home to work. Hence, considering the available transportation network, only a certain time interval is relevant. If we restrict the transportation network to this time interval, then it is reasonable to assume only few layers to be present. In this scenario, if there is no temporal separator of size , then the commuter can reach her working place in time, even if transport hubs are blocked.
In the previous section we showed that (Strict) Temporal Separation is NPcomplete already for (five) two layers (Proposition 3.1). In this section we determine for any smaller number of layers whether the respective problems are polynomialtime solvable. It is folklore that a minimum separator in static graphs can be computed in polynomial time. Thus, Temporal Separation is polynomialtime solvable for . The strict variant is more interesting: We show in this section that a dichotomy takes place when increases from four to five, that is, if we can solve Strict Temporal Separation in time. Furthermore, we show that Strict Temporal Separation on planar temporal graphs is solvable in time for any arbitrary but fixed number of layers. Studying planar temporal graphs is wellmotivated for instance in the context of transportation, since many street networks can be modeled by planar graphs.
Strict Static Expansion.
A key tool [6,