On Efficiently Finding Small Separators in Temporal Graphs
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, time-varying networks, edge-scheduled 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 (non-strict) and paths that contain at most one hop per time step (strict). We settle the hardness dichotomy (NP-hardness versus polynomial-time solvability) of both problem variants regarding the number of time steps of a temporal graph. Moreover we prove both problem variants to be NP-complete 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 constant-sized temporal core, the non-strict 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 NP-complete.
>\SplitArgument1;m \setargsaux#1 \NewDocumentCommand\setargsauxmm \IfNoValueTF#2#1 #1 \delimsize| #2
In complex network analysis, nowadays it is very common to have access and process graph data where the interactions in the data set are time-stamped. 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.  showed that the temporal analogue of this problem is NP-hard.
Temporal graphs are a well-established concept in the literature and are also referred to as evolving  and time-varying  graphs, temporal networks [22, 23, 27], multidimensional networks , link streams , and edge-scheduled networks . In this work, we use the well-established 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 . 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 time-edges, 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 time-edges we call the underlying graph of .
Many real-world 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 .
A fundamental question in temporal graphs, addressing issues such as
connectivity [4, 27], survivability ,
and robustness ,
is whether there is a “time-respecting” path from a
distinguished start vertex to a distinguished target
The two models.
We start with the introduction of the “non-strict” model . Given a temporal graph with two distinct vertices , a temporal -path of length in is a sequence of time-edges 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 (non-strict) temporal separators by strict ones.
While the strict variant appears natural, the non-strict variant can be viewed as a more conservative version of the problem. For instance, in a disease-spreading 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.
|General||Planar with||Temporal core|
(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 NP-complete for all and , respectively, strengthening a result by Kempe et al.  (they show NP-hardness for all ). Moreover, we prove that both problems are NP-complete on temporal graphs that have a planar underlying graph. To this end, we prove that Length-Bounded -Separation (for the problem definition, see Section 3) is NP-hard on planar graphs.
In Section 4, we identify tractable cases of both problems on temporal graphs with few layers. For the non-strict problem, our hardness result is already tight.
2For the strict variant, we identify a dichotomy in the computational complexity by proving polynomial-time solvability of Strict Temporal -Separation for . As a side product, we give a linear-time algorithm for the Single-Source Shortest Strict Temporal Paths problem, improving the best known running time  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 edge-incidences 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 NP-complete 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 non-strict) 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.
Our main reference is the work of Kempe et al.  who proved that Temporal -Separation is NP-hard. In contrast, Berman  proved that computing temporal -cuts (edge deletion instead of vertex deletion) is polynomial-time solvable. In the context of survivability of temporal graphs, Liang and Modiano  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. . 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 vertex-variant of Menger’s Theorem  states that the maximum number of vertex-disjoint paths from to equals the size of a minimum-cardinality -separator. In static graphs, Menger’s Theorem allows for finding a minimum-cardinality -separator via maximum flow computations. However, Berman  proved that the vertex-variant 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.  proved that the vertex-variant of the former analogue to Menger’s Theorem holds true if the underlying graph excludes a fixed minor. Mertzios et al.  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  introduced the time-analogue 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.  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 lower-bounding consecutive time steps of absence of the edge. Axiotis and Fotakis  studied the problem of finding the smallest temporal subgraph of a temporal graph such that single-source temporal connectivity is preserved on temporal graphs where the underlying graph has bounded treewidth.
As a convention, denotes the natural numbers without zero. For , we use .
We use basic notations from (static) graph theory . 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 .
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 non-strict temporal separators.
Throughout the whole paper we assume that the underlying graph of the temporal input graph is connected and that there is no time-edge between and . Furthermore, in accordance with Wu et al.  we assume that the time-edge set is ordered by ascending labels. Moreover, we can assume that the number of layers is at most the number of time-edges:
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 non-empty 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.
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 time-edge 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 time-edges in the time-edge set ordered by ascending labels until the first with the given requirement appear. Set . Then we iterate further over and replace each time-edge with until the next with the given requirement appear. Then we set and iterate further over and replace each time-edge with . We repeat this procedure until the end of is reached. Since we iterate over only once, this can be done in time.
A consequence of Lemma 2.2 is that the maximum label can be upper-bounded by the number of time-edges and hence the input size.
Proof of Lemma 2.1.
Regarding our two models, we have the following connection:
There is a linear-time computable many-one reduction from Strict Temporal -Separation to Temporal -Separation that maps any instance to an instance with and .
Let be an instance of Strict Temporal -Separation. We construct an equivalent instance in linear-time. Set , where is called the set of edge-vertices. Next, let be initially empty. For each , add the time-edges to . This completes the construction of . Note that this can be done in time. It holds that and that .
We claim that is a yes-instance if and only if is a yes-instance.
: 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 time-step 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 NP-complete Length-Bounded -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 straight-forward reduction.
observationlbstostrprob There is a polynomial-time 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.  showed that Length-Bounded -Separation is NP-complete, even if the lower bound for the path length is five, and hence Strict Temporal -Separation is NP-complete for all . This at hand, Lemma 2.3 implies that Temporal -Separation is NP-complete for all . However, through closer inspection we get that the non-strict variant is already NP-complete for all . This improves a previous result by Kempe et al.  who showed NP-completeness of Temporal -Separation and Strict Temporal -Separation for all . We summarize in the following.
Temporal -Separation is NP-complete for all and Strict Temporal -Separation is NP-complete for all .
We will make use of the NP-complete 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 time-edges 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 vertex-edges. In addition, for each edge there is an edge gadget which consists of two edge-edges and . See Figure 3 for an example.
We prove that is a yes-instance if and only if is a yes-instance.
: 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 vertex-gadget of a vertex . Note that in the vertex-gadget of , there are two distinct temporal -separators and . Hence, every temporal -path in contains an edge-edge. Second, let and let and be the temporal -paths which contain the edge-edges of edge-gadget 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 non-strict case the tightness is obvious). This is the first case where we can observe a significant difference between the strict and the non-strict variant of our separation problem.
Both Temporal -Separation and Strict Temporal -Separation are W-hard with respect to .
Furthermore, we show NP-completeness 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 NP-hardness for Length-Bounded -Separation on planar graphs—a result which we consider to be of independent interest; note that NP-completeness on planar graphs was only known for the edge-deletion variant of LBS on undirected graphs  and weighted directed graphs .
Length-Bounded -Separation on planar graphs is NP-hard.
Roughly, the idea behind Theorem 3.3 is to reduce from an NP-complete planar edge-weighted edge-deletion variant of Length-Bounded -Separation which has constant vertex degree. Since the degree is constant, one can replace a vertex with a grid-like gadget.
We give a many-one reduction from the NP-complete  edge-weighted variant of Length-Bounded -Cut, referred to as Planar Length-Bounded -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 Length-Bounded -Separation.
Let be an instance of Planar Length-Bounded -Cut, and we assume to be even
For each vertex , we introduce a vertex-gadget 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 top-left, 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 edge-gadget 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 vertex-gadgets has length at least .
Next, we choose connector sets and such that no vertex is adjacent to a vertex from an edge-gadget. 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 .
We claim that is a yes-instance if and only if is a yes-instance.
: Let be a yes-instance. 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 edge-gadget 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 vertex-gadgets has length at least , we know that goes through at most edge-gadgets. Otherwise would be of length at least Now, we reconstruct an -path in corresponding to by taking an edge into if goes through the edge-gadget . 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 yes-instance.
: Let be a yes-instance. 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 .
Let be a vertex-gadget 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 vertex-gadget 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 vertex-disjoint -paths. The claim then follows by Menger’s Theorem . ∎
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 edge-gadget into if is in . Recall, that an edge-gadget is a path of length . Due to Claim 3.4, we can connect the edge-gadgets 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 vertex-gadgets and edge-gadgets. 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 yes-instance. ∎
Both Temporal -Separation and Strict Temporal -Separation on planar temporal graphs is NP-complete.
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 NP-complete already for (five) two layers (Proposition 3.1). In this section we determine for any smaller number of layers whether the respective problems are polynomial-time solvable. It is folklore that a minimum -separator in static graphs can be computed in polynomial time. Thus, Temporal -Separation is polynomial-time 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 well-motivated for instance in the context of transportation, since many street networks can be modeled by planar graphs.
Strict Static Expansion.
A key tool [6,