Abstract 1 Introduction 2 Related work 3 Results References

Brief Announcement: Directed Temporal Tree Realization for Periodic Public Transport: Easy and Hard Cases

Julia Meusel ORCID Martin Luther University Halle-Wittenberg, Germany Matthias Müller-Hannemann ORCID Martin Luther University Halle-Wittenberg, Germany Klaus Reinhardt ORCID Martin Luther University Halle-Wittenberg, Germany
Abstract

We study the complexity of the directed periodic temporal graph realization problem. This work is motivated by the design of periodic schedules in public transport with constraints on the quality of service. Namely, we require that the fastest path between (important) pairs of vertices is upper bounded by a specified maximum duration, encoded in an upper distance matrix D. While previous work has considered the undirected version of the problem, the application in public transport schedule design requires the flexibility to assign different departure times to the two directions of an edge. A problem instance can only be feasible if all values of the distance matrix are at least shortest path distances. However, the task of realizing exact fastest path distances in a periodic temporal graph is often too restrictive. Therefore, we introduce a minimum slack parameter k that describes a lower bound on the maximum allowed waiting time on each path. We concentrate on tree topologies and provide a full characterization of the complexity landscape with respect to the period Δ and the minimum slack parameter k, showing a sharp threshold between NP-complete cases and cases which are always realizable. We also provide hardness results for the special case of period Δ=2 for general directed and undirected graphs.

Keywords and phrases:
Temporal graph, fastest temporal path, graph realization, periodic scheduling
Copyright and License:
[Uncaptioned image] © Julia Meusel, Matthias Müller-Hannemann, and Klaus Reinhardt; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis
; Mathematics of computing Discrete mathematics
Related Version:
Full Version: http://arxiv.org/abs/2504.07920
Editors:
Kitty Meeks and Christian Scheideler

1 Introduction

Graph realization problems are a central area of research that has been studied extensively since the 1960s for undirected [5, 8, 9] and directed graphs [1, 4, 7]. Given a set of constraints, the objective is to find a graph that satisfies them, or to decide that no such graph exists. Restrictions on degrees [2, 5, 9], distances between vertices [3, 8, 16], eccentricities [12], and connectivity have been studied in detail. Recently, the study of realization problems on temporal graphs was started by Klobas et al. [10, 11]. Temporal graphs are graphs that have a fixed set of vertices and a set of edges that changes over time. Each edge of a static graph is assigned a set of timestamps at which it is active. Informally, a temporal path is a sequence of consecutive edges in the underlying static graph and corresponding timestamps at which they are active. We only consider the strict version of temporal paths where all timestamps on a path are strictly ascending. Klobas et al. and Mertzios et al. examined restrictions on the travel time between pairs of vertices in periodic temporal graphs: upper bounds as well as exact values [10, 11, 13]. In a periodic temporal graph, the set of timestamps is repeated periodically for all edges. There are several variants of the Temporal Graph Realization problem (TGR) that have been studied: In the periodic TGR, all timestamps are repeated periodically. The simple periodic TGR allows only one timestamp per period, unlike the multi-label periodic TGR. The constraints on fastest travel times can be either exact values or upper bounds. If the given underlying graph is a tree, we call the problem Temporal Tree Realization (TTR). In addition to communication networks such as social networks or satellite links, Klobas et al. mention transportation networks as examples of potential applications for the TTR [10, 11]. However, unlike the flow of information in satellite links, transportation networks typically do not carry passengers on an edge in both directions at the same time. Therefore, we examine the directed case as a natural generalization.

With an application in public transport in mind, the input graph models the infrastructure network where vertices correspond to locations of stops (or stations) and edges connect neighboring stops served by a bus, tram, train or the like. In public transport, typical values for the period Δ are 5, 10, 15 or 20 minutes in urban transport, and 30, 60 or 120 minutes in long-distance train networks. The timestamp of an edge (u,v) can be interpreted as the departure time of some vehicle at u. In a practical setting, traveling along an edge e requires e time. An edge of length  can be equivalently replaced by a simple path of edges of unit length. While such a transformation blows up the graph size, it does not change the complexity of the problem (since hardness results are established even for unit length graphs). For simplicity, we will therefore consider only unit-length graphs. We assume that a faster travel time is never detrimental and therefore consider upper bounds on the travel time instead of exact values. Since most public transportation lines run in both directions, we will mostly consider bidirected graphs throughout the paper. In tree structures this is necessary to ensure that every vertex is reachable from every other vertex.

Informally, given a directed, strongly connected graph as the underlying static graph as well as a period Δ and upper bounds on the travel time between each pair of vertices, the objective is to compute a (single) timestamp for each directed edge such that a fastest temporal path between any two vertices does not exceed the given upper bound. The upper bounds between pairs of vertices can be interpreted as a guaranteed quality of service that must be met. The bounds are specified by a matrix D of integers or . The latter means that we do not impose any restriction on the fastest path between the corresponding vertices. Motivated by transportation networks with fixed traffic lines, we consider only one global period instead of allowing different periods for all edges. Since waiting times are unavoidable and natural, for example, due to transfer times at transit hubs, we assume that there is a small amount of waiting time allowed on all paths and introduce a minimum slack parameter k that specifies how much waiting time is at least acceptable on all routes.

2 Related work

Klobas et al. show that the Simple Periodic TGR with exact given fastest travel times is NP-hard even for a small constant period Δ3 [10, 11, Theorem 3]. However, if the underlying static graph is a tree, the problem is solvable in polynomial time [10, 11, Theorem 27]. It is fixed-parameter tractable (FPT) with respect to the feedback edge number of the underlying graph but W[1]-hard when parameterized by the feedback vertex number of the underlying graph [10, 11, Theorem 29 and Theorem 4]. While the Simple Periodic Temporal Graph Realization problem with exact given fastest travel times is solvable in polynomial time on trees, Mertzios et al. showed that the problem given upper bounds on the fastest travel times is NP-hard even if the underlying static graph is a tree [13]. This still holds for a constant period Δ=5 and when the input tree G has a constant diameter or a constant maximum degree [13]. However, it is FPT with respect to the number of leaves in the input tree G [13]. While Klobas et al. and Mertzios et al. only allow one timestamp per edge, Erlebach et al. consider several timestamps per edge [6]. They examine both the periodic and the non-periodic variant with exact given fastest travel times. Among other results, they show that the Multi-Label Periodic Temporal Graph Realization problem is NP-hard, even if the underlying static graph is a star for any number 5 of labels per edge. All these models have in common that labels (periodic timestamps) are assigned to edges. Important related problem versions assign periodic labels to vertices. The Periodic Event Scheduling Problem (PESP), introduced by Serafini and Ukovich in 1989 [15], is widely used to schedule reoccurring events in public transport. Here the input is a so-called event-activity network N=(V,A), a period Δ, and time windows [a,ua] for each activity aA. The set V models events (think of an arrival or departure of a vehicle at a stop) and the set AV×V so-called activities. Activities model driving between neighboring stops, dwelling at a stop, transfers between different vehicles or safety constraints (minimal headways). In PESP, one seeks a periodic timestamp πv{0,1,,Δ1} for each event vV such that (πwπv)modΔ[(v,w),u(v,w)] for all (v,w)A. The time window [a,ua] of an activity models lower and upper bounds on the difference of the timestamps between the corresponding events. In other words, the difference uaa bounds the slack (waiting time) which can be introduced on activity a. In stark contrast to our model, these restrictions are local constraints between adjacent events, not global constraints between arbitrary events as considered in this paper. The PESP is known to be NP-complete for fixed Δ3 [15], but efficiently solvable for Δ=2 [14, page 87].

3 Results

In this paper, we investigate the complexity of the Periodic Upper-Bounded Temporal Directed Graph Realization (DiTGR). In order to define the problem, we first need the following preliminaries: The duration of a temporal graph is the difference between the last and the first timestamp of the path, increased by one. Denote by d^(u,v) the distance of u and v in a static graph.

Periodic Upper-Bounded Temporal Directed Graph Realization (DiTGR)

Input: A directed, strongly connected graph G=(V,E) with V={v1,v2,,vn}, an n×n matrix D of positive integers where u,vV:Du,vd^(u,v), and a positive integer Δ.
Question: Does there exist a Δ-periodic labeling λ:E{0,1,,Δ1} such that, for every i,j, the duration of a fastest temporal path from vi to vj in the Δ-periodic temporal graph (G,λ,Δ) is at most Di,j?

The restriction of DiTGR to inputs of such graphs derived from trees by adding two directed edges (u,v) and (v,u) for every undirected edge {u,v} is called DiTTR.

Figure 1: Complexity of the Directed Upper-Bounded Periodic Temporal Tree Realization Problem for different values of the minimum slack parameter k and period Δ (Δ-k-DiTTR). The labeling of the boxes indicates which Theorem states the respective result: (a) Theorem 2, (b) Theorem 4, (c) Theorem 3, (d) Theorem 5.

Our main results are as follows:

  1. 1.

    We provide efficiently checkable necessary conditions for feasibility in DiTTR when all or a subset of all pairs of vertices must be realized on shortest paths without waiting time. The basic insight is that the solvability for such instances depends on the distance between branching vertices of the given graph topology. We show:

    Lemma 1.

    An instance of DiTTR with u,vV:Du,v=d^(u,v) is realizable if and only if the distance of any pair of branching vertices is a multiple of Δ/2.

    We generalize this sufficient condition to a necessary one for instances in which no waiting is allowed on only some paths.

  2. 2.

    We then introduce the parameter k, which specifies the minimum waiting time to be allowed on each path (the slack), i.e., for all pairs of vertices u and v we require that the duration bound Du,v is at least the distance d^(u,v) of u and v in the underlying static graph plus the constant k: u,vV:Du,vd^(u,v)+k. Note that the parameter k is an implicit parameter of D. We call the version of DiTTR where the parameters Δ and k are fixed Δ-k-DiTTR. We fully characterize the complexity of the problem for bidirected tree topologies in terms of period Δ and slack parameter k. For each possible combination of parameters Δ and k, we either prove that the problem is easily solvable or hard, see Figure 1. We show:

    Theorem 2.

    For Δ=1 all instances of TGR and DiTGR are feasible.

    Theorem 3.

    All instances of DiTTR with Δk+1 for odd Δ and with Δk+2 for even Δ are feasible.

    Theorem 4.

    Instances of DiTTR with period Δ=2 are always feasible.

    Theorem 5.

    For the remaining parameters Δ and k (see Figure 1), the Δ-k-DiTTR is NP-complete.

    For some combinations of parameters, our NP-completeness reductions require gadgets of quadratic size in Δ, while for other combinations we even found gadgets of linear size (for details see Figure 1).

  3. 3.

    For Δ3, we give a simple proof that the undirected version of the Upper-Bounded Periodic Temporal Tree Realization problem is NP-complete, even if the underlying static graph is a star and thus has a constant diameter111After our submission to SAND, the authors of [13] independently of us included essentially the same result in version 2 of their arxiv paper, while raising it as an open question in version 1..

  4. 4.

    We also investigate in more detail the special case of a given period Δ=2. This turns out to be NP-complete in general (for both directed and undirectedfootnotemark: graphs), but can be solved efficiently on directed bipartite graphs and some special cases where the corresponding undirected graph contains at most one single odd cycle. The following theorem can be formulated as a generalization of Theorem 4:

    Theorem 6.

    All instances of DiTGR where the input is restricted to a directed bipartite graph G=(U,V,E) with E(U×V)(V×U) and period Δ=2 are feasible.

References

  • [1] R. P. Anstee. Properties of a class of (0,1)-matrices covering a given matrix. Canadian Journal of Mathematics, 34(2):438–453, 1982. doi:10.4153/CJM-1982-029-3.
  • [2] Jamil N. Ayoub and Ivan T. Frisch. Degree realization of undirected graphs in reduced form. Journal of the Franklin Institute, 289(4):303–312, 1970. doi:10.1016/0016-0032(70)90273-5.
  • [3] Amotz Bar-Noy, David Peleg, Mor Perry, and Dror Rawitz. Graph realization of distance sets. Theoretical Computer Science, 1019:114810, 2024. doi:10.1016/j.tcs.2024.114810.
  • [4] Wai-Kai Chen. On the realization of a (p,s)-digraph with prescribed degrees. Journal of the Franklin Institute, 281(5):406–422, 1966. doi:10.1016/0016-0032(66)90301-2.
  • [5] Paul Erdős and Tibor Gallai. Graphs with prescribed degrees of vertices. Mat. Lapok, 11:264–274, 1960.
  • [6] Thomas Erlebach, Nils Morawietz, and Petra Wolf. Parameterized Algorithms for Multi-Label Periodic Temporal Graph Realization. In Arnaud Casteigts and Fabian Kuhn, editors, 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 12:1–12:16, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAND.2024.12.
  • [7] D.R. Fulkerson. Zero-one matrices with zero trace. Pacific Journal of Mathematics, 10(3):831–836, 1960.
  • [8] S. Louis Hakimi and Stephen S. Yau. Distance matrix of a graph and its realizability. Quarterly of Applied Mathematics, 22:305–317, 1965.
  • [9] Václav Havel. Poznámka o existenci konečných grafů. Časopis pro pěstování matematiky, 080(4):477–480, 1955. URL: http://eudml.org/doc/19050.
  • [10] Nina Klobas, George B. Mertzios, Hendrik Molter, and Paul G. Spirakis. Realizing temporal graphs from fastest travel times, 2024. doi:10.48550/arXiv.2302.08860.
  • [11] Nina Klobas, George B. Mertzios, Hendrik Molter, and Paul G. Spirakis. Temporal Graph Realization from Fastest Paths. In Arnaud Casteigts and Fabian Kuhn, editors, 3rd Symposium on Algorithmic Foundations of Dynamic Networks (SAND 2024), volume 292 of Leibniz International Proceedings in Informatics (LIPIcs), pages 16:1–16:18, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SAND.2024.16.
  • [12] Linda Lesniak. Eccentric sequences in graphs. Periodica Mathematica Hungarica, 6(4):287–293, December 1975. doi:10.1007/BF02017925.
  • [13] George B. Mertzios, Hendrik Molter, and Paul G. Spirakis. Realizing temporal transportation trees, March 2024. doi:10.48550/arXiv.2403.18513.
  • [14] Leon W. P. Peeters. Cyclic railway timetable optimization. PhD thesis, Erasmus Research Institute of Management, Erasmus University Rotterdam, The Netherlands, 2003.
  • [15] Paolo Serafini and Walter Ukovich. A mathematical model for periodic scheduling problems. SIAM Journal on Discrete Mathematics, 2(4):550–581, 1989. doi:10.1137/0402049.
  • [16] Hiroshi Tamura, Masakazu Sengoku, Shoji Shinoda, and Takeo Abe. Realization of a network from the upper and lower bounds of the distances (or capacities) between vertices. In 1993 IEEE International Symposium on Circuits and Systems (ISCAS), pages 2545–2548. IEEE, 1993.