An analysis of the parameterized complexity of periodic timetabling

Public transportation networks are typically operated with a periodic timetable. The periodic event scheduling problem (PESP) is the standard mathematical modeling tool for periodic timetabling. PESP is a computationally very challenging problem: For example, solving the instances of the benchmarking library PESPlib to optimality seems out of reach. Since PESP can be solved in linear time on trees, and the treewidth is a rather small graph parameter in the networks of the PESPlib, it is a natural question to ask whether there are polynomial-time algorithms for input networks of bounded treewidth, or even better, fixed-parameter tractable algorithms. We show that deciding the feasibility of a PESP instance is NP-hard even when the treewidth is 2, the branchwidth is 2, or the carvingwidth is 3. Analogous results hold for the optimization of reduced PESP instances, where the feasibility problem is trivial. Moreover, we show W[1]-hardness of the general feasibility problem with respect to treewidth, which means that we can most likely only accomplish pseudo-polynomial-time algorithms on input networks with bounded tree- or branchwidth. We present two such algorithms based on dynamic programming. We further analyze the parameterized complexity of PESP with bounded cyclomatic number, diameter, or vertex cover number. For event-activity networks with a special—but standard—structure, we give explicit and sharp bounds on the branchwidth in terms of the maximum degree and the carvingwidth of an underlying line network. Finally, we investigate several parameters on the smallest instance of the benchmarking library PESPlib.


Introduction
Creating and optimizing timetables is substantial for planning and operating public transportation networks.Both in local traffic and in long-distance train networks, timetables are often periodic, i.e., the schedule of trips repeats after a certain time period T , e.g., 60 min.
Mathematically, periodic timetabling is captured by the periodic event scheduling problem (PESP, Serafini & Ukovich, 1989).The idea behind PESP is to model arrival and departure events of trips in a public transportation network as vertices (events) of a directed graph.Dependencies between a given graph G on n vertices with a nice tree decomposition of treewidth ≤ k and a natural number T , there is an O( f (k, T ) • n) algorithm deciding the T -Vertex Coloring problem on G (Arnborg & Proskurowski, 1989).
This motivates the investigation of parameterized complexity of PESP.In fact, the treewidth turns out to be rather small on the instances of the benchmarking library PESPlib (Goerigk, 2012).This library is a collection of 20 periodic timetabling problems, none of which could be solved to optimality in the past years.In Sect.3, we recall some standard notions from parameterized complexity, list values or give bounds for several typical graph parameters for the smallest PESPlib instance R1L1, and give an overview on the complexity landscape for these parameters.The corresponding hardness results, algorithms, and the computation of the parameters make up the content of the following three sections of the paper.
We show in Sect. 4 that, in contrast to Vertex Coloring, PESP is not fixed-parameter tractable when parameterized by treewidth unless P = NP.Even if the event-activity network has treewidth 2 or branchwidth 2, i.e., every connected component is series-parallel, it is an NP-complete problem to decide whether a feasible periodic timetable exists.When considering reduced PESP instances, where the activities carry only lower bounds, but no (non-trivial) upper bounds, we prove that it is NP-complete to decide if there exists a periodic timetable whose weighted periodic slack is below a given threshold.Both proofs work by a reduction in the Subset Sum problem.As a by-product, we also obtain an NP-hardness result on networks of carvingwidth 3.As a consequence, if P = NP, then there are only pseudopolynomial-time algorithms available for both the feasibility and the reduced optimality problem.Moreover, the existence of fixed-parameter tractable algorithms allowing a unary encoding of the period time T is shown to be unlikely, as we show that deciding the feasibility of a PESP instance is W [1]-hard w.r.t. the vertex cover number and hence for the treewidth.
We construct a dynamic program that solves PESP based on branch decompositions in Sect. 5.This provides a pseudopolynomial algorithm for networks of bounded branchwidth or treewidth.A straightforward tree decomposition analogue is presented in the Appendix.We also prove that the feasibility version of PESP is fixed-parameter tractable when parameterized by the cyclomatic number, i.e., the dimension of the cycle space of the event-activity network.For computing periodic timetables with minimum weighted periodic slack, we give a polynomial-time algorithm when the cyclomatic number is bounded.
As PESP instances arising from public transportation networks typically have a special structure, we show in Sect.6 that on this type of event-activity networks, the branchwidth can be related to invariants of an underlying line network: Roughly speaking, the number of lines at a station of a public transport network is a (sharp) lower bound on the branchwidth of the event-activity network.The carvingwidth of the often planar line network provides an upper bound, which is also sharp.Finally, we exploit the relation to line networks in order to compute bounds on the parameters discussed in this paper for the smallest PESPlib instance R1L1.
The presentation finishes with a few concluding remarks in Sect.7.

The periodic event scheduling problem
The periodic event scheduling problem (PESP) was introduced in Serafini and Ukovich (1989).PESP instances comprise the following ingredients: -a directed graph G (often called event-activity network) with vertex set V (G) (events) and arc set A(G) (activities), -a period time T ∈ N, lower bounds ∈ Z A(G) ≥0 with a < T for all a ∈ A(G), upper bounds u ∈ Z A (G)  ≥0 with u a ≥ a for all a ∈ A(G), In the application of periodic timetabling in public transport, the events are typically arrivals or departures of a vehicle at a station, and activities model driving between stations, dwelling at a station, passenger transfers, or safety constraint such as minimum distances between vehicles (Liebchen & Möhring, 2007).The weights often reflect the number of passengers using an activity.
Definition 2.1 Given (G, T , , u) as above, a periodic timetable is a vector π ∈ [0, T ) V (G) such that there exists a periodic tension x ∈ R A(G) ≥0 satisfying ∀i j ∈ A(G) : i j ≤ x i j ≤ u i j and π j − π i ≡ x i j mod T . (1) Intuitively, π gives the cyclic order of the events, and x corresponds to the duration of the activities.If there exists a periodic timetable π , then a periodic tension can be computed by where [•] T denotes the modulo-T -operator taking values in [0, T ).Conversely, from a vector x ∈ R In terms of the incidence matrix B of G and its transpose B t , condition (1) can be rewritten as ≤ x ≤ u and B t π ≡ x mod T .
Since B and hence are B t are totally unimodular (Schrijver, 1986, Example 19.2) and the bounds , u are integer, it follows that if a periodic timetable exists, then there is also an integer timetable with an integer periodic tension.However, in general, it is not at all clear that a periodic timetable exists: Definition 2.2 (T -PESP-Feasibility) Given a tuple (G, T , , u) as above, decide if there exists a periodic timetable π .
Theorem 2.3 (Odijk, 1994) T , , u) as follows: G is obtained from H by arbitrarily directing the edges, and set := 1, u := T − 1.Then, H admits a T -coloring if and only if (G, T , , u) has a periodic timetable π .Namely, if f : V (H ) → {0, . . ., T − 1} is a T -coloring, then setting π i := f (i) for all i ∈ V (G) is a periodic timetable, as for every arc i j ∈ A(G) then holds Vice versa, if the PESP instance is feasible, then there is an integer timetable, giving rise to a T -coloring.
So far, we have neglected the weight vector w ∈ Q A (G)  ≥0 .The weights come into play in the optimization variant of PESP, which we state as its corresponding decision version.If x is a periodic tension, we call y := x − ≥ 0 the periodic slack.
Definition 2.4 (T -PESP-Optimality) Given a tuple (G, T , , u, w) as above and a number M, find a periodic timetable π with periodic slack y such that w t y ≤ M.
Minimizing the weighted periodic slack, or equivalently, the weighted periodic tension, can be interpreted as minimizing the total travel time of all passengers in a public transportation network.Clearly, T -PESP-Optimality is an NP-hard optimization problem.However, in many nonrailway public transport networks, minimum distances are neglected for planning, and the driving and dwelling times of vehicles have a rather small span, so that they can be assumed as fixed.Contracting the corresponding activities yields a graph where only transfer activities remain, and these have typically no restrictions on their durations in the sense that lower and upper bounds differ by at least T − 1.This motivates the following specialization of PESP, called reduced PESP in Pätzold and Schöbel (2016): T , , u, w) as above with u ≥ + T − 1 and a number M, find a periodic timetable π with periodic slack y such that w t y ≤ M.
Note that the feasibility problem is trivial to solve: In fact, Theorem 2.6 (Nachtigall, 1993) For any fixed T ≥ 3, T -RPESP-Optimality is NP-hard.

Proof
We adapt the proof of Nachtigall to our notions and notations.Fix some period time T ≥ 3. We reduce T -PESP-Feasibility to T -RPESP-Optimality.Let (G, T , , u) be a T -PESP-Feasibility instance.Without loss of generality, assume that u − < T , because if the instance is feasible, then there is a periodic tension x satisfying x < + T by (2).Add to each arc a ∈ A(G) from i to j a reverse copy a with a := [−u a ] T .Set all weights w to 1.For this T -RPESP-Optimality instance, let π be a periodic timetable with tension x as defined in (2).Then, for any original arc a holds a ≤ x a < a + T and x a ≡ −x a mod T .For the slacks y a and y a , we obtain In particular, for the weighted slack of the and equality holds if and only if x a ≤ u a for all a ∈ A(G).This means that the T -PESP-Feasibility instance is feasible if and only if the described T -RPESP-Optimality instance has weighted periodic slack at most M := We turn now to simple algorithms for T -PESP-Optimality.Consider at first instances where undirecting the event-activity network G results in a tree (shortly, G is a tree): Lemma 2.7 Suppose that G is a tree on n vertices.Then, T -PESP-Optimality on (G, T , , u, w) can be solved in O(n) time.Moreover, is an optimal periodic tension, and the minimum weighted periodic slack is 0.
Proof If undirecting G results in a tree on n vertices, then the transpose B t of the incidence matrix B of G is a (n − 1) × n matrix of full rank n−1.In particular, B t π = has a solution over Z, and reducing modulo T gives a feasible periodic timetable π * with periodic tension and hence weighted periodic slack 0.
Avoiding linear algebra, π * can as well be obtained by traversing the tree, starting with π * v = 0 at an initial vertex v and setting π * On general networks, there are several ways to give naive exponential-time algorithms for T -PESP-Optimality: T , , u, w) with n events and m activities, T -PESP-Optimality can be solved in G) , compute x by (2), and check the bounds.This is an O(mT n ) algorithm.If π is a periodic timetable, then for any d ∈ R, π defined by is a periodic timetable with the same periodic tension.In particular, only T n−1 vectors have to be enumerated.2. By Nachtigall (1998), if G is weakly connected and the instance is feasible, there is an optimal periodic tension x * and a spanning tree F of G such that x * a ∈ { a , u a } for all a ∈ A(F).Enumerate all O(n n−2 ) spanning trees F of G.For each such F, enumerate all 2 n−1 vectors x ∈ a∈A(F) { a , u a }.Interpreting x as a periodic tension defines a periodic timetable π ∈ [0, T ) V (G)    (G) .This is a series of 3 m linear programs.
Somewhat unsurprisingly, Lemma 2.8 implies that all three presented PESP variants are solvable in polynomial time when the number of events or the number of activities is fixed.In the remainder of the paper, we investigate several graph parameters and their effects on the parameterized complexity of PESP.

Parameterized Complexity
Parameterized complexity is an active topic in the context of scheduling; see, for example, Mnich & van Bevern, 2018.Before introducing the parameters discussed in this paper, we recall several standard notions from the field of parameterized complexity and refer to the books (Downey & Fellows, 1999) and (Cygan et al., 2015) for further details.
A parameterized problem over an alphabet Σ is a language L ⊆ Σ * × N. A parameterized problem L is called fixedparameter tractable (FPT) if there are an algorithm A, a computable function f : N → N, and a constant c ∈ N such that for each (x, k) ∈ Σ * × N, A decides whether (x, k) ∈ L within f (k) • size(x, k) c steps.In this case, we will call A an FPT algorithm.The class of FPT problems forms a complexity class, which will also be denoted by FPT.
A parameterized problem L belongs to the complexity class XP if there are an algorithm A and functions f , g : k) steps.Clearly, FPT ⊆ XP.
Generalizing FPT algorithms to non-deterministic algorithms, we obtain the complexity class para-NP.We have FPT = para-NP if and only if P = NP, and no para-NP-hard problem can be in XP.
For parameterized problems L ⊆ Σ * L ×N and M ⊆ Σ * M × N, a parameterized reduction of L to M is an algorithm A that transforms an instance where f : N → N is computable and c ∈ N is a constant, and both f and c are independent of (x, k).Finally, we define the complexity class W [1] as the class of all parameterized problems that admit a parameterized reduction to the k-Clique problem.It is known that FPT ⊆ W [1] ⊆ XP ∩ para-NP, and it is believed that FPT = W [1].

Parameter search
We now return to PESP.The benchmarking library PES-Plib (Goerigk, 2012) contains 20 difficult T -PESP-Optimality instances, created with the LinTim toolbox with data of the German railway network (Goerigk et al., 2013).Despite several efforts, none of the instances is currently solved to proven optimality.
For the event-activity network of the smallest PESPlib instance R1L1, the values of several typical graph parameters in parameterized complexity are summarized in Table 1.Most of the parameters are easy to obtain; we will elaborate in Sect.6 on the computation of the others.The cyclomatic number, also known as feedback edge set number, is a common measure for the difficulty of PESP instances, as it counts the number of integral variables used in a cycle-based mixed integer programming formulation (Borndörfer et al., 2019).However, parameters such as treewidth and branchwidth are much smaller.As T -PESP-Optimality is solvable in linear time on trees by Lemma 2.7, it seems therefore reasonable to investigate parameterized algorithms in terms of treewidth.In particular, we could ask whether there is a polynomial-time algorithm for PESP on event-activity networks with bounded treewidth, i.e., T -PESP-Optimality belongs to XP.Even  better, we wonder if there is an FPT algorithm.Unfortunately, the answer is negative unless P = NP.The complexity landscape of the parameters discussed in this paper is manifold.An overview of the results and the relations between the parameters is depicted in Fig. 1.We will introduce the parameters in the next two sections, presenting hardness results in Sect. 4 and algorithms in Sect. 5.  (Garey & Johnson, 1979, SP13) The Subset Sum problem is the following: Proof Let π be a periodic timetable for I (r , c, C).Then,

Para-NP-Hardness
For the arc (0, r ), we then obtain and found a positive answer to the Subset Sum problem on (r , c, C).Conversely, any vector z ∈ {0, 1} r such that c t z = C yields a feasible periodic timetable π by setting π 0 := 0 and

Treewidth
Definition 4.4 (e.g., Robertson & Seymour, 1984) Given a graph G, a tree decomposition of G is a pair (T , X ) consisting of a tree T and a family of bags X = (X t ) t∈V (T ) with Fig. 3 An optimal tree decomposition of width 2 for the I (r , c, C) network 2. for each a ∈ A(G), there is a bag X t containing both endpoints of a, The width of a tree decomposition is max t∈V (T )|X t | − 1, and the treewidth of G is defined as the minimum possible width of a tree decomposition, i.e., tw(G) := min max This definition applies to both undirected and directed graphs, and as well to multigraphs.According to Definition 4.4, the treewidth of a graph with multiple edges equals the treewidth of the graph where all multiple edges between two vertices are replaced by a single edge.The simple connected graphs of treewidth 1 are precisely the trees.Proof The path of length r depicted in Fig. 3, where each node is labeled with its bag, is a tree decomposition of G. Checking the properties of a tree decomposition is straightforward.The maximum bag size is 3, and hence tw(G) ≤ 2. Removing one of the two arcs from i to i +1, i = 0, . . ., r −1, does not change the treewidth in the sense of Definition 4.4.As r ≥ 2, this results in a simple graph containing a cycle, so that tw(G) ≥ 2.
An alternative way to see that the network G of I (r , c, C) has treewidth at most 2 is to observe that G is series-parallel (see, for example, Bodlaender & van Antwerpen-de Fluiter, 2001, Lemma 3.4).With Lemmas 4.3 and 4.5, we obtain: Remark 4.9 In the proof of Lemma 4.3, the period time T is chosen very large.The above NP-completeness theorems hence do not hold when T is fixed.We will give a pseudo-polynomial algorithm for T -PESP-Optimality with bounded branchwidth in Sect.5, showing that fixing both T and the treewidth results in a polynomial-time algorithm.

Remark 4.10
We want to remark that there has already been a paper (van Heuven van Staereling, 2018) titled Tree Decomposition Methods for the periodic event scheduling problem.However, the title is misleading, as the algorithm there is about finding trees in the network rather than considering tree decompositions in the usual sense.

Branchwidth
Definition 4.11 (Robertson & Seymour, 1991) Given a graph G, a branch decomposition of G is a pair (B, ϕ), where B is a tree such that every non-leaf node has degree 3, and ϕ is a bijection from the leaves of B to A(G).Deleting an edge e of B disconnects B into two subtrees and hence partitions the leaves of B into two sets.Applying ϕ, this yields a partition e .This defines in turn a vertex separator S e ⊆ V as the set of vertices that are incident both to an edge in A 1 Treewidth and branchwidth are related as follows: Theorem 4.12 (Robertson & Seymour, 1991, 5.1) It follows immediately that both T -PESP-Feasibility and T -RPESP-Optimality are NP-complete on networks with branchwidth 3. We prove below that the NP-completeness is already given for branchwidth 2.

Lemma 4.13
For any Subset Sum instance (r , c, C), the event-activity network G of the instance I (r , c, C) has branchwidth 2.
Fig. 4 An optimal branch decomposition of width 2 for the I (r , c, C) network Proof Figure 4 shows a branch decomposition of G, where the leaves are labeled with the corresponding arc and the edges are labeled with the cardinality of the corresponding vertex separator.This is clearly a branch decomposition.
Checking the cardinalities of the vertex separators is again straightforward, and hence bw(G) ≤ 2. The network G cannot have branchwidth 1, as in any branch decomposition, the edge incident to the leaf representing (0, r ) always induces the vertex separator {0, r } of size 2. Another approach to prove Lemma 4.13 and Theorem 4.14 is to exploit that a graph of treewidth at most 2 has branchwidth at most 2 (combine, for example, Bodlaender & van Antwerpen-de Fluiter, 2001, Lemma 3.5 with Robertson & Seymour, 1991, 4.2).

Carvingwidth
Carvingwidth is defined analogously to branchwidth, by labeling the leaves of an unrooted binary tree with the vertices of the original graph instead of the edges.Definition 4.15 (Seymour & Thomas, 1994) Given a graph G, a carving decomposition of G is a pair (C, ψ), where C is a tree such that every non-leaf node has degree 3, and ψ is a bijection from the leaves of C to V (G).Removing an edge e of C induces a partition of the leaves of C, and hence via ψ also a partition Fig. 5 An optimal carving decomposition of width 3 of the modified The maximum cardinality of δ(V 1 e ) taken over all e ∈ E(C) is the width of (C, ψ).The carvingwidth of G is defined as The definition of carvingwidth applies as well to multigraphs, but in contrast to branch-and treewidth, it is sensitive to multiple edges: The carvingwidth is at least the maximum vertex degree Δ(G), as for each Carvingwidth is related to branchwidth as follows: Theorem 4.16 (Nestoridis & Thilikos, 2014;Eppstein, 2018) Let G be a graph with maximum vertex degree Δ(G).Then, Theorem 4.17 T -PESP-Feasibility is NP-complete on networks of carvingwidth at most 3, and T -RPESP-Optimality is NP-complete on networks of carvingwidth at most 6.
Proof Let r ≥ 2 and consider again an instance of the form I (r , c, C) with event-activity network G.Then, Δ(G) = 4, so that cw(G) ≥ 4. For all i ∈ {1, . . ., r − 1}, split vertex i into two new vertices i + and i − , connected by a single directed arc (i + , i − ) with bounds i + ,i − = u i + ,i − = 0.The splitting is done in such a way that the arcs entering i are now entering i + , and the arcs leaving i are leaving i − .Any periodic timetable has the same value at i + and i − , so that the proof of Lemma 4.3 carries over.However, the modified graph has maximum degree 3. The carving decomposition in Fig. 5, where the edges labeled with the number of cut edges, has width 3. Hence, T -PESP-Feasibility is NPcomplete on networks of carvingwidth 3.As a consequence, keeping in mind the arc duplication occurring in the proof of Theorem 2.6, T -RPESP-Optimality is NP-complete for carvingwidth 6.
We also obtain from the proof of Theorem 4.17 that T -PESP-Feasibility is in fact NP-complete on networks with maximum degree 3. Remark 4.18 T -PESP-Optimality is trivial to solve on graphs G with cw(G) = 1, as then Δ(G) ≤ 1 by Theorem 4.16.If cw(G) = 2, then Δ(G) ≤ 2, so that any weakly connected component of G, seen as an undirected graph, is either a path or a cycle.T -PESP-Optimality is solvable in linear time on paths (Lemma 2.7).We will see later in Theorem 5.12 that T -PESP-Optimality admits a polynomial-time algorithm when the cyclomatic number is bounded by a constant, and in particular on a single cycle.

Diameter
The diameter of a graph is the maximum length of an undirected shortest path between two vertices.Proof For the first statement, we turn the instances I (r , c, C) used in Lemma 4.3 into complete graphs by adding activities a with a = 0 and u a = T − 1 and observe that this does not alter the feasibility.
In Sect.5, we will give an FPT algorithm for T -PESP-Optimality when both diameter and cyclomatic number are bounded.

W[1]-Hardness
List Coloring dates back to Vizing (1976) and Erdős et al. (1980).It is known to be W [1]-hard when parameterized by treewidth (Fellows et al., 2011), or by the vertex cover number (Fiala et al., 2011, Theorem 1).We will now describe a parameterized reduction in the List Coloring problem to T -PESP-Feasibility, which will be useful for two purposes.
At first, we can deduce the W [1]-hardness of T -PESP-Feasibility w.r.t. the vertex cover number.
Secondly, note that reducing the Subset Sum problem does still allow for FPT algorithms for T -PESP-Feasibility w.r.t.treewidth or branchwidth when the period time T is encoded in unary.We show that in this situation, T -PESP-Feasibility is W [1]-hard, i.e., there is most likely no such "pseudo"-FPT algorithm.In particular, we can only hope for "pseudo"-XP algorithms, where the exponent of T is a nonconstant function of the parameter.We will indeed present such an algorithm in Sect. 5.

Definition 4.20
The List Coloring problem is the following: Given a graph H together with a finite list L(v) ⊆ Z ≥0 for each v ∈ V (H ), decide whether there is a vertex coloring of H such that each vertex v is colored with a color in L(v).
Given a List Coloring instance (H , L), we construct a T -PESP-Feasibility instance (G, T , , u) as follows: Define T := max v∈V (H ) L(v) + 1.Let G be any orientation of H .For each edge of H , we define for the corresponding activity a in A(G) the bounds a := 1 and u a : Add r parallel activities a 1 , . . ., a r from v 0 to v, with bounds where we set c 0 := c r − T .This way, we model the disjunctive constraints of choosing a color in L(v) as a PESP instance (Liebchen & Möhring, 2007, §3.3).
We claim that (H , L) has a feasible list coloring if and only if (G, T , , u) admits a feasible periodic timetable.Thus, let π ∈ [0, T ) V (H ) be a list coloring for (H , L).
Extend π to a timetable on G by setting π v 0 := 0. Let v ∈ V (H ), and assume that v is colored with the jth color from its list, i.e., π v = c j ∈ L(v).For i ∈ {1, . . ., r }, for the ith activity a i from v 0 to v, the periodic tension would be In the first case c j ≤ T ≤ c i−1 +T , and in the second c i > c j implies c j + T ≤ c i−1 + T .We conclude that π is a feasible periodic timetable.
Conversely, consider a feasible periodic timetable π ∈ [0, T ) V (G) .By a shift replacing π by [π − π v 0 ] T , we can assume that π v 0 = 0.By restriction, using that π j = π i for all i j ∈ A(H ), π yields a coloring of H .It remains to check that this is a feasible list coloring.The periodic tension on an activity a i from v 0 to v must satisfy for all i ∈ {1, . . ., r }.Suppose that there is an index j such that c j ≤ π v < c j+1 .Then, the above inequality for i = j +1 means This shows that π v ∈ {c 1 , . . ., c r }, so that π is indeed a feasible list coloring.
We have hence proved the following:

Treewidth and diameter revisited
The treewidth of a graph is known to be bounded by its vertex cover number: Lemma 4.24 (Fiala et al., 2011, §2) Let G be a graph.Then, tw(G) ≤ vc(G).
Moreover, the vertex cover number bounds the diameter, as any path of length d contains at least d/2 vertices of any vertex cover.As a direct consequence of Theorem 4.23, we hence obtain: The key insight for our dynamic programming approach is the following decomposition property: Let I = (G, T , , u, w) be a T -PESP-Optimality instance.For any partition A(G) = A 1 .
∪ A 2 , we can partition I into two subinstances I 1 resp.I 2 restricted to the activities in A 1 resp.A 2 .If y is a feasible periodic slack on I , then the restrictions y 1 resp.y 2 to I 1 resp.I 2 yield feasible periodic slacks with the property a∈A(G) w a y 2 a . (3) On the level of timetables, we obtain from a timetable π on I two timetables π 1 resp.π 2 on I 1 resp.I 2 such that π , π 1 , and π 2 all coincide when restricted to the events of the vertex separator S associated with the partition of A(G) as in Definition 4.11.Conversely, we can glue two periodic timetables π 1 and π 2 together to a timetable π on I if the restrictions to a vertex separator S satisfy π 1 | S = π 2 | S .The corresponding periodic slacks then hold Eq. (3).For minimum weighted slacks, the above discussion shows the following: ∪ A 2 be a partition with vertex separator S giving subinstances I 1 and I 2 of I .Then, π is a feasible per.timetable on I }.

More generally, if additionally the timetable is fixed on W
where W i = W ∩ V i denotes the intersection of W with the set of events V i of I i , i = 1, 2.

A branch decomposition approach
Since branch decompositions naturally encode vertex separators, we describe at first a branch-decomposition-based dynamic program for where If e is incident to a leaf associated with an activity i j ∈ A(G), then A 1 e = {i j} and S e = {i, j}, as G is 2-edgeconnected.Hence, OPT(I e , S e , π) is the minimum weighted slack of the activity i j when the timetable at i resp.j is fixed to π i resp.π j .Therefore, we set F e (π ) to w Having presented the core dynamic program, we now turn to the surrounding problems: Finding an optimal branch decomposition If bw(G) ≤ k, then there is a linear-time algorithm computing a branch decomposition of width ≤ k (Bodlaender & Thilikos, 1997).
Computing an optimal timetable By additional bookkeeping, we can not only compute the minimum weighted slack, but also a periodic timetable realizing this slack.

2-edge-connectedness
It is clear from the description of T -PESP-Optimality that the problem can be solved on each weakly connected component of G individually.Moreover, if one of these components is not 2-edge-connected, then the optimal periodic slack of any bridge will be zero (Borndörfer et al., 2019, §3.2).Hence, one can safely assume w.l.o.g. that G is 2-edge-connected.Note that this assumption implies bw(G) ≥ 2.
Fixing If π is a feasible periodic timetable and d ∈ R, then the timetable π defined by π i := [π i + d] T for all i ∈ V (G) is feasible as well and produces the same periodic slack.In particular, in Algorithm 5.3, for all e ∈ E, one can choose an event i ∈ S e and then fix π i = 0. Thus, Algorithm 5.3 can be adapted to run in O(mT 3k/2 −1 ) time.
As a consequence, in conjunction with Lemma 2.7 and Theorem 4.14, we obtain

Bounding treewidth and carvingwidth
It is also possible to construct a tree-decomposition-based dynamic program for bounded treewidth.This tree decomposition version is expected to be asymptotically faster, but requires potentially more space.We refer to the Appendix for details.
We omit a carving-decomposition-based algorithm.Bounding the carvingwidth by k means that the branchwidth is bounded by 2k according to Theorem 4.16, and we can invoke Algorithm 5.3.

Cyclomatic number
We have already seen in Lemma 2.8 that fixing the number of events or the number of activities leads to FPT algorithms for T -PESP-Optimality.In this subsection, we discuss fixedparameter tractability by cyclomatic number.The cyclomatic number is a common measure for the difficulty of PESP instances, as it counts the number of integral variables used in a cycle-based mixed integer programming formulation (Borndörfer et al., 2019).
Definition 5.7 Let G be a graph on n vertices, m edges and c weakly connected components.The cyclomatic number of G is defined as μ(G) := m − n + c.
The following seems to be folklore: Proof We give a proof by induction on μ(G).If μ(G) = 0, then G is a forest and therefore tw(G) = 1.Now, let G be a graph with μ(G) > 0.Then, G contains a cycle and hence an edge e such that G := G \ {e} has the same number of connected components as G, and μ(G ) = μ(G) − 1.By induction hypothesis, tw(G ) ≤ μ(G ) + 1 = μ(G), so that we find a tree decomposition (T , X ) of G with maximum bag size at most μ(G) + 1.If there is a bag containing both endpoints of e, then (T , X ) is also a valid tree decomposition for G, and so tw(G) ≤ μ(G).Otherwise, let i be an endpoint of e and add i to each bag of (T , X ).This is a tree decomposition for G of width μ(G) + 1, so that tw(G) ≤ μ(G) + 1.
While it is true that treewidth and branchwidth can be bounded in terms of each other (see Theorem 4.12), this does not hold for treewidth and cyclomatic number: Proof Let C k be the class of graphs G built from a finite disjoint union of cliques of size k with vertex sets V 1 , . . ., V r together with one additional vertex v joined to each vertex from each clique.Let T be a path on the vertices {1, . . ., r }, and set X i := V i ∪ {v}, i = 1, . . ., r .Then, (T , X ) is a tree decomposition of G and, as and for k ≥ 2, this goes to infinity as r → ∞.
Lemma 5.10 On networks where no vertex has degree 2, T -PESP-Optimality is FPT when parameterized by the cyclomatic number.
Proof Let (G, T , , u, w) be a T -PESP-Optimality instance.We can safely remove all i ∈ V (G) with deg(i) = 1, as in any optimal solution, the incident activity must have periodic slack 0. Hence, we can assume that G has minimum degree 3.By the Handshaking lemma, and hence This means that fixing μ provides a fixed bound on the number n of events, and we conclude by Lemma 2.8.
Contracting vertices of degree 2 is a preprocessing technique that is applied to large PESP instances, for example, in Goerigk and Liebchen (2017) and Borndörfer et al. (2019).Clearly, if x is a feasible tension with a i ≤ x ≤ u a i and b j ≤ x b j ≤ u b j for all i and j, then also a ≤ x a ≤ u a with x a := r i=1 x a i − s j=1 x b j .Conversely, any x a with a ≤ x a ≤ u a can be split into feasible tensions on all a i and b j .Thus, this transformation preserves feasibility.Moreover, contracting vertices of degree 2 does not change the cyclomatic number, so that we can assume that G has minimum degree 3. Invoke Lemma 5.10.Theorem 5.12 T -PESP-Optimality is in XP when parameterized by the cyclomatic number.
Proof Let F be a spanning forest of and let γ 1 , . . ., γ μ be its fundamental cycles, seen as incidence vectors {−1, 0, 1} A(G) .Then (e.g., Nachtigall, 1998) is a feasible periodic tension if and only if ≤ x ≤ u and ∀i ∈ {1, . . ., μ} : γ t i x ≡ 0 mod T .G) , the modulo constraints are equivalent to ∀i ∈{1, . . ., μ} : These are the so-called cycle inequalities (Odijk, 1994).In particular, for each i, one has to check at most values for z i .Since, as in the proof of Theorem 2.6, we can assume w.l.o.g. that u − < T , we have the estimate as the γ i are simple cycles and hence contain at most n vertices.
The description of the polynomial-time algorithm is as follows: Enumerate all O((n + 1) μ ) integral vectors (z 1 , . . ., z μ ) satisfying the cycle inequalities and solve the problem This is a minimum cost network tension problem and can be solved in polynomial time by network flow approaches (Hadjiat & Maurras, 1997;Nachtigall & Opitz, 2008).Alternatively, the above minimization problem can be solved by linear programming.
It remains open whether T -PESP-Optimality can be solved with an FPT w.r.t. the cyclomatic number.

Cyclomatic number and diameter
The main obstacle for a FPT for T -PESP-Optimality is that the cyclomatic number does not bound the number of vertices.However, if, for example, one additionally fixes the diameter, then also T -PESP-Optimality becomes fixedparameter tractable: Corollary 5.13 T -PESP-Optimality is FPT when parameterized by cyclomatic number and diameter.
Proof We adapt the proof of Theorem 5.12.In our final estimate of z i , the number of activities contained in γ i can be bounded from above by 2d if d denotes the diameter of the graph.
A by-product of Corollary 5.13 is that T -PESP-Optimality is also fixed-parameter tractable when parameterized by cyclomatic number and vertex cover number.
Finally, we want to remark that fixing both the cyclomatic number and the diameter does not bound the number of vertices: Lemma 5.14 For any k ∈ N, there is an infinite class of simple connected graphs of diameter at most 2 and cyclomatic number at most k.
Proof For r ≥ k, let G be a star graph on r leaves.Connect k distinct pairs of leaves by an edge.Then, μ(G) = (k + r ) − (r + 1) + 1 = k and G has diameter 2.

Structure of realistic event-activity networks
In this section, we discuss the size of the so far discussed graph parameters on realistic periodic timetabling instances.We consider networks with a special structure based on line networks.This structure is the direct outcome of a typical modeling process (Nachtigall, 1998;Liebchen & Möhring, 2007;Schöbel, 2017;Pätzold et al., 2017).For example, the railway networks in the benchmarking library PESPlib (Goerigk, 2012) are found as subgraphs of networks with this structure.For this type of networks, we give lower and upper bounds on the branchwidth in terms of the underlying line network.We use this theoretical result to compute bounds on the branchwidth of the smallest PESPlib instance R1L1.

Line-based event-activity networks
Public transportation systems of cities, but also railway services, are typically organized in lines.Definition 6.1 A line network (N , L) is a directed multigraph N , together with a set L of directed walks on G such that the arc set A(N ) is the disjoint union of A( ) over all lines ∈ L.
Line networks reflect the maps which transport companies offer for passenger information, displaying stations and lines.Depending on the precise application, lines may also constitute non-simple paths or contain cycles (e.g., London's Circle Line or Berlin's Ringbahn).In the context of line planning, we interpret a line network as a frequencyexpanded line plan, i.e., some lines might have the same vertex sequence.Given a line network (N , L), construct an event-activity network G as follows: 1.For each line ∈ L and each arc i j ∈ A( ), create a departure event (i, , dep) and an arrival event ( j, , arr), and connect these by a driving activity ((i, , dep), ( j, , arr)).2. For each vertex i ∈ V (N ) and each line ∈ L, add a dwelling activity ((i, , arr), (i, , dep)) if both events exist.3.For each vertex i ∈ V (N ) and each pair ( 1 , 2 ) of distinct lines, add a transfer activity ((i, 1 , arr), (i, 2 , dep)) if both events exist.Definition 6.2An event-activity network G is line-based if it arises from a line network (N , L) by the above construction.Shortly, G is based on (N , L).
Denote by deg + (i) resp.deg − (i) the number of outgoing resp.ingoing arcs at i.We summarize some straightforward structural properties of line-based networks in the following lemma: 1. G is bipartite, the parts being the departure and arrival events, respectively.2. Every departure event has a unique outgoing activity, and every arrival event has a unique ingoing activity.In both cases, these are driving activities.

The driving activities in G form a perfect matching in G. 4. Deleting the driving activities from G and undirecting the arcs results in the disjoint union of complete bipartite graphs K deg
Remark 6. 4 Our definition of line-based networks disregards headway activities, which are typically employed to model different line frequencies or safety distances.However, the railway instances found in the PESPlib do not feature this particular kind of activities.(See §6.3 for the analysis of R1L1.)

Branchwidth of line-based networks
To give bounds on the branchwidth of line-based eventactivity networks, we start with a well-known result on the branchwidth of minors: Theorem 6.5 (Robertson & Seymour, 1991, 4.1) If G is a graph and H is a minor of G, then bw(H ) ≤ bw(G).
By Lemma 6.3, this implies that if G is based on (N , L), then bw(G) ≥ max As we did not manage to find a reference in the literature for the branchwidth of complete bipartite graphs, we give a proof here: Lemma 6.6 The complete bipartite graph K p,q has branchwidth min( p, q).Proof Assume p ≤ q.Let P and Q denote the two parts, |P| = p, |Q| = q.The vertex separator associated with any neighborhood δ(w) for w ∈ Q is given by P.Moreover, if E δ(w) is a proper subset, then the cardinality of the corresponding vertex separator is |E| + 1 ≤ p.Take any ternary tree with q leaves labeled with the vertices in Q.Then, replace each leaf w by any ternary tree with p leaves, labeled by the edges in δ(w).The result is a branch decomposition of K p,q of width p.This shows bw(K p,q ) ≤ p.
To show that bw(K p,q ) ≥ p, we make use of tangles.That is, if we can find a collection T of subsets of E(K p,q ) such that 1.This is clear.2. Let A ⊆ E(K p,q ) with sep(A) ≤ p − 1 and that K p,q [A] contains all vertices of P.Then, there must be a vertex v ∈ P incident to some edge of A, but not contained in the separator.Hence, A must contain δ(v), and every vertex w ∈ Q is incident to the edge vw ∈ A. Similarly, if A contains at least p vertices from Q, then it contains δ(w) for at least This means if sep(A) ≤ p−1 and A / ∈ T , then A contains δ(v) for some v ∈ P and δ(w) for at least q − ( p − 1) vertices w ∈ Q.The subgraph induced by the complement of A hence does not contain v, and it also does not contain at least q − ( p − 1) vertices of Q.Therefore, the complement of A is in T .3. It follows by the argument in 2. that for each A ∈ T , the vertex separator is given by V (K p,q [A]).Now K p,q [A] is a simple bipartite graph on at most p − 1 vertices.It Hence, we conclude bw(K p,q ) = p.
Speaking more intuitively, the carvingwidth is hence bounded by the maximum number of lines departing and arriving at a stop of the line network.In practice, line networks are often planar, and the carvingwidth of planar graphs can be computed in polynomial time by the ratcatcher algorithm (Seymour & Thomas, 1994).
Proof of Theorem 6.7 The lower bound follows from Lemma 6.3, Theorem 6.5, and Lemma 6.6.For r ∈ N, let N r be a graph on the vertex set {0, 1, . . ., 2r }, and arcs (i, 0) for i ∈ {1, . . ., r } and (0, i) for i ∈ {r +1, . . ., 2r }.The lines are given by L := {(i, 0, i + r ) | i ∈ {1, . . ., r }}.The resulting line-based event-activity network G r has the structure of a complete bipartite graph K r ,r plus 2r activities connecting the K r ,r with events of degree 1 each.It follows that bw As N r is a star graph on 2r rays, its carvingwidth is easily determined to be 2r .Hence, we found a family of graphs for which the lower bound is sharp, and the upper bound is larger than the lower bound.
Concerning the upper bound, we first partition the activities of G: For each i ∈ V (N ), let A i denote the set of all activities incident to some departure event at i.Then, ∪ A 2 e be the induced partition.If e ∈ E(B i ), then one of A 1 e , A 2 e is contained in A i , so that the vertex separator S e has size at most deg + (i) + deg − (i): S e contains at most all deg − (i) arrival events at i, and every other vertex in S e must be either a departure event or the unique arrival event following a departure event.Observe that deg + (i)+deg − (i) ≤ cw(N ) due to Theorem 4.16.In the other case that e ∈ E(C), there is a subset W e ⊆ V (G) such that A 1 e = i∈W e A i .Each vertex of the vertex separator S e is hence an arrival event at some i ∈ W e .The set S e is in bijection to δ(W e ) by mapping ( j, , arr) to i j ∈ A( ) ⊆ A(N ), where (i, , dep) is the unique driving activity entering ( j, , arr).Hence, as C was chosen to be optimal, |S e | = |δ(W e )| ≤ cw(N ).
Finally, we show that the upper bound is sharp: For r ∈ N, let N r be a directed simple cycle on r vertices.Then, cw(N r ) = 2.The event-activity network G r based on N r is then a directed simple cycle on 2r vertices and has branchwidth 2. On the other hand, the lower is not 2, as max i∈V (N r ) min(deg

An upper bound on branchwidth
The network G in its original shape does not satisfy the properties of Lemma 6.3.However, with small modifications, we can find a line network N such that G is a subgraph of an event-activity network based on N .
Transfer activities a ∈ A(G) are in practice typically recognized by a large span u a − a .As the period time is T = 60, we let A t := {i j ∈ A(G) | u a − a ≥ 59}.We call any vertex i with i j ∈ A t for some j an arrival event, and analogously any vertex j with i j ∈ A t for some i is called a departure event.This is well defined and extends to a bipartition of G into arrival resp.departure events.Now, we interpret any activity from a departure to an arrival is called a driving activity.The set of driving activities is not quite a perfect matching in G: There are two arrival events (84 and 256) with two ingoing driving activities, and two arrival events (53 and 177) with no ingoing driving activity.This is due to four mysterious activities with lower and upper bound 0 breaking the structure at this particular spot; see Fig. 7.However, the vertices 53 to 84 and 177 to 256 can be removed from G by sequentially deleting vertices of degree 1.Since the remaining network has branchwidth at least two, removing vertices of degree 1 has no effect on branchwidth: Lemma 6.8 Let G be a connected graph, and let v ∈ V (G) be a vertex of degree 1.If bw(G \ {v}) ≥ 2, then bw(G) = bw(G \ {v}).
Proof By Theorem 6.5, bw(G \ {v}) ≤ bw(G).For the reverse inequality, consider a branch decomposition (B, ϕ) of G \ {v}.Since G is connected, v is adjacent to some vertex w of degree ≥ 2. Choose an edge e = {v, w} incident with w, and replace the leaf of B corresponding to e by a node with the two children e and {v, w}.This is a branch decomposition of G.The size of the vertex separator corresponding to {v, w} is 1, the size of the separator w.r.t. e is at most 2, and all other vertex separators remain unchanged.This shows bw(G) ≤ bw(G \ {v}).
With this adjustment, G has 3552 vertices and 6273 arcs.G satisfies now properties 1-3 of Lemma 6.3.Deleting the driving activities yields a disjoint union of bipartite graphs G i , but they are not all complete.We define N now as the network obtained from G by contracting all these bipartite graphs G i to a single vertex i.Then, G is a subgraph of an event-activity network based on N , choosing, for example, L as the set of all single-arc walks.By Theorems 6.5 and 6.7, bw(G) ≤ cw(N ).
The network N obtained in this way is unfortunately not planar.The maximum degree in N is 62, so that cw(N ) ≥ 62.To compute an upper bound, we first preprocess N by removing vertices of degree 2, as this does not alter carvingwidth (Belmonte et al., 2013, Lemma 6).We use then the Kuratowski subgraph detection algorithm implemented in the Python package networkx (Hagberg et al., 2008) to recursively remove (multi-)arcs from N until the graph becomes planar.We prefer arcs of low multiplicity, and a sequence of 20 removals of simple arcs finally yields a planar graph N .We implemented the ratcatcher method of Robertson and Seymour to compute cw(N ) = 62 and an optimal carving decomposition.As V (N ) = V (N ), this is also a carving decomposition of N , but the width increases to 70.We hence conclude cw(N ) ∈ [62, 70] and bw(G) ≤ 70.

A lower bound on branchwidth
Since G is only realized as a subgraph of an event-activity network based on N , we cannot invoke Theorem 6.7 directly.Of course, it remains true that bw(G) is at least the branchwidth of the (disconnected) subgraph G obtained by deleting the driving activities.G is reasonably small, but there seems to be no freely available software for exact branchwidth computations.However, there are treewidth codes, and we use the algorithm by Tamaki (2019), which has been implemented for the PACE 2017 challenge on exact treewidth computations (Dell et al., 2018).It turns out that tw(G ) = 20, hence bw(G) ≥ 14.
The largest of the components of G is a bipartite graph with maximum part size 31.If this component were complete, then Theorem 6.7 would have predicted bw(G) ≥ 31.
To obtain a better bound on bw(G), we use balanced vertex separators: Lemma 6.9 (Robertson & Seymour, 1995, 3.1) Let G be a graph.Then, there is a vertex separator S with |S| ≤ bw(G) and ∪ S, and no vertex in V1 is adjacent to a vertex in V 2 and vice versa.
We now compute a minimum cardinality vertex separator subject to the balance constraint of Lemma 6.9 by plugging in a straightforward integer program into the CPLEX 1 12.10 solver.We do not use the full network G as input, but take a smaller network that is obtained after standard preprocessing for T -PESP-Optimality instances (Borndörfer et al., 2019, §3.2).This network is a minor of G, so that we obtain a valid bound on the branchwidth.CPLEX finds a vertex separator of cardinality 58 and is able to solve the instance to optimality.We conclude bw(G) ≥ 58.

Practical implications
The instance R1L1 has a period time of T = 60.It becomes clear from Table 1 that none of the algorithms presented in Sect. 5 can be applied for solving R1L1 in practice.For example, storing T bw(G)−1 ≥ 60 57 table entries for the branch-decomposition-based algorithm 5.3 as 32-bit integers would require roughly 9 • 10 101 bytes of space.

Conclusion
The results of this paper underline that PESP is a notoriously hard problem.Although there are several primal heuristics available, the promising global approaches fail to compute provably optimal solutions: For example, mixedinteger programming formulations suffer from weak linear programming relaxations and transformations to Boolean satisfiability problems scale badly.It fits into this picture that exploiting structural parameters such as treewidth does not lead to a polynomial-time algorithm unless P = NP, and to no pseudo-fixed-parameter algorithm unless FPT = W [1].Moreover, the dynamic programs of Sect. 5 are only of theoretical interest.It is even unclear for tentatively large parameters as cyclomatic number and vertex cover number if T -PESP-Optimality becomes fixed-parameter tractable.
On the positive side, it has been demonstrated in Lindner and Liebchen (2019) that balanced edge separators lead to benefits when computing lower bounds of T -PESP-Optimality instances.We think that this should also carry over to vertex separators, and that good heuristic tree or branch decompositions may be useful as a source for separators in order to tackle PESP by a divide-and-conquer approach.
where, for i j ∈ A(G), -If t is a forget vertex with child u, then X t = X u \ {i} for some event i. Set For a node t ∈ V (T ), define G t as the subnetwork of G induced by the events in the bag of X t and the bags of all descendants of t in T .Denote by I t the corresponding T -PESP-Optimality subinstance of I .
Proof Let G t = (V t , A t ).If t = τ is a leaf, then A t = ∅, and both statements are trivial.
Introducing an event i at t with child u means that The latter is a partition of the activities of G t whose vertex separator is contained in X u .Due to Lemma 5.2, D t (π ) must hence equal D u (π | X u ) plus the minimum weighted slack of the subinstance associated with A t \ A u fixing the timetable at X t , and the latter is precisely given by the formula in Algorithm A.1.
When forgetting an event i at t with child u, then G t = G u .However, the timetable has to be fixed at X t which contained one vertex less than X u , so that we minimize over all table entries where the timetable restricted to X u is the same.
If t is a join vertex with u 1 and u 2 as children, then G t = G u 1 ∪ G u 2 .We apply Lemma 5.2 to A t = A u 1 .∪ (A u 2 \ A u 1 ) and to A u 2 = (A u 2 \ A u 1 ) .∪ (A u 1 ∩ A u 2 ).Note that by the connectedness property of the tree decomposition, any activity A u 1 ∩ A u 2 has both endpoints in X t = X u 1 = X u 2 , so that X t contains the vertex separators of both partitions.Now, the minimum weighted slack on G t is the sum of the minimum weighted slacks on G u 1 and G u 2 , subtracting the minimum weighted slack of the activities that have been counted twice, i.e., A u 1 ∩ A u 2 .Hence, the minimum weighted slack on G t can be computed as described in Algorithm A.1.If fixing the timetable π on X t yields an infeasible timetable, then either D u 1 (π ) or D u 2 (π ) must have been infinite, and vice versa.
Finally, if t = τ is the root, then τ has degree one and hence has a unique child u, so that we can treat it as a forget node.Proof By Lemma A.2, at the root τ , the table entry D τ (π ) is the minimum weighted slack on the subnetwork G τ = G fixing the timetable at X τ to π (or ∞).Minimizing over all entries in D τ hence gives the minimum weighted slack of the T -PESP-Optimality instance (or detects infeasibility).The running time estimate is straightforward, as we need to fill each of the |V (T )| tables with at most T k+1 entries and only employ summation and minimization.

Lemma A.3 If the instance I is feasible, then Algorithm
Theorem A. 4 For k ∈ N, there is an O(nT k ) algorithm solving T -PESP-Optimality on event-activity networks G with n events and tw(G) ≤ k.
Proof By Bodlaender (1996), if tw(G) ≤ k, then a tree decomposition with O(n) nodes realizing width tw(G) can be found in O( f (k) • n) time.This can be transformed into a nice tree decomposition on O(n) nodes within O(n) time (Kloks, 1994, Lemma 13.1.3).Applying Lemma A.3 provides an O(nT k+1 ) algorithm.Using the same fixing strategy as for Theorem 5.6, we obtain an O(nT k ) algorithm.

Remark A.5
The branch-decomposition-based algorithm of Theorem 5.6 has an asymptotic running time of O(mT 3 bw(G)/2 −1 ), and the tree-decomposition-based one runs in O(nT tw(G) ) time; see Theorem A.4.By Theorem 4.12, if G happens to be 2-edge-connected, then nT tw(G) ≤ mT 3 bw(G)/2 −1 , so that the tree-decomposition-based algorithm can be expected to be asymptotically superior.

Remark A.6
In terms of memory, Algorithm 5.3 with the fixing strategy needs to store most T bw(G)−1 table entries per edge, whereas Algorithm A.1 (with fixing) stores at most T tw(G)−1 entries per node.In both cases, at most 3 tables need to be stored at the same time, as any node in one of the decompositions has at most 2 children.Since bw(G)−1 ≤ tw(G) if bw(G) ≥ 2, the branch-decomposition-based method potentially requires less space.

Fig. 1
Fig. 1 Parameter hierarchy and complexity results for T -PESP-Feasibility and T -PESP-Optimality

Lemma 4 . 5
For any Subset Sum instance (r , c, C) with r ≥ 2, the event-activity network G of the instance I (r , c, C) has treewidth 2.

Theorem 4 .
6 T -PESP-Feasibility is NP-complete on networks of treewidth 2. Since the transformation in the proof of Theorem 2.6 reduces T -PESP-Feasibility to the T -RPESP-Optimality problem by adding antiparallel arcs, which does not alter the treewidth, we have moreover: Theorem 4.7 T -RPESP-Optimality is NP-complete on networks of treewidth 2. Remark 4.8 If simple graphs are desired, one can dispose of the parallel arcs in I (r , c, C) by subdividing any arc with bounds [0, c i ] into two arcs with bounds [0, c i ] and [0, 0] without affecting the feasibility of the PESP instance.Moreover, one checks that this does not increase the treewidth of I (r , c, C).

e
and to an edge in A 2 e .The width of a branch decomposition (B, ϕ) is defined as max e∈E(B) |S e |.The branchwidth of G is then the minimum possible width of a branch decomposition, i.e., bw(G) := min max e∈E(B) |S e | (B, ϕ) is a branch decomposition of G .

Theorem 4 .
14 The problems T -PESP-Feasibility and T -RPESP-Optimality are NP-complete on networks with branchwidth at most 2.Proof For T -PESP-Feasibility, this follows by combining Lemma 4.3 with Lemma 4.13.Introducing anti-parallel arcs in the network of I (r , c, C) does not increase the branchwidth of 2: In the branch decomposition of the proof of Lemma 4.13, replace a leaf with a vertex of degree 3 adjacent to two new leaves corresponding to the two anti-parallel arcs.The new edges have vertex separators of size 2. Therefore, the transformation in the proof of Theorem 2.6 does not alter the branchwidth, and T -RPESP-Optimality is NP-complete on networks with branchwidth at most 2.

Corollary 4 .The
25 T -PESP-Feasibility is W[1]-hard when parameterized by treewidth, branchwidth, or diameter.Subset Sum problem is weakly NP-complete and can be solved by pseudo-polynomial-time algorithms.In the following, we present a dynamic program for T -PESP-Optimality running in pseudo-polynomial time for event-activity networks of bounded branchwidth.Since T -PESP-Optimality comprises both T -PESP-Feasibility and T -RPESP-Optimality, this implicitly gives pseudopolynomial time algorithms for these problems as well.

Definition 5. 1
Let I = (G, T , , u, w) be a T -PESP-Optimality instance, and let S ⊆ V (G).For a vector ρ ∈ [0, T ) S , define OPT(I , S, ρ) as the minimum weighted slack of a periodic timetable π on I when additionally π | S = ρ is required.

Theorem 5. 6
For k ∈ N, there is an O(mT 3k/2 −1 ) algorithm solving T -PESP-Optimality on networks G with m activities and bw(G) ≤ k.In particular, if k ≥ 2 is fixed, then the problems T -PESP-Optimality, T -PESP-Feasibility and T -RPESP-Optimality are all weakly NP-complete.

Theorem 5 .
11 T -PESP-Feasibility is FPT when parameterized by the cyclomatic number.Proof Let (G, T , , u) be a T -PESP-Feasibility instance.Remove all events of degree 1 from G, as this does neither affect feasibility nor alter the cyclomatic number.Now, all degree 2 vertices of G are arranged on (undirected) paths between two vertices of degree ≥ 3. Consider such a path from s to t with deg(s), deg(t) ≥ 3, forward activities a 1 , . . ., a r and backward activities b 1 , . . ., b s .Delete all intermediate vertices between s and t and insert a single activity a from s to t with

Theorem 6. 7
Let G be a line-based event activity network, based on the line network (N , L).Then, max i∈V (N ) min(deg + (i), deg − (i)) ≤ bw(G) ≤ cw(N ), and both bounds are sharp.Recall from Sect.4.1.4that cw(N ) denotes the carvingwidth of N , and that cw(N ) ≥ max i∈V (N ) (deg be a branch decomposition of the subgraph of G induced by A i .Add a root b i to each B i by subdividing an arbitrary edge.Let (C, ψ) be an optimal carving decomposition of N .Attach to every leaf v of C the tree B ψ(v) , identifying v with b ψ(v) .This results in a branch decomposition (B, ϕ) of G. Now, let e ∈ E(B) and let A(G) = A 1 e .
T -PESP-Feasibility is NPcomplete for fixed T ≥ 3. Proof It is clear that T -PESP-Feasibility is in NP, as a feasible timetable π with periodic tension x serves as certificate.We recall the proof in order to emphasize the natural relationship between PESP and Vertex Coloring.Recall that the T -Vertex Coloring problem is to decide for an undirected graph H whether it admits a T -coloring, i.e., a map

Table 1
Parameters of R1L1

2 Vertex cover number Definition 4.22 For
Lemma 4.21 A List Coloring instance (H , L) has a solution if and only if (G, T , , u) is feasible.agraph G, its vertex cover number vc(G) is defined as the minimum cardinality of a vertex cover of G. Proof List Coloring is W[1]-hard when parameterized by the vertex cover number (Fiala et al., 2011, Theorem 1).Construct a T -PESP-Feasibility instance (G, T , , u) from a List Coloring instance (H , L) as in Lemma 4.21.Since all arcs in G not present in H are connected to v 0 , we obtain vc(G) ≤ vc(H ) + 1.It remains unclear whether T -PESP-Feasibility or T -PESP-Optimality admit polynomial-time algorithms for fixed vertex cover number, i.e., if these problems belong to XP.In Sect.5.3, we show that fixing both vertex cover number and cyclomatic number enables an FPT algorithm for T -PESP-Optimality.

.
feasible and otherwise to ∞.Otherwise, let e be adjacent to e 1 , e 2 ∈ E, with e 1 , e 2 having larger distance from the root than e.Then, A 1 ∪ A 1 e 2 and hence S e ⊆ S e 1 ∪ S e 2 .Moreover, (S e 1 ∪ S e 2 )\ S e is the vertex separator of the partition of A 1 e = A 1 = S e and S = (S e 1 ∪ S e 2 ) \ S e yields the formula in Algorithm 5.3.If k = max e∈E(B) |S e | and m = |A(G)|, then Algorithm 5.3 computes OPT(I ) or decides that I is infeasible in O(mT 3k/2 ) time.Proof We first consider correctness.At the root τ with incident edges e 1 , e 2 , Algorithm 5.3 computes the tables F e 1 , F e 2 such that F e i (π ) = OPT(I e i , S e i π) for all π and i = 1, 2 by Lemma 5.4.Observe that A 1 e 1 = A 2 e 2 , A 2 e 1 = A 1 e 2 , and S e 1 = S e 2 , so that by the first equation in Lemma 5.2, OPT(I ) = min{OPT(I e 1 , S e 1 , π) + OPT(I e 2 , S e 2 , π) | π ∈ {0, . . ., T − 1} V feasible timetable}.This is precisely reflected in the third step of Algorithm 5.3, treating infeasible subinstances with infinite objective value.Concerning running time, Step 1 can be done in O(T 2 ) time and is called m times.Step 3 takes O(T k ) time since |S e 1 | ≤ k.As any node in the rooted branch decomposition has either 0 or 2 children and there are m leaves, there are m − 1 edges for which Step 2 is called.Each of the |S e | table entries requires to take a minimum over |(S e 1 ∪ S e 2 ) \ S e | previously computed table entries.∈ S e , and any such i appears hence twice in the right-hand side of the above inequality.By symmetry, the same holds for all i ∈ S e 2 \ S e 1 .Clearly, any i ∈ S e 1 ∩ S e 2 is counted both in |S e 1 | and in |S e 2 |.This proves the claim.The relation between the separators is also depicted in Fig. 6.Since the size of any of the three vertex separators is bounded by k, we obtain |S e | + |(S e 1 ∪ S e 2 ) \ S e | = |S e 1 ∪ S e 2 | ≤ 3k 2 .Relation between S e , S e1 , and S e2 e 1 ∪ S e 2 | ≤ |S e 1 | + |S e 2 | + |S e |.If i ∈ S e 1 \ S e 2 , then i is adjacent to an activity a ∈ A 1 Thus, Step 2 accounts in total for a running time of O(mT 3k/2 ), and this dominates the other steps, as k ≥ 2 since |S e | = 2 for every edge e incident to a leaf of B.