On the Approximability of Train Routing and the Min-Max Disjoint Paths Problem
Abstract
In train routing, the headway is the minimum distance that must be maintained between successive trains for safety and robustness. We introduce a model for train routing that requires a fixed headway to be maintained between trains, and study the problem of minimizing the makespan, i.e., the arrival time of the last train, in a single-source single-sink network. For this problem, we first show that there exists an optimal solution where trains move in convoys – that is, the optimal paths for any two trains are either the same or are arc-disjoint. Via this insight, we are able to reduce the approximability of our train routing problem to that of the min-max disjoint paths problem, which asks for a collection of disjoint paths where the maximum length of any path in the collection is as small as possible.
While min-max disjoint paths inherits a strong inapproximability result on directed acyclic graphs from the multi-level bottleneck assignment problem, we show that a natural greedy composition approach yields a logarithmic approximation in the number of disjoint paths for series-parallel graphs. We also present an alternative analysis of this approach that yields a guarantee depending on how often the decomposition tree of the series-parallel graph alternates between series and parallel compositions on any root-leaf path.
Keywords and phrases:
Train Routing, Scheduling, Approximation Algorithms, Flows over Time, Min-Max Disjoint PathsFunding:
Umang Bhaskar: supported by the Department of Atomic Energy, Government of India, under Project No. RTI4001.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Graph algorithms analysis ; Theory of computation Approximation algorithms analysisAcknowledgements:
We thank Daniel Schmand, Khai Van Tran and Andreas Wiese for fruitful discussions, as well as Nils Nießen and his group for providing us with foundational insights into train planning. We also thank the participants of the Dagstuhl Seminar 24281 [8], the Oberwolfach Workshop in Combinatorial Optimization 2024 [25], and the Chile Summer Workshop on Combinatorial Optimization 2025 for many interesting comments and questions. Finally, we thank the three anonymous reviewers for their careful reading of our paper and many useful suggestions.Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Given a rail network and a set of trains, the problem of train routing and scheduling refers to the problem of determining a route as well as a schedule for the trains to optimise some objective, such as the total travel time or the maximum travel time (also denoted as makespan). Train routing usually involves a number of real-world constraints, including train acceleration and deceleration, stopping times at stations, bidirectional arcs, presence of other trains, etc. Practical approaches to solving these complex problems often include mixed integer programming, heuristics, and simulations [3, 4, 15, 16, 22, 24], see [21, 22, 5] for surveys and an overview. However, theoretical guarantees on solutions are hard to come by, apart from some results that show NP-hardness already for some very restricted cases [15, 19].
One of the most important constraints in train routing and scheduling is that of headway [6, 18], which determines the minimum gap between successive trains on a link. The headway thus corresponds to a safety distance between two successive trains and is important for at least two different reasons. The first is safety: Maintaining sufficient headway between trains reduces the chances of a collision between trains. The second reason is robustness: If a train is delayed somewhat, then the headway can help ensure that this delay is not propagated to all the following trains, and the schedule can recover quickly. In fact, the importance of maintaining a headway is not restricted to train routing. In vehicular traffic, such as cars on roads, traffic often naturally forms a platoon – a group of vehicles following each other closely. Here, headway is again essential in maintaining safety of vehicles in the platoon, see [26] for a survey.
In this paper, our objective is understanding the impact of headway on the complexity of train routing and scheduling.111Although, as noted, headway plays an important role in routing other vehicles as well, we use the nomenclature for trains as this is what initially motivated our work. While numerous papers study efficient algorithms for both dynamic and static routing problems, research on efficient algorithms that account for headway is scarce. Towards this, we introduce a basic model of train routing with an exogenously defined headway requirement . In our model, we are given a directed network , where each arc has a travel time , and trains that must travel from a source to a sink . Headway constraints require a minimum time separation of between any two trains using the same arc. Our objective is minimising the makespan – the time the last train reaches the sink . We call this problem Train Makespan Optimization (TMO) and refer to Section 1.1 for a formal description.
Two interesting special cases of TMO arise when the headway is either very large ( or very small (). In the former case, no arc can be used by two trains, and hence the paths used by the trains must be pairwise arc-disjoint. The problem for thus becomes the static problem of finding arc-disjoint --paths while minimizing the length of the longest path. This is known in the literature as the Min-Max Disjoint Paths (MinMaxDP) problem [20]. In particular, the temporal dynamics, i.e., the scheduling aspect of the problem, become irrelevant. Conversely, if , the problem is equivalent to finding an integral quickest flow over time, a problem widely studied in traffic networks and transportation [28]. Hence, as reduces, temporal dynamics play a larger role.
The quickest flow over time problem with aggregated arc capacities [11] generalizes the quickest flow over time problem. Here, only a limited amount of flow is allowed to traverse an arc in each time interval of length . By setting these capacities to one, TMO can be seen as an integral special case of the quickest flow over time problem with aggregated arc capacities.
When studying the computational complexity of the problem from a theoretical perspective, one should note that, for large , the size of the input is rather than . Hence, a polynomial time algorithm must run in time polynomial in (and the other parameters). Note that this is not even sufficient time to describe a path for each train. However, we show that optimal solutions can be represented efficiently, by establishing the existence of an optimal convoy solution to TMO that can be described by a polynomial number of different paths and does not require waiting on any intermediate nodes. Furthermore, we show that approximating TMO, for any value of , is equivalent to approximating MinMaxDP. We further develop new approximation algorithms for MinMaxDP, which translate to bounds for TMO as well. This work thus provides new results on a classical routing problem and introduces a new model to capture an important parameter in traffic routing and scheduling.
1.1 Model
We are given a directed graph with travel times for every , a source as well as a sink . We say . Furthermore, we are given a minimum headway time (between the heads of the trains) and a number of identical trains which we want to send from to . An instance of train routing is thus denoted . In the following, we use for and to denote the set of all arcs entering a node .
A train routing is a tuple consisting of a collection of --paths , where consists of the sequence of arcs train traverses on its way from to , together with a collection of entry functions , where denotes the time when the nose of train enters arc
A train routing is feasible if it complies with the following two constraints:
-
for all and any pair of consecutive arcs on ,
-
for all with and .
The first constraint implies that the entry function is consistent with the travel times along the path of each train. Note that this allows trains to wait at any node. The second constraint ensures that a feasible routing respects the minimum headway requirement, i.e., if two trains use the same arc, they can only do so with a temporal distance of at least .
Given a feasible train routing , we denote by the time when the nose of train arrives at . The makespan is the time when the nose of the latest train reaches the sink . We consider the Train Makespan Optimization (TMO) problem, where the objective is to find a feasible train routing that minimises the arrival of the last train at . That is, we want to solve
1.2 The min-max disjoint paths problem
An interesting special case of TMO arises when is sufficiently large compared to the travel times. In that case any (even approximately) optimal train routing sends all trains along disjoint paths – assuming that the network supports disjoint --paths. This leads us to the Min-Max Disjoint Paths (MinMaxDP) problem, which can be formalized as follows: Given a directed graph with two designated vertices and travel times , find pairwise arc-disjoint --paths minimizing the maximum travel time (i.e., makespan) where we use to shorten notation for each path . We call a path profile.
Early work on MinMaxDP has focused on the case where is constant. Indeed, Li et al. [20] – in the first paper that studied MinMaxDP – showed that, even when , the problem is strongly NP-hard for general digraphs and weakly NP-hard for directed acyclic graphs. On the positive side, they also showed that MinMaxDP can be solved in pseudo-polynomial on DAGs when is constant. By standard rounding techniques, this result can be turned into an FPTAS [13] for the same setting.
Special cases of MinMaxDP when is part of the input have been studied under various names. Most notably, the Multi-level Bottleneck Assignment (MLBA) problem is equivalent to a special case of MinMaxDP in a DAG consisting of layers. Dokka and Goerigk [10] recently established a strong inapproximability bound of for MLBA. In the full version of this article [1, Appendix A], we observe that their construction also implies that MinMaxDP (and, by extension, TMO) in DAGs does not admit approximation factors significantly better than logarithmic in , unless every problem in NP can be solved in quasi-polynomial time (violating the exponential time hypothesis). This leads to the following theorem.
Moreover, MinMaxDP in bundle graphs, i.e., digraphs consisting of a sequence of parallel arcs, is equivalent to the so-called complete case of MLBA, from which it also inherits strong NP-hardness. For this problem, a long line of approximation algorithms starting in the 1980s [7, 17] has recently culminated in a PTAS by Das and Wiese [9] (formulated for an equivalent scheduling problem).
1.3 Contributions and overview
In the following, we provide an overview of our main contributions and the techniques used to derive these results.
Existence of optimal convoy routings.
We show that any instance of TMO has an optimal solution in which any two trains either travel along the same path (with sufficient temporal distance), or follow disjoint paths (Theorem 2 in Section 2). We call such solutions convoy routings. In particular, convoy routings have a compact representation that is polynomial in the size of the input, even when the number of trains is exponential in the size of the network. A further consequence is that allowing trains to wait at intermediate nodes does not help to improve the optimal solution value. The proof of this result relies on an uncrossing algorithm that takes an arbitrary train routing and modifies it to ensure that any train that is the first to traverse the final arc of its path is also the first to traverse any other arc it uses. Conflicts, i.e., situations where this property is violated, are resolved iteratively, starting with those closest to the sink, with a potential function argument ensuring eventual termination of the procedure.
A flow-based additive approximation for TMO.
We further provide a simple flow-based approximation algorithm for TMO that returns a convoy routing whose makespan is bounded by (Theorem 4 in Section 3). This result is achieved by solving an appropriately defined quickest flow over time problem in the underlying network. Note that in practice, the headway is typically much smaller than the total transit time of a train from source to sink, and hence the additive error is small compared to .
Reduction to MinMaxDP.
Building on the previous two results, we establish a strong connection between MinMaxDP and TMO by showing that any -approximation algorithm for MinMaxDP yields a -approximation algorithm for TMO with polynomial runtime in the size of the input and (Theorem 5 in Section 4). To achieve this result, we devise a gadget that encodes the choices on the number of trains on each path of a convoy routing into the routing decisions in the network. The size of this gadget is polynomial in the size of the original network and . It thus provides an exact reduction of TMO to MinMaxDP when the number of trains is polynomial in the size of the network. When is large, on the other hand, there must be an arc traversed by a large number of trains and hence is much larger than . In this case, the additive guarantee of of our flow-based algorithm for TMO mentioned above translates to a -approximation. As we mentioned previously, for sufficiently large values of , TMO coincides with MinMaxDP. Thus, finding good approximation algorithms for MinMaxDP is not only sufficient but also necessary to obtain good approximations for TMO.
Approximation algorithms for MinMaxDP in series-parallel networks.
In the remainder of this paper, we therefore focus on approximation algorithms for MinMaxDP. We show that a natural greedy approach achieves an approximation which is logarithmic in on series-parallel (SePa) networks (Theorem 8 in Section 5), where is the number of paths to be constructed. This constitutes the first non-trivial approximation result for MinMaxDP going beyond the aforementioned PTAS for bundle graphs [9], without assuming that either or the number of layers of the graph is constant.
We prove the approximation guarantee via induction on a series-parallel decomposition of the graph. The key ingredient is showing that the greedy algorithm maintains a solution fulfilling a strong balance condition on the path lengths. Additionally, we provide an alternative analysis of the same approach that yields an upper bound of on the approximation factor, where denotes the number of changes from series to parallel composition on a root-leaf path in the binary tree describing the SePa-graph. To the best of our knowledge, the parameter , which we demonstrate to be independent of the choice of the decomposition tree, has not been used in the literature before. We believe that this natural parameter can be of independent interest for designing and analysing algorithms for other problems in SePa-graphs. Our alternative analysis implies the classic greedy -approximation for bundle graphs by Hsu [17] as a special case. By the aforementioned reduction of TMO to MinMaxDP, the approximation results for MinMaxDP on SePa-graphs, translate to our train routing problem.
2 Existence of optimal convoy routings
Let be an instance of TMO. A convoy routing consists of a collection of pairwise arc-disjoint --paths in , together with a vector with , whose -th component denotes the number of trains using path . Note that any such convoy routing can be turned into a (feasible) train routing by sending trains along path in single file with temporal spacing between any two consecutive trains. Thus, the makespan of this train routing is , where
Theorem 2 (Convoy theorem).
Every instance of TMO admits an optimal solution that is a convoy routing.
Our proof of Theorem 2 is constructive. Note that, since we allow waiting at nodes, there is always an optimal train routing which is acyclic in the sense that none of the paths contains a cycle. In order to show that any instance of TMO admits an optimal routing which is a convoy solution (i.e., to prove Theorem 2), we take an optimal acyclic train routing , and modify this train routing step by step without increasing the makespan until the routing corresponds to a convoy routing.
The algorithm, which we from now on call uncrossing algorithm, proceeds in two phases. First, in the uncrossing phase, we reroute trains such that at the end of the phase, the trains that are the first ones to use their respective ingoing arc to the sink , travel along disjoint paths. We call these trains leaders, and the remaining trains non-leaders. Afterwards, in the assignment phase, we assign every non-leader train a route based on the arc it uses to enter . In particular, each such train follows its leader from to .
We now outline the algorithm in more detail and briefly sketch its correctness. A detailed description can be found in the full version of this article [1, Appendix B].
2.1 The uncrossing phase
We first introduce some notation. For an arc entering , i.e., , we define the leader on as the first train using arc . We denote by the set of leaders. We say that a leader has a conflict on arc with another train if uses some arc before . Note that this relation is not symmetric. For a leader , we define the transition arc as the first arc on which a conflict of with another train exists when traversing from to , i.e., in the reverse direction. Note that might not exist, in which case is the first train on every arc on its path.
In the uncrossing phase, we pick a leader for which exists. We reroute all trains preceding on such that, after rerouting, they all use the same subpath as from to . The rerouted trains traverse every arc of this --path with the same temporal distance to train as they had on arc . Hence, the rerouted trains keep their respective pairwise temporal distances on the entire path from to and no new conflicts among the rerouted trains arise. Figure 1 shows an example of such a rerouting step. Note that this rerouting procedure also cannot create new conflicts with other trains as was the first train on every arc of from to . Hence, the new routing is feasible and does not increase the makespan as arrives after any rerouted train and the routing of remains unchanged.
We iterate this procedure with the updated train routing (and the corresponding leaders and transition arcs) until every leader is the first train on all arcs of its path, which implies that all leaders use disjoint paths. In the proof of Lemma 3 below, we establish that this termination criterion is reached after a finite number of uncrossing steps.
2.2 The assignment phase
After successfully uncrossing the paths of all leaders, we receive an updated routing . To achieve a convoy routing , define where is the --path used by leader in . We assign all trains that use the same arc as to enter in to and define as the resulting number of trains that use . As each train uses exactly one arc in , this induces a partition of and thus a feasible convoy routing.
To see why the makespan remains unchanged, note the following: Fix an arc for some . The first train from our convoy routing arrives at no later than the corresponding leader in . This is because they use the same path, and the train from departs immediately. Further, in both routings, the last train entering must have a minimum temporal distance of to the first train entering . In the convoy routing, this bound is tight and thus the assignment phase does not increase the makespan.
2.3 Analysis
By its construction, if the uncrossing algorithm terminates, it returns a convoy routing with a makespan no worse the one of the input routing. Theorem 2 thus follows as a consequence of the following lemma.
Lemma 3.
The uncrossing algorithm terminates.
Proof (sketch).
We prove this using a potential function. To define this function, we extend the definition of to arbitrary, i.e., also non-leader trains, . Informally, is the last arc on train ’s path after which the set (or order) of trains driving before changes.
The potential of a train is the number of arcs of from to . We prove the following two statements: (i) When resolving a conflict for some leader , we decrease its potential, (ii) The potential of all other trains does not increase when resolving a conflict of . Together, (i) and (ii) imply that the sum of all potentials decreases in every iteration of the uncrossing phase, implying finite termination of this phase and thus of the entire algorithm. The proof of (i) and (ii) involves a careful analysis, which reveals that the transition node of a train is always on its path in the original routing, and a case distinction of possible configurations arising in the uncrossing steps. The details of this analysis can be found in the full version of this article [1, Appendix B].
3 A flow-based additive approximation for TMO
As mentioned in Section 1, TMO with reduces to Quickest Flow Over Time in a network with unit capacities. This problem asks for a flow over time of a given value ( units in our case) to be sent from a source to a sink in the shortest time possible. For an in-depth discussion of flows over time, we refer to [28]. By guessing the optimal makespan (e.g., by using parametric search [27]), Quickest Flow Over Time can, in turn, be reduced to Maximum Flow Over Time – i.e., sending a maximum amount of flow within a given time horizon. The latter problem can be solved efficiently using a classic result of Ford and Fulkerson [14]: Compute an appropriate static flow, decompose this flow into (disjoint, in the case of unit capacities) paths, and send one unit of flow along each path as long as it still reaches the sink within the time horizon.
A natural extension of this approach to the case is computing a quickest flow over time sending units in total, and transform it into a train routing by only sending one unit of flow (i.e., one train) every time units along each path. Because, conversely, any routing of trains also can be extended to a flow over time of value when allowing an extra period of time units beyond its makespan, we obtain the following approximation guarantee for TMO. Again, a detailed proof can be found in the full version of this article [1, Appendix C].
Theorem 4.
There is an algorithm that, given a TMO instance, computes in strongly polynomial time a convoy routing with makespan at most , where is the optimal makespan.
4 Reduction to MinMaxDP
In this section, we examine the relationship between TMO and MinMaxDP. It is easy to see that any -approximation for TMO implies an -approximation for MinMaxDP, by choosing . Proving the converse is more involved. We use a bundle graph (see Figure 2) consisting of a sequence of parallel arcs as a gadget, attached to the source node for the MinMaxDP instance, for our reduction.
Theorem 5.
Proof (sketch).
We defer a formal proof to the full version of this article [1, Appendix D] and restrict ourselves to providing its intuition for now. First, consider the case , i.e., when is large. Then, is much greater than because some arcs are used by more than trains, and hence the flow-based approximation from Section 3 yields a -approximate solution.
Otherwise, when , we utilise the given -approximation for MinMaxDP. We guess the number of disjoint paths in an optimal convoy routing. For that , we construct an auxiliary digraph by adding the gadget described in Figure 2 prior to the source node of the given digraph . It is easy to see that the minimum makespan for MinMaxDP on (when was guessed correctly) and the minimum makespan for the original TMO-instance coincide. Hence, ’s approximation guarantee carries over to TMO. Note that the above case distinction is necessary to bound the size of polynomially.
Remark 6.
Bundle graphs and SePa-graphs are examples of such closed classes. Theorem 5 in conjunction with Theorem 1 from [9] yields the following stronger result for bundle graphs.
Corollary 7.
There is a PTAS for TMO on bundle graphs.
5 Approximation algorithm for MinMaxDP in series-parallel graphs
In this section, we describe and analyse an algorithm for approximating MinMaxDP in series-parallel graphs. Before we state our main result, we first provide a formal definition of series-parallel graphs and the parameter that is part of the approximation guarantee.
Series-parallel graphs.
A series-parallel digraph (SePa-graph, for short) has a source and a sink and consists of either a single arc or can be obtained by a series or parallel composition of two series-parallel subgraphs and . The series composition merges the sink of with the source of , such that the source of is the source of and the sink of is the sink of . The parallel composition merges the two sources of and to a single source of and merges the sinks of and to a single sink of . Note that it is possible to have parallel arcs between two nodes.
The parameter .
Any SePa-graph can be described by a binary decomposition tree, where the leaves of the tree correspond to the arcs and the internal vertices correspond to either the series (labeled ![]()
![]()
Main result and overview.
We can now formally state our main result for this section. Note that denotes the -th harmonic number, i.e., .
Theorem 8.
For every there is an algorithm that computes a -approximate path profile for MinMaxDP and runs in time polynomial in , , and .
A central component of our algorithm is a greedy composition procedure that inductively combines path profiles in subgraphs based on the binary decomposition tree. In Section 5.1, we present this greedy composition procedure and several invariants maintained by the procedure that are crucial to our analysis. In particular, we show that if the invariants are fulfilled by the final solution, they imply the desired approximation ratio.
A remaining challenge is that it is not obvious how to initialise the procedure with solutions that satisfy the invariants at the beginning. In particular, some of the invariants are defined with respect to certain properties of the optimal solution and are thus not easy to verify. In Section 5.2, we show how to solve this issue by devising two dynamic programs, each optimising for one of the two terms whose minimum defines the approximation guarantee. Running these two DPs concurrently then yields the guarantee of the theorem (where is an error incurred by rounding so that the DPs run in polynomial time).
5.1 Greedy composition procedure
We use the following notation. We write for a series-parallel subgraph which corresponds to one of the vertices of the decomposition tree of , i.e., the decomposition tree of is the subtree rooted at that vertex. Now consider any such subgraph with arc set , source , and sink . If an --path in a path profile of uses an arc in , the series-parallel structure of implies that is an -path in . We denote the length of a path in by , and the length of the longest subpath of in by . Moreover, we call the total length of arcs of path profile in component , that is .
Greedy composition.
Let and be two SePa-graphs, and let and be path profiles of and consisting of and arc-disjoint paths, respectively. For a series composition , if , the greedy composition of and is the path profile of that is derived by combining the longest path in with the shortest path in , the second-longest path in with the second-shortest path in , and so on. Note that this construction is only defined for For a parallel composition , the greedy composition is given by of , where simply consists of the union of the paths in and .
We now discuss three properties that are maintained by the greedy composition procedure described above if they are fulfilled by the path profiles that are being combined. To define these properties, we fix an arbitrary optimal path profile in the graph that defines our MinMaxDP instance. The first property we consider is consistency.
Consistency.
We call a path-profile consistent with in if and use the same number of paths in and if
| (1) |
Note that consistency is maintained by greedy composition, as the arcs used by the disjoint paths in the composed profile are exactly the union of the paths in the two profiles that are being combined. We now define the second property, balancedness, and show that together with consistency it implies the first of our two approximation bounds.
Balancedness.
Let be a path profile, and let be traversed by paths from . Let be the lengths of those paths in . Then is balanced in if
| (2) |
We first establish that balancedness – when combined with consistency – is indeed maintained by greedy composition. While this is straightforward for parallel composition, the proof for series composition requires a more involved analysis that carefully combines (1) and (2). The details of this analysis are given in the full version of this article [1, Appendix F.1].
Lemma 9.
Let and let . If and are consistent and balanced path profiles in and , respectively, then the greedy profile is a consistent and balanced path profile in .
Crucially, the following lemma reveals that if the final solution is balanced and consistent with , it is a logarithmic approximation for the latter. The lemma follows from an averaging argument over (2) for , which can be found in the full version of this article [1, Appendix F.2].
Lemma 10.
Let be a consistent and balanced path profile in . Then .
We now introduce the third property, -boundedness, which is likewise maintained by greedy composition and implies the second bound on the approximation guarantee when fulfilled by the final solution.
-boundedness.
We call a path profile -bounded in if
| (3) |
Note that in this definition, the left-hand side refers to the length of the longest path of in the subgraph , whereas the right-hand side refers to the optimal objective value for MinMaxDP on the entire graph . The following lemma establishes that consistency and -boundedness are maintained by the greedy composition when executing all compositions that correspond to one component of the decomposition tree.
Lemma 11.
Let be a subgraph corresponding to a root vertex of an -component or -component, respectively. Let be the graphs corresponding to the children of the component. Further, let be a consistent and -bounded path profile in for . Then, the greedy series, respectively parallel, composition of is a consistent and -bounded path profile in .
The proof of this lemma involves an induction over the components of the decomposition tree of and can be found in the full version of this article [1, Appendix F.3].
5.2 Dynamic programs
The results in the preceding section imply that if we start from path profiles for the leaves of the decomposition tree of that are consistent with an optimal solution and balanced or -bounded, respectively, then iteratively applying greedy composition will yield a path profile for that is consistent and balanced or -bounded, respectively. In particular, such a profile then yields an -approximation or -approximation.
However, since we do not know the optimal solution, we do not know which path profiles fulfil these requirements. A natural approach seems to be to restrict ourselves to a solution with minimum total length (i.e., an integral minimum-cost --flow of value ). However, there is a difficult trade-off between minimising the length of a longest path or minimising the total length of the solution in a subgraph, as the following example shows.
Example 12.
Consider the graph depicted in Figure 4. If we set , the path profile with minimal total length consists of paths of length and one path with length , leading to the objective value . However, the optimal path profile consists of paths all having length . On the other hand, assume that and create a graph that consists of copies of composed in series. In this case, solving the MinMaxDP in each subgraph results in all paths having length inside each copy of the example, yielding to the objective value when combining them in series. However, the optimal path profile uses exactly one arc of length in each path and otherwise only length- arcs, yielding an objective value of . Thus, an algorithm which locally only considers the length of the longest path in the profile, would be a factor of apart form the optimal value.
DP framework.
In the following, we show how to resolve this issue by means of two dynamic programs. In both cases, our dynamic programming table will have the following attributes per cell:
-
a subgraph ,
-
the number of paths used in ,
-
the total length of the path profile in .
Recall that the total length of a path profile in subgraph was defined as the sum of the lengths of the paths in , i.e., . We let denote the set containing all possible values that might appear as total costs.
To fill the cells of the dynamic programming table, we start with the subgraphs consisting of single arcs, i.e., . Here, the non-empty entries of the table corresponding to are and , while all remaining entries corresponding to are empty (which is different from containing an empty path profile).
Given a cell , we combine all path profiles and of and consisting of and paths of total length and , respectively, if and only if and (in case of a parallel composition), or (in case of a series composition). We build path profiles for according to the greedy composition of the path profiles for and as described above.
With this procedure, we obtain multiple candidates for a path profile in table entry . Below, we analyse two different strategies to pick a good candidate that lead to different approximation guarantees. After filling the complete table of the dynamic program, there is a path profile with paths in for each possible total-cost value . In the last step, the algorithm will choose the path profile for which the longest path is as short as possible, i.e. the algorithm chooses .
DP strategy for balancedness.
Our first strategy for selecting the candidates for the intermediate steps aims for balancedness of the solutions and is formalised in the following lemma, that reveals that the strategy yields an -approximation.
Lemma 13.
The dynamic program which always selects the candidate with paths of lengths that minimises
| (4) |
computes a solution with , where DP is the objective value of the computed solution and is the objective value of an optimal solution.
DP strategy for boundedness.
Our second candidate selection strategy aims at -boundedness of the intermediate solutions. This is formalised in the following lemma, which shows that this strategy yields a -approximation.
Lemma 14.
The dynamic program that always selects the candidate with paths of lengths that minimises
| in case of a series combination, and | (5) | |||
| in case of a parallel composition | (6) |
computes a solution with , where DP is the objective value of the computed solution and is the objective value of an optimal solution.
Similarly to the proof of Lemma 13 we follow the table entries of an optimal solution. However, here we need to consider a component of the decomposition tree of at once and show that the entries for the subgraphs corresponding to segment roots are -bounded. The formal proof of this lemma can be found in the full version of this article [1, Appendix F.5].
Running time.
From the size of the dynamic programming table, we can obtain the bound on its running time formalised in the lemma below. By a standard rounding approach, we can further ensure that the number of possible total-cost values is polynomial in the size of the graph at a loss of a -factor in the approximation ratio, obtaining the desired polynomial running time; see the full version of this article [1, Appendix F.6] for details.
Lemma 15.
The dynamic program runs in time .
6 Conclusion
In this paper, we introduced TMO as a natural optimisation problem that captures some of the fundamental challenges of routing trains with a headway constraint. By showing the existence of optimal train routings with a convoy structure, we linked the approximability of the problem to that of MinMaxDP, for which we then provided new approximation results in SePa-graphs. Several interesting questions arise from our work:
-
Which of the results presented in this paper can be extended to the setting in which trains might have distinct sources and sinks? Note that for general DAGs even finding disjoint paths for multiple source-sink pairs is NP-hard [12] and that this still holds true in undirected SePa-graphs [23]; however, this hardness result does not carry over to directed SePa-graphs, so there is hope that our approximation results for those graphs extend to the multi commodity case.
References
- [1] Umang Bhaskar, Katharina Eickhoff, Lennart Kauther, Jannik Matuschke, Britta Peis, and Laura Vargas Koch. On the Approximability of Train Routing and the Min-Max Disjoint Paths Problem, 2025. doi:10.48550/arXiv.2507.03687.
- [2] Hans L. Bodlaender and Babette de Fluiter. Parallel algorithms for series parallel graphs. In Josep Díaz and Maria J. Serna, editors, Algorithms — ESA ’96, Lecture Notes in Computer Science, pages 277–289, Berlin, Heidelberg, 1996. Springer Berlin Heidelberg. doi:10.1007/3-540-61680-2_62.
- [3] Ralf Borndörfer, Torsten Klug, Thomas Schlechte, Armin Fügenschuh, Thilo Schang, and Hanno Schülldorf. The freight train routing problem for congested railway networks with mixed traffic. Transportation Science, 50(2):408–423, 2016. doi:10.1287/trsc.2015.0656.
- [4] Valentina Cacchiani, Alberto Caprara, and Paolo Toth. Scheduling extra freight trains on railway networks. Transportation Research Part B: Methodological, 44(2):215–231, 2010. doi:10.1016/j.trb.2009.07.007.
- [5] Gabrio Caimi, Leo Kroon, and Christian Liebchen. Models for railway timetable optimization: Applicability and applications in practice. Journal of Rail Transport Planning & Management, 6(4):285–312, 2017. doi:10.1016/j.jrtpm.2016.11.002.
- [6] Malachy Carey. Ex ante heuristic measures of schedule reliability. Transportation Research Part B: Methodological, 33(7):473–494, 1999. doi:10.1016/S0191-2615(99)00002-8.
- [7] Edward G. Coffman, Jr. and Mihalis Yannakakis. Permuting elements within columns of a matrix in order to minimize maximum row sum. Mathematics of Operations Research, 9(3):384–390, 1984. doi:10.1287/moor.9.3.384.
- [8] José Correa, Carolina Osorio, Laura Vargas Koch, David Watling, and Svenja Griesbach. Dynamic traffic models in transportation science (dagstuhl seminar 24281). Dagstuhl Reports, 14(7):1–16, 2024. doi:10.4230/DagRep.14.7.1.
- [9] Syamantak Das and Andreas Wiese. On minimizing the makespan when some jobs cannot be assigned on the same machine. In Kirk Pruhs and Christian Sohler, editors, 25th Annual European Symposium on Algorithms (ESA 2017), volume 87 of LIPIcs, pages 31:1–31:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ESA.2017.31.
- [10] Trivikram Dokka and Marc Goerigk. Multi-level bottleneck assignment problems: Complexity and sparsity-exploiting formulations. Computers & Operations Research, 154:106213, 2023. doi:10.1016/j.cor.2023.106213.
- [11] Daniel Dressler and Martin Skutella. An FPTAS for flows over time with aggregate arc capacities. In Klaus Jansen and Roberto Solis-Oba, editors, International Workshop on Approximation and Online Algorithms, volume 6534 of Lecture Notes in Computer Science, pages 106–117. Springer, 2010. doi:10.1007/978-3-642-18318-8_10.
- [12] Shimon Even, Alon Itai, and Adi Shamir. On the complexity of timetable and multicommodity flow problems. SIAM Journal on Computing, 5(4):691–703, 1976. doi:10.1137/0205048.
- [13] Rudolf Fleischer, Qi Ge, Jian Li, and Hong Zhu. Efficient algorithms for k -disjoint paths problems on dags. In Ming-Yang Kao and Xiang-Yang Li, editors, Algorithmic Aspects in Information and Management, volume 4508 of Lecture Notes in Computer Science, pages 134–143. Springer Berlin Heidelberg, 2007. doi:10.1007/978-3-540-72870-2_13.
- [14] Lester Randolph Ford, Jr. and Delbert Ray Fulkerson. Constructing maximal dynamic flows from static flows. Operations research, 6(3):419–433, 1958. doi:10.1287/opre.6.3.419.
- [15] T. Godwin, Ram Gopalan, and T. T. Narendran. Freight train routing and scheduling in a passenger rail network: Computational complexity and the stepwise dispatching heuristic. Asia-Pacific Journal of Operational Research, 24(4):499–533, 2007. doi:10.1142/S0217595907001358.
- [16] Rebecca Haehn, Erika Ábrahám, and Nils Nießen. Freight train scheduling in railway systems. In Holger Hermanns, editor, Measurement, Modelling and Evaluation of Computing Systems, volume 12040, pages 225–241. Springer, 2020. doi:10.1007/978-3-030-43024-5_14.
- [17] Wen-Lian Hsu. Approximation algorithms for the assembly line crew scheduling problem. Mathematics of Operations Research, 9(3):376–383, 1984. doi:10.1287/moor.9.3.376.
- [18] Fahimeh Khoshniyat. Optimization-Based Methods for Revising Train Timetables with Focus on Robustness. Linköping University Electronic Press, 2016. doi:10.3384/lic.diva-132920.
- [19] Leo G. Kroon, H. Edwin Romeijn, and Peter J. Zwaneveld. Routing trains through railway stations: complexity issues. European Journal of Operational Research, 98(3):485–498, 1997. doi:10.1016/S0377-2217(95)00342-8.
- [20] Chung-Lun Li, S. Thomas McCormick, and David Simchi-Levi. The complexity of finding two disjoint paths with min-max objective function. Discrete Applied Mathematics, 26(1):105–115, 1990. doi:10.1016/0166-218X(90)90024-7.
- [21] Richard M. Lusby, Jesper Larsen, Matthias Ehrgott, and David Ryan. Railway track allocation: models and methods. OR Spectrum, 33(4):843–883, 2011. doi:10.1007/s00291-009-0189-0.
- [22] Shi Mu and Maged Dessouky. Scheduling freight trains traveling on complex networks. Transportation Research Part B: Methodological, 45(7):1103–1123, 2011. doi:10.1016/j.trb.2011.05.021.
- [23] Takao Nishizeki, Jens Vygen, and Xiao Zhou. The edge-disjoint paths problem is NP-complete for series–parallel graphs. Discrete Applied Mathematics, 115(1):177–186, 2001. doi:10.1016/S0166-218X(01)00223-2.
- [24] Bianca Pascariu, Marcella Samà, Paola Pellegrini, Andrea d’Ariano, Joaquin Rodriguez, and Dario Pacciarelli. Formulation of train routing selection problem for different real-time traffic management objectives. Journal of Rail Transport Planning & Management, 31:100460, 2024. doi:10.1016/j.jrtpm.2024.100460.
- [25] Thomas Rothvoss, Laura Sanità, and Robert Weismantel. Combinatorial optimization. Technical Report 50/2024, Mathematisches Forschungsinstitut Oberwolfach, 2024. doi:10.14760/OWR-2024-50.
- [26] Sedigheh Sadeghhosseini. Time headway and platooning characteristics of vehicles on interstate highways. University of Illinois at Urbana-Champaign, 2002. URL: https://hdl.handle.net/2142/83185.
- [27] Masahide Saho and Maiko Shigeno. Cancel-and-tighten algorithm for quickest flow problems. Networks, 69(2):179–188, 2017. doi:10.1002/net.21726.
- [28] Martin Skutella. An introduction to network flows over time. In William Cook, László Lovász, and Jens Vygen, editors, Research Trends in Combinatorial Optimization: Bonn 2008, pages 451–482. Springer Berlin Heidelberg, 2009. doi:10.1007/978-3-540-76796-1_21.
