Abstract 1 Introduction 2 Preliminaries 3 Temporal Graph Encodings 4 Temporal Meta–Theorems 5 Logic Cookbook (see full version) 6 Future Work References

FO and MSO Model Checking on Temporal Graphs

Michelle Döring ORCID Hasso Plattner Institute, University of Potsdam, Germany    Jessica Enright ORCID School of Computing Science, University of Glasgow, UK    Laura Larios-Jones ORCID School of Computing Science, University of Glasgow, UK    George Skretas ORCID Hasso Plattner Institute, University of Potsdam, Germany
Abstract

Algorithmic meta-theorems provide an important tool for showing tractability of graph problems on graph classes defined by structural restrictions. While such results are well established for static graphs, corresponding frameworks for temporal graphs are comparatively limited.

In this work, we revisit past applications of logical meta-theorems to temporal graphs and develop an extended unifying logical framework. Our first contribution is the introduction of logical encodings for the parameters vertex-interval-membership width (𝗏𝗂𝗆) and tree-interval-membership width (𝗍𝗂𝗆), parameters that capture the signature of vertex and component activity over time. Building on this, we extend existing monadic second-order (MSO) meta-theorems for bounded lifetime and temporal total degree to the parameters 𝗏𝗂𝗆 and 𝗍𝗂𝗆, and establish novel first-order (FO) meta-theorems for all four parameters.

Finally, we signpost a modular lexicon of reusable FO and MSO formulas for a broad range of temporal graph problems, and give an example. This lexicon allows new problems to be expressed compositionally and directly yields fixed-parameter tractability results across the four parameters we consider.

Keywords and phrases:
temporal graphs, dynamic graphs, time-varying graphs, parameterized complexity, logic, meta-theorems, monadic second-order logic, first-order logic, treewidth, planar, nowhere dense, lifetime, temporal total degree, vertex-interval membership width, tree-interval membership width
Copyright and License:
[Uncaptioned image] © Michelle Döring, Jessica Enright, Laura Larios-Jones, and George Skretas; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic
; Mathematics of computing Graph algorithms ; Theory of computation Fixed parameter tractability
Related Version:
Full Version: https://doi.org/10.48550/arXiv.2602.14592
Acknowledgements:
We thank Sebastian Siebertz for his valuable feedback.
Editors:
George B. Mertzios and Andréa W. Richa

1 Introduction

Many networks of interest, such as public-transport systems or communication and interaction networks, consist of time-sensitive connections. A standard abstraction of such networks is a temporal graph 𝒢=(V,E,λ), that is, a static graph G=(V,E) as footprint together with an edge labelling λ:E2 assigning to each edge the time steps at which it is available. This model strictly generalises static graphs, which are recovered as the special case in which all edges are available at all times. While temporal graphs are more expressive, this comes at a computational costs: many problems that are polynomial-time solvable on static graphs are computationally hard on temporal graphs (see e. g., the survey [24, Section 3]), motivating an extensive line of work in parameterised complexity (e. g., [33, 22, 6, 23, 35]).

The core question in parameterised complexity is whether a problem is fixed-parameter tractable (𝙵𝙿𝚃) when parameterised by some measure that captures relevant properties of the input. For static graphs, one of the most studied parameters is treewidth (𝗍𝗐). Two standard approaches to obtain 𝙵𝙿𝚃 algorithms parameterised by treewidth are: (i) developing a dynamic program (see [11, Section 7.3]), or (ii) expressing the problem in a suitable logic and applying a logical meta-theorem.

First-order (FO) logic and monadic-second order (MSO) logic provide formal languages that can be used for expressing combinatorial problems on graphs. A key benefit of this logical perspective is that it allows for logical meta-theorems which unify algorithmic results by establishing tractability for entire classes of problems on entire classes of graphs, often based on the fragment of logic required. The most prominent example is Courcelle’s theorem [9], which implies that every property definable in MSO logic can be decided in linear time on graphs of bounded treewidth. On sparse graphs, FO model checking has a long history on increasingly general graph classes, culminating in the result of Grohe, Kreutzer, and Siebertz [26] showing that FO model checking is fixed-parameter tractable on nowhere dense graph classes – a broad notion of sparsity that, in particular, includes planar graphs and graph classes of bounded treewidth, degree, or expansion. For a detailed background on logic and algorithmic meta-theorems we refer to the surveys [25, 30].

For temporal graphs, applications of logical meta-theorems so far exclusively use MSO formulations to obtain 𝙵𝙿𝚃 results under bounded treewidth combined with lifetime (largest time label) or temporal degree (number of temporal edges incident to one vertex) [12, 13, 20, 21, 24, 27, 31, 35]. In contrast, the FO meta-theorem route on planar or nowhere dense graphs has not yet been considered for temporal graphs. Moreover, it is still common to obtain 𝙵𝙿𝚃 results via problem-specific dynamic programs with long technical proofs (see, e.g., [8, 28]), even in settings where a logical approach could yield a simpler and more modular proof. Here, we provide a unifying framework for encoding temporal graphs along with example associated formulas. We also extend existing applications of logical meta-theorems to temporal graphs beyond bounded treewidth by enabling applications of FO meta-theorems for nowhere-dense footprints.

Beyond proof techniques, a central question is which parameters meaningfully capture temporal and structural complexity. Recently, two new parameters have been introduced that are sensitive to the order of snapshots and thus capture temporal structure more intrinsically: vertex-interval-membership width (𝗏𝗂𝗆) by Bumpus and Meeks [3], and tree-interval-membership width (𝗍𝗂𝗆) by Enright, Hand, Larios-Jones and Meeks [19]. The latter work studies parameterised complexity with respect to 𝗏𝗂𝗆 and 𝗍𝗂𝗆, and proposes a general procedure for deriving dynamic programs. Concretely, any problem satisfying certain locality properties admits a dynamic program on graphs with bounded 𝗏𝗂𝗆, and under even more restrictive locality requirements on graphs with bounded 𝗍𝗂𝗆. A drawback of their approach is that verifying the locality properties is quite involved for 𝗏𝗂𝗆 and becomes even more demanding for 𝗍𝗂𝗆. Since bounded 𝗏𝗂𝗆 and 𝗍𝗂𝗆 imply bounded treewidth of the footprint, it is a question whether these parameters support logical meta-theorems as for 𝗍𝗐+Λ and 𝗍𝗐+Δt. We answer this affirmatively: we show that 𝗏𝗂𝗆 and 𝗍𝗂𝗆 admit encodings within our framework that preserve the structure needed to apply FO and MSO meta-theorems, yielding the first such results for purely temporal parameters.

1.1 Our contribution

We provide a unifying framework including the pre-existing encodings for lifetime (Λ) and temporal total degree (Δt), and introduce novel encodings for the parameters 𝗏𝗂𝗆 and 𝗍𝗂𝗆. These encodings are given in Section 3.

In Section 4, we show that all four encodings admit the application of FO and MSO meta-theorems. Concretely, we analyse the Gaifman graph induced by each encoding and prove that its structure is bounded by the respective parameter. This allows us to lift the static meta-theorems to temporal graphs, yielding the following temporal meta-theorems: any property expressible in FO/MSO logic over the corresponding encoding yields an 𝙵𝙿𝚃 algorithm parameterised by the respective parameter.

Theorem 1.

MSO Model Checking on a temporal graph 𝒢=(G,λ) is 𝙵𝙿𝚃 when parameterised by (i) 𝗍𝗐+Λ, (ii) 𝗍𝗐+Δt, (iii) 𝗏𝗂𝗆, or (iv) 𝗍𝗂𝗆.

Theorem 2.

FO Model Checking on a temporal graph 𝒢=(G,λ) is 𝙵𝙿𝚃 when parameterised by (i) Λ if the footprint G is nowhere dense, (ii) Δt, (iii) 𝗏𝗂𝗆, or (iv) 𝗍𝗂𝗆.

Finally, we provide the Logic Cookbook (see Section 5 in the full version): a collection of FO and MSO formulas for over a dozen temporal graph problems studied in the literature. Besides serving as a reusable reference for future work, this section highlights the simplicity and modularity of this logical tool. For example, in each of [3, 7, 8, 19, 28], a substantial contribution is an 𝙵𝙿𝚃 result proven via a specialised dynamic program and lengthy correctness arguments; in our cookbook, the same 𝙵𝙿𝚃 result follows from a compact formula combined with the meta-theorem.

Some results and proofs are omitted due to space constraints and can be found in the full version of the paper.

1.2 Related Work

The first work in logic that bears resemblance to temporal graph encodings is by [1] who provided an alternative proof of Courcelle’s MSO meta-theorem and considered, in particular, edge-labelled static graphs. This perspective was later adopted by [35] to obtain an 𝙵𝙿𝚃 algorithm for Temporal (s,z)-Separator parameterised by 𝗍𝗐+Λ, introducing what we call the lifetime encoding.

Independently, [32] studied different models of time-varying graphs (including temporal graphs) with bounded lifetime and proposed an encoding that was claimed to extend the MSO and FO meta-theorems of Courcelle and Frick–Grohe to this setting. However, their encoding contains a fundamental flaw, which was later identified and shown to be irreparable in the survey by [24]. That survey gives a comprehensive exploration of possible notions of treewidth for temporal graphs (since no singular temporal treewidth definition exists), discussing both the lifetime and degree encodings in detail. The degree encoding was introduced by [20]. They used it to show that Temporal Reachability Edge Deletion is in 𝙵𝙿𝚃 with respect to 𝗍𝗐, Δt and solution size combined.

Subsequent work that uses an MSO approach: [27] prove 𝙵𝙿𝚃 by 𝗍𝗐+Λ for Temporal Feedback Edge/Connection Set; [31] show 𝙵𝙿𝚃 by 𝗍𝗐+Λ for Temporal Reachability Dominating Set; [21] show 𝙵𝙿𝚃 by 𝗍𝗐+Δt for Counting Temporal Paths via a counting variant of MSO; [13] show 𝙵𝙿𝚃 by 𝗍𝗐+Λ and by 𝗍𝗐+Δt for Open and Closed Temporal Connected Component; [33] use Courcelle-type reasoning over a static MSO formulation on the footprint for Temporal Graph Realization with Fixed Stretch; and [14] show 𝙵𝙿𝚃 by 𝗍𝗐 plus maximum deadline D for ReachFast using an MSO encoding which is similar to the lifetime encoding but tailored specifically to this label-shifting problem.

Concurrently to our work, [2] obtain MSO and restricted-FO meta-theorems for temporal graphs by encoding the static expansion graph 𝒢 as a relational structure, with treewidth and twin-width of 𝒢 as the respective parameters. They define a custom temporal logic (𝖬𝖲𝖮𝖳2, 𝖥𝖮𝖳1Δ) which can equivalently be defined as a relational encoding of the static expansion within our framework. They also study a local time-window variant (differentials), yielding meta-theorems parameterised by the maximum treewidth or twin-width over sliding windows. In the full version, we discuss in how their results fit into our framework.

2 Preliminaries

A temporal graph 𝒢=(V,E,λ) consists of a static graph G=(V,E), known as the footprint, and a labelling function λ:E2 assigning to every static edge e a finite set of time labels λ(e). The largest value assigned by λ is referred to as the lifetime Λ. Alternatively, a temporal graph can be defined as a sequence 𝒢=(Gt=(V,Et))tΛ of static snapshots Gt. A temporal graph is (un)directed if the footprint is (un)directed. A pair (e,t), where eE and tλ(e), is a temporal edge with label t. We denote the set of all temporal edges of 𝒢 by . A temporal path of length is a sequence of temporal edges (ei,ti)i[] where ei forms a path in the footprint and the time labels ti are non-decreasing. If the time labels are strictly increasing, the path is strict; otherwise, it is non-strict. If there is a temporal path from u to v, we say u reaches v. A temporal graph is temporally connected if for all u,vV, u reaches v and vice versa. A temporal graph where reachability is considered exclusively using (non-)strict paths is called a (non-)strict temporal graph.111Formally, strictness is a property of the path model rather than of the temporal graph itself. We use this terminology, analogously to speaking of weighted or unit-weight static graphs, as a convention about the travel time of temporal edges: one in the strict case and zero in the non-strict case.

We distinguish two families of parameters for temporal graphs: static parameters, which constrain the structure of the (undirected) footprint, and temporal parameters, which bound the temporal structure locally or the activity over time. See Table 1 for an overview.

Static graph parameters.

The static degree of a vertex v is defined as δs(v)=|{eE:ve}| and Δs=maxvVδ(v) denotes the maximum static degree of 𝒢. The treewidth of a graph measures how structurally close it is to being a tree. Small treewidth means that the graph can be organised into small, overlapping pieces with a tree-like skeleton. The treewidth of a temporal graph always refers to the undirected footprint; for directed temporal graphs we take the treewidth of the underlying undirected graph of the directed footprint.

Definition 3 (Tree Decomposition, Treewidth [11]).

Let G=(V,E) be an undirected static graph. A tree decomposition of G is a pair 𝒯=(T,{Bu:uV(T)}) consisting of a tree T and a family of bags BuV such that (i) uV(T)Bu=V, (ii) for every eE there exists uV(T) with eBu, and (iii) for every vV, the set {uV(T):vBu} induces a connected subtree of T. The width of 𝒯 is defined as width(𝒯):=maxuV(T)|Bu|1. The treewidth of a static graph G is 𝗍𝗐(G):=min{width(𝒯):𝒯 is a tree decomposition of G}.

A path decomposition is a tree decomposition in which the underlying tree T is restricted to be a path; the pathwidth 𝗉𝗐(G) is defined analogously as the minimum width over all path decompositions of G. Since every path is a tree, we have 𝗉𝗐(G)𝗍𝗐(G) for all graphs G. A class of graphs has bounded treewidth (respectively bounded pathwidth) if there exists a constant k such that every graph in the class satisfies 𝗍𝗐(G)<k (resp. 𝗉𝗐(G)<k).

Table 1: Overview of the parameters considered in this paper.
Symbol Name Family What it controls
Δs static degree static #static edges locally
𝗉𝗐 pathwidth static footprint path-likeness
𝗍𝗐 treewidth static footprint tree-likeness
𝖽 denseness function static sparsity measure
Λ lifetime temporal largest time label
Δt temporal total degree temporal #temporal edges locally
𝗏𝗂𝗆 vertex-interval membership width temporal #relevant vertices at a time
𝗍𝗂𝗆 tree-interval membership width temporal #relevant vertices connected at a time

We use standard notions from topological minor theory; for details we refer to the book [34]. Two graphs G and H are isomorphic if there is a bijection between V(G) and V(H) that preserves adjacency. For r, an r-subdivision of H is obtained by selecting an arbitrary subset of edges and replacing each edge of that set by a path of length at most r+1 such that all paths are pairwise internally vertex-disjoint. The graph H is a depth-r topological minor of G, denoted HrtG, if some r-subdivision222The standard definition uses a 2r-subdivision. We drop the factor 2 for notational simplicity; this only rescales the depth parameter by a constant factor and yields an equivalent notion. of H is isomorphic to a subgraph of G (the t in rt stands for topological and should not be confused with a time step t[Λ]). A graph class 𝒞 is nowhere dense if there exists a function 𝖽: such that for every r and every G𝒞 we have K𝖽(r)rtG. We call 𝖽 a denseness-function of 𝒞.

Temporal graph parameters.

The lifetime Λ of a temporal graph is its largest time label. The temporal total degree of a vertex v at time t is defined as δt(v)=|{(e,t):ve,tλ(e)}| and Δt=maxvVδt(v) denotes the maximum temporal total degree of 𝒢. The vertex-interval membership (VIM) width and tree-interval membership (TIM) width capture the maximum number of vertices that are simultaneously “participating” in the temporal graph. Both measures use the activity-interval of a vertex v, which starts at the first time at which v has an incident edge and ends after the last time at which v has an incident edge. For every snapshot outside this interval, v does not interact with the rest of the graph.

Definition 4 (Activity-interval).

For vV, let tmin(v)=min{λ(e):eE,ve} and tmax(v)=max{λ(e):eE,ve}. The activity-interval of vertex v is defined as A(v)=[tmin(v),tmax(v)] and the activity-interval of a static edge eE as A(e)=[minλ(e),maxλ(e)]. We say v or e is alive at time t if tA(v) or tA(e), respectively.

Note that an edge eE can be alive at time t without being active (i. e., tA(e) and tλ(e)), but not vice versa.

The VIM decomposition of a temporal graph consists of a path with one bag per time step containing exactly the vertices that are alive at that time. Note that every temporal graph has a unique VIM decomposition and that a temporally connected graph has VIM width exactly n. See Figure 1 left for an illustration of a VIM decomposition.

Definition 5 (Vertex-Interval-Membership Width (Bumpus and Meeks [3])).

The vertex-interval-membership (VIM) decomposition of a temporal graph 𝒢 is a sequence (πt)t[Λ] of bags with πt={vV:tA(v)}. The vertex-interval-membership width of a temporal graph 𝒢 is 𝗏𝗂𝗆(𝒢)=maxt[Λ]|πt|.

The TIM width parameter generalises VIM width from a decomposition as a path over time to a tree. This is motivated by the fact that for many temporal problems, vertices that are alive at the same time but far from one another in the graph can be considered independently. The bags of a TIM decomposition have the property that any connected component of a snapshot is entirely contained in a bag at that time. Each bag at time t is connected to the bags at time t1 and t+1 with which it shares vertices. This forms a tree-shape (see Figure 1 right). Since the complexity of computing a minimum-width TIM decomposition is unknown, we have a trade off between time required to decompose the temporal graph and size of the decomposition. For this reason, we discuss both parameters in this work despite similarities in the proofs for each.

Figure 1: Example from [19] of a VIM decomposition (A) and a TIM decomposition (B) of a temporal graph 𝒢.
Definition 6 (Tree-Interval-Membership Width [19]).

A tree-interval-membership (TIM) decomposition of a temporal graph 𝒢 is a triple 𝒯=(T,Π,τ) consisting of a labelled directed tree T, a family of bags Π={πi:iV(T)}, and a node labelling function τ:V(T)[Λ] such that:

  1. (i)

    for every vV(𝒢) and t[Λ] there exists a unique iV(T) with τ(i)=t and vπi,

  2. (ii)

    for every (uv,t)(𝒢) there exists an iV(T) with τ(i)=t and {u,v}πi, and

  3. (iii)

    the directed edges of T are E(T)={(i,j):πiπj and τ(i)+1=τ(j)}.

The width of a TIM decomposition is defined as width(T):=max{|πi|:iV(T)}. The TIM width of a temporal graph 𝒢 is 𝗍𝗂𝗆(𝒢):=min{width(𝒯):𝒯 is a TIM decomposition of 𝒢}.

Since the VIM bags form a (not necessarily optimal) path decomposition of the undirected footprint, it follows that 𝗉𝗐(𝒢)𝗏𝗂𝗆(𝒢) (and hence 𝗍𝗐(𝒢)𝗉𝗐(𝒢)𝗏𝗂𝗆(𝒢)). Analogously, the TIM bags form a tree decomposition of the undirected footprint, and thus 𝗍𝗐(𝒢)𝗍𝗂𝗆(𝒢).

2.1 Logic in Static Graphs

First-order (FO) logic and monadic second-order (MSO) logic provide a uniform language to express graph properties and, in turn, define whole graph classes. Since we only recall the basic notions needed in this paper, we point the reader to [30] as an accessible entry point with a focus on meta-theorems and a concise introduction to FO and MSO logic. For a more detailed treatment of FO and MSO logic, we refer to [10, 16, 17].

To reason about graphs using logic, each graph is represented as a relational structure: An undirected graph G=(V,E) is encoded with universe U:=VE and an incidence relation 𝗂𝗇𝖼E×V satisfying 𝗂𝗇𝖼(uv,x) if and only if x{u,v}. A directed graph D=(V,A) is encoded with universe U:=VA and relations 𝗌𝗈𝗎𝗋𝖼𝖾,𝗍𝖺𝗋𝗀𝖾𝗍A×V satisfying 𝗌𝗈𝗎𝗋𝖼𝖾((u,v),x) if and only if x=u, and 𝗍𝖺𝗋𝗀𝖾𝗍((u,v),x) if and only if x=v.

An FO formula φ uses element variables x,y, ranging over the universe U and builds formulas from atomic predicates x=y or R(x1,x2,) via the logical connectives ¬,,,,, the existential quantifier , and the universal quantifier . An MSO formula is an FO formula which can additionally use set variables X,Y,U, the membership relation xX, and is allowed to quantify over sets.

A formula φ is interpreted in a relational structure G of a graph G in the natural way: = denotes equality of elements or sets, R(x1,,xk) denotes containment in the relation R, denotes set containment, and ¬,,,, denote negation, disjunction, conjunction, implication, and biimplication, respectively. Furthermore, x(φ(x)) is true in G if and only if there is an element in the universe bU such that φ is true in G when x is interpreted by b. Analogously, x(φ(x)) is true in G if and only if φ is true in G for all interpretations of x by elements bU in the universe. For MSO formulas, X(φ(X)) and X(φ(X)) are analogously defined for sets BU by which X is interpreted. A formula φ is satisfied by a G if φ is true interpreted in G. The algorithmic task of deciding whether a given graph satisfies a specific formula is the model checking problem.

Model Checking (MC)

 
Input: A static graph G and a logical formulas φ.
Problem: Does G satisfy φ?

For FO and MSO there exist general meta-theorems that characterise the static graph classes on which their respective MC problem is tractable.

Theorem 7 (Grohe–Kreutzer–Siebertz: FO MC on nowhere dense [26]).

Let 𝒞 be a graph class with denseness function 𝖽:, i.e., K𝖽(r)rtG for all r and all G𝒞. Then for every ε>0 there exists a computable function f and a computable radius function r() such that, given a graph G𝒞 and an FO formula φ, one can decide whether G satifies φ in time f(|φ|,ε,𝖽(r(φ)))|V(G)|1+ε.

Theorem 8 (Courcelle: MSO MC on bounded treewidth, [10]).

There exists a computable function f such that, given a graph G of treewidth 𝗍𝗐 and an MSO formula φ, one can decide whether G satisfies φ in time f(|φ|,𝗍𝗐)(|V|+|E|).

3 Temporal Graph Encodings

To apply logical meta-theorems to temporal graphs, we encode them as relational structures resembling the static graph encoding with additional structure to represent time. Different encodings make different aspects of the temporal structure explicit and directly influence the structure of the resulting representation as well as the expressive power of any logic.

We present four relational encodings – two known (the lifetime encoding [27] and the degree encoding [20]) and two novel (the VIM and TIM encodings, introduced in this work) – each tailored to a specific notion of static or temporal sparsity. These encodings serve as the foundation for the temporal meta-theorems in Section 4, yielding tractability of FO and MSO model checking under bounded (i) Λ, (ii) Δt, (iii) 𝗏𝗂𝗆, and (iv) 𝗍𝗂𝗆, possibly combined with static parameters. All encodings are presented for strict, undirected temporal graphs. Directed variants can be obtained by replacing the incidence relation with source and target relations. Non-strict reachability is obtained via adapting the successor relation in the degree encoding, or on the formula level for the lifetime, VIM, and TIM encoding.

The lifetime encoding represents a temporal graph as a time-labelled static graph, mirroring the standard mathematical definition. The universe contains the vertices, temporal edges, and time steps. An incidence relation identifies the endpoints of each temporal edge, while a presence relation records when a temporal edge is present. A total linear order on the time steps encodes the global timeline.

Definition 9 (lifetime encoding).

Let 𝒢=(V,) be an undirected strict temporal graph with lifetime Λ, and let L:=[Λ]. The lifetime encoding 𝒢Λ is the relational structure defined as:

universe U=VL

unary relations VU,U,LU

binary relations

  • 𝗂𝗇𝖼×V where 𝗂𝗇𝖼((uv,t),x)x=u or x=v,

  • 𝗉𝗋𝖾𝗌×L where 𝗉𝗋𝖾𝗌((uv,t),t)t=t,

  • <TL×L where t1<Tt2t1<t2.

Figure 2: Illustration of the lifetime encoding 𝒢Λ. Each temporal edge (e,t) between two vertices (empty circles) is represented by a temporal-edge node (filled circles), which is connected via the presence relation (orange) to the time-node tL for which ε=(e,t). The total order <T induces a clique KΛ of size Λ.
Figure 3: Illustration of the degree encoding 𝒢Δt. Each temporal edge (e,t) between two vertices (empty circles) is represented by a temporal-edge node (filled circles), which is connected via the possible-successor relation (orange) to every temporal-edge-node with whom it shares an endpoint and satisfies the temporal order.

The degree encoding abstracts away from the concrete time labels of edges and instead focuses on the relative order of neighbouring temporal edges. Rather than representing when an edge appears, the encoding captures which temporal edges can be taken consecutively along a temporal path. In contrast to static graphs – where succession is determined simply by shared endpoints – this relation additionally depends on the order at which the edges are present. As a result, the encoding directly represents temporal reachability via a partial order on temporal edges.

Definition 10 (degree encoding).

Let 𝒢=(V,) be an undirected strict temporal graph with temporal total degree Δt. The degree encoding 𝒢Δt is the relational structure defined as:

universe U=V

unary relations VU,U

binary relations

  • 𝗂𝗇𝖼×V, where 𝗂𝗇𝖼((uv,t),x)x=u or x=v,

  • 𝗉𝗌𝗎𝖼×, where 𝗉𝗌𝗎𝖼((e1,t1),(e2,t2))t1<t2 and there
    exists vV such that 𝗂𝗇𝖼(e1,v) and 𝗂𝗇𝖼(e2,v).

The VIM encoding directly represents the VIM decomposition of the temporal graph at the level of the relational structure. The encoding contains a sequence of bag elements, one for each bag of the VIM decomposition. Vertices and temporal edges are related to the bag elements in which they are alive, and successive bags are connected by a linear successor relation. In contrast to the lifetime encoding, the bags are not pairwise adjacent; this avoids introducing a clique over time and ensures that the density of the structure is bounded by the VIM width of the graph.

Definition 11 (VIM encoding).

Let 𝒢=(V,) be an undirected strict temporal graph with VIM decomposition (πt)t[Λ]. The relational VIM structure 𝒢𝗏𝗂𝗆 is defined as:

universe U=VΠ

unary relations VU,U,ΠU

binary relations

  • 𝗂𝗇𝖼×V where 𝗂𝗇𝖼((uv,t),x)x=u or x=v,

  • 𝖻𝖺𝗀V×Π where 𝖻𝖺𝗀(v,πt)vπt,

  • 𝗉𝗋𝖾𝗌×Π where 𝗉𝗋𝖾𝗌((uv,t),πi)i=t and u,vπi,

  • 𝗇𝖾𝗑𝗍Π×Π where 𝗇𝖾𝗑𝗍(πi,πj)i+1=j.

Figure 4: Illustration of the VIM encoding 𝒢𝗏𝗂𝗆 (left) and the TIM encoding 𝒢𝗍𝗂𝗆 (right). Each temporal edge (e,t) between two vertices (empty circles) is represented by a temporal-edge node (filled circles). Vertices are connected via the bag relation (solid blue) to every bag in which they are alive. Temporal-edge-nodes are connected analogously via the presence relation (dotted orange). The relation 𝗇𝖾𝗑𝗍 induces a path (left), resp. tree (right), over the bag-nodes Π.

The TIM encoding is a generalisation of the VIM encoding. In a TIM decomposition, vertices in the same connected component of a snapshot must be in the same bag at that time, while those in different connected components may be in different bags.

Definition 12 (TIM encoding).

Let 𝒢=(V,) be an undirected strict temporal graph with TIM decomposition (T,Π,τ). The relational TIM structure 𝒢𝗍𝗂𝗆 is defined as:

universe U=VΠ

unary relations VU,U,ΠU

binary relations

  • 𝗂𝗇𝖼×V where 𝗂𝗇𝖼((uv,t),x)x=u or x=v,

  • 𝖻𝖺𝗀V×Π where 𝖻𝖺𝗀(v,πi)vπi,

  • 𝗉𝗋𝖾𝗌×Π where 𝗉𝗋𝖾𝗌((uv,t),πi)τ(i)=t and u,vπi,

  • 𝗇𝖾𝗑𝗍Π×Π where 𝗇𝖾𝗑𝗍(πi,πj)τ(i)+1=τ(j) and 
    (πi,πj)
    E(T)
    .

4 Temporal Meta–Theorems

In this section, we establish meta-theorems for FO and MSO model checking on temporal graphs. Using the relational encodings from Section 3, we show that FO/MSO-definable temporal properties are fixed-parameter tractable under bounded (i) Λ, (ii) Δt, (iii) 𝗏𝗂𝗆, or (iv) 𝗍𝗂𝗆, possibly in combination with structural assumptions on the footprint. See 1 See 2 Both results are obtained by analysing the Gaifman graph Gf(𝒮) of a relational structure.

Definition 13 (Gaifman graph).

Let 𝒮 be any finite relational structure with universe U and some set of relations ={R1,R2,}. The Gaifman graph Gf(𝒮) is a static, simple, undirected graph with vertex set U and an edge {a,b} if and only if (i) ab and (ii) there exist a relation R with k2 arguments and a tuple (a1,,ak)R such that a,b{a1,,ak}.

The illustrations in Figures 3, 3, 4, and 4 depict the Gaifman graphs of the four encodings. The static meta-theorems (Theorems 8 and 7) apply to relational structures via their Gaifman graphs: bounded treewidth of Gf(𝒮) yields 𝙵𝙿𝚃 MSO MC on 𝒮 by Courcelle’s theorem, and nowhere denseness of Gf(𝒮) yields 𝙵𝙿𝚃 FO MC on 𝒮 by the Grohe–Kreutzer–Siebertz theorem. Since each encoding 𝒢 is a relational structure, it suffices to show that Gf(𝒢) has bounded treewidth, respectively is nowhere dense, as a function of the corresponding parameter.

4.1 Temporal Encodings preserve Treewidth

MSO model checking is fixed-parameter tractable on graph classes of bounded treewidth. We show that the Gaifman graph of each encoding has bounded treewidth whenever the corresponding parameter Λ, Δt, 𝗏𝗂𝗆 or 𝗍𝗂𝗆 is bounded. This has previously been established for the lifetime encoding [27] and the degree encoding [20]; we provide proofs for completeness and unified notation in the full version. For the VIM encoding and TIM encoding introduced in this work, we give novel proofs.

All results in this section are proven with a similar technique. Starting from a tree, VIM, or TIM decomposition of the temporal graph 𝒢, the bags are enlarged with temporal elements specific to each encoding to obtain a tree decomposition of the Gaifman graph.

Lemma 14 ([27]).

Let 𝒢 be a temporal graph with treewidth 𝗍𝗐(𝒢) and lifetime Λ. Then 𝗍𝗐(Gf(𝒢Λ))Λ+Λ𝗍𝗐(𝒢)2+𝗍𝗐(𝒢) and, consequently, 𝗍𝗐(Gf(𝒢Λ))𝒪(𝗍𝗐(𝒢)2Λ).

Lemma 15 ([20]).

Let 𝒢 be a temporal graph with treewidth 𝗍𝗐(𝒢) and maximum temporal total degree Δt. Then 𝗍𝗐(Gf(𝒢Δt))(Δt+1)(𝗍𝗐(𝒢)+1) and, consequently, 𝗍𝗐(Gf(𝒢Δt))𝒪(𝗍𝗐(𝒢)Δt).

Lemma 16.

Let 𝒢 be a temporal graph with VIM width 𝗏𝗂𝗆(𝒢). Then 𝗍𝗐(Gf(𝒢𝗏𝗂𝗆))𝗏𝗂𝗆(𝒢)+2𝗏𝗂𝗆(𝒢)2 and, consequently, 𝗍𝗐(Gf(𝒢𝗏𝗂𝗆))𝒪(𝗏𝗂𝗆(𝒢)2).

Proof.

Let Π=(πt)t[Λ] be the VIM decomposition of 𝒢, so πt={vV:tA(v)} and maxt[Λ]|πt|=𝗏𝗂𝗆. Recall that the VIM decomposition forms a (not necessarily optimal) path decomposition of the footprint G of 𝒢. We build a path decomposition (T,{Bt:t[Λ]}) of Gf(𝒢𝗏𝗂𝗆) as follows. To avoid confusion, we refer to the bags πt of the VIM decompositions of 𝒢 as VIM-bags and the bags Bt of the path decomposition of Gf(𝒢𝗏𝗂𝗆) as simply bags. For notational convenience, let πΛ+1:=. For each tV(T)=[Λ], define the bag

Bt:= {v:vπt}t-alive vertices{ε:ε=(e,t)}temporal edges in Gt{πt,πt+1}current and next VIM-bag.

We show that this forms a path decomposition. Recall that the universe of 𝒢𝗏𝗂𝗆 is U=VΠ.

  1. (i)

    First, we show t[Λ]Bt=U:

    • A vertex vV lies in every Bt with tA(v).

    • A temporal edge ε lies in Bt where ε=(e,t) for some static edge e.

    • A VIM-bag πtΠ lies in the bags Bt and Bt1.

  2. (ii)

    Every edge of the Gaifman graph is covered by some bag:

    • 𝗂𝗇𝖼×V: if v is an endpoint of ε=(e,t) then tA(v) and we must have ε,vBt.

    • 𝗉𝗋𝖾𝗌×Π: if 𝗉𝗋𝖾𝗌(ε,πt), then ε,πtBt.

    • 𝖻𝖺𝗀V×Π: if 𝖻𝖺𝗀(v,πt), then v,πtBt.

    • 𝗇𝖾𝗑𝗍Π×Π: for any t[Λ), we have πt,πt+1Bt and Bt+1.

  3. (iii)

    For each element of U, the indices of bags containing it form a connected subtree of T:

    • vV occurs precisely in the bags Bt where tA(v). Since A(v) is a contiguous interval, this must be a subpath of the decomposition.

    • ε=(e,t) occurs only in the bag Bt. This must trivially induce a connected subpath of the decomposition.

    • πtF occurs only in Bt and Bt1, which are adjacent in the decomposition.

Lastly, we bound the width. For any t[Λ], we have |πt|𝗏𝗂𝗆. Every temporal edge in Bt has both endpoints in πt, so there are at most |πt|2𝗏𝗂𝗆2 such edges. Thus |Bt|1+|πt|+|πt|21+𝗏𝗂𝗆+𝗏𝗂𝗆2, and hence 𝗍𝗐(Gf(𝒢𝗏𝗂𝗆))𝒪(𝗏𝗂𝗆(𝒢)2).

For the TIM encoding, recall that 𝗍𝗂𝗆(𝒢)𝗍𝗐(𝒢).

Lemma 17.

Let 𝒢 be a temporal graph with TIM width 𝗍𝗂𝗆(𝒢). Then 𝗍𝗐(Gf(𝒢𝗍𝗂𝗆))𝗍𝗂𝗆(𝒢)2+3𝗍𝗂𝗆(𝒢)1 and, consequently, 𝗍𝗐(Gf(𝒢𝗍𝗂𝗆))𝒪(𝗍𝗂𝗆(𝒢)2).

Proof.

Let (T,Π={πi:iV(T)},τ) be a TIM decomposition of 𝒢. We build a tree decomposition (T,{Bi:iV(T)}) of Gf(𝒢𝗍𝗂𝗆) as follows. To avoid confusion, we refer to the bags πi of the TIM decomposition as TIM-bags and the bags Bi of the tree decomposition as simply bags. For each iV(T), define the bag

Bi:= {vπi}vertices in TIM-bag{ε=(e,t):τ(i)=t,ε[0],ε[1]πi}temporal edges with endpoints in TIM-bag{πi,p(πi)}TIM-bag and parent,

where p(πi) is the parent TIM-bag of πi in the TIM decomposition. We show that this forms a tree decomposition. Recall that the universe of 𝒢𝗍𝗂𝗆 is U=VEΠ.

  1. (i)

    First, we show iV(T)Bi=U:

    • A vertex vV lies in every Bi with vπi. By definition of a TIM decomposition there exists at least one such TIM-bag for every vertex.

    • A temporal edge ε=(e,t) lies in Bi where τ(i)=t and ε[0],ε[1]πi. By definition of a TIM decomposition, there exists at least one such TIM-bag for every temporal edge.

    • A TIM-bag πiΠ lies in Bi.

  2. (ii)

    Every edge of the Gaifman graph is covered by some bag:

    • 𝗂𝗇𝖼×V: if v is an endpoint of ε=(e,t), then there exists iV(T) with τ(i)=t and ε[0],ε[1]πi; hence ε,vBi.

    • 𝖻𝖺𝗀V×Π: for vπi we have v,πiBi.

    • 𝗉𝗋𝖾𝗌×Π: if 𝗉𝗋𝖾𝗌(ε,πi), then ε,πiBi.

    • 𝗇𝖾𝗑𝗍Π×Π: for (i,j)E(T), we have that πj is the parent of πi in T by definition of the TIM encoding. By construction of our bags, we have πiBi and p(πi)=πjBi. Hence πi and πj occur together in the bag Bi.

  3. (iii)

    For each element of U, the indices of bags containing it form a connected subtree of T:

    • vV appears in the bag Bi if and only if vπi. By the definition of a TIM decomposition, the subtree of T induced by TIM-bags containing v must form a directed path. Since the TIM decomposition and this tree decomposition are indexed by the same tree, the bags containing v form a subpath of T.

    • ε=(e,t) appears in the bag Bi if and only if both endpoints of ε are in πi and τ(i)=t. This occurs in exactly one bag of the decomposition. Therefore, the subtree induced by the bags of (T,) containing ε is connected and non-empty.

    • πiΠ appears in Bi and all bags of its children, which induce a connected subtree of T. Since the tree decomposition and the TIM decomposition are indexed by the same tree, the claim follows.

Lastly, we show the width bound. Since |πi|𝗍𝗂𝗆 for iV(T), we have |Bi||πi|+|i|+|NT(πi)| 3𝗍𝗂𝗆+𝗍𝗂𝗆2, hence 𝗍𝗐(Gf(𝒢𝗍𝗂𝗆))𝒪(𝗍𝗂𝗆(𝒢)2).

4.2 Temporal Encodings preserve Nowhere Denseness

FO model checking is fixed-parameter tractable on nowhere dense graph classes, a broad family that includes, e. g., planar graphs, graphs of bounded expansion and of bounded treewidth. We show that the Gaifman graphs arising from our relational encodings form nowhere dense graph classes.

To the best our knowledge, FO meta-theorems have previously been considered for temporal graphs only by Mans and Mathieson [32] who studied a (flawed) variant of the lifetime encoding. They had essentially the same goal as in this paper: to design an encoding whose Gaifman graphs allow efficient FO model checking which, at the time, was only known for the class of graphs with bounded expansion. A flaw in their encoding and the associated argument was later identified by Fluschnik et al. [24]: Mans and Mathieson consider a generalisation of temporal graphs where the vertex set also varies over time. Their universe therefore contains an element for every vertex appearance (a temporal vertex), in contrast to our encoding which contains one element per static vertex. They claimed one could identify whether two temporal vertices belong to the same underlying vertex using a constant-length formula, but this would imply the existence of a constant-length formula for 3-colourability on constant-treewidth graphs [24], which would contradict PNP.

In what follows, we show that all four encodings preserve nowhere denseness when their respective parameter is bounded. Among the four encodings, the lifetime encoding requires the most care and we first give additional definitions for depth-r topological minors.

Depth-𝒓 topological minors via models.

Recall that for static graphs G and H, we write HrtG, if some r-subdivision of H is isomorphic to a subgraph of G. An r-subdivision is obtained by replacing a set of edges in H by paths of length at most r+1 such that the internal vertices (all but the endpoints) of all paths are disjoint. Equivalently, HrtG holds if G contains a depth-r model of H, which is a pair η=(ηV,ηE) where ηV:V(H)V(G) is an injective mapping, and for every edge abE(H), ηE(ab) is a simple path in G, called model-path, of length at most r+1 that connects ηV(a) and ηV(b), such that for all distinct edges ab,cdE(H), the paths ηE(ab) and ηE(cd) are internally vertex-disjoint, and no internal vertex of any path ηE(ab) lies in ηV(V(H)). The vertices in ηV(V(H)) are called the branch-vertices of the model. Intuitively, the model represents how the graph H can be “found” inside G after stretching each edge of H into a path of length at most r+1. The process of contracting an edge uv yields the graph G/uv obtained by identifying u and v into a new vertex that is adjacent to every vertex that was adjacent to u or v in G, and then deleting self-loops and parallel edges (so that the result remains simple).

Lemma 18.

Let 𝒞 be a nowhere dense class of static graphs with denseness-function 𝖽, and consider the class of all temporal graphs 𝒞 with footprint in 𝒞 and maximum lifetime Λ. Then the class of Gaifman graphs Gf(𝒢Λ) for each 𝒢𝒞 is nowhere dense. In particular, the function g(r):=𝖽(r/2)+2Λ is a denseness-function for this class.

Proof.

Let 𝒞 be a nowhere dense static graph class with denseness-function 𝖽, and let 𝒞 be the class of all temporal graphs 𝒢=(G,λ) with lifetime at most Λ and whose footprint G lies in 𝒞. We analyze the class of Gaifman graphs {Gf(𝒢Λ):𝒢𝒞}.

Fix 𝒢𝒞, let GGf:=Gf(𝒢Λ). We will refer to a vertex aVL of GGf as vertex node, temporal-edge node, or time node, respectively.

Step 1: 𝑮𝐆𝐟𝑳 is nowhere dense with 𝗱𝐆𝐟𝑳(𝒓):=𝗱(𝒓/𝟐).

Consider GGfL. This graph can be obtained from the footprint G by subdividing every edge uvE(G) once (resulting in a temporal-edge node ε) and multiplying this uεv path for every temporal edge (uv,t). Conversely, G can be obtained from GGfL by contracting every temporal-edge node with one of its neighbours.

We show that if we can find an r-subdivision of a clique Kq in GGfL, then there is an r/2-subdivision of Kq in G. From this we conclude that 𝖽GfL(r):=𝖽(r/2) is a denseness function of GGfL.

Fix r and q4, and assume that Kqrt(GGfL). Let η be a depth-r model of Kq in GGfL. In GGfL, every temporal-edge node ε=(uv,t) has degree 2 and is adjacent exactly to the nodes u and v. Consequently, no temporal-edge node in can be a branch-vertex of a depth-r clique model when q4, and hence all branch-vertices must lie in V. Additionally, each model-path of length in GGfL must alternate between V and , and therefore becomes a path of length at most /2 on V in G (after contracting all temporal-edge nodes with one of its neighbours). Internal vertex-disjointness of the model-paths is preserved under contraction. Thus, we obtain a depth-r/2 model of Kq in G, and therefore Kqr/2G.

By definition of 𝖽 as a denseness-function for 𝒞, we have K𝖽(r/2)r/2G for all r. By our arguments above, this implies K𝖽GfL(r)=K𝖽(r/2)rt(GGfL) for all r, and hence 𝖽GfL(r)=𝖽(r/2) is a denseness-function for the class of all such graphs GGfL.

Step 2: 𝑮𝐆𝐟 is nowhere dense with 𝗱𝐆𝐟(𝒓):=𝗱𝐆𝐟𝑳(𝒓)+𝟐𝚲.

Towards contradiction assume KrtGGf for :=𝖽GfL(r)+2Λ, and let η be a depth-r model of K in GGf.

Step 1 shows that GGfL cannot contain a depth-r topological minor isomorphic to K𝖽GfL(r). Thus, the only way the model η can “beat” this bound is by exploiting clique of time nodes L. Importantly, L can help in two ways: (i) by hosting branch-vertices, and (ii) by serving as internal vertices on model-paths for clique edges. We show that both effects are limited by |L|=Λ.

First, we consider the time nodes in L that are branch-vertices. Let B be the set of branch-vertices of η and denote by BL:=BL the branch-vertices in L and by B¬L:=BL the branch-vertices in GGfL. Since |L|=Λ, we have |BL|Λ and therefore |B¬L|Λ=𝖽GfL(r)+Λ.

Next, we consider the time nodes in L that are used by model-paths. Let F be the set of clique edges xy whose model path contains a time node of L as an internal vertex. Since model-paths have to be internally disjoint, each time node in L can be used by the model-path of at most one clique edge, and therefore |F||LBL|Λ. Let S be the set of endpoints (in B¬L) of the edges in F. Then |S|2|F|2Λ.

Define B:=B¬LS as the set of branch vertices outside L whose model-paths do not use L. It holds |B||B¬L|2Λ𝖽GfL(r). We claim that restricting η to the branch-vertices B yields a depth-r model of K|B| in GGfL. To that end, consider any two distinct x,yB. Then x,yL and xyF (otherwise xS or yS). Hence the model-path for xy does not go through L and must lie entirely in GGfL. Thus, GGfL contains K|B| as a depth-r topological minor, and in particular contains K𝖽GfL(r) as a depth-r topological minor. This contradicts 𝖽GfL being a denseness-function for GGfL.

Consequently, K𝖽GfL(r)+2ΛrtGGf for all r, and hence g(r)=𝖽GfL(r)+2Λ is a denseness-function for the class of all such graphs GGf.

For the degree encoding, we show a stronger result, namely that the maximum static degree of the Gaifman graph is bounded by the temporal total degree of 𝒢. Since graph classes of bounded maximum degree are nowhere dense, this immediately implies the desired result.

Lemma 19.

Let 𝒞 be a nowhere dense class of static graphs with denseness-function 𝖽, and consider the class of all temporal graphs 𝒞 with footprint in 𝒞 and maximum temporal total degree Δt. For 𝒢𝒞, let H:=Gf(𝒢Δt) be the Gaifman graph of the degree encoding of 𝒢. Then Δ(H)2Δt and, consequently, the class of all such graphs H is nowhere dense.

Proof.

Let GGf:=Gf(𝒢Δt) be the Gaifman graph of the degree encoding 𝒢Δt. Recall from the degree encoding that the vertices of GGf are V, where is the set of temporal edges. The binary relations are: 𝗌𝗈𝗎𝗋𝖼𝖾((e,t),v) and 𝗍𝖺𝗋𝗀𝖾𝗍((e,t),v), connecting every temporal edge to its endpoints; and 𝗉𝗌𝗎𝖼((e1,t1),(e2,t2)), which holds if and only if the two temporal edges share an endpoint and t1t2. Thus, in the Gaifman graph GGf: each temporal edge (e,t) is adjacent to its two endpoints; and two temporal edges (e1,t1) and (e2,t2) are adjacent if and only if they share a vertex in V and their times are comparable (which is always the case, since is a total order). We now bound the maximum degree of GGf in terms of the maximum temporal total degree Δt.

Let vV. By definition of Δt, there are at most Δt temporal edges incident with v, so in GGf the vertex v has at most Δt neighbours (all of them in ). There are no edges in GGf between two vertices of V. Hence degH(v)Δt. Let ε=(e,t) where e has endpoints u,vV (for directed graphs, u is the source and v the target; the argument is identical). Then the neighbours of ε in GGf are (1) its endpoints u and v (two vertices in V); and (2) all other temporal edges incident with u or with v (the 𝗉𝗌𝗎𝖼-neighbours). By the definition of Δt, there are at most Δt1 temporal edges at u different from (e,t), and at most Δt1 such edges at v. Therefore ε has at most (Δt1)+(Δt1) neighbours in , plus its two endpoint vertices. In particular, degH(x)2+2(Δt1)2Δt.

Combining both cases, the maximum degree of GGf is bounded by Δ(GGf)2Δt.

For the VIM encoding and the TIM encoding the nowhere dense preservation also follows from a stronger result: the parameters 𝗏𝗂𝗆 and 𝗍𝗂𝗆 bound the treewidth of the footprint of a temporal graph. Since graph classes with bounded treewidth are nowhere dense, the desired result follows directly from the treewidth bounds established in Lemmas 16 and 17.

Corollary 20.

Let 𝐂 be a class of temporal graph with VIM width at most 𝗏𝗂𝗆. Then the class of all Gaifman graphs {Gf(𝒢𝗏𝗂𝗆):𝒢𝐂} is nowhere dense. Equivalently, let 𝐂 be a class of temporal graph with TIM width at most 𝗍𝗂𝗆. Then the class of all Gaifman graphs {Gf(𝒢𝗍𝗂𝗆):𝒢𝐂} is nowhere dense.

5 Logic Cookbook (see full version)

A major motivation of our framework is reusability: in the full version, we provide a modular lexicon of FO/MSO formulas for temporal-graph properties across all four encodings (and, by design, extendable to future encodings). The cookbook covers over a dozen problems considered in the temporal graph literature including reachability notions (temporal path, reachability, restless path), reachability-based problems (separator/cut, connected component, temporal spanner), covering problems (matching, edge/vertex cover, dominating set), classic subgraph problems (temporal clique and independent set, colouring), and temporal parameters (feedback edge number, temporal path number). For each problem, we provide (i) a formal definition; (ii) a modular logic formula; (iii) metadata such as the supported encodings, the logical fragment (FO/MSO), and formula length.

As an illustration, we give the formula for Temporal Spanner (see [5, 29]) which is a sparse subgraph of a temporal graph that preserves temporal connectivity.

MSO Formula 5.3.13 temporal spanner

Purpose: there exists a set X such that for every u,vV there is a temporal u-v path in 𝒢 if and only if there is a temporal u-v path only traversing temporal edges in X

Logic: MSO Length: constant Encodings: Λ, Δt, 𝗏𝗂𝗆, 𝗍𝗂𝗆
φtspanner()=Xu,vV:(φpath(u,v)φEpath(u,v,X))

where φpath(u,v) checks if there is a temporal path from u to v and φEpath(u,v,X) checks if there is a temporal path from u to v only traversing temporal edges in X.

6 Future Work

Several directions for future research exist on the use of logic for temporal graphs.

With respect to temporal encodings, a natural direction is to identify other temporal parameters for which similar preservation and meta-theorems can be obtained. Possible candidates include the temporal feedback vertex number [27], the temporal cliquewidth [18], or a combination of underlying cliquewidth with lifetime or temporal total degree.

In the work introducing the TIM width, Enright et al. [19] present two meta-algorithms that characterise the classes of computational problems that are 𝙵𝙿𝚃 with respect to 𝗏𝗂𝗆 and 𝗍𝗂𝗆. For 𝗏𝗂𝗆, tractability is tied to a notion of temporal locality, while for 𝗍𝗂𝗆 this locality is further structurally restricted. This perspective reminds of first-order logic which is inherently limited to see only local properties of a graph. An interesting question is whether these classes of problems admit a precise logical characterisation, e. g., by a suitable fragment of FO or MSO logic, and how such a characterisation relates to the VIM and TIM encodings.

Finally, a broader direction is to investigate logical tools beyond FO and MSO meta-theorems, such as logical transductions, game-based techniques, and methods inspired by the Weisfeiler–Leman framework. Such tools may provide alternative ways to compare temporal graph classes and to reason about their structural and algorithmic properties. Recent work has begun to study isomorphisms for temporal graphs under reachability notions [4, 15]; an intriguing next step is to explore whether transductions or related techniques can be used to further compare temporal graph classes, in particular with respect to structural parameters and the computational complexity of temporal graph problems.

References

  • [1] Stefan Arnborg, Jens Lagergren, and Detlef Seese. Easy problems for tree-decomposable graphs. Journal of Algorithms, 12(2):308–340, 1991. doi:10.1016/0196-6774(91)90006-K.
  • [2] Binh-Minh Bui-Xuan, Florent Krasnopol, Bruno Monasson, and Nathalie Sznajder. Model checking with temporal graphs and their derivative, 2026. doi:10.48550/arXiv.2602.12446.
  • [3] Benjamin Merlin Bumpus and Kitty Meeks. Edge Exploration of Temporal Graphs. Algorithmica, 85(3):688–716, 2023. doi:10.1007/s00453-022-01018-7.
  • [4] Arnaud Casteigts, Timothée Corsini, and Writika Sarkar. Simple, Strict, Proper, Happy: A Study of Reachability in Temporal Graphs. Theoretical Computer Science, 991:114434, 2024. doi:10.1016/j.tcs.2024.114434.
  • [5] Arnaud Casteigts, Anne-Sophie Himmel, Hendrik Molter, and Philipp Zschoche. Finding Temporal Paths Under Waiting Time Constraints. Algorithmica, 83(9):2754–2802, 2021. doi:10.1007/s00453-021-00831-w.
  • [6] Arnaud Casteigts, Nils Morawietz, and Petra Wolf. Distance to Transitivity: New Parameters for Taming Reachability in Temporal Graphs. In Rastislav Královič and Antonín Kučera, editors, 49th International Symposium on Mathematical Foundations of Computer Science, volume 306, pages 36:1–36:17, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISSN: 1868-8969. doi:10.4230/LIPIcs.MFCS.2024.36.
  • [7] Justine Cauvi and Laurent Viennot. Parameterized Restless Temporal Path, 2025. doi:10.48550/arXiv.2507.05760.
  • [8] Dibyayan Chakraborty, Antoine Dailly, Florent Foucaud, and Ralf Klasing. Algorithms and Complexity for Path Covers of Temporal Dags, 2024. URL: https://hal.science/hal-04493029.
  • [9] Bruno Courcelle. Graph Rewriting: An Algebraic and Logic Approach. In Handbook of Theoretical Computer Science, Volume B: Formal Models and Semantics, pages 193–242. Elsevier, 1990. doi:10.1016/B978-0-444-88074-1.50010-X.
  • [10] Professor Bruno Courcelle and Dr Joost Engelfriet. Graph Structure and Monadic Second-Order Logic: A Language-Theoretic Approach. Cambridge University Press, USA, 1st edition, 2012.
  • [11] Marek Cygan, Fedor V. Fomin, Łukasz Kowalik, Daniel Lokshtanov, Daniel Marx, Marcin Pilipczuk, and Michał Pilipczuk. Parameterized Algorithms, volume 5. Springer, a edition, 2015.
  • [12] Tom Davot, Jessica Enright, and Laura Larios-Jones. Parameterised algorithms for temporally satisfying reconfiguration problems. In International Symposium on Algorithmics of Wireless Networks, pages 89–103. Springer, 2025. doi:10.1007/978-3-032-09120-8_7.
  • [13] Argyrios Deligkas, Michelle Döring, Eduard Eiben, Tiger-Lily Goldsmith, George Skretas, and Georg Tennigkeit. Parameterized Complexity of Temporal Connected Components: Treewidth and Temporal Path Number, 2025. doi:10.48550/arXiv.2510.05806.
  • [14] Argyrios Deligkas, Eduard Eiben, and George Skretas. Minimizing Reachability Times on Temporal Graphs via Shifting Labels. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 2023, 19th-25th August 2023, Macao, SAR, China, volume 5, pages 5333–5340, 2023. doi:10.24963/ijcai.2023/592.
  • [15] Michelle Döring. Simple, Strict, Proper, and Directed: Comparing Reachability in Directed and Undirected Temporal Graphs. In The 36th International Symposium on Algorithms and Computation, ISAAC 2025, volume 359, pages 27:1–27:21, Tainan, Taiwan, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025). doi:10.4230/LIPIcs.ISAAC.2025.27.
  • [16] H.-D. Ebbinghaus, J. Flum, and W. Thomas. Mathematical Logic. Springer, New York, NY, 1994. doi:10.1007/978-1-4757-2355-7.
  • [17] Heinz-Dieter Ebbinghaus and Jörg Flum. Finite Model Theory. Springer Science & Business Media, 1999.
  • [18] Jessica Enright, Samuel D. Hand, Laura Larios-Jones, and Kitty Meeks. Structural Parameters for Dense Temporal Graphs. LIPIcs, Volume 306, MFCS 2024, 306:52:1–52:15, 2024. doi:10.4230/LIPIcs.MFCS.2024.52.
  • [19] Jessica Enright, Samuel D. Hand, Laura Larios-Jones, and Kitty Meeks. Families of Tractable Problems with Respect to Vertex-Interval-Membership Width and Its Generalisations, 2025. doi:10.48550/arXiv.2505.15699.
  • [20] Jessica Enright, Kitty Meeks, George B. Mertzios, and Viktor Zamaraev. Deleting Edges to Restrict the Size of an Epidemic in Temporal Networks. Journal of Computer and System Sciences, 119:60–77, 2021. doi:10.1016/j.jcss.2021.01.007.
  • [21] Jessica Enright, Kitty Meeks, and Hendrik Molter. Counting Temporal Paths. Algorithmica, 87(5):736–782, 2025. doi:10.1007/s00453-025-01301-3.
  • [22] 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.
  • [23] Thomas Erlebach and Jakob T. Spooner. Parameterised Temporal Exploration Problems. Journal of Computer and System Sciences, 135:73–88, 2023. doi:10.1016/j.jcss.2023.01.003.
  • [24] Till Fluschnik, Hendrik Molter, Rolf Niedermeier, Malte Renken, and Philipp Zschoche. As Time Goes By: Reflections on Treewidth for Temporal Graphs. In Fedor V. Fomin, Stefan Kratsch, and Erik Jan Van Leeuwen, editors, Treewidth, Kernels, and Algorithms, volume 12160 of Lecture Notes in Computer Science, pages 49–77. Springer International Publishing, Cham, 2020. doi:10.1007/978-3-030-42071-0_6.
  • [25] Martin Grohe. Logic, Graphs, and Algorithms. Logic and Automata, pages 2 : 357–422, 2008.
  • [26] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding First-Order Properties of Nowhere Dense Graphs. J. ACM, 64(3):17:1–17:32, 2017. doi:10.1145/3051095.
  • [27] Roman Haag, Hendrik Molter, Rolf Niedermeier, and Malte Renken. Feedback Edge Sets in Temporal Graphs. Discrete Applied Mathematics, 307:65–78, 2022. Publisher: Elsevier. doi:10.1016/j.dam.2021.09.029.
  • [28] Anton Herrmann, Christian Komusiewicz, Nils Morawietz, and Frank Sommer. Timeline Problems in Temporal Graphs: Vertex Cover vs. Dominating Set. In Akanksha Agrawal and Erik Jan van Leeuwen, editors, 20th International Symposium on Parameterized and Exact Computation (IPEC 2025), volume 358 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:18, Dagstuhl, Germany, 2025. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.IPEC.2025.12.
  • [29] David Kempe, Jon Kleinberg, and Amit Kumar. Connectivity and Inference Problems for Temporal Networks. Journal of Computer and System Sciences, 64(4):820–842, 2002. doi:10.1006/jcss.2002.1829.
  • [30] Stephan Kreutzer. Algorithmic meta-theorems. In Finite and Algorithmic Model Theory, London Mathematical Society Lecture Note Series, pages 177–270. Cambridge University Press, 2011. editors: J. Esparza, C. Michaux, and C. Steinhorn.
  • [31] David C. Kutner and Laura Larios-Jones. Temporal Reachability Dominating Sets: Contagion in Temporal Graphs. Journal of Computer and System Sciences, 155:101–116, 2023. doi:10.1007/978-3-031-48882-5_8.
  • [32] Bernard Mans and Luke Mathieson. On the Treewidth of Dynamic Graphs. Theoretical Computer Science, 554:217–228, 2014. doi:10.1016/j.tcs.2013.12.024.
  • [33] George B. Mertzios, Hendrik Molter, Nils Morawietz, and Paul G. Spirakis. Temporal Graph Realization With Bounded Stretch. In 50th International Symposium on Mathematical Foundations of Computer Science, volume 345, pages 75:1–75:19, Dagstuhl, Germany, 2025. Leibniz International Proceedings in Informatics (LIPIcs). doi:10.4230/LIPIcs.MFCS.2025.75.
  • [34] Jaroslav Nešetřil and Patrice Ossona De Mendez. Sparsity: Graphs, Structures, and Algorithms, volume 28 of Algorithms and Combinatorics. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012. doi:10.1007/978-3-642-27875-4.
  • [35] Philipp Zschoche, Till Fluschnik, Hendrik Molter, and Rolf Niedermeier. The Complexity of Finding Small Separators in Temporal Graphs. Journal of Computer and System Sciences, 107:72–92, 2020. doi:10.1016/j.jcss.2019.07.006.