Realization of Temporally Connected Graphs Based on Degree Sequences
Abstract
Given an undirected graph , the problem of deciding whether admits a simple and proper time-labeling that makes it temporally connected is known to be NP-hard (Göbel et al., 1991). In this article, we relax this problem and ask whether a given degree sequence can be realized as a temporally connected graph. Our main results are a complete characterization of the feasible cases, and a recognition algorithm that runs in time for graphical degree sequences (realized as simple temporal graphs) and in time for multigraphical degree sequences (realized as non-simple temporal graphs, where the number of time labels on an edge corresponds to the multiplicity of the edge in the multigraph). In fact, these algorithms can be made constructive at essentially no cost. Namely, we give a constructive time algorithm that outputs, for a given (multi)graphical degree sequence , a temporally connected graph whose underlying (multi)graph is a realization of , if one exists.
Keywords and phrases:
temporal paths, gossiping, (multi)graphical degree sequences, edge-disjoint spanning trees, linear time algorithmsFunding:
Arnaud Casteigts: Supported by the Swiss NSF, project RECAPT (200021-236640).Copyright and License:
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis ; Mathematics of computing Discrete mathematics ; Networks Network design and planning algorithmsEditors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung TsaiSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
Proof of statements marked with are deferred to the full version.
1 Introduction
The problem of assigning time labels to the edges of a graph in such a way that every vertex can reach every other vertex by a non-decreasing path (temporal path) is known as the gossiping problem. Problems of this type were extensively studied in the late 70s - early 90s (see, e.g. [21, 22]), initially motivated by optimal scheduling of phone calls, where the agents are represented by vertices and the calls by time-labeled edges (e.g. [17, 6]). Most of the research in this line consider interactions that are mutually exclusive (an agent cannot have multiple phone calls at the same time) and non-repetitive (two agents cannot call each other twice). One of the landmark results in this area was obtained in 1991 by Göbel et al. [16], who showed that deciding whether a given graph admits such a labeling is NP-complete.
The past decade have seen a renewed interest in this type of problems, motivated by the modeling of various types of dynamic networks, such as wireless networks, social networks, autonomous vehicles, and transportation scheduling. In today’s terminology, the gossip problem can naturally be rephrased in terms of temporal graphs. Formally, a temporal graph is a pair where is the underlying graph (in this work, undirected) and is a mapping that assigns time labels to the edges. Such a labeling is simple if every edge of has a single time label, and it is proper if adjacent edges do not share any time label. The graph is temporally connected (i.e. in class TC) if there exists a path traversing edges with non-decreasing times (temporal path) between each ordered pair of nodes. In this terminology, the gossip problem corresponds to deciding, given a graph , if there exists a simple and proper labeling such that TC (and finding such a labeling).
A number of similar realizability questions have been considered recently in the temporal graph literature, focusing on labelings that satisfy additional prescribed properties. For example, several works investigate whether the labeling can ensure that the fastest temporal paths between vertices match (or is upper-bounded by) a given matrix of pairwise durations [24, 12, 27, 26, 28]. Another problem asks that the temporal paths realize a target reachability relation [11], under various restrictions of the labeling function (see [7, 8] for discussions on the resulting expressivity). Further studies consider minimizing the number of labels [1], minimizing reachability times [10], maximizing overall reachability sets [5], or avoiding temporal cycles [2], to name a few.
Broadly speaking, all these problems, and their non-temporal versions before them, are part of a long series of realizability questions in graph theory, having their root in the seminal work of Erdős and Gallai [14] and Havel and Hakimi [20, 18] on whether (and how, respectively) a given degree sequence can be realized as a (static) graph.
In this work, we return to the roots of realizability questions, studying the temporal analog of Erdős and Gallai’s problem, namely, whether (and how) a given degree sequence can be realized as a temporal graph in TC, for both the simple and non-simple cases. This question is partly motivated by the hardness results of Göbel et al. [16], a natural question being how to relax the input specification in a way that offers more flexibility (and tractability) for realization. Another motivation is to investigate whether this format allows for an elegant and concise characterization of all the feasible cases, a situation that is pretty rare in the literature on temporal graphs.
Main results.
Before stating the results, we recall that a degree sequence is a non-increasing list of integers. A degree sequence of length is graphical if there exist an -vertex (static) graph whose vertices have exactly these values as their degrees. Moreover, is multigraphical if a multigraph with this degree distribution exists.
Our main result is a complete characterization of the graphical sequences that admit a realization as a simple and proper temporal graph in TC. We refer to these sequences as TC-realizable graphical sequences. The characterization, obtained in Section 5, is the following:
Theorem 5.1.
A graphical sequence with edges is TC-realizable if and only if one of the following holds:
-
, , and
-
and either (i) or (ii) , , and .
We also characterize the degree sequences that can be realized as a non-simple and proper temporal graph in TC, where non-simple means that a same edge can receive multiple time labels. Conveniently, non-simple temporal graphs are equivalent to simple temporal graphs whose underlying graph is a multigraph and where each edge of the multigraph only receives one label. Thus, the problem amounts to characterizing TC-realizable multigraphical sequences. The characterization is:
Theorem 5.2.
A multigraphical sequence with edges is TC-realizable if and only if one of the following holds:
-
and
-
and either (i) or (ii) , , and .
As one can see, both characterizations are close to each other, the set of TC-realizable multigraphical sequences being of course more general (indeed, TC-realizable graphical sequences are special cases of these). However, the difference is more important than one may think by looking only at these theorems, because multigraphical sequences already differ from graphical sequences. (Both standard characterizations will be recalled in the paper.)
On the algorithmic side, we show that TC-realizable graphical sequences can be recognized in time and TC-realizable multigraphical sequences in time. We also give a constructive time algorithm that outputs a temporal graph satisfying the desired constraints (if one exists), this algorithm being obviously asymptotically optimal.
The fact that we consider proper labelings is not a limitation. Precisely, if non-proper labelings are considered, then one may either consider strict (i.e. increasing) or non-strict (i.e. non-decreasing) temporal paths. In the case of strict temporal paths, we know that non-proper labelings can always be turned into proper labelings without reducing the reachability relation [7]. Together with the fact that proper labelings are particular cases of non-proper labelings, this implies that the feasible cases are the same as in the proper setting. If one considers non-strict temporal paths instead, then the problem becomes trivial to solve: a single spanning tree suffices (with the same time label on every edge). Thus, in this case, the problem reduces to testing if the sequence can be realized as a connected graph, which from earlier works [25, 23, 15] is the case if and only if and .
Technical overview.
The characterization of TC-realizable graphs in terms of input graphs is complicated. Some necessary and sufficient conditions are known from the work of Göbel et al. [16] (itself based on earlier works in gossip theory [19, 17, 6]), the remaining cases being NP-hard to decide. A necessary condition for these graphs is to contain two spanning trees that share at most two edges. If the graphs admit two spanning trees that share at most one edge, then this is sufficient: the graph is TC-realizable. The case with two shared edges is further constrained. If the number of edges is exactly , then it is necessary and sufficient that the two shared edges belong to a central cycle of length . Göbel et al. [16] called such graphs “-graphs” (although they do not consist only of a cycle of length 4. To avoid this confusion, we use the term -pivotable graphs instead. A formal definition is given in Section 2). Otherwise, there may exist feasible cases which are difficult to characterize, and these cases are precisely the ones making the problem NP-hard. Interestingly, our results imply that the framework of degree sequences allows one to circumvent these hard cases entirely.
Our characterization proceeds as follows: First, we note that the characterization of degree sequences which are realizable as a graph admitting two edge-disjoint spanning trees is known [25]. Thus, we focus on characterizing the degree sequences that can be realized as a graph admitting two spanning trees sharing exactly one edge, and, for degree sequences corresponding to exactly edges, we characterize the ones admitting a realization with the above -pivotable graph property. Surprisingly, these cases already cover all the TC-realizable graphical sequences. Namely, if a graph has strictly more than edges and is TC-realizable, then its degree sequence could also be realized as a graph with two spanning trees sharing at most one edge, falling back on the previous cases. In other words, a significant by-product of our analysis is that the difficult graphs can safely be ignored in the framework of degree sequences.
In light of these explanations, the feasible cases stated in Theorem 5.1 correspond respectively to the following theorems in the paper: A degree sequence is TC-realizable if and only if it admits (i) a realization which is a -pivotable graph (Theorem 4.1) or (ii) a realization with two spanning trees that share at most one edge (Theorem 3.1). For multigraphical sequences, we prove the characterization similarly.
All of our proofs are constructive and rely on deconstructing recursively the degree sequence to a smaller degree sequence, using gadgets that preserve two edge-disjoint spanning trees in the constructed graph (up to a central component). These constructive proofs can be implemented efficiently by using a suitable data structure that stores the degree sequence and the respective graph efficiently. The labeling is then handled separately by a dedicated procedure that achieves the claimed time using our data structure and extra features offered by the above structural algorithms.
Temporal graphs are notoriously intractable objects. Most of the results in this young field are negative and most of the problems turn out to be computationally hard, often due to the non-symmetric and non-transitive nature of reachability. In this respect, the fact the feasible cases for TC-realizability admit a characterization that is at the same time compact, purely structural, and easy to recognize appears to be significant. This situation is clearly an exception in the landscape of temporal graphs studies.
2 Definitions and Important Existing Results
A temporal graph is a pair , where is a standard (in this work, undirected) graph called the underlying graph of , and is a labeling function that assigns a non-empty set of time labels to every edge of , interpreted as availability times. The labeling function can be restricted in various ways. It is called proper if adjacent edges cannot share a common time label ( is locally injective), and it is called simple if every edge has exactly one time label ( is single-valued). The typical setting of gossiping, including that of Göbel et al. [16], requires that the labeling is both proper and simple.
A pair such that is a temporal edge of . A temporal path in is a sequence of temporal edges such that is a path in the underlying graph and is non-decreasing (such a path is strict if is increasing). A temporal graph is temporally connected (in class TC) if temporal paths exist between all ordered pairs of nodes. Observe that, beyond modeling mutually exclusive interaction, the proper setting has the technical advantage of removing the distinction between strict and non-strict temporal paths (indeed, all the temporal paths in this case are de facto strict), which allows us to rely on a single definition of TC throughout the paper.
We can now state the gossiping problem as follows: We are given an undirected (multi)graph and the question is whether there exists a simple and proper labeling of such that the resulting temporal graph is temporally connected (i.e., in TC).
The original realizability question of Erdős and Gallai asks the following question:
Degree Sequence Realization
Input: A degree sequence .
Question: Does there exist a graph with such that has degree ?
When the answer is yes, the degree sequence is called graphical and is called a realization of . If multiedges are permitted in and if there is a multigraph that realizes , then the sequence is instead called multigraphical [9]. In this work, we study the following temporal version of the problem:
Degree Sequence TC Realization
Input: A degree sequence .
Question: Does there exist a realization of and a labeling such that ?
Next, we state important existing results on (multi)graphical degree sequences and TC-realizable graphs and derive immediate consequences that we use throughout the paper.
Graphical Degree Sequences.
Theorem 2.1 (Graphical Characterization [14, 29]).
A degree sequence is graphical if and only if
(i) is even, and
(ii) for each
Based on this characterization, we obtain the following sufficient condition under which degree sequences with few edges are graphical.
Corollary 2.2 ().
Let be a degree sequence with being even, , , , and . Then is graphical if .
We will make use of this corollary several times in this work to easily argue that specific degree sequences are graphical. Similarly, we also obtain the following sufficient condition.
Corollary 2.3.
Let be a degree sequence with , , , , and . Then is graphical if .
The following algorithm constructs a graph from a graphical degree sequence.
Definition 2.4 (Graphical Laying Off Process [18]).
Let be a graphical sequence. The laying off procedure consists of connecting the vertex to the first vertices, excluding . The resulting residual sequence is given by:
The next lemma implies that the laying off process can be used iteratively to build a realization for a graphical degree sequence.
Multigraphical degree sequences.
Theorem 2.6 (Multigraphical Characterization [18]).
A degree sequence is multigraphical if and only if
(i) is even, and
(ii) .
For multigraphical sequences there also exists a “laying off” process which is similar to Definition 2.4, but more flexible. Contrary to the graphical case, where a whole degree is laid off, in the multigraphical case, only a single edge is laid off.
Theorem 2.7 (Multigraphical Laying Off Process [4]).
Let be a multigraphical degree sequence with . Then, for each , the degree sequence is multigraphical (after reordering).
(Multi)graphical sequences admitting two edge-disjoint spanning trees.
The characterization of sequences admitting a realization with edge-disjoint spanning trees is identical for graphical and multigraphical sequences. For graphical sequences, it was proven constructively by Kundu for [25] and extended to general by Kleitman and Wang [23]. The multigraphical case was shown non-constructively by Gu, Hai, and Liang [15]. While we focus on the case , we state the full characterization below.
TC-realizable graphs.
Finally, we provide an overview on some known necessary and sufficient conditions of TC-realizable (multi)graphs.
Lemma 2.9 ([17]).
Let be a TC-realizable (multi)graph on vertices. Then has at least edges.
Lemma 2.10 ([3]).
Let be a (multi)graph with two spanning trees that share at most one edge. Then is TC-realizable.
Definition 2.11 (Reformulation of Göbel et al. [16]).
A graph on vertices and edges is a -pivotable graph if contains an induced cycle of length (called a central cycle) and two spanning trees that share exactly two edges, where both shared edges are from .
This definition is equivalent to the one provided by Göbel et al. [16], since no tree can contain more than three edges of the central cycle, and due to the number of edges, each edge of the cycle is contained in at least one of the two spanning trees.
Lemma 2.12 ([16]).
Let be a graph with vertices and edges. Then is TC-realizable if and only if is a -pivotable graph.
Even though it is not explicitly stated [16], the following generalization of -pivotable graphs to multigraphs also is TC-realizable by the same labeling procedure used for -pivotable graphs.111We will recall this labeling procedure in the full version.
Definition 2.13.
A multigraph on vertices and edges is a -pivotable multigraph if contains an induced cycle of length (called a central cycle) and two spanning trees that share exactly two edges, where both shared edges are from .
Here, an induced cycle in a multigraph has the additional property that each edge of exists exactly once in . Note that a -pivotable graph is also a -pivotable multigraph.
Corollary 2.14.
Let be a -pivotable multigraph. Then is TC-realizable.
3 Realizations with Two Spanning Trees Sharing at Most one Edge
In this section, we establish the following characterization of sequences that allow for a realization with two spanning trees that share (at most) one edge.
Theorem 3.1.
Let be a graphical sequence. Then, admits a realization with two spanning trees that share at most one edge if and only if and (i) or (ii) , , and .
First, we consider the special cases of . To this end, note that are exactly the graphical sequences of length at most . Each of these sequences has a unique realization and is the only sequence for which the unique realization is not connected. Hence for , there is no realization with two spanning trees that share at most one edge and . For , and there is no realization with two spanning trees that share at most one edge. This proves the equivalence for part (i) of Theorem 3.1.
By the above, we may assume and proceed to show the forward direction for part (ii) of Theorem 3.1. Figure 1 provides a guideline for the steps of the proof of this case.
Lemma 3.2 ().
Let be a graphical sequence with . If admits a realization with two spanning trees that share at most one edge, then , , and .
Realizability.
Now, we consider the backward direction for part (ii) of Theorem 3.1. That is, we will show the following.
Lemma 3.3.
Let be a graphical sequence with , , , and . Then admits a realization with two spanning trees that share at most one edge.
First, recall Theorem 2.8, for which the following is a corollary.
Corollary 3.4 ([23]).
Let be a graphical sequence with , , and . Then admits a realization that has two edge-disjoint spanning trees.
Hence, it remains to consider (i) , , and , and (ii) and . We first consider the former.
Lemma 3.5 ().
Let be a graphical sequence with , , , and . Then has a realization with two spanning trees that share one edge.
Now, we consider and . Note that these sequences are guaranteed to fulfill , as otherwise, . We first prove the case of in Lemma 3.6, which is needed for the subsequent case in Lemma 3.8.
Lemma 3.6.
Let be a graphical sequence with and . Then admits a realization with two spanning trees that share one edge.
Proof.
We will show that in this case. To this end, we provide a lower bound on the number of entries of value in .
Claim 3.7 ().
Let be the smallest index of for which . Then, the number of entries of value in is .
Note that this implies that , as otherwise, would contain at least entries of value . We distinguish between and .
Firstly, consider the case that . Note that this implies by Claim 3.7 that , since . In other words, for each , there is exactly one degree sequence of length with fulfilling . Realizations with two spanning trees that share one edge for the three sequences , , and are depicted in Figure 2. Now, consider . Recall that and for each . Moreover, recall that has a realization with two spanning trees and that share exactly one edge (see Figure 2). Let be an arbitrary vertex of degree in . We obtain a graph by adding a cycle of length to and adding the edge to for each vertex of the cycle . Note that is a realization of , since contains vertices of degree and the degree of was increased by to . Since consists of a universal vertex attached to a cycle of length at least 3 (since by ), contains two edge-disjoint spanning trees and . Hence, and are spanning trees of , and and share only one edge, namely the edge shared by and . Hence, admits a realization with two spanning trees that share one edge.
Secondly, consider the case that . Note that Claim 3.7 thus implies that , since and contains at least entries of value . Let be the sequence obtained from by removing the entry , removing entries of value 3, and adding a 1. We first show that admits a realization with two spanning trees that share one edge, and then describe how to construct the realization for .
The remainder of this case is deferred to the full version. Intuitively, to then obtain a desired realization, we attach, similar to the the first case, a large cycle to a degree- vertex . This time, the cycle has length instead of as in the first case.
Finally, we consider the case where and . Essentially, we perform an induction over the length of the sequence and lay off the smallest degree , until we reach a sequence of constant length or has value unequal to . In the latter case, the previous lemma acts as a base case.
Lemma 3.8 ().
Let be a graphical sequence with and . Then admits a realization with two spanning trees that share one edge.
4 Realizations of -pivotable Graphs
In this section, we establish the following characterization of graphical sequences that allow for a -pivotable graph realization.
Theorem 4.1.
Let be a graphical sequence. Then, admits a realization which is a -pivotable graph if and only if , , and .
Figure 3 provides a guideline on the individual steps for proving Theorem 4.1. First, we show the forward direction of Theorem 4.1. To this end, we analyze the minimum and maximum degree of -pivotable graphs. This then directly proves the forward direction of Theorem 4.1.
Lemma 4.2 ().
Let be a -pivotable graph on vertices. Then has a minimum degree of at least and a maximum degree of at most .
Realizability.
Now, we show the backward direction. That is, we show the following.
Lemma 4.3.
Let be a graphical sequence with , , and . Then, admits a realization which is a -pivotable graph.
To prove this statement, we assume that we are given a graphical sequence with , , and . Note that these sequences are guaranteed to fulfill , as otherwise, . We split the analysis in three cases. First, we consider the case of and in Lemma 4.4, then and in Lemma 4.5, and lastly and in Lemma 4.6.
Lemma 4.4.
Let be a graphical sequence with , and . Then admits a realization which is a -pivotable graph.
Proof.
Since , , and , we get that , , and (if ), . In other words, for each , there is exactly one degree sequence of length with the required properties.
We show that admits a realization which is a -pivotable graph via induction over . In fact, we show a stronger result, namely, that for each , has a realization which is a -pivotable graph with central cycle , such that (i) there are two spanning trees and of that share exactly two edges and both belong to , and (ii) for each , there are two distinct edges from and outside of for which and are matchings in . We call edge pairs and fulfilling these conditions matching edge pairs.
For the base case of , consider the graph given in Figure 4 which is a realization of . As highlighted in the figure, there is a central cycle on the vertices . Moreover, and are matching edge pairs. Hence, the statement holds for the base case of .
Now let and assume that the statement holds for . We show that the statement also holds for . Let be a realization of according to the properties of the induction hypothesis. That is, is a -pivotable graph with central cycle , two spanning trees and that share exactly two edges, both of which belong to , and matching edge pairs and . Recall that can be obtained from by adding a single entry of value . The idea to obtain a realization for with these properties is by essentially subdividing both edges and and identifying both newly added degree-2 vertices to obtain a new vertex (which then has degree 4). Formally, we obtain a graph by removing the edges and from and afterwards adding a new vertex together with the edges .
Note that each vertex of has the same degree in both and and has degree 4. Hence, is a realization of . Moreover, since and are not part of the central cycle of , is still a central cycle where and being spanning trees of that each share exactly two edges and both of which belong to . This implies that is a -pivotable graph. It thus remains to show that there are matching edge pairs and in . To define these pairs, we use the so far undiscussed pair . Since are pairwise distinct edges in , and are still edges of and moreover, is an edge of and is an edge of . Recall that and are edges of , and note that contains at most one of and as an endpoint, as otherwise would be identical to . Hence, there is an edge which is not adjacent to , that is, is a matching in . With the same arguments, there is an edge which is not adjacent to , that is, is a matching in . This implies that and are matching edge pairs. Consequently, the statement holds for .
Concluding, for each , the degree sequence admits a -pivotable graph realization.
Next, we consider the case that and .
Lemma 4.5 ().
Let be a graphical sequence with , , and . Then admits a realization which is a -pivotable graph.
Sketch.
Essentially, we can show that the degree sequence obtained by reducing by and removing six entries of value , has a realization with two edge-disjoint spanning trees. To this graph, we then attach the six vertices as depicted in Figure 5 to a vertex of degree in . The resulting graph is then a -pivotable graph realization of .
Finally, we consider the case where and . This proof is similar to the proof of Lemma 3.8. Essentially, we perform an induction over the length of the sequence and lay off the smallest degree , until we reach a sequence of constant length or has value 3. In the latter case, one of the previous two lemmas acts as a base case.
Lemma 4.6 ().
Let be a graphical sequence with , , and . Then admits a realization which is a -pivotable graph.
5 The Characterizations for TC-realizable Sequences
We now prove our characterization for graphical and multigraphical TC-realizable sequences.
5.1 Realizations of TC-realizable Graphs
We now prove our characterization of TC-realizable graphical sequences restated as follows.
Theorem 5.1.
A graphical sequence with is TC-realizable if and only if one of the following holds
-
, , and
-
and (i) (ii) , , and .
Proof.
If , , and , then due to Theorem 4.1, has a realization which is a -pivotable graph. By Harary and Schwenk [19] this implies that is TC-realizable and thus that is TC-realizable.
If and (i) or (ii) , , and , then admits a realization which has two spanning trees that share at most one edge (see Theorem 3.1). By Harary and Schwenk [19] this implies that is TC-realizable and thus that is TC-realizable.
Suppose that is TC-realizable and let be one of its realizations. By Hajnal et al. [17], has at least edges, which implies .
First, consider the case that . That is, has edges. Hence, by Göbel et al. [16], is a -pivotable graph. Thus, by Theorem 4.1, , and .
Second, consider the case that . Since is TC-realizable, is connected. For , is from as these are the only graphical sequences of length at most 2 fulfilling . Thus, consider . Since is connected and , has a minimum degree of 1, which implies that . It remains to show that . To this end, assume towards a contradiction that . Then, contains at least two vertices and of degree 1. These vertices are not adjacent in , as otherwise, would not be connected. Hence, the unique edge incident with and the unique edge incident with are distinct. Since is TC-realizable, there is a TC-labeling of the edges of . To ensure that there is a temporal path from to , this labeling has to assign a label to which is strictly smaller than the label assigned to . But simultaneously, to ensure that there is a temporal path from to , the label assigned to has to be strictly smaller than the label assigned to ; a contradiction. Consequently, contains no two vertices of degree , which implies that and in the case that .
5.2 Realizations of TC-realizable Multigraphs
We now prove our characterization for TC-realizable multigraphical sequences:
Theorem 5.2 ().
A multigraphical sequence with is TC-realizable if and only if one of the following holds
-
and
-
and (i) or (ii) , , and .
Note that the only difference from the characterization of (simple) graphical sequences (see Theorem 5.1) is the absence of the restriction in the case .
We show the statement in the following similarly to the graphical case.
Intermediate characterization for spanning trees with one shared edge.
First, we provide a characterization for multigraphical sequences that allow for a realization that has two spanning trees with at most one shared edge.
Theorem 5.3 ().
Let be a multigraphical sequence. Then, admits a realization with two spanning trees that share at most one edge if and only if and (i) or (ii) , , and .
Intermediate characterization for -pivotable multigraphs.
Next, we provide a characterization for multigraphical sequences that allow for a realization which is a -pivotable multigraph.
Theorem 5.4.
Let be a multigraphical sequence. Then, admits a realization which is a -pivotable multigraph if and only if and .
Proof.
By definition, each -pivotable multigraph on vertices has exactly multiedges. Hence, holds. Next, we show that also has to hold. The argument is identical to the one in the proof of Lemma 4.2: By definition, each vertex of a the -pivotable multigraphs is (i) part of the central cycle or (ii) a vertex that has at least one incident multiedge in each of the two spanning trees that only share edges of the central cycle. In both cases, vertex has degree at least 2. Hence, the minimum degree of is at least 2, which implies that to allow for a realization which is a -pivotable multigraph. This completes this direction.
We have to show that has a realization which is a -pivotable multigraph if and . Note that this implies that . To show the statement, we distinguish between the possible values of .
If , then . By , this implies . Thus, by Corollary 2.2, is also a graphical sequence, since . This is due to the fact that and , as otherwise, . Hence, Theorem 4.1 thus implies that admits a realization which is a -pivotable graph (and thus a -pivotable multigraph).
Hence, we only need to consider the case that . First, we consider special cases: . Note that these are the only two options for for which , , and . Both these degree sequences are graphical and fulfill and . Hence, by Theorem 4.1, admits a realization which is a -pivotable graph (and thus a -pivotable multigraph).
For all other options of , we can thus assume that . Let be the degree sequence with obtained from by (i) removing , , and , and by (ii) reducing by (and potentially reordering).
Claim 5.5 ().
admits a realization with two edge-disjoint spanning trees and .
We obtain a realization of as follows: Let denote an arbitrary vertex of with degree . We add three new vertices , and to and add the edges . Note that is a realization of , since we added three new vertices of degree 2 to and increased the degree of a vertex of degree by . It remains to show that is a -pivotable multigraph. This is the case, since is an induced cycle of length 4 in and and are two spanning trees of that only share two edges and both these edges are from (namely the edges and ). Consequently, admits a realization which is a -pivotable multigraph.
With these characterizations, we can prove our characterization for TC-realizable multigraphical sequences. The proof is similar to Theorem 5.1 and deferred to the full version.
6 Linear-Time Algorithm for Realizing TC (Multi)graphs
In the previous section, we presented a full characterization of (multi)graphical degree sequences that are TC-realizable (see Theorems 5.1 and 5.2). These necessary and sufficient conditions can be checked in time in the graphical and in time in the multigraphical case, where denotes the number of edges in each realization. Hence, in linear time, we can detect whether there is a TC-realizable graph for the given degree sequence. It is, however, not clear how efficiently we can build such a realization. In this section, we show that in both the graphical and multigraphical case, we can construct such a realization (together with a TC-labeling) in time. To this end, we observe that all existential proofs in the previous sections are constructive and allow for linear time implementations with the help of a simple data structure.
First, we describe the data structure and its properties, afterwards, we explain how all previous constructive algorithms can be implemented in linear time, and finally, we describe how to obtain a TC-labeling for the constructed realization in linear time.
The data structure.
We assume that all graphs be stored via adjacency list. Since our arguments rely on spanning trees, we assign two Boolean flags to each edge to indicate whether this edge is part of the first tree, the second tree, both, or neither of them. This will allow to extract the two spanning trees in time, once the final realization is constructed.
We now come to the additional data structure for degree sequences and (multi)graphs. Instead of storing degree sequences as sequences of numbers, we store them as double-linked list that store entries of the form . Such an entry indicates that the respective degree sequence contains exactly entries of value . The entries of the double-linked list are sorted decreasingly according to their -values. In this way, both in the graphical and multigraphical case, we can lay off a degree in time, since we only need to remove and rearrange the -values of the at most first entries of the data structure. In this data structure, we can ensure that the degree sequence always stays sorted and no reordering is necessary.
Similarly, we use an additional data structure for (multi)graphs . It is also a double-linked list and stores entries of the form . Such an entry indicates that the vertices of are exactly the vertices of that have degree exactly . These entries are also sorted decreasingly according to their -values. This way, we can reattach a vertex of degree to by adding edges properly to vertices of the first entries of the data structure. That is, we can obtain a realization for the degree sequence that, after laying off a vertex of degree , leads to the degree sequence of . In particular, this can be done in time.
In case of a realization for a -pivotable (multi)graph, we also output the central cycle separately.
Realizations for two edge-disjoint spanning trees.
We now turn to the algorithmic aspects of finding a realization with two edge-disjoint spanning trees and show that such a realization can be computed in linear time.
For the graphical case, we used the result by Kundu [25]. While their proof is constructive in nature, the arguments are brief and incomplete. Thus, we give a complete construction in Lemma 6.1 and argue how it can be implemented in time using our data structure.
For the multigraphical case, we build on the result by Gu et al. [15], which was proven non-constructively. In Lemma 6.4, we give a complete inductive construction for such multigraphical sequences, and argue that this construction, too, can be carried out in time using our data structure.
Lemma 6.1 ().
Let be a graphical sequence with and . We can compute a realization of and two disjoint spanning trees of in time.
Proof.
To prove the statement, we show that for each and for each graphical sequence of length with and , we can construct a realization with two edge-disjoint spanning trees. We show this statement via induction over .
For the base case, note that for , there is no graphical sequence of length that sums up to . Moreover, for , is the only graphical sequence of length with and . Since the complete graph on four vertices, which obviously contains two edge-disjoint spanning trees, is the only realization of , the base case holds for .
For the inductive step, let and assume that the statement holds for . Let be an arbitrary graphical sequence of length fulfilling and . We show that admits a realization with two edge-disjoint spanning trees. Observe that whenever , it holds that as otherwise .
If and , or and , consider the residual sequence of length obtained from laying off the entry according to Definition 2.4. In the full version, we show that this degree sequence fulfills the conditions of the induction hypothesis and thus admits a realization with two edge-disjoint spanning trees. Moreover, we can then obtain a desired realization for by reattaching a vertex of degree .
Otherwise, and . In that case, consider the sequence obtained from by reducing by 1 and removing the entry .
Claim 6.2 ().
admits a realization with two edge-disjoint spanning trees and .
Now consider the graph obtained from by adding a degree-3 vertex , connecting it to a vertex of of degree , and inserting it on an arbitrary edge of with (replacing with and ). Then is a realization of . Moreover, contains the edge-disjoint spanning trees and .
We defer the analysis of the running time to the full version.
For multigraphical sequences, we split the proof in two parts: we first show how to construct the desired realization for a multigraphical sequence with and in Lemma 6.3, and then describe how this can be used to obtain a realization for every multigraphical sequence fulfilling and .
Lemma 6.3 ().
Let be a multigraphical sequence with and . We can compute a realization of and two disjoint spanning trees of in time.
Sketch.
Intuitively, this result is again obtained via a constructive induction over the of . Two cases are distinguished in the inductive step: If , then simply laying off and reattaching it to the provided solution for the sequence of length provides a desired realization. By our data structure, this laying off and reattaching can be done by a constant time overhead. If , then the degree sequence actually is graphical and the algorithm behind Lemma 6.1 provides the desired result.
The construction for sequences with a degree sum larger than follows directly from the laying-off process for multigraphical sequences (Theorem 2.7), which reduces the degree sum by two while preserving the length of the sequence.
Lemma 6.4 ().
Let be a multigraphical sequence with and . We can compute a realization of and two disjoint spanning trees of in time.
Realizations with spanning trees that share at most one edge and -pivotable graph realizations.
By carefully recalling the existential proofs of the previous sections, one can observe that these proofs imply linear-time constructions by using the data structure.
Lemma 6.5 ().
Let be a (multi)graphical degree sequence. If is TC-realizable, then we can compute a realization of in time.
Computing a TC-labeling.
We recall the labeling schemes for TC-labelings (that can be implemented in linear time) in the full version. We conclude the following algorithmic main result of our work.
Theorem 6.6 ().
Let be a (multi)graphical degree sequence. We can decide in time whether is TC-realizable. If this is the case, then in time, we can compute a (multi)graph which is a realization of together with a TC-labeling for .
7 Conclusion
In this work, we presented complete characterizations of graphical and multigraphical degree sequences that admit temporally connected realizations under proper labelings. All characterizations presented in this paper are constructive and lead to linear-time algorithms for constructing TC realizations (including the corresponding labelings), provided that the input satisfies the necessary conditions.
As explained in introduction, the fact that we only considered proper labelings is not a limitation, as the remaining cases involving non-proper labelings are either trivial or covered by our techniques. Thus, these results cover directly or indirectly all the possible combinations of settings among proper/non-proper, simple/non-simple, and strict/non-strict.
Several natural questions could follow from the present work. For instance, one may ask to enumerate all TC-realizable graphs of a given degree sequence, or ask for realizations with additional constraints such as bounded lifetime, bounded diameter, or the existence of temporal spanners of a certain size. Another promising avenue is to optimize over these criteria while searching for a realization. Finally, the realizability question studied in this paper could be generalized to temporal -connectivity or to directed temporal graphs.
References
- [1] Eleni C. Akrida, George B. Mertzios, Paul G. Spirakis, and Leszek Gasieniec. The Complexity of Optimal Design of Temporally Connected Graphs. Theory of Computing Systems / Mathematical Systems Theory, 61(3):907–944, April 2017. Publisher: Springer US. doi:10.1007/S00224-017-9757-X.
- [2] Davi de Andrade, Júlio Araújo, Allen Ibiapina, Andrea Marino, Jason Schoeters, and Ana Silva. Temporal Cycle Detection and Acyclic Temporization, March 2025. arXiv:2503.02694 [cs]. doi:10.48550/arXiv.2503.02694.
- [3] Brenda Baker and Robert Shostak. Gossips and Telephones. Discrete Mathematics, 2(3):191–193, June 1972. doi:10.1016/0012-365X(72)90001-5.
- [4] F. Boesch and F. Harary. Line removal algorithms for graphs and their degree lists. IEEE Transactions on Circuits and Systems, 23(12):778–782, December 1976. doi:10.1109/TCS.1976.1084170.
- [5] Filippo Brunelli, Pierluigi Crescenzi, and Laurent Viennot. Maximizing Reachability in a Temporal Graph Obtained by Assigning Starting Times to a Collection of Walks. Networks, 81(2):177–203, March 2023. doi:10.1002/net.22123.
- [6] Richard T Bumby. A problem with telephones. SIAM Journal on Algebraic Discrete Methods, 2(1):13–18, 1981.
- [7] Arnaud Casteigts, Timothée Corsini, and Writika Sarkar. Simple, Strict, Proper, Happy: A Study of Reachability in Temporal Graphs. Theoretical Computer Science, 991:114434, April 2024. doi:10.1016/j.tcs.2024.114434.
- [8] Michelle Döring. Simple, Strict, Proper, and Directed: Comparing Reachability in Directed and Undirected Temporal Graphs. In Proceedings of the 36th International Symposium on Algorithms and Computation, ISAAC 2025, Tainan, Taiwan, 2025. arXiv:2501.11697 [cs]. doi:10.48550/arXiv.2501.11697.
- [9] R. B. Eggleton and D. A. Holton. Simple and multigraphic realizations of degree sequences. In Kevin L. McAvaney, editor, Combinatorial Mathematics VIII, volume 884, pages 155–172. Springer Berlin Heidelberg, Berlin, Heidelberg, 1981. Series Title: Lecture Notes in Mathematics. doi:10.1007/BFb0091817.
- [10] Jessica Enright, Kitty Meeks, and Fiona Skerman. Assigning Times to Minimise Reachability in Temporal Graphs. Journal of Computer and System Sciences, 115:169–186, February 2021. doi:10.1016/j.jcss.2020.08.001.
- [11] Thomas Erlebach, Othon Michail, and Nils Morawietz. Recognizing and Realizing Temporal Reachability Graphs. In Proceedings of the 33rd Annual European Symposium on Algorithms, ESA 2025, LIPIcs. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ESA.2025.93.
- [12] Thomas Erlebach, Nils Morawietz, and Petra Wolf. Parameterized Algorithms for Multi-Label Periodic Temporal Graph Realization. Theoretical Computer Science, page 115412, 2025. Publisher: Elsevier. doi:10.1016/j.tcs.2025.115412.
- [13] D. R. Fulkerson, A. J. Hoffman, and M. H. McAndrew. Some Properties of Graphs with Multiple Edges. Canadian Journal of Mathematics, 17:166–177, January 1965. doi:10.4153/CJM-1965-016-2.
- [14] Tibor Gallai and Paul Erdős. Gráfok előírt fokú pontokkal. Matematikai Lapok, 11:264–274, 1960.
- [15] Xiaofeng Gu, Hong-Jian Lai, and Yanting Liang. Multigraphic degree sequences and supereulerian graphs, disjoint spanning trees. Applied Mathematics Letters, 25(10):1426–1429, October 2012. doi:10.1016/j.aml.2011.12.016.
- [16] F. Göbel, J. Orestes Cerdeira, and H. J. Veldman. Label-Connected Graphs and the Gossip Problem. Discrete Mathematics, 87(1):29–40, January 1991. doi:10.1016/0012-365X(91)90068-D.
- [17] A. Hajnal, E. C. Milner, and E. Szemerédi. A Cure for the Telephone Disease. Canadian Mathematical Bulletin, 15(3):447–450, 1972. doi:10.4153/CMB-1972-081-0.
- [18] S. L. Hakimi. On Realizability of a Set of Integers as Degrees of the Vertices of a Linear Graph. I. Journal of the Society for Industrial and Applied Mathematics, 10(3):496–506, September 1962. Publisher: Society for Industrial and Applied Mathematics. doi:10.1137/0110037.
- [19] Frank Harary and Allen J. Schwenk. The Communication Problem on Graphs and Digraphs. Journal of the Franklin Institute, 297(6):491–495, January 1974. doi:10.1016/0016-0032(74)90126-4.
- [20] Václav Havel. Časopis pro pěstování matematiky. Časopis pro pěstování matematiky, 080(4):447–480, 1955. Publisher: Mathematical Institute of the Czechoslovak Academy of Sciences. URL: http://eudml.org/doc/19050.
- [21] Sandra M Hedetniemi, Stephen T Hedetniemi, and Arthur L Liestman. A survey of gossiping and broadcasting in communication networks. Networks, 18(4):319–349, 1988. doi:10.1002/NET.3230180406.
- [22] Juraj Hromkovic, Ralf Klasing, Burkhard Monien, and Regine Peine. Dissemination of information in interconnection networks (broadcasting and gossiping). Combinatorial network theory, 1:125–212, 1996.
- [23] D. J. Kleitman and D. L. Wang. Decomposition of a Graph Realizing a Degree Sequence into Disjoint Spanning Trees. SIAM Journal on Applied Mathematics, 30(2):206–221, 1976. Publisher: Society for Industrial and Applied Mathematics. URL: https://www.jstor.org/stable/2100523.
- [24] Nina Klobas, George B. Mertzios, Hendrik Molter, and Paul G. Spirakis. Temporal Graph Realization from Fastest Paths. Theoretical Computer Science, 1056:115508, 2025. doi:10.1016/j.tcs.2025.115508.
- [25] Sukhamay Kundu. Disjoint Representation of Tree Realizable Sequences. SIAM Journal on Applied Mathematics, 26(1):103–107, January 1974. doi:10.1137/0126006.
- [26] George B. Mertzios, Hendrik Molter, Nils Morawietz, and Paul G. Spirakis. Temporal graph realization with bounded stretch. In Proceedings of the 50th International Symposium on Mathematical Foundations of Computer Science, MFCS 2025, LIPIcs. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.MFCS.2025.75.
- [27] George B. Mertzios, Hendrik Molter, Nils Morawietz, and Paul G. Spirakis. Realizing temporal transportation trees. In Proceedings of the 51st Workshop on Graph-Theoretic Concepts in Computer Science, WG 2025, LNCS. Springer, 2025.
- [28] Julia Meusel, Matthias Müller-Hannemann, and Klaus Reinhardt. Directed Temporal Tree Realization for Periodic Public Transport: Easy and Hard Cases. In Proceedings of the 25th Symposium on Algorithmic Approaches for Transportation Modeling, Optimization and Systems, Warsaw, Poland, September 2025. OASIcs. arXiv:2504.07920 [cs]. doi:10.48550/arXiv.2504.07920.
- [29] Amitabha Tripathi, Sushmita Venugopalan, and Douglas B. West. A short constructive proof of the Erdős–Gallai characterization of graphic lists. Discrete Mathematics, 310(4):843–844, February 2010. doi:10.1016/j.disc.2009.09.023.
