Temporal Explorability Games
Abstract
Temporal graphs extend ordinary graphs with discrete time that affects the availability of edges. We consider solving games played on temporal graphs where one player aims to explore the graph, i.e., visit all vertices. The complexity depends majorly on two factors: the presence of an adversary and how edge availability is specified.
We demonstrate that on static graphs, where edges are always available, solving explorability games is just as hard as solving reachability games. In contrast, on temporal graphs, the complexity of explorability coincides with generalized reachability (-complete for one-player and -complete for two player games). We show that if temporal graphs are given symbolically, even one-player reachability (and thus explorability and generalized reachability) games are -hard. For one player, all these are also solvable in and for two players, they are in , and , respectively.
Keywords and phrases:
Temporal Graphs, Explorability, Reachability, GamesCopyright and License:
2012 ACM Subject Classification:
Theory of computation Network games ; Theory of computation Representations of games and their complexity ; Mathematics of computing Graphs and surfaces ; Theory of computation Formal languages and automata theoryFunding:
This work has been supported by the EPSRC, projects EP/V025848/1 and EP/X042596/1 and by the Fonds de la Recherche Scientifique – FNRS under Grant n° T.0188.23 (PDR ControlleRS). The research was mainly performed when N. Mazzocchi was affiliated with the Institute of Science and Technology Austria where he was financed by the ERC-2020-AdG 101020093.Editors:
Patricia Bouyer and Jaco van de PolSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Two player zero-sum games on graphs are a common formalism in formal verification, especially reactive synthesis (see e.g. [21, 16, 34, 35]). The two players jointly determine an infinite path stepwise, where the owner of the current vertex gets to extend the path to a valid successor. One player aims to satisfy a given winning condition, such as reaching a target vertex, and the opposing player aims to prevent that. Under very general conditions, that are satisfied here, such games are determined, meaning that exactly one player has a winning strategy that guarantees a favourable outcome for them no matter their opponent’s choices. Solving a game refers to the algorithmic task to determine which player has a winning strategy.
Temporal graphs are a way to model dynamic systems: they extend graphs with discrete and global time and can specify for each edge at which times it can be traversed. Temporal graphs are typically given as sequence of graphs over the same vertex set, an encoding we refer to as explicit. For our purposes this is polynomially equivalent to encoding temporal graphs as ordinary graphs in which (directed) edges carry an explicit list of timestamps, which we also refer to as explicit encodings111This is trivial for timestamps in unary encoding; Allowing binary-encoded timestamps in the input does not impact the complexity of solving explorability games since winning plays necessarily use consecutive times and thus cannot exist if the edge relation is too sparse.. Alternatively, and more interestingly, we consider succinct symbolic representations where the availability of edges is given as logical predicate in the existential fragment of Presburger Arithmetic.
In this paper we study the computational complexity of solving games played on temporal graphs (where players’ choices are required to respect the temporal constraints on edges). Our focus lies on explorability games, where Player 1 wins if and only if all vertices of the graph are visited. Explorability generalizes reachability conditions in the sense that reachability games straightforwardly and in logarithmic space reduce to explorability games. On the other hand, explorability is a special case of so-called generalized reachability conditions of [17], where several target sets are given and at least one vertex must be reached in each.
For the benefit of readers unfamiliar with temporal graphs, or turn-based games, we start by providing some intuition to help appreciate the difficulties caused by the dynamic changes of the arena, as well as the presence of antagonistic choice. Consider first the one-player explorability game played on the arena in Figure 1(a). Starting in , Player 1 wins by exploring the graph as . From any other vertex there is no exploring path due to the non-availability of edges at time . An easy property that implies non-explorability of static graphs is the presence of two pairwise non-reachable vertices. Indeed, if two such vertices exists then any path can at most see one of them, hence not explore the graph. This can be turned into a full characterization of explorability even in the presence of an opponent (see Lemma 4). However, due to the temporal constraints on edges, this cannot naïvely be extended to temporal graphs. For example, arena is explorable yet is not reachable from starting at time 0, and vice versa. On the other hand, in arena (Figure 1(b)), for every pair of vertices at least one can reach the other starting at time . Yet, from no initial vertex and at no time, is explorable.
Figure 1(c) demonstrates that even if Player 1 wins the explorability game (as here from vertex ), she may not be able to enforce visiting the vertices in a particular order, as that can be influenced by her opponent’s moves. Dually, as for the game starting in vertex in , even if Player 2 wins, he may not be able to dictate which vertex is left unexplored.
Related Work.
Temporal graphs have been used to analyse dynamic networks and distributed systems in dynamic topologies, such as dissemination/propagation of information [9, 12, 24, 36] or the spread of diseases [38]. There is a large body of mathematical work that considers temporal generalizations of various graph-theoretic notions and properties [11, 18, 31]. Related algorithmic questions include graph colouring [28], travelling salesman [32], maximal matchings [27], and checking the existence of temporal cliques [29], Eulerian circuits [7], vertex-cover sets [3], and explorability [1, 2, 14] (called exploration). Several prior works on explorability assume structural properties that ensure that the graph is explorable. Questions then focus on the minimal time to explore. Pelc [33] provides several sufficient conditions on temporal graphs to be explorable. Spirakis and Michail [32] showed that without assumptions on the graph, checking explorability can be done in linear time for static graphs and is -complete for temporal graphs. In most of the works, a path in the temporal graph is allowed to wait at a vertex for an unbounded amount of time.
The edge relation is often deliberately left unspecified and sometimes only assumed to satisfy some weak assumptions about connectedness, frequency, or fairness to study the worst or average cases in uncontrollable environments. Depending on the application, one distinguishes between “online” questions (e.g. [19, 26]), where the edge availability is revealed stepwise, as opposed to the “offline” variant where all is given in advance. We refer to [13, 22, 30] for overviews of temporal graph theory and its applications.
Fijalkow and Horn [17] study games with generalized reachability objectives, which generalize not only reachability but also explorability games. Generalized reachability conditions are conjunctions of reachability conditions: aims to reach at least one vertex out of each of several target sets. Explorability thus corresponds to the case where every vertex forms a singleton target set. Solving generalized reachability games is -complete [17], but in polynomial time if all target sets are singletons.
Reachability and parity games played on (symbolically represented) temporal graphs have been introduced in [6]; solving these games is -complete. The lower bound was shown by reduction from the emptiness problem for unary alternating finite automata, crucially relying on the presence of antagonistic choice. As in [6], our notion of temporal graphs assumes that some edge must be traversed at every unit time. Waiting (not moving the token for a while) as occasionally permitted [30, 3] can be modelled by adding self-loops.
Turn-based games involving temporal constraints have also been studied in the context of games played on the configuration graphs of timed automata [4]. Solving timed parity games is complete for [8, 25] and the lower bound already holds for reachability games on timed automata with only two clocks [23]. However, the time in temporal graphs is discrete as opposed to the continuous time semantics in timed automata. A direct translation of (games on) temporal graphs to equivalent timed automata games requires two clocks: one to hold the global time used to check the edge predicate and one to ensure that time progresses one unit per step. Fearnley and Jurdziński [15] showed that the reachability problem (solving one-player reachability games) for two-clock timed automata is already -hard. Our lower bound constructions have a similar flavour but are incomparable in that they do not re-prove nor are implied by their result. They make crucial use of resetting of clocks which is impossible in our model. Our construction in turn uses either antagonistic choice (Theorem 8) or the more powerful transition guards in symbolic representations (Theorem 9).
| Static | Explicit | Symbolic | ||
|---|---|---|---|---|
| One-player | Reachability | -complete | -complete | -complete |
| [5, Theorem 4.18] | [Theorem 6] | [Corollary 14] | ||
| Explorability | -complete | -complete | -complete | |
| [Theorem 5] | [Theorem 7] | [Corollary 14] | ||
| Gen. Reach | -complete | -complete | -complete | |
| [17, Theorem 3] | [Theorem 6] | [Corollary 14] | ||
| Two-player | Reachability | -complete | -complete | -complete |
| [21] | [Theorem 6] | [6, Theorem 2] | ||
| Explorability | -complete | -complete | -hard; In | |
| [Theorem 5] | [Theorem 8] | [Corollary 14] | ||
| Gen. Reach | -complete | -complete | -hard; In | |
| [17, Theorem 1] | [Theorem 6] | [Corollary 14] |
Contributions.
We study the complexity of solving explorability games and contrast the worst-case complexity for related decision questions for games played on static graphs versus temporal graphs. It turns out that explorability is no harder than reachability on static graphs whereas on temporal graphs, explorability games exhibit the hardness of generalized reachability when the temporal edge availability is given explicitly. For temporal explorability games with a succinct, symbolic representation, we have -hardness for both variants but a - complexity gap for two-player games. Specifically,
-
1.
on static graphs, solving explorability games is complete for polynomial time (and -complete for one-player games);
-
2.
on explicitly represented temporal graphs, explorability games are -complete (-complete in the one-player variant);
-
3.
reachability and thus explorability games on symbolically represented temporal graphs are -hard even in the single-player variant. This strengthens the known lower bound from [6] which required a second antagonistic player.
Figure 2 summarizes these and related claims. Our most involved constructions are the lower bounds, both from the satisfiability of quantified Boolean formulae (QBF).
2 Notations
Definition 1 (Temporal Graphs).
A temporal graph is a directed graph where are vertices and is the edge availability relation that maps each pair of vertices to the set of times at which the respective directed edge can be traversed. If we call an -successor of and write . We call static if for all , is either or . Its horizon is , that is, the largest finite time at which any edge is available, or if no such finite time exists.
Naturally, one can unfold a temporal graph into its expansion up to time , which is the static graph with vertices and if and only if . We denote by the expansion of a temporal graph , its expansion up to its horizon . See for instance Figure 3 for the expansion of a temporal graph (up to its horizon ).
Complexity bounds for decision problems about temporal graphs very much depend on the representation of the input. We will say a temporal graph is represented explicitly if it is given as sequence of directed graphs, one per unit time from up to its (finite) horizon. We also consider a symbolic representation where the edge relation is represented as a formula in the existential fragment of Presburger Arithmetic (PA), the first-order theory over natural numbers with equality and addition. That is, the formula with one free variable represents the set of times at which an edge from to is available as . We use common syntactic sugar including inequality and multiplication with constants.
In this representation, checking if an edge is available at a given time, i.e., checking whether a given PA formula is satisfied by a given valuation, is -complete (and in polynomial time if the number of quantifiers are fixed) [37, Corollary 1]. The symbolic representation of a temporal graph can be exponentially more succinct than the explicit one: using repeated doubling one can express exponentially large values. This representation is also at most exponentially larger because the Presburger-definable edge relation must be ultimately periodic with base and period at most exponential [20].
Definition 2 (Games on graphs).
A game is played by two opposing players. It consists of a directed graph , a partitioning of the vertices into those controlled by Player 1 and Player 2 respectively, and a winning condition. We refer to as the arena of the game.
The game starts with a token on an initial vertex and is turn-based, where in round , the owner of the vertex occupied by the token moves it to some successor. This way an infinite path called a play is generated based on choices made by each player given the current round and vertex. A play is won by Player 1 if it satisfies the given winning condition, and by Player 2 otherwise.
A strategy for Player is a recipe for how to move. It is a function from finite paths ending in a vertex in to some successor. A strategy is winning from if Player wins every play that starts in and during which all decisions are according to .
We call a vertex winning for Player if there exists a winning strategy from , and call the subset of all such vertices the winning region for that player. The main algorithmic question is to solve a game, meaning in other words to compute the winning regions for a given arena and winning condition. We consider the following winning conditions.
-
Reachability towards a given set of target vertices. This is satisfied by those plays that eventually visit a vertex in .
-
Generalized Reachability towards target sets . This is satisfied by those plays that visit at least one vertex of every target set .
-
Explorability is the condition that asks that eventually every vertex in is visited.
Note that explorability is a special case of generalized reachability where every vertex corresponds to one target set .
We study games played on the expansion of a given temporal graph , where the ownership of vertices and winning condition are defined on the underlying temporal graph and lifted to the expansion of . That is, for any time and , the vertex is owned by Player . Similarly, (generalized) reachability conditions are defined in terms of target sets and explorability asks to visit every vertex in .
3 Static Graphs
We first discuss the bounds of explorability games for both one and two player variants, on static graphs, i.e., every edge is available at any time.
Lemma 3.
For every arena and vertices one can construct (in logarithmic space) an arena such that , , and Player 1 wins the reachability game on from to if, and only if, she wins the explorability game on .
Proof.
Without loss of generality, assume that and that each vertex has at least one outgoing edge. We construct as follows. Firstly, for every edge between vertices , introduce a new vertex that can either move to or reset, i.e. move back to . Secondly, from target there exists an edge to every other vertex.
We claim that Player 1 wins the reachability game on if and only if she wins the explorability game on . Indeed, if Player 1 does not win on , then she cannot visit on either arena and therefore loses in both. Conversely, if Player 1 does win on , then she can explore by repeatedly moving from to ; visit a previously unseen vertex, then reset to . Note that a reduction from a one-player reachability game where Player 1 owns all the vertices will construct another one-player explorability game where this still holds.
The following characterization of explorability games is adapted from [17, Theorem 4], where denotes that Player 1 wins the reachability game from with target .
Lemma 4.
Consider an arena with vertex set and let be an initial vertex. Player 1 wins the explorability game from if, and only if, both 1) for all either or ; and 2) for all , .
Proof.
Suppose both conditions 1 and 2 are true. Point 1 implies that there exists a linearization of all vertices such that . By Point 2 we have that and therefore there is such a linearization of with . Consequently, for all there exists a Player 1 strategy that wins the reachability game from to . Player 1 can follow the from until is reached, then switch to and so on, until all vertices have been visited.
Suppose we have an arena where the first condition is false: there are with and . Regardless of the starting vertex , once a play visits , Player 1 cannot ensure to visit from then on (or vice versa). Finally, if the second condition is false then there must be one vertex that Player 1 cannot ensure to visit from .
Theorem 5.
Solving one-player (respectively two-player) explorability games on a static graph is complete for (respectively ).
Proof.
The hardness is a consequence of Lemma 3. Note that the explorability game constructed from a one-player reachability game is also one-player. As one and two-player reachability games are -hard and -hard respectively, the lower bounds follow. The upper bounds follow from Lemma 4, observing that at most reachability queries are necessary to verify the two conditions in the lemma. These queries can be done in in the one-player case, and in the two-player case.
4 Explicitly represented Temporal Graphs
Before discussing explorability games, we first remark that solving reachability and generalized reachability games have the same complexity on explicitly represented temporal graphs and on static graphs. This is because for any temporal graph one can construct its expansion , which is only polynomially larger assuming explicit encodings, and modify the winning conditions appropriately to get a game on this static graph: every target vertex in gives rise to target vertices in for all times .
This reduction allows transferring complexity upper bounds for solving games on static arenas [17].
Theorem 6.
Assuming explicit encodings, solving one-player games on temporal graphs is -complete for reachability conditions and -complete for generalized reachability. Solving two-player games on temporal graphs is -complete for reachability and -complete for generalized reachability.
Note that an explorability game on a temporal graph corresponds to a generalized reachability game on its expansion as outlined above. However, the target sets are no longer singleton sets and therefore the improved (. resp. ) upper bounds provided in [17] for (one resp. two-player) generalized reachability with singleton targets do not apply to explorability on temporal graphs. For example, the explorability game on (Figure 1) corresponds to the generalised reachability game on its expansion (Figure 3) with targets , , , and , where are all possible times up to the horizon.
In contrast to games on static arenas, where explorability is not harder than reachability, we will see that on temporal graphs explorability is as hard as generalized reachability.
Theorem 7.
Solving one-player explorability games on an explicit temporal graph is -complete.
Proof.
The -hardness is due to Michail and Spirakis [32, Proposition 2] by reduction from the Hamiltonian Path problem. Indeed, a directed graph with vertices has a Hamiltonian path if and only if it can be explored in exactly steps. A matching upper bound can be achieved by stepwise guessing an exploring path of length at most , which is polynomial given that the input graph is explicitly represented.
We now consider the impact of an antagonistic player for explorability on temporal graphs. A key element of our lower bound construction is the interaction of antagonistic choice and the passing of time. Our reduction, from QBF, relies on a time-bounded final “flooding phase” that allows exploration only if sufficient time is left, and which can only be guaranteed by winning the preceding QBF game.
Theorem 8.
Solving two-player explorability games on explicit temporal graphs is -complete.
Proof.
The upper bound for solving explorability games on a temporal arena follows from solving the generalized reachability game on the expansion of , where we have a target set for every vertex of . Generalized reachability games can be solved in [17, Theorem 1].
We provide a matching lower bound using a reduction from QSAT. Given a QBF formula , we construct a two-player explorability game on a temporal graph so that Player 1 wins iff is true. Let refer to the matrix of the given formula , that is, each is a disjunction of at most literals. The game has vertices , where
-
the vertices , and are controlled by Player 1.
-
the vertices and are controlled by Player 2.
The game is played in phases, each of a fixed length, as follows.
-
1.
In the initial phase, from time to , the game starts from and visits all clause vertices of in order and then ends up in the vertex corresponding to the first existential quantifier. Formally, the edges available during this phase are, for all , . Edges of the initial phase are drawn in red in the example in Figure 4.
-
2.
The selection phase, from time to , the game visits the vertices corresponding to the quantifiers in order of their appearance in the formula. Depending on whether the quantifier is (or ), Player 1 (respectively Player 2) chooses to visit a vertex corresponding to either a positive or negative literal for each variable. The edges available during this phase are for all , . Corresponding edges are in blue in Figure 4 and corresponds to choosing a valuation for the variables in the formula .
-
3.
The evaluation phase, at time and , starts from vertex , where Player 2 selects a clause by moving to vertex . Formally, we have for all , . From , Player 1 has the choice to visit a literal vertex at time if is contained in the clause , where is a literal. After this phase, all vertices in have been visited as well as half of . In Figure 4, edges for the clause selection and literal selection are in green.
-
4.
The game ends after a flooding phase that lasts for exactly steps starting from time . That is, all edges become unavailable from time onwards. During this phase, an edge is available from a literal vertex to both literal vertex and . Formally, the edges , for all and , where , are available at times . Thus, in this phase Player 1 can visit exactly of the possibly unexplored vertices. The flooding phase is shown in yellow in Figure 4.
Suppose the QBF formula is true. Then the -player has a strategy to assign values to the variables (for odd ) to ensure that is true. By following the same choices in the selection phase (moving if is set to and otherwise), Player 1 guarantees that when is reached, the jointly chosen variable assignment satisfies . At this point the play has already visited exactly one vertex among and for all . Moreover, no matter which vertex is chosen by Player 2 in the next step, the corresponding clause is also satisfied by assignment . By construction, this means there exists a literal such that vertex has been visited before. The Player 1 can then move to end the evaluation phase. Finally, in the flooding phase, Player 1 can freely move to visit the remaining literal vertices not visited thus far. This guarantees that indeed, all vertices have been visited and Player 1 wins the explorability game.
If the QBF instance is not satisfiable, then the -player has a strategy to assign values to the to ensure that is false. By following the same choices during the selection phase (moving if is set to and otherwise), Player 2 guarantees that when is reached, the jointly chosen variable assignment does not satisfy , meaning that there is some clause that is not satisfied. In the evaluation phase, the strategy then picks as the successor from . Consequently, all successors of must be vertices that have already been seen in the play. This means that exactly of the literal vertices are not yet visited. However, the game ends after the following of the flooding phase. Therefore, one of the literal vertices must be left unexplored.
5 Symbolically represented Temporal Graphs
We now consider games on temporal graphs that are given in a succinct representation. More precisely, we assume that the arena is given as the underlying (static) graph and for every edge, the set of times at which it is available is represented by a formula in the existential fragment of Presburger Arithmetic (PA). Recall that evaluating for a given PA formula and time is in . We call this representation of temporal graphs symbolic. Symbolic representations that are equally as powerful as PA, such that they can represent semi-linear sets, include the likes of solving a union of linear equations and commutative context-free grammars [10]. Finding a satisfying valuation for both of these encodings of semi-linear sets has also been shown to be in , much like PA. We use PA as the formulae produced are concise and easy to understand after only a brief viewing. There are other concise encodings (such as the inclusion of the universal fragment of PA) that could be used for a symbolic temporal graph, however the problem of finding membership or satisfiability of a given value may be too complex for the encoding to be efficient. For example, satisfiability with respects to the universal fragment of PA is exponential and not in .
Theorem 9.
Solving one-player symbolic temporal reachability games is -hard.
Proof.
We reduce QSAT to one-player temporal reachability with symbolic time encoding. Consider a quantified Boolean formula where is a propositional formula with variables in . Without loss of generality assume that the quantifiers alternate strictly, starting and ending with existential quantifiers (introduce at most useless variables otherwise). We show how to construct the symbolic one-player game such that is satisfiable if and only if some target vertex of can be reached. We use elapse of time to encode valuations of variables of . At a time , since is quantifier-free, determining whether the valuation makes true can be checked with a single transition that is available exactly at time . The difficulty arises from encoding of the “adversarial” behaviour of universal quantifiers. To do so, we leverage both the graph structure and the Presburger arithmetic.
In our encoding, time is sectored into segments of 4 bits. The horizon of is thus . For every and time , we call , , , and the four bits of the th most significant sector, i.e., the bits at indices , , and in the binary expansion of . In particular, and are respectively the most and the least significant bits. Intuitively, in the sequel we use to represent the chosen value of variable , we control overflows of with assumption on and , and is an extra bit acting as buffer, to allow spending time without influencing the others. In the sequel, we define constrains on such bits. To do so, for all and all , we require the th least significant bit of a given time to be . This can be expressed thanks to following Presburger formula, which states that the th least significant bit in the binary expansion of equals .
In the following, we write , where and as a shorthand for the formula for checking the corresponding bits.
In , each quantifier will have a corresponding vertex. If is existentially quantified, the vertex evaluates thanks to a self-loop which also set . In other words, Player 1 can use the self-looping transition of for spending time (not more than steps since must be ) which in particular leaves him possibility to set the bit as an encoding the value of . Additionally, the non-looping transition of is available only when the bit is . See the left gadget of Figure 5. Observe that, if is entered at time where , there are exactly two times when can be exited, and and only differ on the bit . Formally, , . This is a direct consequence of the availability of both outgoing transitions of leaving only the bit as degree of freedom to Player 1. We shall prove that vertices encoding existential quantifiers are the only source of branching in . If is universally quantified, the self-loop of the vertex only serves to set , the evaluation of being driven by vertices encoding existential quantifiers and auxiliary vertices , and . See the right gadget of Figure 5. The vertex admits two behaviours. If is entered at a time when , then exits toward the vertex encoding the next existential quantifier. Otherwise, and then backtracks toward the auxiliary vertices of the previous universal quantifier. The elapsing of time while backtracking will set to 1, and then sets it back to 0. If , the side effect of backtracking is to switch from 0 to 1. Otherwise, , and the side effect of backtracking is to switch from 0 to 1, which triggers a further backtrack in . To end the construction of , we add two more vertices (to check the valuation of encoded by elapse of time) and (to end the cascade of backtrack). A complete picture is given when has 5 quantifiers in Figure 6. The quantifier-free Presburger formula is defined as where every positive occurrence in is replaced by in and every negative occurrence is replaced by . The size of , in particular the encoding of edges availability is discussed at the end of the proof.
Next, we prove that is satisfiable if and only if admits a path from to composed of exactly edges, thanks to the unrestricted self-loop on . The argument holds by induction on the odd number of quantifiers. In the base case, and has three vertices and . We show that when is entered at time , it can be exited only at time and . By construction, can only be exited toward that has a single outgoing edge toward . Hence, the edge from to can only be traversed at time or where and respectively. By definition of , the vertex is reachable if and only if is satisfiable.
Now, assume that has an odd number of quantifiers. Let where . For all , we denote the formula where takes value and takes value . Observe that is a quantified Boolean formula without free-variable. For all , by induction hypothesis admits a path from to composed of exactly edges if and only if is satisfiable. Intuitively, we construct such a path of from to based on a path of from to . This is effective since is a subgraph of where and in match respectively with and in . In fact, has an horizon of because has quantifiers, and has a self-loop available at all time in this horizon, that is, cannot modify the bits of bit sectors 1 and 2. Also, is entered only when the least significant bits of the time are zero due to the availability of the edge from to , and is leaved only if the bits overflow due to as a direct consequence of the availability of the edge from to .
We show that when is entered at time , it can be exited only at time , . Then is visited and since in both cases , by construction, the vertex is visited at time or (where switched to ). Let where and where . In both cases, . For all , by induction hypothesis, there is a path from at time to at time if and only if is satisfiable. If and are not satisfiable, then cannot reach from and is not satisfiable. Otherwise, the two paths in that reach at and can be extended to reach at time and respectively (where switched to ). Since in both cases, the vertex is visited at time and respectively (where switched to ). Let where and where . For all , by induction hypothesis, there is a path from at time to at time if and only if is satisfiable. If and are not satisfiable, then cannot reach and is not satisfiable. Otherwise, the two paths in that reach at and can be extended to reach at time and respectively (where switched to ). Since , the vertex is visited at time and respectively. Hence, admit a path from to if and only if there is such that and are satisfiable, i.e., if and only if is satisfiable.
It is worth emphasizing that, when admits a path from to , it can be constructed with a memoryless strategy. In the above reduction, for each vertex that encodes an existential quantifier, the inductively constructed strategy aims in at evaluating such that the next time is visited its outgoing edge will be available. Hence, in , the strategy is solely based on the value . Since the vertices encoding existential quantifiers are the only source of branching in , the strategy is memoryless.
Finally, we show that the size of is polynomial in the size of . Here after, the size of the formula corresponds to the number of symbols to write it. The size of a symbolic temporal graphs , is defined by . The graph has at most vertices, and all availability are expressible by a Presburger formula of polynomial size in . Since the horizon of is , each edge availability can be expressed as a conjunction of at most formulas of the form .
Corollary 10.
Solving reachability games on one-player symbolic temporal graphs with at most temporal edges is -hard, i.e, hard for the -th level of the polynomial hierarchy, where .
Proof.
In the proof of Theorem 9, the number of quantifiers in determines the number of temporal edges used in the constructed symbolic temporal graph. The gadget to encode existential quantifiers uses two temporal edges and the one for universal quantifiers uses nine temporal edges, and there is one edge for the quantifier-free formula (see Figure 5). Note that if a quantifier block contains more than variables, we can blow up the number of bits polynomially by having bits for , while keeping the number of temporal edges the same, thus obtaining a reduction from QSAT with a fixed number of quantifiers. A similar -hardness also holds for a different choice of . Note that this is in contrast with the -hardness proof for two-player reachability games on symbolic temporal graphs, where the problem is -hard even with just one temporal edge [17, Theorem 1].
A restriction that makes the problem easier is allowing waiting. It is typical in study of temporal graphs to allow waiting for an arbitrary amount of time in temporal paths, i.e., instead of having to take an edge at every timestep, edges are traversed at increasing (but not necessarily consecutive) timesteps. This corresponds to having a loop on all vertices that can be traversed at any time. In case of two-player games, this allows Player 2 to stall infinitely and therefore is not interesting. The following remark states that the explorability on a one-player temporal arena with symbolic encoding becomes easy if waiting is allowed. We show that this holds even for generalized reachability objectives.
Theorem 11.
Assuming symbolic encodings, solving one-player games on temporal graphs with waiting is -complete for reachability, explorability and generalized reachability.
Proof.
The lower bound follows from checking satisfiability of an existential Presburger formula, which is known to be -complete [37]. Given a PA formula with no free variables, consider the symbolic temporal graph , such that is the only available edge, where is a variable that does not occur in . The vertex is reachable from if, and only if, is true. For the upper bound, note that the length of a shortest witnessing path, measured by the number of edges traversed, is at most quadratic in the number of vertices of the graph. The upper bound can be shown by guessing the vertices visited along a play, together with the time they are visited first. The intermediate path between two such vertices can only visit linearly many vertices as no vertex is repeated in such a path. If a revisit is necessary, there is another path which waits instead. If a path does exist, then the time at which it is visited will at most be exponentially large and consequentially can be guessed in polynomial time. Therefore, by guessing the path and the times at which corresponding edges are taken, we obtain an algorithm.
Remark 12.
In [15], Fearnley and Jurdziński introduce counter-stack automata to prove that reachability in two-clock timed automata is -complete. The model of counter-stack automata bears similarity with the technique used in proof of Theorem 9. Indeed, both rely on a linear ordering of counters (being bits in our model) and that incrementation of a counter can only be performed when the value of all smaller counters is known. When elapse of time sets a bit to 1, the smaller bits are reset to 0. In [15] counters can be reset, which correspond to reset of clocks. Our proof cannot be derived from [15] because time cannot be reset in our setting. Vice versa, our proof uses existential Presburger formula with arbitrarily many variables which is not known to be expressible with a two-clock automata.
Theorem 13.
Solving two-player symbolic temporal generalized reachability games is in . It is in for one-player games.
Proof.
Consider a generalized reachability game on arena and with targets . Note that under symbolic encodings, temporal graphs are ultimately periodic, meaning that there are so that for every , if, and only if, . This is because the set of times at which any given edge is available is defined using a Presburger formula and thus semilinear [20]. Moreover, the least common multiple of the periods of the individual edges is therefore a period of (all edges in) the temporal graph and we can bound and to be at most exponential in the size of the input.
We can therefore construct an at most exponentially larger reachability game in which control states record the set of states (of ) that have already been visited, and the time up to and within the period. That is, define the arena where and with edge relation so that if and either or both . Player 1 owns a state in iff she owns in . Finally, define the reachability target set in the constructed game as
Notice that any play from in uniquely corresponds to a play from state at time in the original game . The second components within control states in are non-decreasing and record the set of states visited by the corresponding play in . By definition of our reachability target , we see that a play is winning for Player 1 in the constructed reachability game if, and only if, the corresponding play is winning for Player 1 in the generalized reachability game .
Note that the size of is , where . The claim thus follows from the (known) facts that two-, and one-reachability games can be solved in polynomial time and logarithmic space, respectively.
Corollary 14.
Assuming symbolic encodings, solving one-player games on temporal graphs is -complete for reachability, explorability and generalized reachability. Solving two-player games on temporal graphs is -complete for reachability and -hard and in for explorability and generalized reachability.
6 Conclusion
We study the complexities of solving explorability games on temporal graphs, splitting into several cases based on the way temporal edges are defined and whether one or two-players are active.
First, we transfer results for games on static graphs and show that there, solving explorability games is -complete for the one-player and -complete for the two-player case.
On explicitly represented temporal graphs in which waiting is permitted, it was known that checking the existence of an exploring path, i.e. the solving one-player explorability games is -complete [30]. We show here that even for the more general case where waiting is not always allowed the problem remains in . We further show that solving two-player games on explicitly represented temporal graphs is -complete for reachability, explorability, and generalized reachability conditions. The existing lower bound for reachability [6] crucially relies on binary encodings and the presence of an antagonistic player.
The main technical contribution of this work is a strong lower bound for symbolically represented temporal graphs: We show that already single-player reachability (and thus explorability) games are -hard. Our construction uses specially crafted Presburger constraints to ensure that all possible choices of an “opponent” in a QBF game are verified. Towards upper bounds, we show that even two-player generalized reachability games are solvable in deterministic exponential time, which is better than the exponential space procedure one gets for free (by encoding time into the state space) but not quite matching our lower bound. We conjecture that indeed, solving two-player games for each of these three objectives remains in , mainly because raising the lower bound remained elusive. To show -hardness one needs to encode non-trivial and recoverable information into timestamps. Our attempts to reduce from CTL Satisfiability or Countdown Games so far required to either construct Presburger constraints to compare bits that are exponentially far apart in the binary expansion of a given free variable (time), or to construct gadgets that “copy” bitstrings from lower to higher significant bit positions. It is worth noting that any such construction must only be correct for explorability but not for the simpler reachability conditions (which are -complete [6]).
On the other hand, showing -membership would require either find a polynomially bounded untimed game gadgets to evaluate any given PA formula or to encode the antagonistic behaviours arithmetically.
References
- [1] 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), volume 221 of Leibniz International Proceedings in Informatics (LIPIcs), pages 5:1–5:10. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.SAND.2022.5.
- [2] Eleni C. Akrida, George B. Mertzios, Paul G. Spirakis, and Christoforos Raptopoulos. The temporal explorer who returns to the base. Journal of Computer and System Sciences, 120:179–193, 2021. doi:10.1016/j.jcss.2021.04.001.
- [3] Eleni C. Akrida, George B. Mertzios, Paul G. Spirakis, and Viktor Zamaraev. Temporal vertex cover with a sliding time window. Journal of Computer and System Sciences, 107:108–123, 2020. doi:10.1016/j.jcss.2019.08.002.
- [4] Rajeev Alur and David L. Dill. A theory of timed automata. Theoretical Computer Science, 126(2):183–235, 1994. doi:10.1016/0304-3975(94)90010-8.
- [5] Sanjeev Arora and Boaz Barak. Computational Complexity: A Modern Approach. Cambridge University Press, 1st edition, 2009.
- [6] Pete Austin, Sougata Bose, and Patrick Totzke. Parity games on temporal graphs. In International Conference on Foundations of Software Science and Computational Structures, pages 79–98. Springer Nature Switzerland, 2024. doi:10.1007/978-3-031-57228-9_5.
- [7] Benjamin Merlin Bumpus and Kitty Meeks. Edge exploration of temporal graphs. In Combinatorial Algorithms, pages 107–121. Springer International Publishing, 2021. doi:10.1007/978-3-030-79987-8_8.
- [8] Krishnendu Chatterjee, Thomas A. Henzinger, and Vinayak S. Prabhu. Timed Parity Games: Complexity and Robustness. Logical Methods in Computer Science, Volume 7, Issue 4, December 2011. doi:10.2168/LMCS-7(4:8)2011.
- [9] Hongjiang Chen, Pengfei Jiao, Huijun Tang, and Huaming Wu. Temporal graph representation learning with adaptive augmentation contrastive. In Machine Learning and Knowledge Discovery in Databases: Research Track, pages 683–699. Springer Nature Switzerland, 2023. doi:10.1007/978-3-031-43415-0_40.
- [10] Dmitry Chistikov, Christoph Haase, and Simon Halfon. Context-free commutative grammars with integer counters and resets. Theoretical Computer Science, 735:147–161, 2018. Reachability Problems 2014: Special Issue. doi:10.1016/j.tcs.2016.06.017.
- [11] Jean-Lou De Carufel, Paola Flocchini, Nicola Santoro, and Frédéric Simard. Cops & robber on periodic temporal graphs: Characterization and improved bounds. In Structural Information and Communication Complexity, pages 386–405. Springer Nature Switzerland, 2023. doi:10.1007/978-3-031-32733-9_17.
- [12] 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-23, pages 5333–5340. International Joint Conferences on Artificial Intelligence Organization, August 2023. doi:10.24963/ijcai.2023/592.
- [13] Stefan Dobrev, Rastislav Královič, and Euripides Markou. Online graph exploration with advice. In Structural Information and Communication Complexity, pages 267–278. Springer Berlin Heidelberg, 2012. doi:10.1007/978-3-642-31104-8_23.
- [14] Thomas Erlebach, Michael Hoffmann, and Frank Kammer. On temporal graph exploration. Journal of Computer and System Sciences, 119:1–18, 2021. doi:10.1016/j.jcss.2021.01.005.
- [15] John Fearnley and Marcin Jurdziński. Reachability in two-clock timed automata is pspace-complete. In Automata, Languages, and Programming, pages 212–223. Springer Berlin Heidelberg, 2013.
- [16] Nathanaël Fijalkow, Nathalie Bertrand, Patricia Bouyer-Decitre, Romain Brenguier, Arnaud Carayol, John Fearnley, Hugo Gimbert, Florian Horn, Rasmus Ibsen-Jensen, Nicolas Markey, Benjamin Monmege, Petr Novotný, Mickael Randour, Ocan Sankur, Sylvain Schmitz, Olivier Serre, and Mateusz Skomra. Games on graphs, 2023. doi:10.48550/arXiv.2305.10546.
- [17] Nathanaël Fijalkow and Florian Horn. The surprizing complexity of generalized reachability games, 2012. arXiv:1010.2420.
- [18] Paola Flocchini, Bernard Mans, and Nicola Santoro. Exploration of periodically varying graphs. In Algorithms and Computation, pages 534–543. Springer Berlin Heidelberg, 2009. doi:10.1007/978-3-642-10631-6_55.
- [19] Janosch Fuchs, Christoph Grüne, and Tom Janßen. The complexity of online graph games. In SOFSEM 2024: Theory and Practice of Computer Science, pages 269–282. Springer Nature Switzerland, 2024. doi:10.1007/978-3-031-52113-3_19.
- [20] Seymour Ginsburg and Edwin H. Spanier. Semigroups, Presburger formulas, and languages. Pacific Journal of Mathematics, 16(2):285–296, 1966.
- [21] Erich Grädel, Wolfgang Thomas, and Thomas Wilke, editors. Automata Logics, and Infinite Games: A Guide to Current Research. Springer-Verlag, 2002.
- [22] Petter Holme and Jari Saramäki. Temporal Network Theory. Springer, January 2019. doi:10.1007/978-3-030-23495-9.
- [23] Marcin Jurdziński and Ashutosh Trivedi. Reachability-time games on timed automata. In International Colloquium on Automata, Languages and Programming, pages 838–849. Springer Berlin Heidelberg, 2007.
- [24] Fabian Kuhn, Nancy Lynch, and Rotem Oshman. Distributed computation in dynamic networks. In Symposium on Theory of Computing, STOC ’10, pages 513–522. Association for Computing Machinery, 2010. doi:10.1145/1806689.1806760.
- [25] Oded Maler, Amir Pnueli, and Joseph Sifakis. On the synthesis of discrete controllers for timed systems. In International Symposium on Theoretical Aspects of Computer Science, pages 229–242. Springer Berlin Heidelberg, 1995.
- [26] Nicole Megow, Kurt Mehlhorn, and Pascal Schweitzer. Online graph exploration: New results on old and new algorithms. In Automata, Languages and Programming, pages 478–489. Springer Berlin Heidelberg, 2011. doi:10.1007/978-3-642-22012-8_38.
- [27] George B. Mertzios, Hendrik Molter, Rolf Niedermeier, Viktor Zamaraev, and Philipp Zschoche. Computing maximum matchings in temporal graphs. Journal of Computer and System Sciences, 137:1–19, 2023. doi:10.1016/j.jcss.2023.04.005.
- [28] George B. Mertzios, Hendrik Molter, and Viktor Zamaraev. Sliding window temporal graph coloring. Journal of Computer and System Sciences, 120:97–115, 2021. doi:10.1016/j.jcss.2021.03.005.
- [29] George B. Mertzios, Sotiris Nikoletseas, Christoforos Raptopoulos, and Paul G. Spirakis. Brief Announcement: On the Existence of -Temporal Cliques in Random Simple Temporal Graphs. In 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 27:1–27:5. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.SAND.2024.27.
- [30] Othon Michail. An Introduction to Temporal Graphs: An Algorithmic Perspective, pages 308–343. Springer International Publishing, 2015. doi:10.1007/978-3-319-24024-4_18.
- [31] Othon Michail, Ioannis Chatzigiannakis, and Paul G Spirakis. Causality, influence, and computation in possibly disconnected synchronous dynamic networks. Journal of Parallel and Distributed Computing, 74(1):2016–2026, 2014. doi:10.1016/J.JPDC.2013.07.007.
- [32] 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.
- [33] Andrzej Pelc. Explorable families of graphs. In Structural Information and Communication Complexity, pages 165–177. Springer International Publishing, 2018. doi:10.1007/978-3-030-01325-7_17.
- [34] A. Pnueli and R. Rosner. On the synthesis of a reactive module. In Annual Symposium on Principles of Programming Languages, POPL ’89, pages 179–190. Association for Computing Machinery, 1989. doi:10.1145/75277.75293.
- [35] Amir Pnueli. The temporal logic of programs. In Annual Symposium on Foundations of Computer Science, SFCS ’77, pages 46–57. IEEE Computer Society, 1977. doi:10.1109/SFCS.1977.32.
- [36] Ramamoorthi Ravi. Rapid rumor ramification: Approximating the minimum broadcast time. In Proceedings 35th Annual Symposium on Foundations of Computer Science, pages 202–213, 1994.
- [37] Bruno Scarpellini. Complexity of subcases of presburger arithmetic. Transactions of the American Mathematical Society, 284(1):203–218, 1984. doi:10.2307/1999283.
- [38] Yuejiao Wang, Dajun Daniel Zeng, Qingpeng Zhang, Pengfei Zhao, Xiaoli Wang, Quanyi Wang, Yin Luo, and Zhidong Cao. Adaptively temporal graph convolution model for epidemic prediction of multiple age groups. Fundamental Research, 2(2):311–320, 2022. doi:10.1016/j.fmre.2021.07.007.
