Timeline Problems in Temporal Graphs:
Vertex Cover vs. Dominating Set
Abstract
A temporal graph is a finite sequence of graphs, called snapshots, over the same vertex set. Many temporal graph problems turn out to be much more difficult than their static counterparts. One such problem is Timeline Vertex Cover (also known as MinTimeline∞), a temporal analogue to the classical Vertex Cover problem. In this problem, one is given a temporal graph and two integers and , and the goal is to cover each edge of each snapshot by selecting for each vertex at most activity intervals of length at most each. Here, an edge in the th snapshot is covered, if an activity interval of or is active at time . In this work, we continue the algorithmic study of Timeline Vertex Cover and introduce the Timeline Dominating Set problem where we want to dominate all vertices in each snapshot by the selected activity intervals.
We analyze both problems from a classical and parameterized point of view and also consider partial problem versions, where the goal is to cover (dominate) at least edges (vertices) of the snapshots. With respect to the parameterized complexity, we consider the temporal graph parameters vertex-interval-membership-width and interval-membership-width . We show that all considered problems admit FPT-algorithms when parameterized by . This provides a smaller parameter combination than the ones used for previously known FPT-algorithms for Timeline Vertex Cover. Surprisingly, for , Timeline Dominating Set turns out to be easier than Timeline Vertex Cover, by also admitting an FPT-algorithm, whereas the vertex cover version is NP-hard even if is constant. We also consider parameterization by combinations of , the vertex set size, with or and parameterization by . Here, we show for example that both partial problems are fixed-parameter tractable for which significantly improves and generalizes a previous result for a special case of Partial Timeline Vertex Cover with .
Keywords and phrases:
NP-hard problem, FPT-algorithm, interval-membership-width, Color codingFunding:
Nils Morawietz: Supported by the French ANR, project ANR-22-CE48-0001 (TEMPOGRAL).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Parameterized complexity and exact algorithms ; Theory of computation Graph algorithms analysisRelated Version:
Some of the results of this work are also contained in the first author’s Master’s thesis [21].Editors:
Akanksha Agrawal and Erik Jan van LeeuwenSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
A crucial task in the management of wireless sensor networks is to monitor the network by selecting few dedicated sensors that can monitor themselves and other sensors which are close enough to have a direct wireless connection [27, 30]. In graph-theoretic terms, this is the famous NP-hard Dominating Set problem where we say that a vertex dominates itself and all its neighbors and the task is to select few vertices of the graph such that every vertex is dominated by some selected vertex. In some applications of sensor networks, the network may change over time. Then, instead of a static graph the input would be a temporal graph , consisting of a set of snapshots , each reflecting the connections at timestep . Moreover, in such a scenario each sensor could carry out the surveillance only for a bounded duration, for example due to limited battery capacities. Thus, instead of selecting few sensors to monitor the network, we would like to select, for each sensor, an active time interval of bounded length , during which it monitors itself and all its current neighbors. To make the model more general, we may also allow for each sensor to select up to such active intervals, for example because each sensor carries batteries. By calling a collection of active intervals for all vertices of the graph a -activity -timeline, the scenario described above corresponds to the following problem.
Timeline Dominating Set (Timeline DS)
Input: A temporal graph and integers .
Question: Is there a -activity -timeline which dominates all temporal vertices of ?
For an example input and solution for Timeline DS, refer to Figure 1. As in the static Dominating Set problem, we may further generalize the problem to handle scenarios where we are not able to monitor the whole network over the full time period but instead we want to maximize the number of monitored sensors under the resource limitations.
Timeline Partial Dominating Set (Timeline PDS)
Input: A temporal graph and integers .
Question: Is there a -activity -timeline which dominates at least temporal vertices of ?
In this work, we initialize the study of Timeline (Partial) Dominating Set in particular from a computational complexity perspective. As we show, Timeline (Partial) Dominating Set is NP-hard. To cope with this intractability, we consider mostly the parameterized complexity of the problem, with a particular focus on structural parameterizations of temporal graphs.
The idea to consider timelines in a temporal graph setting is not new: Rozenshtein et al. [28] introduced it in Timeline Vertex Cover,111Rozenshtein et al. denote this problem as MinTimeline∞. the second main problem studied in this work.
Timeline Vertex Cover (Timeline VC)
Input: A temporal graph and integers .
Question: Is there a -activity -timeline which covers all temporal edges of ?
For an example input and solution for Timeline VC, refer again to Figure 1. The model behind Timeline VC is that edges in a temporal graph arise only when at least one of their endpoints is active and the task of the problem is to provide an explanation of all edges such that the vertices are only active a few times, each time only for a short duration [28].
Dondi et al. [12] later analyzed the partial variant of the problem.
Timeline Partial Vertex Cover (Timeline PVC)
Input: A temporal graph and integers .
Question: Is there a -activity -timeline which covers at least temporal edges of ?
We continue the study of Timeline (Partial) Vertex Cover with two aims: First, some of the parameters considered in our study have not yet been studied for this problem. Second, we seek a comprehensive complexity overview for these two fundamental timeline problems, highlighting their similarities and differences.
Previous results.
Rozenshtein et al. [28] showed that Timeline VC is NP-hard in general, but solvable in polynomial time for . Froese et al. [18] continued the algorithmic study of Timeline VC. They proved NP-hardness even if the input consists of at most three snapshots, and and studied the parameterized complexity with respect to different parameters. Froese et al. [18] showed fixed-parameter tractability for and [1]-hardness for . Herein, is the number of vertices of the underlying graph which in turn is the static graph obtained by taking the union of all edge sets. Moreover, Timeline VC admits an XP-algorithm for and is fixed-parameter tractable with respect to if [18]. Schubert [29] later analyzed the parameterized complexity of Timeline VC with respect to combinations of input parameters with structural parameters of the underlying graph. Finally, Dondi et al. [12] obtained two results for Timeline PVC with : First, it was shown that this case is NP-hard, in contrast to Timeline VC. Second, Dondi et al. [12] gave FPT-algorithms for parameterization by the number of covered edges and by the number of uncovered edges.
Our results.
We start off with a new hardness result for Timeline VC: We show that the problem remains NP-hard even if the total number of snapshots , , and are constant and additionally the maximum degree in every snapshot is at most one. Then, we show the NP-hardness of Timeline DS, again for the case that , , and are constant and the maximum snapshot degree is one.
We then study the parameterized complexity of the problems; an overview of the results is given in Table 1. As noted above, Timeline VC is fixed-parameter tractable with respect to [18]. Since is a rather large parameter, Froese et al. [18] asked whether there are FPT-algorithms also for parameters that are smaller than . We make progress in this direction by considering the two parameters interval-membership-width and vertex-interval-membership-width which where introduced by Bumpus and Meeks [3]. The parameters and are interesting in the sense that they are among the relatively few truly temporal structural graph parameters because they are sensitive to the order of the snapshots [3]. Informally, can be defined as follows: We say the lifetime of a vertex is the time interval between its first and last non-isolated appearance in a snapshot. For a timestep , the bag of is the set of vertices whose lifetime contains timestep , and is the size of the largest bag of .
We first show that Timeline PVC is fixed-parameter tractable with respect to . To further improve on this, we introduce a hierarchy of parameters with non-increasing size. The idea, inspired by the -index of static graphs [16], is that a temporal graph may have only few large bags. In that case, we would rather parameterize by the size of the th largest bag, denoted by , for some . With this definition, we have and for all . We show that Timeline PVC is fixed-parameter tractable for with . Informally, this means that the larger and get, the more large bags can be ignored for the parameter. We then consider Timeline (Partial) Dominating Set in the same setting. We first showing fixed-parameter tractability of Timeline PDS for . Then we show that for Timeline DS it can be improved to fixed-parameter tractability for for while for Timeline PDS parameterization by is not useful. The latter result is obtained by showing NP-hardness of the extremely restricted special case when there are two snapshots, one of which is edgeless, and .
Afterwards, we consider the interval-membership-width . Informally, this is the edge-version of , that is, the bag at timestep contains the edges which occur at timestep and those that occur both before and after . Note that can be considered to be a smaller parameter than : For all instances, we have and there are instances with constant values of and unbounded values of . We show that Timeline DS is fixed-parameter tractable for the parameter while all three other problems are NP-hard for constant values of . Given the latter hardness results, we refrain from analyzing a hierarchy of -based parameters. Altogether, the results show that in our setting, is a much more powerful parameter than .
We then conclude by considering the more standard parameters , , , and , where denotes the number of vertices to dominate or edges to cover, respectively. For Timeline DS, we show fixed-parameter tractability for and [1]-hardness for , thus showing that the complexity is similar to the one of Timeline VC. Finally, we show that Timeline PDS and Timeline PVC can be solved in time. This improves and extends a previous result of Dondi et al. [12, Thm. 6] who provided an algorithm for Timeline PVC with that has running time .
Proofs of statements marked with are deferred to the related full version.
| Parameter | Timeline VC | Timeline PVC | Timeline DS | Timeline PDS |
|---|---|---|---|---|
| FPT | FPT | FPT | FPT | |
| Thm. 4.1 | Thm. 4.1 | Thm. 4.3 | Thm. 4.3 | |
| NP-h | NP-h | FPT | NP-h | |
| Thm. 4.7 | Thm. 4.7 | Thm. 4.6 | Thm. 4.8 | |
| FPT | FPT | FPT | NP-h | |
| Prop. 4.2 | Prop. 4.2 | Prop. 4.4 | Thm. 4.5 | |
| FPT | ? | FPT | ? | |
| [18, Thm. 8] | Thm. 5.1 | |||
| W[1]-h | W[1]-h | W[1]-h | W[1]-h | |
| [18, Thm. 12] | [18, Thm. 12] | Thm. 5.2 | Thm. 5.2 | |
| – | FPT | – | FPT | |
| Thm. 5.4 | Thm. 5.4 |
Further related work.
Akrida et al. [1] introduced the problems Temporal Vertex Cover (TVC) and Sliding Window Temporal Vertex Cover (SW-TVC), where the goal is to find a minimum number of temporal vertices that cover the edges of the temporal graph. In TVC each edge needs to be covered in at least one of the snapshots and in SW-TVC, the input contains an integer , and the aim is to cover every edge at least once at every consecutive time steps. Akrida et al. [1] showed that TVC remains NP-hard when the underlying graph is a star graph. Moreover, they studied the approximability of both problems, provided (S)ETH-based running time lower bounds and designed an exact dynamic programming algorithm with exponential running time. The research on these problems was then continued by Hamm et al. [20], who showed that TVC is solvable in polynomial time if the underlying graph is a path or cycle while SW-TVC remains NP-hard in this case. Besides that, they provided several (exact and approximation) algorithms for the sliding window variant. The Temporal Dominating Set (TDS) problem is defined analogously, here the task is to dominate every vertex in at least one of the snapshots of the temporal graph by selecting few temporal vertices. TDS is NP-hard in very restricted cases, for example when the maximum degree in every snapshot is 2 [22]. There are further temporal variants of Vertex Cover and Dominating Set which have been discussed and studied. These include a multistage variant of Vertex Cover [17], a reachability-based variant for Dominating Set [23] and different conditions on how and when a vertex should be dominated [4, 31].
2 Preliminaries
We denote the set of integers by , and simply by . Given a set and an integer , we write for the collection of all size- subsets of .
Graph theory.
A (static) graph consists of a set of vertices and a set of edges . We denote by and the vertex and edge set of , respectively. Furthermore, we let and . For an edge we write and call and endpoints of the edge. Further, we say that the vertex is incident with if . If , then and are adjacent and they are neighbors of each other. The set is the (open) neighborhood of . Moreover, is the closed neighborhood of . For a set of vertices , we let and . By we denote the degree of . If , we say that is isolated. The maximum degree is . For vertex sets and , we let and we let . A graph is bipartite if can be partitioned into two sets and such that . For more details on graph theory, we refer to the book by Diestel [8].
Temporal graphs.
A temporal graph is a finite sequence of graphs which all have the same set of vertices . The graphs are called snapshots, is the lifetime of , and is a time step. We may write instead of and instead of . Moreover, for and , is a temporal vertex and with is a temporal edge in snapshot . We say edge appears in if . Moreover, we say that a vertex is incident with the temporal edge if . For a temporal vertex , we define the (open) neighborhood by and the closed neighborhood by . By we denote the underlying graph of . We let . Furthermore, by we denote the maximum snapshot degree of . If we say that is empty. We may drop the subscript when it is clear from context.
Parameter definitions.
We give the precise definitions of the parameters related to the (vertex)-interval-membership width: , , and .
Let be a temporal graph. The vertex-interval-membership sequence of is the sequence of vertex-subsets (called bags), where each is defined as
The vertex-interval-membership-width of , denoted by , is the maximum size of a bag in the vertex-interval-membership sequence, that is, .
For given we introduce the parameter as the size of the th largest bag of the vertex-interval-membership sequence. Formally, let be an ordering of such that . Then we define
Note that can be much smaller than : for example consider a temporal graph where every vertex only appears non-isolated for a short period of time. If all snapshots have only a few edges, then is small. However, a single snapshot with many edges is enough to make arbitrarily large. If only a few such snapshots exist, then is already much smaller then for small .
The interval-membership sequence of is the sequence of edge-subsets (again called bags), where each is defined as
The interval-membership-width of , denoted by , is the maximum size of a bag in the interval-membership sequence, that is, .
We remark that and that there exist temporal graphs with but arbitrary large [3]. Finally, note that the vertex-interval-membership sequence and the interval-membership sequence can be computed in polynomial time with respect to the input size.
Timelines.
Given a temporal graph , an activity interval of a vertex is a triple such that . We say that is the starting time and is the end time of an activity interval . The length of the activity interval is defined by . A -activity timeline of the temporal graph is a set of activity intervals , which contains at most activity intervals for each vertex. A -activity -timeline is a -activity timeline in which each activity interval has length at most . Given a -activity timeline , a vertex is called active in snapshot , if there exists such that . A -activity timeline dominates the temporal vertex if . A -activity timeline covers the temporal edge if at least one of the two endpoints of is active in snapshot .
Parameterized complexity.
Let be a computational problem specified over some alphabet and let be a parameter, that is, assigns to each instance of an integer parameter value (which we simply denote by if the instance is clear from the context). We say that is fixed-parameter tractable (FPT) with respect to if can be decided in time where is the length of the input. The corresponding hardness concept related to fixed-parameter tractability is W[]-hardness, ; if a problem is W[]-hard with respect to , then is assumed to not be fixed-parameter tractable. Moreover, is slice-wise polynomial (XP) with respect to if can be decided in time. Let and be two instances of . A reduction to a (problem) kernel for is a polynomial-time algorithm that computes an instance such that
-
, and
-
is a yes-instance of if and only if is a yes-instance of .
The instance is referred to as the problem kernel and is the size of the kernel. Furthermore, if is a polynomial, we say that the kernel is a polynomial problem kernel. For more details about parameterized complexity we refer to the standard monographs [14, 7].
3 NP-Hardness Results
We show NP-hardness for Timeline VC and Timeline DS even when they are restricted to temporal graphs with a maximum snapshot degree of 1 and constant lifetime , interval number , and interval length . First, we present the reduction for Timeline VC.
Theorem 3.1.
Timeline VC is NP-hard even if , and the maximum snapshot degree is one.
Proof.
We reduce from the NP-hard problem -Coloring on graphs with maximum degree four [19]. In -Coloring the input is a graph and the question is whether the vertices can be colored with three colors such that no two adjacent vertices have the same color.
Intuition.
The basic idea is to construct a temporal graph with three parts and (call them color blocks), each consisting of five snapshots and representing one of the three colors. The part in which a vertex is not active corresponds to the assigned color of . As each of the three parts will contain every edge of and only vertices of degree at most one, this ensures that all neighbors are active in the part where is not active. Hence, they are assigned a different color. The basic idea for encoding a given graph into snapshots of maximum degree one is to find a proper edge coloring with five colors and split the edge set with respect to this coloring, which can be done in polynomial time via Vizing’s theorem. Our aim is that no activity interval of any vertex can hit more than one color block. To ensure this, we add sufficiently many empty snapshots between any two parts.
Construction.
Let be an instance of -Coloring on graphs with maximum degree four. We construct the following temporal graph where .
The temporal graph consists of snapshots. It can be seen as a sequence of five parts, namely . Parts and consist of empty snapshots and each of consists of 5 snapshots. Thus, snapshots to and to 18 are empty. We denote and as the empty blocks and we call and color blocks as they correspond to the three colors. In the following we formally define the snapshots of the color blocks. All three color blocks and will be identical. Hence, we only formally define , that is, snapshots 1 to 5.
Here we exploit the fact that the graph has maximum degree four, because this implies that there exists a proper edge coloring with at most five colors due to Vizing’s theorem [32], which can be computed in polynomial time [25]. Let be the partition of into five colors of some proper edge coloring. Now, snapshot contains exactly the edges of . Finally, observe that by construction, the maximum degree in each snapshot is at most one. By setting and , we obtain the Timeline VC instance .
Correctness.
We show that is -colorable if and only if has a -activity -timeline covering all temporal edges of . In the following we say a vertex is active during for to indicate that an activity interval of starts at the first time step and ends and the last time step of the corresponding part.
Let be a proper 3-coloring of . We construct an activity timeline of which covers all temporal edges. For each , the vertex is active in the two color blocks, which do not correspond to the assigned color of . Clearly, this yields a 2-activity timeline . It remains to argue that each temporal edge is covered by . Since is a proper 3-coloring, both endpoints of each edge have a different color. Moreover, since in color block all vertices are active which do not have color , we conclude that all temporal edges of are covered by .
Let be a -activity 4-timeline covering all temporal edges of . Observe that since parts and corresponding to snapshots 6 to 9 and 15 to 18 are empty, no activity interval of any vertex can hit more than one color block. Consequently, since , for each vertex there exists at least one color such that is not active during any snapshot of color block . Let be such a color. Note that if is not unique, we pick any color fulfilling the property. We now argue that is a proper 3-coloring of . Assume towards a contradiction that this is not the case, that is, there exists at least one edge such that both endpoints and have the same color . This implies that both and are not active during . But since exactly one of the 5 snapshots corresponding to color block contains the edge , timeline is not covering all temporal edges of , a contradiction. Thus, is a proper 3-coloring of . Next, we extend the ideas of this reduction to Timeline DS for which the reduction is more involved since we also need to deal with isolated temporal vertices.
Theorem 3.2 ().
Timeline DS is NP-hard even if and the maximum snapshot degree is one.
4 The Influence of Membership-Width Based Parameters
Now, we investigate the membership-width based parameters and . More precisely, we study the parameter combinations and . These combinations are motivated by the fact that Timeline VC and Timeline DS are W[1]-hard with respect to ; for Timeline VC this follows from previous work [18] and for Timeline DS, we will show this in Section 5.
4.1 The Parameter Vertex-Interval-Membership-Width
In this section, we provide FPT-algorithms with respect to for Timeline PVC and Timeline PDS. Moreover, we show that can be replaced by smaller parameters for all problems except Timeline PDS (the precise value of differs for Timeline PVC and Timeline DS). Simultaneously, these algorithms also are XP-algorithms for Timeline PVC and Timeline PDS parameterized by alone. Initially, we focus on Timeline (Partial) Vertex Cover and we show that Timeline PVC admits an FPT-algorithm for .
Theorem 4.1 ().
Timeline PVC is solvable in time.
Proof.
Let be an instance of Timeline PVC. Further, suppose that (otherwise, it is a trivial instance) and that the underlying graph contains no isolated vertex . Otherwise, since does not cover any temporal edge, can be safely removed and consequently remains unchanged. Moreover, we assume that each vertex is contained in at least bags (recall that these are consecutive) because otherwise we can simply greedily pick activity intervals of which contain all snapshots where is non-isolated and thus we cover all temporal edges incident with . Thus, it is safe to remove from and reduce by the number of temporal edges incident with over all snapshots.
The idea is to use dynamic programming over the lifetime of the temporal graph. Each table entry corresponds to the maximal number of covered temporal edges where a specific set of vertices in the bag is active. In other words, the dynamic program keeps track of the activity of the vertices which are contained in the bag of the currently considered time step . While iterating over the lifetime of the temporal graph, we need to ensure that the activities at a time step are compatible with the activities at the neighboring time steps. Moreover, for a vertex let and be the index of the smallest and largest snapshot where is incident to an edge, respectively. By definition, for any . Furthermore, since is isolated in all snapshots where or , it is safe to assume that all activity intervals of are used when is contained in the bags .
Recall that the vertex-interval-membership sequence can be computed in polynomial time. Since we assumed that the underlying graph contains no isolated vertex, it follows that each vertex is contained in at least one bag of the sequence.
Table Definition.
We denote and . In other words, is the set of vertices which are isolated in all snapshots since we assumed that contains no isolated vertices. Moreover, for we define functions and . The functions and indicate for each vertex whether an activity interval of is active during snapshot . More precisely, the function value determines the number of the current activity interval of and the function value determines the position in this activity interval. Here, means that the current time step is before the first activity interval and means that is currently not active, that is, the -th activity interval of is already over and the next one has not started yet. Now the entry contains the maximum number of covered temporal edges in the first snapshots , while is at the -th position of the -th activity interval of .
The formal definition of the table now is
where the maximum is taken over all -activity -timelines
such that for each
-
(i)
there are at most activity intervals of in ,
-
(ii)
, and
-
(iii)
for if .
We need Conditions (i)-(iii) for the following reasons: Condition (i) ensures that each vertex has at most activity intervals. Moreover, condition (ii) ensures that no activity interval starts before time step one. Finally, condition (iii) ensures that each activity interval has length , except if the remaining number of snapshots is too small.
Initialization.
For all and , for which implies , the table is initialized by
Note that and therefore only activity timelines are considered in the definition of . The initialization is correct, since the table entry contains the number of temporal edges which are covered by the active vertices from in . Observe that the other endpoints of the covered edges are also contained in by definition.
Recurrence.
The remaining table entries are computed recursively. Intuitively, is computed by trying all activity interval choices for the vertices of , such that there is no conflict with and . Formally, we set
where the maximum is taken over all and which are compatible with and . Informally, and are compatible with and if they provide a correct extension of the activities of at time step to time step . Formally, four conditions need to be fulfilled: First, if an interval of is already active at time step , that is, if , then an activity interval of is already active during time step . This can be formalized as follows.
| (1) |
Second, if a new activity interval of starts at time step either was inactive at time step or the previous activity interval of ended at time step . This can be formalized as follows.
| (2) |
Third, if the first activity interval of starts at time step , then in the previous time step vertex cannot be active. This can be formalized as follows.
| (3) |
Finally, if is not active during time step , either is also not active during time step or an activity interval of ended at time step . This can be formalized as follows.
| (4) |
Correctness.
We show the correctness of the computation by proving inequalities in both directions.
() Suppose the maximum in the definition of the table entry is attained for and assume that no activity intervals from overlap. We define by taking all activity intervals from which are relevant for a table entry of . Formally, we define
and, in accordance with , functions by
Note that . We show that and satisfy Conditions (1)–(4). This means that the table entry is considered in the maximum on the right side of the recursive computation. By definition of and it is clear that is then considered in the definition of the table entry . Now let .
-
(1)
If , then for some and by definition of , each such activity interval of in is also contained in . Consequently, we have and .
-
(2)
If and , then for some . So the activity timeline contains at most activity intervals of and therefore . Now either for some or is not active in with respect to the activity intervals from . This means that either or .
-
(3)
If and , then for some . Consequently, contains no activity interval of and therefore .
-
(4)
If and , then either for some or is not active in with respect to the activity intervals from . So by definition and either or .
Now consider the set of temporal edges until time step that are covered by and the set of temporal edges until time step that are covered by . There are two cases for a temporal edge .
- Case 1: .
-
Since the temporal edge is covered by we can conclude that .
- Case 2: .
-
We have . This implies the existence of an activity interval or in with . However, then the activity interval is by definition contained in and consequently .
Hence, any temporal edge in is contained in . We thus have the desired inequality
() Suppose the maximum on the right side of the computation is attained for and the maximum in the definition of is attained for . We define by extending in the following way: For the activity interval is added if and only if . These new intervals together with the already active ones () cover all edges of . Hence, the total number of edges covered by is .
Because is considered in the definition of , we have
Hence, the desired inequality holds.
Result.
Finally, we return yes if and only if for and some function . The restriction to these functions is correct, since we can assume without loss of generality that a vertex is active in if and only if its -th activity interval ends at time step (recall that we assume that each vertex is in at least bags). Consequently, all -activity -timelines of are considered in the definition of the table entry and all covered temporal edges of are counted in the respective maximum of the definition.
Running Time.
For each time step , there are choices for the functions and . This upper-bounds the size of our dynamic programming table by . In each recursive computation of a table entry, there are also choices for and . The remaining summands of the recursive formula can be computed in time. Hence, the overall running time can be bounded by .
Now, we show that for Timeline PVC the parameter can be replaced by an even smaller parameter, . The algorithm for this parameter has two steps: First it applies a preprocessing step that handles the large bags. Then, it invokes the algorithm of Theorem 4.1 for .
Proposition 4.2.
Timeline PVC is solvable in time where .
Proof.
Let be the bags of the vertex-interval-membership sequence of . Similar to the proof of Theorem 4.1, it is safe to assume that each vertex is contained in at least bags (by definition the bags containing need to be consecutive) because otherwise, we can greedily pick the -activity intervals of such that is active during all these snapshots and thus all temporal edges incident to are covered and we can reduce accordingly.
We call the largest bags of large. The idea is to pick the intervals greedily for all vertices that are only contained in large bags. Intuitively, this works since the large bags appear consecutively. Afterwards, we remove all these vertices and adapt accordingly. Finally, we can invoke the algorithm of Theorem 4.1.
Now, let be a sequence of consecutive indices such that each bag for each is large. By definition . Now, let . If or , then or is simply the empty set. Suppose . By definition, each vertex in is isolated in and also in . By our assumption that each vertex is contained in at least bags, we can conclude that . Now observe that by picking the -activity intervals for each vertex in greedily, we can cover all temporal edges which are incident to some vertex of . Hence, it is safe to remove from and to reduce by the number of temporal edges covered by the vertices in . For the remaining instance, we use the algorithm of Theorem 4.1. After removing , we have for every and consequently Theorem 4.1 yields the desired running time. Now, suppose and let be a large bag contained in a sequence of large bags with indices . In this case, we can conclude and again apply Theorem 4.1.
Now, we focus on Timeline (Partial) Dominating Set. Initially, we show how to adapt the algorithm of Theorem 4.1 for Timeline PDS to obtain an algorithm with the same running time for Timeline PDS. However, we need to be more careful since isolated vertices in the snapshots can no longer be ignored as for Timeline PVC. This means that vertices which are not contained in the current bag of the vertex-interval-membership sequence might have to be active. Hence, the update of the dynamic program additionally needs to consider the case that activity intervals of vertices appear before or after their first or last occurrence in a bag.
Theorem 4.3 ().
Timeline PDS is solvable in time.
Recall that for Timeline PVC we showed that can be replaced by the much smaller parameter , the size of the largest bag. Hence, one may ask whether can be replaced by with some suitably chosen for Timeline DS and Timeline PDS. We show that both problems behave quite differently: First, we show we that can be replaced by for Timeline DS by having a preprocessing step and then adapting the algorithm behind Theorem 4.3. Second, we show that replacing by is not possible for Timeline PDS. More precisely, we show NP-hardness even if there are only two snapshots one of which is edgeless (which implies ).
We start with our result for Timeline DS.
Proposition 4.4 ().
Timeline DS is solvable in time where .
Finally, we show hardness for constant , and for Timeline PDS.
Theorem 4.5 ().
Timeline PDS is NP-hard even if , , , the underlying graph is bipartite, planar, has maximum degree 3, and one snapshot is edgeless.
4.2 The Parameter Interval-Membership-Width
Now, we study the influence of instead of . Initially, we show that the parameter yields a polynomial kernel for Timeline DS. This also implies a polynomial kernel for and for Timeline DS. More precisely, we show an even stronger result: We provide a polynomial kernel for , where is the maximal number of edges in any snapshot. Note that is never larger than , since any bag contains . Moreover, in the temporal graph with a star on leaves as underlying graph and lifetime , where the edge towards the -th leaf is active at snapshots and , we have and .
Theorem 4.6.
Timeline DS has a kernel where both the number of snapshots and vertices are cubic in which can be computed in linear time with respect to the input size.
Proof.
In order to provide the kernel we bound the number of snapshots and the number of vertices of the underlying graph based on the following case distinction.
- Case 1: .
-
By definition each -activity -timeline has active vertices in at most snapshots. Hence, if , then the instance is a no-instance.
- Case 2.1: and .
-
We show that in this case, we are dealing with a no-instance. Since each snapshot contains at most edges, any set of vertices can dominate at most vertices in this snapshot. As , it follows that at least vertices must be active in order to dominate all temporal vertices of the corresponding snapshot . Moreover, note that the total number of active vertices in any -activity -timeline is at most . Consequently, for any yes-instance.
- Case 2.2: and .
-
If , then we have the desired bound. Otherwise, if , we can solve the instance in polynomial time as follows. Since each snapshot has at most edges, at most vertices are non-isolated in each snapshot. Moreover, since there are at most snapshots, in total at most vertices are non-isolated in the temporal graph. Consequently, since there exists at least one vertex which is isolated in every snapshot. Thus, if we deal with a trivial no-instance and if we deal with a trivial yes-instance.
Thus, in each case we either solve the instance (giving a kernel of constant size) or obtain a kernel with at most snapshots and at most vertices. Moreover, the kernel can be computed in linear time as it involves only computing , , and .
We show that the remaining problems are NP-hard if .
Theorem 4.7 ().
Timeline VC is NP-hard even if , , , each edge of the underlying graph exists in exactly one snapshot, and the underlying graph has a constant maximum degree.
Theorem 4.8 ().
Timeline PDS is NP-hard even if , , and the underlying graph has a constant maximum degree.
5 Complexity with respect to Input Parameters
Finally, we study the influence of the input parameters , and on the complexity of Timeline (Partial) Vertex Cover and Timeline (Partial) Dominating Set. Both Timeline VC and Timeline DS are NP-hard for constant values of and . Consequently, larger parameters need to be considered to obtain FPT-algorithms or XP-algorithms. Froese et al. [18, Theorem 8] showed that Timeline VC admits an FPT-algorithm for . A similar algorithm also works for Timeline DS.
Theorem 5.1 ().
Timeline DS is solvable in time .
Froese et al. [18, Theorem 12] showed that Timeline VC is W[1]-hard for even if with a reduction from Unary Bin Packing and using a multicolored and a nonuniform variant of Timeline VC as intermediate problems in the reduction. In Nonuniform Timeline VC we are not given a single number of permitted activity intervals , but instead a number for each vertex . In a similar way we introduce Nonuniform Timeline DS, which we will use as an intermediate problem to show hardness for for Timeline DS.
Theorem 5.2 ().
Timeline DS parameterized by is -hard even if .
The -hardness results for both problems do not apply to the case . For Timeline VC, this case is fixed-parameter tractable because there exists an ILP formulation in which the number of variables is bounded by some function of [18, Lemma 10]. It is also straightforward to extend this ILP formulation to Timeline PVC. To complete the picture, we extend the ILP formulation also to Timeline PDS, thus showing that it is fixed-parameter tractable for as well.
Theorem 5.3 ().
Timeline PDS is fixed-parameter tractable with respect to if .
Finally, we show that both Timeline PDS and Timeline PVC can be solved in time, where denotes the number of temporal vertices/edges, which need to be dominated/covered. Recall that Dondi et al. [12, Theorem 6] provided an FPT-algorithm for Timeline PVC with running time if . Hence, our approach improves upon their running time and is not limited to . The idea is to use color coding [2], a very popular technique to obtain FPT-algorithms [7]. To provide deterministic algorithm, we use -perfect hash families which can be computed efficiently [26].
Theorem 5.4 ().
Timeline PDS and Timeline PVC are solvable in time.
6 Conclusion
We studied the classical and parameterized complexity of Timeline (Partial) Vertex Cover and Timeline (Partial) Dominating Set. We showed that all problems admit FPT-algorithms for , where is the vertex-interval-membership width. Our running time bounds also give XP-algorithms for alone. For Timeline VC this improves upon an XP-algorithm for [18]. Moreover, we showed that the smaller parameter leads to para-NP-hardness for all problems except Timeline DS. Hence, we discovered a parameter where a dominating set problem is tractable while the corresponding vertex cover variant is not.
For future work it is interesting to investigate whether already the parameter yields an FPT-algorithm for any problem in our study. Moreover, it is open whether Timeline PVC and Timeline PDS admit an FPT-algorithm with respect to . Even for fixed-parameter tractability with respect to is still open. Moreover, one could investigate the complexity with respect to other temporal graph parameters such as the temporal neighborhood diversity [15] or temporal graph parameters that are sensitive to the order of the snapshots [6, 5].
A further problem related to Timeline VC is MinTimeline+. In this problem, the value of bounds the sum of the lengths of the activity intervals instead of the length of the longest activity interval. MinTimeline+ was also introduced by Rozhenstein et al. [28] and studied in several works [18, 10, 11, 9, 13, 29, 24]. To distinguish this problem from the other problems in our naming convention, Timeline VC (MinTimeline∞) could be called MinMax Timeline VC and MinTimeline+ could be called Sum Timeline VC, and the timeline variants of Dominating Set could be named analogously. It is open which of our positive results for and can be transferred to the Sum variants of the problems. Finally, it is interesting to study other classic problems as Feedback Vertex Set in the MinMax Timeline and Sum Timeline setting.
References
- [1] Eleni C. Akrida, George B. Mertzios, Paul G. Spirakis, and Viktor Zamaraev. Temporal vertex cover with a sliding time window. J. Comput. Syst. Sci., 107:108–123, 2020. doi:10.1016/J.JCSS.2019.08.002.
- [2] Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. J. ACM, 42(4):844–856, 1995. doi:10.1145/210332.210337.
- [3] Benjamin Merlin Bumpus and Kitty Meeks. Edge exploration of temporal graphs. Algorithmica, 85(3):688–716, 2023. doi:10.1007/S00453-022-01018-7.
- [4] Arnaud Casteigts. A Journey through Dynamic Networks (with Excursions). Habilitation thesis, Université de Bordeaux, 2018. URL: https://tel.archives-ouvertes.fr/tel-01883384.
- [5] Arnaud Casteigts, Nils Morawietz, and Petra Wolf. Distance to Transitivity: New Parameters for Taming Reachability in Temporal Graphs. In Proceedings of the 49th International Symposium on Mathematical Foundations of Computer Science (MFCS ’24), volume 306 of LIPIcs, pages 36:1–36:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.MFCS.2024.36.
- [6] Filippos Christodoulou, Pierluigi Crescenzi, Andrea Marino, Ana Silva, and Dimitrios M. Thilikos. Making the interval membership width of temporal graphs connected and bidirectional. In Proceedings of the 35th International Workshop on Combinatorial Algorithms (IWOCA ’24), volume 14764 of Lecture Notes in Computer Science, pages 247–258. Springer, 2024. doi:10.1007/978-3-031-63021-7_19.
- [7] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [8] Reinhard Diestel. Graph Theory, 4th Edition, volume 173 of Graduate Texts in Mathematics. Springer, 2012.
- [9] Riccardo Dondi. Insights into the Complexity of Disentangling Temporal Graphs. In Proceedings of the 23rd Italian Conference on Theoretical Computer Science (ICTCS ’22), volume 3284 of CEUR Workshop Proceedings, pages 1–13. CEUR-WS.org, 2022. URL: https://ceur-ws.org/Vol-3284/2973.pdf.
- [10] Riccardo Dondi. Untangling temporal graphs of bounded degree. Theor. Comput. Sci., 969:114040, 2023. doi:10.1016/J.TCS.2023.114040.
- [11] Riccardo Dondi and Manuel Lafond. An FPT algorithm for timeline cover. J. Comput. Syst. Sci., 154:103679, 2025. doi:10.1016/J.JCSS.2025.103679.
- [12] Riccardo Dondi, Fabrizio Montecchiani, Giacomo Ortali, Tommaso Piselli, and Alessandra Tappini. Partial temporal vertex cover with bounded activity intervals. In Proceedings of the 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND ’24), volume 292 of LIPIcs, pages 11:1–11:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.SAND.2024.11.
- [13] Riccardo Dondi and Alexandru Popa. Exact and approximation algorithms for covering timeline in temporal graphs. Ann. Oper. Res., 351(1):609–628, 2025. doi:10.1007/s10479-024-05993-8.
- [14] Rodney G. Downey and Michael Ralph Fellows. Fundamentals of Parameterized Complexity. Springer Science & Business Media, 2013.
- [15] Jessica A. Enright, Samuel D. Hand, Laura Larios-Jones, and Kitty Meeks. Structural parameters for dense temporal graphs. In Proceedings of the 49th International Symposium on Mathematical Foundations of Computer Science (MFCS ’24), volume 306 of LIPIcs, pages 52:1–52:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.MFCS.2024.52.
- [16] David Eppstein and Emma S. Spiro. The h-index of a graph and its application to dynamic subgraph statistics. J. Graph Algorithms Appl., 16(2):543–567, 2012. doi:10.7155/JGAA.00273.
- [17] Till Fluschnik, Rolf Niedermeier, Valentin Rohm, and Philipp Zschoche. Multistage vertex cover. Theory Comput. Syst., 66(2):454–483, 2022. doi:10.1007/s00224-022-10069-w.
- [18] Vincent Froese, Pascal Kunz, and Philipp Zschoche. Disentangling the computational complexity of network untangling. Theory Comput. Syst., 68(1):103–121, 2024. doi:10.1007/S00224-023-10150-Y.
- [19] M. R. Garey, David S. Johnson, and Larry J. Stockmeyer. Some simplified NP-complete problems. In Proceedings of the 6th Annual ACM Symposium on Theory of Computing, pages 47–63. ACM, 1974. doi:10.1145/800119.803884.
- [20] Thekla Hamm, Nina Klobas, George B. Mertzios, and Paul G. Spirakis. The complexity of temporal vertex cover in small-degree graphs. In Proceedings of the Thirty-Sixth AAAI Conference on Artificial Intelligence (AAAI ’22), pages 10193–10201. AAAI Press, 2022. doi:10.1609/AAAI.V36I9.21259.
- [21] Anton Herrmann. On the complexity of computing optimal dominating sets in temporal graphs. Master’s thesis, Friedrich-Schiller-Universität Jena, 2024.
- [22] Anton Herrmann, Christian Komusiewicz, Nils Morawietz, and Frank Sommer. Temporal dominating set and temporal vertex cover under the lense of degree restrictions. In Proceedings of the 4th Symposium on Algorithmic Foundations of Dynamic Networks (SAND ’25), volume 330 of LIPIcs, pages 16:1–16:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPICS.SAND.2025.16.
- [23] David C. Kutner and Laura Larios-Jones. Temporal reachability dominating sets: Contagion in temporal graphs. J. Comput. Syst. Sci., 155:103701, 2026. doi:10.1016/J.JCSS.2025.103701.
- [24] Giorgio Lazzarinetti, Sara Manzoni, Italo Zoppis, and Riccardo Dondi. FastMinTC+: A Fast and Effective Heuristic for Minimum Timeline Cover on Temporal Networks. In Proceedings of the 31st International Symposium on Temporal Representation and Reasoning (TIME ’24), volume 318 of LIPIcs, pages 20:1–20:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.TIME.2024.20.
- [25] Jayadev Misra and David Gries. A constructive proof of Vizing’s theorem. Inf. Process. Lett., 41(3):131–133, 1992. doi:10.1016/0020-0190(92)90041-S.
- [26] Moni Naor, Leonard J. Schulman, and Aravind Srinivasan. Splitters and near-optimal derandomization. In Proceedings of the 36th Annual Symposium on Foundations of Computer Science (FOCS ’95), pages 182–191. IEEE Computer Society, 1995. doi:10.1109/SFCS.1995.492475.
- [27] Tayler Pino, Salimur Choudhury, and Fadi Al-Turjman. Dominating set algorithms for wireless sensor networks survivability. IEEE Access, 6:17527–17532, 2018. doi:10.1109/ACCESS.2018.2819083.
- [28] Polina Rozenshtein, Nikolaj Tatti, and Aristides Gionis. The network-untangling problem: from interactions to activity timelines. Data Min. Knowl. Discov., 35(1):213–247, 2021. doi:10.1007/S10618-020-00717-5.
- [29] Carsten Schubert. Leveraging graph structure to untangle temporal networks efficiently. Master’s thesis, TU Berlin, Institute of Software Engineering and Theoretical Computer Science, 2023.
- [30] I. Stojmenovic, M. Seddigh, and J. Zunic. Dominating sets and neighbor elimination-based broadcasting algorithms in wireless networks. IEEE Trans. Parallel Distributed Syst., 13(1):14–25, 2002. doi:10.1109/71.980024.
- [31] M Verheije. Algorithms for domination problems on temporal graphs. Master’s thesis, Utrecht University, Graduate School of Natural Sciences, 2021.
- [32] Vadim G Vizing. On an estimate of the chromatic class of a -graph. Discret Analiz, 3:25–30, 1964.
