Abstract 1 Introduction 2 Preliminaries 3 Always Connected Graphs 4 General Graphs References

Brief Announcement: Exploring Word-Representable Temporal Graphs

Duncan Adamson ORCID School of Computer Science, University of St Andrews, UK
Abstract

Word-representable graphs are a subset of graphs that may be represented by a word w over an alphabet composed of the vertices in the graph. In such graphs, an edge exists if and only if the occurrences of the corresponding vertices alternate in the word w. We generalise this notion to temporal graphs, constructing timesteps by partitioning the word into factors (contiguous subwords) such that no factor contains more than one copy of any given symbol. With this definition, we study the problem of exploration, asking for the fastest schedule such that a given agent may explore all n vertices of the graph. We show that if the corresponding temporal graph is connected in every timestep, we may explore the graph in 2δn timesteps, where δ is the lowest degree of any vertex in the graph. In general, we show that, for any temporal graph represented by a word of length at least n(2dn+d), with a connected underlying graph, the full graph can be explored in 2dn timesteps, where d is the diameter of the graph.

Keywords and phrases:
Temporal Graphs, Word-Representable Graphs
Copyright and License:
[Uncaptioned image] © Duncan Adamson; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Mathematics of computing Graph algorithms
Related Version:
Full Version: https://arxiv.org/abs/2502.07496 [1]
Editors:
Kitty Meeks and Christian Scheideler

1 Introduction

Word-Representable graphs, first introduced by Kitaev and Pyatkin [12], are a subset of graphs that may be represented in a concise manner via a word (or string) of symbols. In these graph, the vertices are represented by the alphabet, while edges are defined by the structure of the word. See [10] and [11] for an overview of the main results on word-representable graphs.

Much work on word-representable graphs has focused on determining which such graphs are representable [12, 3, 9]. Such work has shown that a large number of graph classes are representable by word graphs, including three colourable graphs, circle graphs, and crown graphs. As such, the study of problems on these graphs are non-trivial.

In this work, we extend the notion of word-representable graphs to temporal graphs. Temporal graphs are a generalisation of static graphs, replacing the single edge set with an ordered sequence of sets. Each edge set is used to define a timestep (also known as a snapshot), during which the only active edges are those in the corresponding timestep. Temporal graphs have attracted a large amount of attention in recent years, with a particular focus on reachability [4, 6, 13] and exploration [2, 5, 7, 8, 14].

Our Contributions.

We present a set of results on the problem of exploring word-representable temporal graphs. This combines research on word-representable graphs, temporal graphs, and graph exploration. We provide two primary results. First, we show that for any word-representable temporal graph where each timestep is a fully connected graph, we can construct an exploration schedule requiring at most 2δn timesteps, where δ is the minimum degree of any vertex in the graph and n the number of vertices. Second, we show that for any word-representable temporal graph where the underlying graph is connected and the word representation requires at least n(2dn+d) symbols, we can construct an exploration schedule requiring 2dn timesteps, where d is the diameter of the graph, and n the number of vertices.

Related Work.

While there is a large body of work on both word-representable graphs and exploration of temporal graphs, we highlight a small number of papers in both fields of particular relevance. Regarding word-representable graphs, we point first to the work of Kitaev and Pyatkin [12] who introduced word-representable graphs as a tool for semigroup theory. From the prespective of structural results on word-representable graphs, in [3], Courcelle shows that circle graphs are word-representable. Halldorson et al. [9] strengthen this by showing that comparability graphs and all 3-colourable graphs a word-representable, as well as presenting communication from Limouzy that cover graphs are word-representable. On the negative side, Halldorson et al. show that it is NP-hard to determine if a given triangle free graph is word-representable.On the exploration of temporal graphs, we first mention the landmark paper by Erlebach et al. [7], which established many of the key ideas behind temporal graph exploration. In particular, they show a general O(n2) upper bound on the length of the fastest exploration schedule for a single agent on an always connected temporal graph. This is complemented by schedules of length O(n1.5k1.5logn) for graphs with treewidth k, O(n1.8logn) for planar graphs, O(n) for cycles with one chord, and O(nlog3n) for 2×n grids. Building on this, Erlebach and Spooner showed in [8] that an always connected temporal graph in which each timestep is at most k-edges inactive can be explored in O(knlogn) timesteps.

2 Preliminaries

Graphs and Temporal Graphs.

We define a graph G by a tuple containing a set V of vertices, and set EV×V of edges, each a pair of vertices. When writing an edge explicitly as (vi,vj) we call vi the start point and vj the end point of the edge. We call two vertices vi,vjV neighbours if (vi,vj)E. We denote by N(v)={vV(v,v)E} the set of neighbours of v.. The degree of a vertex vV, denoted Δ(v)=|N(v)|, is equal to the number of neighbours of v. A walk in a graph G is an ordered sequence of edges, e1,e2,,ek such that the end point of the ith edge is the start point of the (i+1)th edge. The start point of a walk is the start point of the first edge of the walk, and the end point of a walk is the end point of the last edge of the walk. Two vertices, vi and vj, are connected if there exists some walk starting at vi and ending at vj. We denote the set of all walks in a graph G by 𝒲(G). The length of a walk P=e1,e2,,ek, denoted |P| is the number of edges in the walk. A walk visits a vertex v if there exists at least one edge e such that ve. The distance between two vertices vi,vjV, denoted dist(vi,vj) is the walk of minimum length with vi as the start point and vj as the end point. We define the diameter of a graph as maxvi,vjVdist(vi,vj).

A temporal graph 𝒢 is a generalisation of a graph, defined over one set of vertices V, and T sets of edges, E1,E2,,ET. We refer to the graph formed from the vertex set V and the tth edge set, Et, as the tth timestep, denoted Gt=(V,Et). The lifetime of a temporal graph 𝒢=(V,E1,E2,,ET) is equal to the number T of edge sets in 𝒢. The underlying graph of a temporal graph 𝒢=(V,E1,E2,,ET), denoted U(𝒢), is the graph formed over the vertex set V and the union of all edge sets, giving U(𝒢)=(V,t[1,T]Et). A temporal walk is an extension of a walk, with each step being an edge-time pair, (e1,t1)(e2,t2)(ek,tk) such that, for every i[1,k1]:

  • the edge ei is active in the timestep Eti,

  • the end point of ei is the start point of ei+1, and,

  • ti+1>ti.

Additionally, ek must be active in timestep tk. Note that ti+1 may be greater than ti+1. In this case, assuming ei=(vj,vi), we say that an agent traversing this walk waits at vi for ti+1ti1 timesteps. A temporal walk P=(e1,t1),(e2,t2),,(ek,tk) visits a vertex v iff there is some edge ei in the walk such that vei. The length of a temporal walk containing k edges is equal to tk.

Words.

An alphabet Σ={1,2,,σ} is a finite set of symbols. A word (also known as a string) w is a finite sequence of symbols from a given alphabet. We assume, for the remainder of this paper, that our alphabet Σ is defined over some set of integers 1,2,,σ. The length of a word w, denoted |w| is the number of letters in the word. For i[1,|w|] let w[i] denote the ith letter of w. The set of all finite words over the alphabet Σ is denoted by Σ. Given n𝒩0, let Σn denote all words in Σ exactly of length n. Given two words w,v, we denote by wv the word formed by the concatenation of w and v, i.e. the word such that wv[i]=w[i], if i[1,|w|] or v[i|w|] if i[|w|+1,|w|+|v|]. Given a word wΣ and natural k0, let wk denote the word formed by k copies of w, satisfying |wk|=k|w| and wk[i]=w[imod|w|], i[1,k|w|]. Let alph(w)={𝚊Σi[|w|] s.t. w[i]=𝚊} be the alphabet of w.

Given a pair of words u,wΣ where |u||w|, u is a subsequence of w if there exists some set of indices i1,i2,,i|u| such that 1i1<i2<i|u||w| such that u=w[i1]w[i2]w[i|u|]. Given a set of symbols 𝒮Σ and word wΣ, the subsequence of w π𝒮(w) satisfies π𝒮(w)𝒮, and, u𝒮 either |u||π𝒮(w)| or u is not a subsequence of w.

Word-Representable (Temporal) Graphs.

Given a word wΣ, the graph represented by w, G(w), is constructed as follows. Let V=(v1,v2,,vn) be a set of n vertices, each labelled uniquely by some symbol from Σ=1,2,,n. Informally, G(w) contains the edge (vx,vy) iff the symbols x and y alternate in w. A pair of symbols, x,yΣ alternate in w if π{x,y}(w){(xy)k,(xy)kx,(yx)k,(yx)kyk0}. Thus, we define the edge set E as the set {(vx,vy)π{x,y}(w){(xy)k,(xy)kx,(yx)k,(yx)kyk0}}. A graph G is word-representable if there exists some word w such that G(w)=G.

Given a word wΣ, the temporal graph represented by w, TG(w), is constructed using G(w) as a basis. To determine the timesteps, we introduce the set of indices S1,S2,,ST[1,|w|] as the set of start points for each timestep. The value of each is computed recursively, with S1=1, and Si the index such that w[Si]alph(w[Si1,Si1]) and, Si[Si1,Si1],w[Si]alph(w[Si1+1,Si1]).

With this set of indices, the timestep t is defined with regard to the symbols appearing in the factor w[St,St+11] (or, w[ST,|w|] for the final timestep). Formally, given some edge (vx,vy) in the edge set E of G(w), the edge (vx,vy)Et iff either xalph(w[St,St+11]) (resp., xw[ST,|w|]) or yalph(w[St,St+11]) (resp., yw[ST,|w|]). We call any factor of w of the form w[Si,Si+11] a timestep factor.

3 Always Connected Graphs

In this section, we provide results on exploring always connected graphs. A temporal graph 𝒢 is always connected if there exists, at every timestep, exactly one connected component containing all vertices in 𝒢.

Lemma 1.

Let 𝒢=(V,E1,E2,,ET) be a word-representable temporal graph represented by the word w, such that 𝒢 is connected in every timestep. Then, given any vertex vxV, xalph(w[St,St+Δ(vx)+11]), t[1,TΔ(x)2], and xalph(w[STΔ(vx)1,|w|] where S1,S2,,ST are the set of start points of w.

Corollary 2.

Let 𝒢=(V,E1,E2,,ET) be a word-representable temporal graph represented by the word w, such that 𝒢 is connected in every timestep. Then the edge (vx,vy)EtEt+1Et+min(Δ(vx),Δ(vy)), t[1,Tmin(Δ(vx),Δ(vy))].

We now strengthen Lemma 1 and Corollary 2 to prove that each edge e in any word-representable always-connected temporal graph appears at least once in every set of δ+1 contiguous timesteps. The main idea is to propagate the constraints given implicitly in Corollary 2 across the graph. At a high level, we have that not only must some symbol x satisfy xalph(w[St,St+Δ(vx)+11], as given in Lemma 1, but also xalph(w[St,St+min(Δ(vx),Δ(vy))+11] as indicated by Corollary 2 and formally stated in Lemma 3. More generally, however, x must appear at least once between each occurrence of y, for any y such that vyN(vx). Thus, any bound on the number of occurrences of y can be propagated through the graph to all other symbols. By extension, we get a bound on the number of timesteps in which an edge may be absent. Lemma 3 formalises this idea.

Lemma 3.

Let 𝒢=(V,E1,E2,,ET) be a word-representable temporal graph represented by the word w, such that 𝒢 is connected in every timestep. Then the edge (vx,vy)EtEt+1Et+δ, t[1,Tδ], where δ=minvVΔ(v).

We now present our main theorem for this section, showing that any word-representable always-connected temporal graph may be explored in 2δn timesteps. The high-level idea behind this proof is to first construct a spanning tree on the underlying graph, then use a walk P exploring this tree to derive a temporal walk exploring the temporal graph. We do so by following the same set of edges as P, waiting at each vertex at most δ timesteps for the next edge to become available. As P can contain at most 2n edges, our temporal walk requires at most 2δn timesteps, giving the algorithmic result.

Theorem 4.

Let 𝒢=(V,E1,E2,,ET) be a word-representable temporal graph represented by the word w, such that 𝒢 is connected in every timestep. Then, 𝒢 can be explored in 2δ|V| timesteps starting at any vertex vx, where δ=minvVΔ(v).

4 General Graphs

We now consider general word-representable temporal graphs. We assume, without loss of generality, that all graphs in the section contain a single component in the underlying graph, noting that any graph that does not satisfy this can not be explored. As in Section 3, we start with some structural results on the word representations of these graphs.

Lemma 5.

Given a word-representable temporal graph 𝒢 represented by the word w containing the edge (vx,vy). Then, |π{x}(w)|1|π{y}||π{x}(w)|+1.

Lemma 6.

Let vx,vyV be a pair of vertices such that dist(vx,vy)=d. Then, |π{x}(w)|d|π{y}(w)||π{x}(w)|+d.

Lemma 7.

Let vx,vyV be a pair of vertices such that dist(vx,vy)=d. Further, let χi be the index of the ith occurrence of x in w, and let γj be the index of the jth occurrence of y in w. Then χidγiχi+d.

Corollary 8.

Given a word-representable temporal graph 𝒢, represented by the word w, U(𝒢)=(V,t[1,d]Et), where d is the diameter of U(𝒢).

From Lemmas 5, 6, 7 and Corollary 8, we have the main tools used to build our algorithmic result. At a high level, we use a similar technique to Theorem 4, building a temporal walk exploring the graph from a walk exploring the spanning tree of the underlying graph. Lemma 9 and Corollary 10 provide the last needed results for the approach, showing that each edge in the graph is inactive for at most d consecutive timesteps.

Lemma 9.

Given a word-representable temporal graph 𝒢, represented by the word w such that U(G) has a diameter of d. Then, given any edge (vx,vy) active in timestep t[1,Td1], t[t+1,t+d+1] such that (vx,vy)Et.

Corollary 10.

Given a word-representable temporal graph 𝒢, represented by the word w such that the underlying graph U(𝒢) has a diameter of d. Then, for any t[1,Td], U(𝒢)=(V,d[0,d]Et+d).

From Lemma 9 and Corollary 10, we now apply a similar technique to Theorem 4 to derive an algorithm for exploring word-representable temporal graphs of length at least n(2dn+d) in 2dn timesteps. Informally, we construct a exploration of U(𝒢) by way of an Eulerian walk on a spanning tree of U(𝒢). As each edge is active at least once every d timesteps per Corollary 10, this may be converted into a temporal walk exploring 𝒢 requiring at most 2dn timesteps.

Theorem 11.

Let 𝒢=(V,E1,E2,,ET) be a word-representable temporal graph, represented by the word w such that |w|n(2dn+d), where d is the diameter of the underlying graph U(𝒢)=(V,t[T]Et). Then, 𝒢 can be explored in at most 2dn timesteps.

References

  • [1] Duncan Adamson. Exploring word-representable temporal graphs, 2025. doi:10.48550/arXiv.2502.07496.
  • [2] Duncan Adamson, Vladimir V Gusev, Dmitriy Malyshev, and Viktor Zamaraev. Faster exploration of some temporal graphs. In 1st Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2022). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022.
  • [3] Bruno Courcelle. Circle graphs and monadic second-order logic. Journal of Applied Logic, 6(3):416–442, 2008. doi:10.1016/J.JAL.2007.05.001.
  • [4] Argyrios Deligkas and Igor Potapov. Optimizing reachability sets in temporal graphs by delaying. Inf. Comput., 285(Part):104890, 2022. doi:10.1016/J.IC.2022.104890.
  • [5] Konstantinos Dogeas, Thomas Erlebach, Frank Kammer, Johannes Meintrup, and William K Moses Jr. Exploiting automorphisms of temporal graphs for fast exploration and rendezvous. arXiv preprint arXiv:2312.07140, 2023. doi:10.48550/arXiv.2312.07140.
  • [6] 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.
  • [7] Thomas Erlebach, Michael Hoffmann, and Michael Kammer. On temporal graph exploration. Journal of Computer and System Sciences, 119:1–18, 2021. doi:10.1016/J.JCSS.2021.01.005.
  • [8] Thomas Erlebach and Jakob T. Spooner. Exploration of k-edge-deficient temporal graphs. In Anna Lubiw and Mohammad Salavatipour, editors, Algorithms and Data Structures, pages 371–384, Cham, 2021. Springer International Publishing. doi:10.1007/978-3-030-83508-8_27.
  • [9] Magnús M. Halldórsson, Sergey Kitaev, and Artem Pyatkin. Semi-transitive orientations and word-representable graphs. Discrete Applied Mathematics, 201:164–171, 2016. doi:10.1016/J.DAM.2015.07.033.
  • [10] Sergey Kitaev. A comprehensive introduction to the theory of word-representable graphs. In International Conference on Developments in Language Theory, pages 36–67. Springer, 2017. doi:10.1007/978-3-319-62809-7_2.
  • [11] Sergey Kitaev and Vadim Lozin. Words and graphs. Springer, 2015. doi:10.1007/978-3-319-25859-1.
  • [12] Sergey Kitaev and Artem Pyatkin. On representable graphs. Journal of Automata, Languages and Combinatorics, 13(1):45–54, 2008. doi:10.25596/JALC-2008-045.
  • [13] Kitty Meeks. Reducing reachability in temporal graphs: Towards a more realistic model of real-world spreading processes. In Conference on Computability in Europe, pages 186–195. Springer, 2022. doi:10.1007/978-3-031-08740-0_16.
  • [14] Othon Michail and Paul G Spirakis. Traveling salesman problems in temporal graphs. Theoretical Computer Science, 634:1–23, 2016. doi:10.1016/J.TCS.2016.04.006.