Extending Ghouila-Houri’s Characterization of Comparability Graphs to Temporal Graphs
Abstract
An orientation of a static graph is called transitive if for any three vertices , the presence of arcs and forces the presence of arc . If only the presence of an arc between and is required, but its orientation is unconstrained, the orientation is called quasi-transitive. A fundamental result due to Ghouila-Houri [8] states that any static graph admitting a quasi-transitive orientation also admits a transitive orientation. In a seminal work [15], Mertzios et al. introduced the notion of temporal transitivity in order to model information flows in simple temporal networks. We revisit the model introduced by Mertzios et al. and propose an analogous to Ghouila-Houri’s characterization for the temporal scenario. We present a structural theorem that will allow us to express by a 2-SAT formula all the constraints imposed on a temporal graph for it to admit a temporal transitive orientation. The latter produces an efficient recognition algorithm for graphs admitting such orientations, that we will call comparability temporal graphs. Inspired by the lexicographic strategy presented by Hell and Huang in [10] to transitively orient static graphs, we then propose an algorithm for constructing a temporal transitive orientation of a YES instance. This algorithm is straightforward and has a running-time complexity of , with , and being respectively the number of vertices, edges and monolabel triangles, i.e., triangles having the same unique time-label on their edges, in the temporal graph. This represents an improvement compared to the algorithm presented in [15]. Additionally, we extend the temporal transitivity model to temporal graphs having multiple time-labels associated to their edges and claim that the previous results hold in the multilabel setting. Finally, we propose a characterization of comparability temporal graphs by forbidden temporal ordered patterns.
Keywords and phrases:
Temporal graphs, Transitive orientations, Graph algorithmsCopyright and License:
2012 ACM Subject Classification:
Mathematics of computing Graph algorithms ; Theory of computation Design and analysis of algorithmsFunding:
This work was supported by the French ANR projects ANR-24-CE48-4377 (GODASse) and ANR-22-CE48-0001 (TEMPOGRAL).Editors:
George B. Mertzios and Andréa W. RichaSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Context
In the static (i.e., not temporal) case, an undirected graph is a comparability graph if and only if it admits a transitive orientation, that is, if it is possible to orient its edges such that, whenever an edge is oriented from towards and an edge from towards (i.e., arcs and belong to the orientation), a third edge must exist and be oriented from towards . If only the existence of the third edge is required, but its orientation is unconstrained, the orientation is called quasi-transitive.
Consider a graph and a quasi-transitive orientation of . Whenever and but , orienting from towards in will force edge to be oriented from towards (and analogously, orienting from towards will force the orientation of from towards ). Thus, by defining a Boolean variable for each edge and interpreting the truth assignment 1 to the variable as the orientation from towards , and the truth assignment 0 as the opposite orientation, these forcing relations between arcs, i.e., the presence of an arc in the orientation implying the presence of a second one, can be expressed by clauses of arity two of the type . Hence, deciding if a graph admits a quasi-transitive orientation can be reduced to solving a -SAT problem, which can be solved by the famous Tarjan’s algorithm [1] in time linear in the size of the set of clauses, which, for our problem, corresponds to the number of induced paths on three vertices. Using the same approach to determine the existence of a transitive orientation is less efficient, because forbidding a directed triangle requires adding two clauses of size three and therefore obtaining an equivalent 3-SAT problem. In this context, the following result proposed by Ghouila-Houri is particularly interesting as it allows the recognition problem of comparability graphs to be solved by 2-SAT in , with and being respectively the number of vertices and edges of the graph.
Theorem 1 ([8]).
A graph admits a transitive orientation if and only if it admits a quasi-transitive orientation.
A first english version of [8] can be found in the Appendix section of the related version of this article. Note that Theorem 1 does not imply that every quasi-transitive orientation is transitive, since a quasi-transitive orientation may contain directed triangles, and therefore does not solve the problem of obtaining such an orientation. How to efficiently obtain a transitive orientation of a given comparability graph was extensively studied. We will present a brief survey of the algorithms proposed to solve the problem.
In his proof, published in the early 1960s, Ghouila-Houri implicitly formulates an algorithm for constructing a transitive orientation of a comparability graph from a quasi-transitive orientation. Given a static graph and a quasi-transitive orientation of its edges , the strategy is to break the cyclical orientation of triangles in by identifying a module containing some, or all, of the triangle vertices, transitively orienting the module, recursively orienting the subgraph induced by - and orienting all edges between and - in the same direction. This approach laid the groundwork for subsequent techniques using modular decomposition, as we will see below.
In [9], Golumbic proposed an algorithm for constructing a transitive orientation of a comparability graph. The algorithm is based on the observation, mentioned earlier, that the constraints associated to transitive orientations can be expressed as local forcings between the possible edge orientations. Since these forcings are symmetric, one can partition the possible orientations of the edges of a graph into equivalence classes, called implication classes. Then, Golumbic’s algorithm will construct the orientation by selecting an arbitrary unoriented edge, fixing its orientation, propagating it through its implication class, and then repeating the procedure on the subgraph induced by the not yet oriented edges. Note that the implication classes are re-computed at each iteration as only unoriented edges will be used to identify forcings, this is the key to avoid orienting triangles cyclically. The algorithm proposed by Golumbic has a running-time of . Later on, Spinrad [17] proposed an algorithm with an running-time, relying on a modular decomposition technique based on the same principles proposed by Ghouila-Houri in his proof. Along the same lines, in the late 1990s, McConnell and Spinrad [14] proposed linear time algorithms based on efficiently computing the modular decomposition of a given graph.
In his seminal article [8], Ghouila-Houri proposed another important characterization of comparability graphs. Let be a static graph and the graph obtained by taking as vertices both possible orientations and for each edge , and by connecting all vertices to and to all such that . One can think of as the “conflict” graph of as it links incompatible edge orientations. Then, it is easy to see that admits a transitive orientation if and only if admits a 2-coloring of its vertices. Once again, this characterization only provides a straightforward recognition algorithm, leaving unsolved the problem of obtaining a transitive orientation of in the case of a positive instance. In the 1990s, Hell and Huang [10] used the previous characterization and provided a lexicographic argument to greedily 2-color the components of in order to obtain a transitive orientation of a comparability graph. The technique, as well as the correctness proof, are very straightforward and result in an algorithm having time complexity.
Although obtaining a transitive orientation can be done in linear time if the graph was a comparability graph, up to our knowledge there is no linear time algorithm to verify if a given orientation is transitive, or even quasi-transitive, as this problem is closely related to the Boolean Matrix Multiplication Problem. Therefore, the recognition of comparability graphs still requires running-time in the worst case.
Temporal Comparability Graphs
Temporal (or time-varying, or evolving) graphs were introduced with the aim of modeling dynamic networks, that is, networks whose connections evolve over time. They are of great use in modeling a large number of real-world systems, such as information, traffic and social networks, see [2, 13]. Our work uses the formalism presented in the foundational paper of Kempe et al.[12], where a temporal network is defined as a pair , with a time-labelling function over the edges of a static graph , specifying the discrete time at which its endpoints interact. With the objective of modeling the flow of information on paths whose time-labels respect the ordering of time, Kempe et al. introduced the notion of (strict) time-respecting path, where edges of a given path in satisfy (resp. ). As in these paths the edges model undirected interactions between the network nodes, Mertzios et al.[15] explored directed communications, extending the classical notion of transitive orientations to the temporal scenario. As different versions of temporal transitivity were previously considered in diverse areas such as medical data treatment [16] or text processing [18], Mertzios et al. propose a new definition which can be justified in the context of confirmation and verification of information in a temporal network. One can consider a scenario where an important information is sent from node to node at time and then this intermediary node sends the information to node at , with . Subsequently, node might want to verify the information by querying directly from node at a time . Before formally defining temporal transitive orientations, let us make a parallelism with the static case by introducing quasi-temporal transitive orientations. Whenever a directed time-respecting path is formed, temporal transitive orientations will ask for a third edge to exist, to have a greater or equal time-label than the one associated to edge and to be oriented from towards . As for quasi-transitive orientations in the static scenario, the orientation of this third arc will not be restricted by quasi-temporal transitive orientations, unlike its existence and time-label value.
Definition 2.
An orientation of a temporal graph is a temporal transitive orientation, or TTO, (resp. QTTO) if whenever and , with then (resp. or with .
Note that the time-label value of an edge is independent of its orientation. Then, by the previous definition, we observe that only monolabel triangles, i.e., triangles which have a unique time-label associated to their three edges, can be cyclically directed in a QTTO. This will be the equivalent to directed triangles in the static case, as it corresponds to the only restriction imposed by temporal transitive orientations that cannot be captured by Boolean clauses of arity two. We will refer to temporal graphs admitting a temporal transitive orientation as temporal comparability graphs. One can note that this definition is a true generalization of comparability graphs in the static case, since if all edges share the same time-label, then is a comparability temporal graph if and only if is a comparability graph. Given a temporal graph , the TTO Problem consists of deciding whether admits a temporal transitive orientation of its edges. Mertzios et al. presented an algorithm to solve this problem, inspired by the strategy proposed by Golumbic [9] for the static case. This way, they extend the forcing relation to consider the temporal labels of the edges and express the temporal transitive constraints by a Boolean formula formed by the conjunction of a 3-NAE and a 2-SAT formula. Recall that 3-NAE stands for 3-Not-All-Equal, and is formed by a conjunction of clauses, with three literals each, satisfied when at least one of the literals receives 1 as truth assignment and another one 0. The goal of these clauses is to capture the constraint of orienting monolabel triangles in a non-cyclical way. As the problem of 3-NAE is NP-complete, the authors use structural arguments specific to the TTO Problem to prove that the overall running-time of their algorithm is polynomial (see [15] for more details), although they do not explicitly state its complexity and the correctness proof is rather technically involved. Different variants to the problem were defined by Mertzios et al. Given an orientation of a temporal graph , if we only ask for with whenever is a strict time-respecting directed path, i.e., , then the problem is defined as Strict TTO. Similarly, if one asks the transitive arc from to to have a time-label such that , the orientation is called strongly temporal transitive, and the associated problem Strong TTO. By combining the two requirements, one gets the Strong Strict TTO problem. Mertzios et al. proved in [15] that the TTO, Strong TTO and Strong Strict TTO problems can be solved in polynomial time while deciding if a temporal graph admits a Strict TTO is NP-hard.
Forbidden Patterns Characterizations
Hereditary classes of graphs, such as comparability graphs, can be characterized by their set of minimal obstructions for the induced subgraph relation as can be seen in [6]. Very often, these sets are unknown, or known but infinite. The use of additional structures, such as an ordering of the graph’s vertices, can allow to describe these properties by finite sets of forbidden structures. For example, it is not difficult to see that comparability graphs are exactly the graphs for which there exists an ordering of their vertex set such that there is no ordered triple where and are edges of the graph but is not. The study of characterizations by such forbidden ordered patterns was proposed by Damaschke [5]. Since then, multiple studies have been carried out, allowing the description of many hereditary graph classes. In [11], Hell et al. show that all graph classes characterized by sets of three-vertex ordered patterns can be recognized in polynomial time. In [7], the authors refine the previous analysis presenting a detailed characterization of all 24 graph classes that can be described by a set of three-vertex ordered patterns, showing that all classes except two of them can be recognized in linear time. In [4], they introduce the usage of forbidden ordered patterns for temporal graphs. In the temporal case, a pattern is a temporal subgraph that represents a specific arrangement with respect to the order not only of its vertices but also of its edges based on their time-labels.
Our contributions and structure of the paper
In Section 2, we present the main notations and definitions that will be used throughout the paper. Then, we begin Section 3 by observing that Ghouila-Houri’s result, stated in Theorem 1, is not directly adaptable to the temporal case, since it is not true that every temporal graph admitting a QTTO admits a TTO, as shown by the example in Figure 1. Based on this observation, we define almost-temporal transitive orientations, or ATTO, which are slightly more restrictive than the QTTO ones. Then, we establish the exact analogue of Ghouila-Houri’s theorem by proving that a temporal graph admits an ATTO if and only if it admits a TTO. Inspired by the lexicographic strategy presented by Hell and Huang in [10], we present a lexicographic simple approach to solve the TTO problem with a running-time, with being the number of monolabel triangles in the temporal graph. As most temporal networks allow resources to traverse their arcs at multiple given times and therefore result in multilabel temporal graphs, we finish this section by extending the temporal transitivity notion to the multilabel setting and stating that the proposed results hold as well. In Section 4, we introduce the notations we will use to work with temporal forbidden ordered patterns and we provide a characterization for the class of temporal graphs admitting a temporal transitive orientation by means of these structures, both for TTO and Strict TTO. We conclude in Section 5 by presenting a series of open problems, suggesting interesting directions for future research.
2 Definitions and notations
A graph is a pair where is the vertex set and is the set of edges. Usually, for algorithmic complexity analysis, we take and . If we consider with a set of ordered pairs of vertices, called arcs, we say is a directed graph or a digraph. Note that a directed graph might contain 2-cycles, i.e., bidirected edges. If and are vertices of a graph (resp. digraph), we denote by the edge between and (resp. the arc from to ). In the context of directed graphs, we will abuse the notation to denote as a directed cycle of size the set of vertices such that , for all , and are arcs. We will refer to the directed cycle of size three as a directed triangle.
A temporal graph is a graph whose vertex set is fixed while its edge set changes over time. Given a classical graph , we can obtain a temporal graph by assigning a set of time-labels to its edges such that with . These time-labels indicate the discrete time steps in which a given edge is active. We say is the underlying graph of . A temporal subgraph of a temporal graph is a temporal graph such that is a subgraph of and for every . A temporal graph is simple if , that is, every edge has a single presence time. As we will mostly reference simple temporal graphs, we will refer to them as temporal graphs and when considering temporal graphs admitting multiple time-labels per edge, we will explicitly call them multilabel temporal graphs. We say that a temporal graph is monolabel if all of its edges share the same single time-label. In the temporal scenario, a classic graph might be referred to as a static graph. We say two temporal graphs and are isomorphic if there exists a bijection between their vertex sets such that any two vertices are adjacent in if and only if are adjacent in and if is an edge then .
Following [8, 10], an orientation of an undirected graph consists in the choice of exactly one of the pair , for each edge . We refer to a graph equipped with an orientation as an oriented graph. Let us denote by the set of all possible arcs in an orientation of , that is . For a subset of we denote by its reverse the set defined by . A partial orientation of is a subset satisfying . An orientation is thus a partial orientation satisfying .
3 Recognition of comparability temporal graphs and TTO construction
3.1 Structural characterization of temporal transitivity
As explained in the introduction, in the static setting, the key to deciding whether a transitive orientation exists, or to construct one, is the weaker notion of quasi-transitive orientations. Although not every quasi-transitive orientation is transitive, Theorem 1 shows that the existence of a quasi-transitive orientation implies the existence of a transitive one. All known algorithms rely, either implicitly or explicitly, on this fact.
In the temporal case, Definition 2, introduced by Mertzios et al., provides a generalization of both transitive and quasi-transitive orientations (TTO and QTTO). As in the static case, any TTO is also a QTTO, and again the converse is not true since a cyclic orientation of a monolabel triangle is a QTTO but not a TTO. The crucial difference is that Theorem 1 does not extend with these definitions of TTO and QTTO, as witnessed by the example shown in Figure 1: the temporal graph is oriented by a QTTO but one can prove it does not admit any TTO (a short proof can be derived using Lemma 11 below).
The following lemma states some simple facts about QTTO.
Lemma 3.
Let be a QTTO of a temporal graph . Then,
-
A directed triangle in is necessarily monolabel.
-
is if only if is acyclic.
Proof.
Suppose there exists a directed non-monolabel triangle in . Then, necessarily there exists an edge with maximum time-label value in the triangle which is adjacent to another edge, say , such that and . But this contradicts being QTTO. Now, for the second item, if is QTTO and acyclic then, in particular, it does not contain any directed triangle and thus is TTO. Suppose is QTTO but not acyclic and let be a minimal directed cycle. There must exist along the cycle two consecutive arcs and such that . Since is QTTO, either or belong to . The first case would produce a shorter directed cycle, contradicting the minimality of , so we can assume . But then we get a directed triangle and thus is not TTO.
We now define the implication graph of a temporal graph , that will encode the forcing rules between arcs in a QTTO described in the introduction.
Definition 4.
The implication digraph of a temporal graph , denoted Imp(), is the digraph with vertex set and with arcs from to and from to if and or .
Observe that is a QTTO if and only if for each arc from to in , implies . As we have seen, this implication digraph is not enough to capture the TTO forcing relations because of monolabel triangles. This is why we will augment this digraph using a four-vertex configuration, called correlated monolabel triangle.
Definition 5.
A quadruple of vertices of a temporal graph forms a correlated monolabel triangle if:
-
form a monolabel triangle of time-label
-
with
-
with
-
if , then
Remark.
When depicting a temporal graph, dashed labelled edges represent either a non edge or an edge satisfying the label condition.
For any correlated monolabel triangle , it is not difficult to see that there is a directed path in . Therefore, in any TTO, the presence of forces the presence of . Since a TTO cannot contain the directed triangle , it follows that if is an arc of a TTO, then so will be . Based on this observation, we propose the following definition.
Definition 6.
The augmented implication digraph of a temporal graph , denoted Aug(), is the digraph obtained from by adding all arcs and , where forms a correlated monolabel triangle. We say that an arc forces an arc if there is a directed path from to in .
The following lemma is a direct consequence of the definition of the arcs of and . It reflects the law of contraposition if we think of the vertices of as Boolean variables, as in the introduction.
Lemma 7.
Let and be edges of a temporal graph . If forces , then forces .
Definition 8.
If is a partial orientation of a temporal graph , we denote by (resp. ) the set of vertices of that are forced by (resp. that force) some arc in . An orientation of is an Almost-TTO (or ATTO) if .
The additional restrictions captured by do not follow directly from the definition of temporal transitive orientations. However, as we have seen before, if forces , then any TTO of that contains must also contain . In other words, every TTO is an ATTO. Again the converse is not true (consider a monolabel directed triangle), but the main theorem of this section (Theorem 16) will provide the desired analogue of Ghouila-Houri’s theorem: a temporal graph admits a if and only if it admits an .
The definition of the augmented implication digraph immediately implies the following useful lemma.
Lemma 9.
Let be a temporal graph and let be an ATTO of . If is a correlated monolabel triangle, then triangle cannot be directed in .
Since is a subgraph of it is clear that every ATTO is a QTTO. The converse is not true, as one can take as an example the QTTO represented in Figure 1, which is not ATTO as is a directed triangle belonging to a correlated monolabel triangle.
The following definition will play a crucial role in establishing the equivalence between admitting a TTO and an ATTO.
Definition 10.
We will say an arc is necessary if forces . We will denote by Ness() the set of necessary arcs of .
Lemma 11.
Let be a temporal graph. Then and for any ATTO of .
Proof.
Consider and assume forces . By Lemma 7 forces , and by definition of forces . Hence forces and thus . Now if is an ATTO of , since an arc and its reverse cannot be both in , all arcs in must be contained in .
By Lemma 3, any TTO is acyclic, so if a temporal graph admits a TTO, then the arcs in must induce an acyclic orientation in . In fact, the key ingredient to prove that admits a TTO if and only if it admits an ATTO will be the observation that both conditions are equivalent to containing no directed cycle. Note that the fact that is acyclic for any comparability temporal graph directly implies that the graph represented in Figure 1 does not admit any TTO, as it is not difficult to see that the three arcs are all in .
Let us now propose two lemmas, reminiscent of a statement called the Triangle Lemma in [9], that will be central in the proof of our main theorem.
Lemma 12.
Let be an ATTO of a temporal graph . If is a directed triangle in and there is an arc such that , then is also a directed triangle in .
Proof.
Let be a directed triangle in . Since every ATTO is a QTTO, by Lemma 3, is necessarily monolabel and we denote by be the common time-label. We will distinguish cases on whether the arc from to is an arc in or not, and whether or .
-
i)
Let and be an arc of . Then, and either or . But now, is a directed path with . Since is ATTO, we must have with . It is not possible to orient from towards in , as it would create the time-respecting directed path and by hypothesis or , which would contradict being ATTO. We conclude that , which implies triangle is directed.
-
ii)
Let and be an arc of . For this second case, and either or . Since is ATTO and is a time-respecting directed path, we must have and . Suppose is oriented from towards in and consider the directed path . Since or and, once again, is ATTO, we must have . Then, the quadruple forms a correlated monolabel triangle. But this is a contradiction by Lemma 9 since triangle is directed in , an ATTO. Hence, must be oriented from towards in , forming the directed triangle .
-
iii)
Let and be an arc of but not of . For this case to be produced, we claim the existence of a vertex such that is a correlated monolabel triangle: as forced in , arcs and were added to . Suppose . Since is ATTO and form a directed path with , this forces which in turn forces with . But then, forms a time-respecting path with and , a contradiction to being ATTO. Hence, . Then, necessarily and with . Suppose , then must form a monolabel triangle. That is, . But then, both possible orientations and of lead to a contradiction as the triplet would fail to satisfy the ATTO conditions. Therefore, we claim . Also, we deduce as otherwise would form a non-monolabel directed triangle. As form a monolabel directed path, either or belong to , with . If , we obtain a correlated monolabel triangle directed in an ATTO, a contradiction by Lemma 9. Finally, if we have found our directed triangle .
-
iv)
Let and be an arc of but not of . Similarly to the previous case, there must exist a vertex such that is a correlated monolabel triangle. As observed when such quadruples were defined, since belongs to , then so do , and . Consider the monolabel directed path . As is ATTO, with . Notice that if , then is a directed triangle and if , then triangle is directed. As is ATTO, the only way for it to contain a directed triangle is for it to be monolabel, we deduce . Assume for contradiction that is oriented from towards . Then, the directed path , with , implies the existence of an edge such that . It cannot be oriented from towards because it would create a non-monolabel directed triangle . Therefore, . Since by hypothesis or , if , would fail being ATTO. Hence, . But now, form a correlated monolabel triangle directed in , a contradiction by Lemma 9.
Lemma 13.
Let be an ATTO of a temporal graph . If is a directed triangle in and if there exists an arc forcing in , then is also a directed triangle in .
Proof.
As forces , there exists a directed path from to in . Then, we can repeatedly apply Lemma 12 starting from the second to last arc in the directed path, i.e., arc directly forcing , until reaching arc . At each step, we get a new directed triangle containing an arc forced by the immediately previous arc in the path, this allows us to continue to apply Lemma 12. When reaching arc , Lemma 12 will finally guarantee that is also a directed triangle in .
Lemma 14.
Let be an ATTO of a temporal graph . No directed triangle in can have an arc in .
Proof.
Assume by contradiction that is a directed triangle in such that . Then, as forces , there exists a directed path in from to . By Lemma 7, will also contain the “contraposite” path of , that is the path from to consisting of all arcs such that is an arc in . Let be the first node in such that . Since is ATTO, all nodes in the subpath of from to will also be included in . Consider the node immediately before in . As , necessarily . Also, belongs to , and therefore forces in . Then, both and are arcs in forcing arc in and we can apply Lemma 13 twice to state that and are two directed triangles in . But now, since , either or . If , the directed triangle implies while the directed triangle supposes the inverse orientation, i.e., . If , we get a similar conflict with the orientation of edge . We conclude that triangles and cannot be both directed in and reach a contradiction.
In the lemma below, we generalize to ATTO a property previously established for TTO: no directed cycle in an ATTO of a temporal graph is formed exclusively by arcs in .
Lemma 15.
If a temporal graph admits an ATTO, then defines an acyclic partial orientation of .
Proof.
Assume by contradiction that induces a directed cycle in and let be a minimal such cycle. Let be an ATTO of and recall that, by Lemma 11, . Since is ATTO, by Lemma 14, we get . We prove first that is monolabel, assume for contradiction this is not the case. Then, there must exist two consecutive arcs and in such that . As is ATTO, with and thus forces arc in . Since , by Lemma 11, . Hence, we reached a smaller directed cycle induced by , which contradicts being the minimal one. is therefore monolabel and we denote by its vertices. As is ATTO and form a monolabel directed path in , then necessarily . If , we have found a directed triangle such that , a contradiction to Lemma 14. Then, . If , then forces in and thus, by Lemma 11, , yielding a directed cycle formed by arcs in shorter than , a contradiction. Hence and we can repeat the same argument with vertices and to get with . Hence, in order to avoid creating a directed triangle with , necessarily for all such that . But then, form a directed triangle with , contradicting again Lemma 14.
We are now ready to prove our main result.
Theorem 16.
Let be a temporal graph. The following assertions are equivalent:
-
i)
admits a TTO.
-
ii)
admits an ATTO.
-
iii)
induces an acyclic digraph.
Proof.
The implication from to is straightforward as all TTO are ATTO and the one from to is proved by Lemma 15. To prove the implication from to , we will mimic the proof provided by Hell et al. in [10] for the static case, by using an analogous lexicographic argument. The proof will provide a simple algorithm to decide whether a given temporal graph is a comparability temporal graph and construct a TTO of if the answer is YES, as detailed in Subsection 3.2. Let be a partial ATTO of containing . We start by showing that taking any edge not yet oriented in , ensures that will also be an ATTO of . As is ATTO, it is clear that holds. Assume for contradiction that , i.e., there exists a pair of vertices such that . Since is ATTO, both arcs cannot belong to , so assume . It is not possible that as well, as this would imply and thus , meaning which contradicts the assumption of edge being not yet oriented in . Hence, . Observe that implies . But now, since , we must have , again contradicting the assumption of unoriented in . As induces an acyclic digraph, there exists an order on the vertices of such that all arcs in are oriented forward, i.e., if then . We propose to construct an orientation in a greedy lexicographic fashion, following the order defined by . We initially set . Then, while is not yet a complete orientation of , we repeat what follows. We consider the unoriented edge , with , such that it is lexicographically minimal with respect to , and we add to . By the observation above, as was initially an ATTO of containing , the final orientation obtained by this procedure will also be ATTO. It remains to show that does not contain directed triangles. Assume by contradiction it contains at least one, and consider the monolabel directed triangle that is lexicographically minimal with respect to the position in of its three vertices. Then, contains at least one arc oriented backwards by , without loss of generality take as this backward arc with . Since it was oriented backwards, and it is not possible that was chosen as next unoriented edge in the algorithm above. Hence, the orientation of was assigned because for some edge , chosen as minimal unoriented edge at some step in our greedy algorithm. As at this step was also an unoriented edge, this implies that is lexicographically smaller that . But now, since there is a directed path from to in , by applying Lemma 13, we get that is also a directed triangle in , contradicting the lexicographic minimality of .
3.2 Algorithmic aspects
The proof presented for Theorem 16 establishes the algorithm we will propose for deciding whether a given temporal graph is a comparability temporal graph, and if so, obtaining a TTO of its edges. The strategy will start by obtaining the set of necessary arcs of . For this, it is first required to construct the implication digraph and then to add the appropriate constraints to obtain the augmented digraph . We start by observing that the size of both digraphs is in , which is the order of the maximum number of triplets of vertices, forming a triangle or a three-vertex path and therefore potentially producing an implication constraint. Consider and the complexity functions of computing digraphs and respectively. Then, by the previous observations, we claim that deciding whether admits a QTTO (resp. ATTO) can be solved in (resp. ) by a 2-SAT linear time algorithm. To obtain , only triangles and three-vertex paths need to be evaluated as no other structure can produce an implication, i.e., an arc in the digraph. Then, it is easy to see that . However, for , we need to additionally consider correlated monolabel triangles, formed by a specific quadruple of vertices. To do this, two different strategies can be implemented, and the structure of the graph will determine which of the two is most efficient. First, one can consider for each monolabel triangle , all other vertex and verify whether the quadruple forms a correlated monolabel triangle. If we consider as the number of monolabel triangles, then clearly this procedure is in . Alternatively, one can consider every pair of edges in and evaluate whether satisfies the desired configuration. This can be done in . When is small, the first strategy will be more efficient, however this is not always the case as . Therefore, we state that , and as Theorem 16 proves that any temporal graph admitting an ATTO is a comparability temporal graph, we claim that the recognition problem for comparability temporal graphs can be solved in . Once the digraph is constructed, it is straightforward to obtain by Tarjan’s [19] linear strategy in the size of the digraph, that is . Again by Theorem 16, we know that is a directed acyclic graph and we can obtain in an order such that all necessary arcs are oriented from left to right according to , i.e., all satisfy . We can extend with the rest of the vertices in in an arbitrary way. Then, we consider as the initial orientation and we greedily orient the remaining edges by selecting at every step the unoriented edge , with , such that is lexicographically minimum. We then fix orientations in . Using the same arguments as in proof of Theorem 16, we state that this results in a TTO of . Note that adding to will fix the orientation of all the arcs forced in . Then, after orienting we can remove all these vertices from , as all vertices in , and claim the complexity of the greedy orientation construction can be done in . To conclude, we state that the overall time complexity of the algorithm is of .
Theorem 17.
Deciding if is a comparability temporal graph and constructing a TTO if the answer is YES can be done in .
The bottleneck of our algorithm can be the computation of the correlated monolabel triangles when as the construction of the digraph will require . On the other hand, since up to our knowledge there is not yet a linear time algorithm to verify whether an orientation is transitive in the static case, and temporal transitive orientations generalize transitive ones, this supposes a lower bound for the comparability temporal graph recognition problem.
3.3 Multilabel temporal transitive orientations
Since most temporal networks allow resources to traverse their arcs at multiple given times, it is natural to try to formulate an extension to the notion of temporal transitivity to multilabel temporal graphs, i.e., temporal graphs with and . We shortly introduce the motivation and main definitions, further clarifications can be found in the Appendix section of the related version of this article. Let us recall the initial motivation behind the model proposed by Mertzios et al.[15]. The authors introduced temporal transitive orientations as a way to avoid “shortcuts” in the transmission of information by nodes in a communication network. This way, if node sends information to node and node then sends it to node , the latter should be able to verify this information from source at a later, or equal, time than when receiving the message via . In the multilabel setting, it is considered that new information can reach node and be transmitted to multiple times, at the moments determined by the time-label set associated with the arc connecting both nodes. Therefore, the arc connecting node with node should not allow the information to be transmitted at an earlier time to the one of sending the information to . We formalized this idea as follows. First, we introduce the operator that will allow us to compare two time-label sets in the multilabel scenario.
Definition 18.
Let be two sets in , (resp. ) if there exist and such that (resp. ).
Let us denote by (resp. ) the negation. Notice that (resp. ) implies that all elements in are strictly greater (resp. greater or equal) than all elements in .
Definition 19.
Let be a multilabel temporal graph and an orientation of . We will say is a multilabel temporal transitive orientation (MTTO) if whenever with , then necessarily with .
In the multilabel scenario, the equivalent to monolabel triangles considered in the previous subsections will be monolabel triangles with singleton time-label sets. Then, we can define almost-multilabel temporal transitive orientations (AMTTO) as the analogous to the simple temporal case. This leads to an equivalent characterization of comparability multilabel temporal graphs and lexicographic strategy for constructing a MTTO of a YES instance.
Theorem 20.
Let be a multilabel temporal graph. Then, the following assertions are equivalent:
-
i)
admits a MTTO
-
ii)
admits an AMTTO
-
iii)
induces an acyclic digraph
Furthermore, there is a -time algorithm to decide if is a comparability multilabel temporal graph and construct a MTTO if the answer is YES, with being the number of monolabel triangles with a singleton time-label set associated to their edges.
4 Characterizations by forbidden temporal ordered patterns
All proofs of results in this section are included in the Appendix of the related version.
Temporal ordered patterns.
In graph theory, a property is hereditary if it is stable under the induced subgraph relation. As such, hereditary properties can be characterized by a, possibly infinite, set of forbidden induced subgraphs. For some hereditary properties, interesting insights can be obtained by proving the existence of orderings of the graph’s vertices avoiding induced ordered substructures, usually called patterns. In this section we extend these considerations to the temporal setting and prove such characterizations for the classes related to TTO. An ordered temporal graph is a temporal graph equipped with an ordering of its vertices. Two ordered temporal graphs are isomorphic if there is an isomorphism between them that preserves the vertex orderings. We say that an ordered temporal graph contains another one if by removing vertices from the first graph, one obtains an ordered temporal graph isomorphic to the second graph. A temporal pattern is a compact way of representing a family of ordered temporal graphs, given as an ordered temporal trigraph: between every pair of vertices there is either a non edge, a full edge or a dashed edge. In the latter two cases, the time-label is given as a variable, and the pattern will be defined using some inequalities between those variables. An example is shown on Figure 3. A realization of a temporal pattern, is an ordered temporal graph obtained from the pattern by choosing for each dashed edge either a non edge or an edge, and by assigning values to the edge variables that satisfy the contraints given by the pattern. Given a collection of patterns , we define the class as the set of connected temporal graphs admitting an ordering of their vertices that do not contain (in the ordered temporal graph sense) any realization of a pattern in . We say that the ordering of the temporal graph avoids all patterns in .
with and
Consider the temporal ordered pattern from Figure 3 and the set of temporal ordered patterns illustrated in Figure 4 and let us propose the following characterizations. Observe that when a temporal graph is monolabel, the pattern corresponds to the usual pattern for characterizing the class of comparability graphs, see [7] for a survey on three-vertex patterns.
Theorem 21.
A temporal graph admits a temporal transitive orientation if and only if it belongs to .
Theorem 22.
A temporal graph admits a strict temporal transitive orientation if and only if it belongs to .
5 Perspectives
In section 3, to prove our main result, Theorem 16, we used the lexicographic argument proposed in [10]. The question of whether it is possible to directly prove that any graph admitting an ATTO is a comparability temporal graph by using a similar approach to Ghouila-Houri’s original proof, i.e., by module contraction and re-orientation of an ATTO, remains unresolved. For this, the concept of module should be extended to the temporal setting. Then, a set of vertices having the same neighbors outside of and connected to them by exactly the same time-labels could be considered as a temporal module. What is more, in the static case, all possible transitive orientations of a graph can be described in a compact way by the modular decomposition tree, see [9]. In the temporal setting, recall that our algorithm constructs a temporal transitive orientation of a temporal graph by computing , selecting any linear extension having all necessary arcs forward and greedily completing the orientation in a lexicographic way. We observe that any TTO of can in fact be obtained by this algorithm by choosing the appropriate linear extension of : it suffices to start with the linear extension that puts all arcs of forward. However, it remains unanswered whether a compact representation of all TTO can be proposed, as for the static case. It is in this context that we raise the following open problem.
Open Problem 1.
For a given comparability temporal graph , is it possible to obtain a TTO of by a strategy based on temporal modular decomposition? Can this decomposition provide a compact structure to describe all possible TTO of ?
On a different note, every static graph admits an assignation of time-labels to its edges resulting in a comparability temporal graph. We can take an arbitrary ordering of the vertices of , define as in Equation 1 below and construct by orienting every edge from left to right according to . All directed paths in will have strictly decreasing time-labels in , and thus will be TTO. This observation leads to the following relabelling problem.
| (1) |
Open Problem 2.
For a given temporal graph , how to compute the minimum number of time-labels to be modified in order to obtain a comparability temporal graph?
As an application of this relabelling problem, one can model a transportation network as a temporal graph and evaluate how to adjust its timetables to satisfy temporal transitivity.
References
- [1] Bengt Aspvall, Michael F Plass, and Robert Endre Tarjan. A linear-time algorithm for testing the truth of certain quantified boolean formulas. Information processing letters, 8(3):121–123, 1979. doi:10.1016/0020-0190(79)90002-4.
- [2] Arnaud Casteigts, Paola Flocchini, Walter Quattrociocchi, and Nicola Santoro. Time-varying graphs and dynamic networks. International Journal of Parallel, Emergent and Distributed Systems, 27(5):387–408, 2012. doi:10.1080/17445760.2012.668546.
- [3] Pierre Charbit, Michel Habib, and Amalia Sorondo. Extending ghouila-houri’s characterization of comparability graphs to temporal graphs. arXiv preprint arXiv:2510.06849, 2025. doi:10.48550/arXiv.2510.06849.
- [4] Mónika Csikós, Michel Habib, Minh-Hang Nguyen, Mikaël Rabie, and Laurent Viennot. Forbidden patterns in temporal graphs resulting from encounters in a corridor. Journal of Computer and System Sciences, 150:103620, 2025. doi:10.1016/J.JCSS.2025.103620.
- [5] Peter Damaschke. Forbidden ordered subgraphs. In Topics in Combinatorics and Graph Theory: Essays in Honour of Gerhard Ringel, pages 219–229. Springer, 1990.
- [6] Reinhard Diestel. Graph Theory, 4th Edition, volume 173 of Graduate texts in mathematics. Springer, 2012.
- [7] Laurent Feuilloley and Michel Habib. Graph classes and forbidden patterns on three vertices. SIAM Journal on Discrete Mathematics (SIDMA), 35(1):55–90, 2021. doi:10.1137/19M1280399.
- [8] Alain Ghouila-Houri. Caractérisation des graphes non orientés dont on peut orienter les arêtes de manière à obtenir le graphe d’une relation d’ordre. Comptes Rendus de l’Académie des Sciences Paris, 254:1370–1371, 1962.
- [9] Martin Charles Golumbic. Algorithmic Graph Theory and Perfect Graphs (Annals of Discrete Mathematics, Vol 57). North-Holland Publishing Co., NLD, 2004.
- [10] Pavol Hell and Jing Huang. Lexicographic orientation and representation algorithms for comparability graphs, proper circular arc graphs, and proper interval graphs. Journal of Graph Theory, 20(3):361–374, 1995. doi:10.1002/JGT.3190200312.
- [11] Pavol Hell, Bojan Mohar, and Arash Rafiey. Ordering without forbidden patterns. In European Symposium on Algorithms, pages 554–565. Springer, 2014. doi:10.1007/978-3-662-44777-2_46.
- [12] David Kempe, Jon Kleinberg, and Amit Kumar. Connectivity and inference problems for temporal networks. In Proceedings of the thirty-second annual ACM symposium on Theory of computing, pages 504–513, 2000. doi:10.1145/335305.335364.
- [13] Matthieu Latapy, Tiphaine Viard, and Clémence Magnien. Stream graphs and link streams for the modeling of interactions over time. Social Network Analysis and Mining, 8(1):61, 2018.
- [14] Ross M McConnell and Jeremy P Spinrad. Modular decomposition and transitive orientation. Discrete Mathematics, 201(1-3):189–241, 1999. doi:10.1016/S0012-365X(98)00319-7.
- [15] George B Mertzios, Hendrik Molter, Malte Renken, Paul G Spirakis, and Philipp Zschoche. The complexity of transitively orienting temporal graphs. Journal of Computer and System Sciences, page 103630, 2025. doi:10.1016/J.JCSS.2025.103630.
- [16] Robert Moskovitch and Yuval Shahar. Fast time intervals mining using the transitivity of temporal relations. Knowledge and Information Systems, 42(1):21–48, 2015. doi:10.1007/S10115-013-0707-X.
- [17] Jeremy Spinrad. On comparability and permutation graphs. SIAM Journal on Computing, 14(3):658–670, 1985. doi:10.1137/0214048.
- [18] Xavier Tannier and Philippe Muller. Evaluating temporal graphs built from texts via transitive 598 reduction. Journal of Artificial Intelligence Research (JAIR), 40(375Ű413):599, 2011.
- [19] Robert Endre Tarjan. Depth-first search and linear graph algorithms. SIAM J. Comput., 1(2):146–160, 1972. doi:10.1137/0201010.
