Edinburgh Research Explorer Computing Technical Capacities in the European Entry-Exit Gas Market is NP-Hard

. As a result of its liberalization, the European gas market is organized as an entry-exit system in order to decouple the trading and transport of natural gas. Roughly summarized, the gas market organization consists of four subsequent stages. First, the transmission system operator (TSO) is obliged to allocate so-called maximal technical capacities for the nodes of the network. Second, the TSO and the gas traders sign mid-to long-term capacity-right contracts, where the capacity is bounded above by the allocated technical capacities. These contracts are called bookings. Third, on a day-ahead basis, gas traders can nominate the amount of gas that they inject or withdraw from the network at entry and exit nodes, where the nominated amount is bounded above by the respective booking. Fourth and ﬁnally, the TSO has to operate the network such that the nominated amounts of gas can be transported. By signing the booking contract, the TSO guarantees that all possibly resulting nominations can indeed be transported. Consequently, maximal technical capacities have to satisfy that all nominations that comply with these technical capacities can be transported through the network. This leads to a highly challenging mathematical optimization problem. We consider the speciﬁc instantiations of this problem in which we assume capacitated linear as well as potential-based ﬂow models. In this contribution, we formally introduce the problem of Computing Technical Capacities ( CTC ) and prove that it is NP -complete on trees and NP -hard in general. To this end, we ﬁrst reduce the Subset Sum problem to CTC for the case of capacitated linear ﬂows in trees. Afterward, we extend this result to CTC with potential-based ﬂows and show that this problem is also NP -complete on trees by reducing it to the case of capacitated linear ﬂow. Since the hardness results are obtained for the easiest case, i.e., on tree-shaped networks with capacitated linear as well as potential-based ﬂows, this implies the hardness of CTC for more general graph classes.


Introduction
The European gas market is organized as a so-called entry-exit market system, which has been the outcome of the European gas market liberalization; see [6][7][8].The main goal of the entry-exit system is to decouple the trading and transport of gas.The current market organization that should achieve this goal is mainly split into different stages in which the transmission system operator (TSO) and the gas traders interact with each other.First, the TSO is obliged to allocate so-called maximal technical capacities at all nodes of the network at which gas can be injected or withdrawn.After determining the maximal technical capacities, the TSO and the gas traders sign mid-to long-term capacity-right contracts, called bookings, in which the traders buy rights for the maximal injection or withdrawal at certain entry and exit nodes of the network.In doing so, the maximal bookable capacities are bounded from above by the maximal technical capacities.These mid-to long-term booking contracts bound the amounts of gas that traders can nominate on a day-ahead market.On this day-ahead basis, the traders nominate the amount of gas that they inject or withdraw on the next day while the nominated amount of gas is bounded above by the beforehand determined bookings.Finally, the TSO has to operate the network such that the nominated amount of gas is transported as requested.By signing the booking contract, the TSO has to guarantee the feasibility of transport for every booking-compliant nomination, i.e., every nomination below the booked capacity.Since the gas traders can sign any booking below the maximal technical capacities, the TSO has to guarantee that all technical-capacities-compliant nominations, i.e., infinitely many flow situations, can be transported through the network.Thus, computing maximal technical capacities in the European gas market leads to a challenging mathematical problem.A mathematical model of the European entry-exit gas market system that models the described market organization has been developed in [16].The model is a four-level model and it is shown that, under suitable assumptions, it can be reformulated as an equivalent bilevel model.Here, we focus on the first stage where the maximal technical capacities need to be computed.For doing so, we consider passive networks, i.e., no controllable network devices like valves or compressors exist.We further focus on stationary models of gas transport with capacitated linear flow models as well as on potential-based flows as used in, e.g., [17,29].One of the main differences between capacitated linear flows and the more accurate potential-based flow models is that, in the latter, no cyclic flows are possible.On the one hand, this provides additional structure that can be exploited for analyzing the feasibility of nominations and bookings as well as the maximization of technical capacities.However, on the other hand, the coupling between node potentials and arc flows usually is nonlinear and thus, leads to a harder class of optimization problems.
Mathematical optimization methods for gas transport networks have been studied with great interest in the last decades.For a comprehensive overview of this field see, e.g., the book [20] and the survey article [27] as well as the references therein.Most of the literature focuses on checking the feasibility of a single nomination as well as its transport through the network.In [2] and [5], the cost-optimal gas transport in the Belgian network before and after the European market liberalization is discussed.In these papers, the gas physics is approximated by piecewise-linear functions, leading to mixed-integer linear programs (MILPs).Alternative approaches that are also based on MILP techniques can be found in [12,13,24].Further, purely continuous and physically accurate nonlinear optimization models are, e.g., studied in [30][31][32].Even more sophisticated nonlinear mixed-integer models are considered, e.g., in [14,15,19].Checking the feasibility of a nomination considering a capacitated linear flow model is in P, since the task can be modeled as a linear program.Additionally, the same holds in case of potential-based networks; see [4,25].In case of networks with active elements, deciding the feasibility of a nomination is NP-hard for the potential-based flow model; see [34].
In contrast to the rich literature on nominations, there is much less published research on the feasibility of bookings.Deciding the feasibility of a given booking consists of checking the feasibility of all booking-compliant nominations, i.e., of all infinitely many nominations within the given booking bounds.Thus, this problem can also be seen as a two-stage or adjustable robust optimization problem, see, e.g., [3], where the uncertainty set is given by the booking-compliant nominations.First results about the mathematical analysis of bookings are obtained in the PhD theses [18,36].Moreover, the reservation-allocation problem studied in [10] is also related to the feasibility of bookings.Considering the robust side, a set containment approach to decide the robust feasibility and infeasibility of bookings with an application to the Greek gas transport network is studied in [1].In general, structural properties such as (non-)convexity and star-shapedness of the set of feasible nominations and bookings for different gas transport models are considered in [29].For networks consisting of pipes only together with potential-based flows, the feasibility of bookings can be characterized by conditions on nominations with maximal potential difference; see [21].Further, there it is shown that in case of a linear potential-based flow model, this characterization enables us to check the feasibility of a booking in polynomial time.Additionally, this is also possible in case of nonlinear potential-based flows in tree-shaped networks; see [21,28].Using special structures of the nomination with maximal potential difference together with techniques from real algebraic geometry enables the authors of [22] to show that checking the feasibility of a booking in a single cycle network is in P. For the general case, i.e., a nonlinear potential-based flow model on arbitrary networks, the complexity of checking the feasibility of a booking is not yet decided and an open question for research.The general problem of deciding the feasibility of a booking is shown to be in coNP in [18,21].For the case of a capacitated linear flow model, checking the feasibility of a booking is coNP-complete for cyclic networks, but it can be solved in polynomial time for trees; see [18].An illustrative overview about the computational complexity of checking the feasibility of a booking is given in Section 6 of [21].
For computing maximal technical capacities as introduced in, e.g., [23], there is much less in the literature compared to the results for nominations and even less compared to the feasibility of bookings.First results about technical capacities are again obtained in the PhD theses [18,36].Further, for the case of a capacitated linear flow model, exponential upper bounds for computing technical capacities are given in [18].
Our contribution is the following.We prove that computing maximal technical capacities is NP-complete for capacitated linear flows as well as potential-based flow models even in tree-shaped networks.The proof is obtained by reducing the Subset Sum problem to computing maximal technical capacities for capacitated linear flows on trees.Afterward, we reduce computing maximal technical capacities with potential-based flows to the case of capacitated linear flows.Consequently, computing maximal technical capacities is significantly harder than checking the feasibility of bookings, since the latter can be done in polynomial time on trees.Note that our complexity results are obtained on trees.Thus, computing technical capacities remains hard on more complex graph classes like on general graphs.We summarize our contribution, together with a review of the results from the literature, in Table 1.
The remainder of this paper is structured as follows.In Section 2, the problem of computing maximal technical capacities is formally defined.The NP-completeness of computing maximal technical capacities for capacitated linear flow models on trees is shown in Section 3. Afterward, in Section 4 we extend this result by showing that this problem is also NP-complete for potential-based instead of capacitated linear flows.Finally, we close with a conclusion in Section 5.

Problem Description
In general, our problem description follows the one in [22].We consider a directed and connected graph G = (V, A) with nodes V and arcs A. The set of nodes is partitioned into the set V + of entry nodes, at which gas is supplied, the set V − of exit nodes, where gas is withdrawn, and the set V 0 of the remaining inner nodes.We abbreviate the set V + ∪ V − by V b .The node types are also encoded in a vector We now introduce basic definitions that we use in the following.Definition 2.1.A load flow is a vector = ( u ) u∈V ∈ R V ≥0 , with u = 0 for all u ∈ V 0 .The set of load flow vectors is denoted by L.
A load flow thus corresponds to an actual situation at a single point in time by specifying the amount of gas that is supplied ( u for u ∈ V + ) or withdrawn ( u for u ∈ V − ).Since we only consider stationary flows, we need to impose that the supplied amount of gas equals the withdrawn amount, which leads to the definition of a nomination.We now define feasible nominations and feasible bookings, where "feasible" is meant w.r.t.technical, physical, and legal constraints of gas transport.To this end, let c E (x; ) = 0 and c I (x; ) ≥ 0 be the possibly nonlinear, nonconvex, and nonsmooth constraints that model the full problem of gas transport.
holds.The set of feasible nominations is denoted by F N .
We note that the set of feasible nominations F N depends on the chosen model of gas transport.The only constraint that we need in all formulations is mass conservation at each node of the network, i.e., a∈δ out (u) where q u ≥ 0 for entries, q u ≤ 0 for exits, and q u = 0 for inner nodes.The dependence of the feasible set defined in (1) on the nomination is given by a fixation of the entry and exit flows according to the nomination , i.e., q u = u for all u ∈ V + , q u = − u for all u ∈ V − .
These constraints are part of c E (x; ) = 0 in (1).
For a nomination ∈ N , we say that q ∈ R A is an -flow if and only if q satisfies Condition (2).We note that to check whether a given nomination is feasible may lead to a nonlinear and nonconvex problem depending on the constraints c E and c I .For more information on this problem, see, e.g., [20,26] and the references therein.Due to the liberalization of the European gas market, trading and transport are decoupled.This is mainly ensured by the so-called technical capacities.The TSO is obliged to allocate such capacities while guaranteeing the feasibility of transport for any balanced injections at entry nodes and withdrawals at exit nodes within these capacities.
Definition 2.6.Technical capacities are a vector q C = (q C u ) u∈V ∈ R V ≥0 with q C u = 0 for u ∈ V 0 .The set of technical capacities is denoted by C.
We note that technical capacities q C can also be seen as a booking.Definition 2.7.We say that technical capacities q C are feasible if all bookings b ∈ B with b ≤ q C are feasible.The set of feasible technical capacities is denoted by F C .
From the previous definitions it follows that given technical capacities q C ∈ C are feasible if and only if all nominations ∈ N (q C ) are feasible.
In the following, we analyze the complexity of computing maximal feasible technical capacities for different Constraints (1) of gas transport.To avoid unbounded technical capacities, we require that feasible technical capacities satisfy the conditions Conditions (3a) ensure that for every entry node, a technical-capacities-compliant nomination exists such that the entry supplies its total capacity to the grid, i.e., a nomination ∈ N (q C ) with w = q C w exists.Consequently, the complete capacity of an entry node can be nominated in a nomination.In analogy, Conditions (3b) ensure that for every exit node a technical-capacities-compliant nomination exists such that the exit demands its total capacity.Conditions (3) ensure that we do not allocate "unusable" node capacities, i.e., capacities that are not completely used in any technical-capacities-compliant nomination.This prevents that the problem of computing technical capacities is unbounded by setting a single technical capacity to an arbitrary large value and the remaining capacities to zero.The latter technical capacities only contain the zero nomination as technical-capacitiescompliant nomination which is usually feasible.
We finally describe the problem of computing (optimal) technical capacities for a fixed weight vector d ∈ R V by max d q C s.t.q C are feasible technical capacities that satisfy (3). (4) Note that feasibility of (4) implicitly contains feasibility of the actual flows of every technical-capacities-compliant nomination; see (1).Moreover, let us briefly discuss that Problem (4) is slightly more general than the problem that TSOs actually face in practice.The reason is that we consider arbitrary weight vectors d ∈ R V , whereas these may be restricted to be nonnegative in practice.The proof of our complexity result is already rather technical without this restriction.Thus, we keep the assumption d ∈ R V throughout the paper and postpone the nonnegative case to future research.
We define two variants of CTC as the threshold problem associated with optimization problem (4).Note that the used specific constraints c lin E (x; ) and c lin I (x; ) as well as c pot E (x; ) and c pot I (x; ) will be specified in detail later.Computing Technical Capacities (CTC) -capacitated linear flows.

Computing Technical Capacities for Capacitated linear Flows
As in the last section, we follow the notation introduced in [22].In the remainder of the paper, we focus on tree-shaped networks and thus assume that the graph G = (V, A) is a tree.
We first introduce some notation.We choose to use directed graphs to represent gas networks.This modeling choice allows us to interpret the direction of flows.However, actual physical flow in a gas network is not influenced by the direction of the arcs.Thus, for u, v ∈ V , we introduce the so-called flow-path contains the nodes of the path from u to v in the undirected version of the graph G and A(u, v) ⊆ A contains the corresponding arcs of this path.Moreover, we call P (u, v) a directed flow-path from u to v if P (u, v) is a directed path from u to v in G.For another pair of nodes u , v ∈ V , we say that and if P (u , v ) is itself a flow-path.In particular, this allows us to define an order on the nodes of a flow-path.For We note that if we reverse arcs in G, then -flows can be adapted by switching the sign for flows on each arc with different orientation.For a given -flow q, we say that node u ∈ V supplies node v ∈ V \ {u} if for each arc a = (i, j) ∈ A(u, v), the conditions i ≺ P j =⇒ q a > 0, j ≺ P i =⇒ q a < 0 hold.We now introduce two sub-graphs for an arc a = (u, v) ∈ A. If we delete arc a in G, then the tree decomposes into two sub-trees.We define the sub-tree that includes node u as ) and the other sub-tree that contains v holds.Note that considering the reversed arc (v, u) does not change the sub-trees G u and G v .
We now present the capacitated linear flow model considered in this section.We consider lower and upper flow bounds q − a ≤ q + a that are given for every arc a ∈ A and assume no other flow constraints.This means, we consider a standard capacitated linear flow model.Consequently, for a nomination ∈ N , Constraints (1) are given by ( 2) and the flow bounds i.e., c lin I (x; ) = (c lin I,a (q)) a∈A , c lin I,a (q) = (q a − q − a , q + a − q a ) and c E stays the same as in Section 2, i.e., We note that checking the feasibility of a nomination ∈ N w.r.t.Conditions (1) of this section is a standard -transshipment problem; see, e.g., Chapter 11 of the book [33].
We first show that we can validate the feasibility of given technical capacities for a tree-shaped network in polynomial time.Afterward, in Section 3.2 we prove that CTC for capacitated linear flows is NP-hard even for trees.
3.1.Checking Feasibility of Technical Capacities.Due to the tree structure of the graph, we know that for every nomination ∈ N , there exists a unique -flow.Lemma 3.1 (Lemma 1 in [28]).Let ∈ N be a nomination.Then, a unique -flow exists and this flow can be computed in O(|V |).
With the next lemma, we bound the arc flow for a given -flow in dependence of the technical capacities by using the uniqueness of the flow-path between two nodes.Thus, the arc flow is bounded by the minimum of the aggregated capacities of the entries on one side of the arc and of the aggregated capacities of the exits on the other side of the arc.Lemma 3.2.Let q C ∈ C be technical capacities, ∈ N (q C ) a nomination, and q its unique -flow.Then, for every arc a = (u, v) ∈ A, the flow q a is bounded by Proof.The claim follows from the tree structure of G, Lemma 3.1, and the flow conservation constraints (2) that are satisfied by q.
With an adaption of the approach developed in [28], we can show that the lower and upper arc flow bounds (6) are tight w.r.t.N (q C ).This means that for every arc at least one nomination exists such that the corresponding flow is at the bound.To this end, we state the auxiliary lemma that directly follows from the tree structure of G.
We now show that the upper arc flow bound in ( 6) is tight w.r.t.N (q C ).We even show a stronger result: For any node pair, a nomination with unique flows exists so that for every arc of the unique flow-path between these two nodes the arc flow is at its upper bound.Lemma 3.4.Let q C ∈ C be technical capacities and u = w ∈ V .Furthermore, let P (u, w) be a directed flow-path from u to w.Then, a nomination ∈ N (q C ) with unique flows q exists such that for every arc a = (k, l) ∈ A(u, w) the corresponding arc flow is at its upper bound in (6), i.e., holds for every a ∈ A(u, w).Additionally, we can compute this nomination in polynomial time.
Proof.For directly applying the results of Theorem 4 in [28] and its proof, we make the following additional assumption.If u is no entry, then we interpret u as an entry with technical capacity of zero.In analogy, if w is no exit, then we interpret w as an exit with technical capacity of zero.These assumptions do not affect the upper bound in (6).Further, let arc (u, i) ∈ A(u, w) be the first arc of the flow-path P (u, w).We distinguish between two cases.
This means that no flow can be supplied to u without using arcs of flow-path P (u, w).Thus, the claim directly follows from Theorem 4 in [28] and its proof.(ii) Let V (u,i) u ∩ V + = {u} holds.We apply Lemma 3.3 and Case 1 for ũ and w.
In doing so, we can w.l.o.g.assume that P (ũ, w) is a directed flow-path from ũ to w.Consequently, ( 7) is satisfied for a ∈ P (ũ, w).Due to this and P (u, w) ⊂ P (ũ, w), the claim follows.We can compute the corresponding nominations of Case 1 and 2 in polynomial time due to Lemma 11 in [28].
Using Lemma 3.4, we now prove that also the lower arc flow bound of ( 6) is tight.Lemma 3.5.Let q C ∈ C be technical capacities and u = w ∈ V .Furthermore, let P (u, w) be a directed flow-path from u to w.Then, a nomination ∈ N (q C ) with unique flows q exists such that for every arc a = (k, l) ∈ A(u, w) the corresponding arc flow is at the lower bound in (6), i.e., holds for every a ∈ A(u, w).Additionally, we can compute this nomination in polynomial time.
Proof.We consider the graph G = (V, Ã), which is a copy of G = (V, A) except that arcs of P (u, w) are reversed so that P (u, w) is a directed flow-path from w to u.We now apply Lemma 3.4 for w and u in G. Consequently, a nomination ∈ N (q C ) with unique -flow q in G exist such that for (l, k) ∈ A(u, w), it holds Let q be the unique flows in G corresponding to nomination .Due to the different orientation of arc a = (k, l) of P (u, w) in G and G and the tree structure of G, holds.This shows the claim.
Using the previous two lemmas, we can efficiently check the feasibility of technical capacities.
Lemma 3.6.Let q C ∈ C be technical capacities.Then, q C are feasible technical capacities if and only if for every arc a = (u, v) ∈ A, the conditions are satisfied.
Proof.Let q C be feasible technical capacities and a ∈ A = (k, l) an arbitrary arc.Applying Lemmas 3.4 and 3.5 for u = k and w = l as well as using the feasibility of every nomination in N (q C ) implies Conditions (9).Let Condition (9) be valid.
Then, q C are feasible technical capacities due to Lemma 3.2.
We finally prove that checking the feasibility of given technical capacities can be done in polynomial time.
Theorem 3.7.Let q C be technical capacities in a tree.Then, it can be decided in polynomial time if q C is feasible and if it satisfies Conditions (3).In particular, this implies that CTC with capacitated linear flows on trees is in NP.
Proof.For given technical capacities, we can check Conditions (3), and for every arc, the Condition (9), in polynomial time.
We note that the result of the previous theorem is also shown in a different way by Theorem 3.2.3 and Proposition 3.2.7 in [18].We have proven the same result differently here because we need the special structure considered in Lemmas 3.4 and 3.5 for the potential-based case, which is not considered in [18].

3.2.
Hardness.We prove that CTC for the case of capacitated linear flows is NP-complete on trees.In the remainder of this section, we require that feasible technical capacities satisfy Definition 2.6 and Conditions (3), i.e., feasible technical capacities are always feasible for Problem (4).
In what follows, we reduce the Subset Sum problem to CTC.To this end, we consider the following variant of the Subset Sum problem.

Subset Sum (SSP).
Input: This definition of the SSP slightly deviates from the original definition in [11].The requirements n ≥ 2, n i=1 Z i ≥ M , and Z i ≤ M for i ∈ {1, . . ., n} can be checked in polynomial time and, thus, the considered SSP variant is still NP-hard.
The proof is structured as follows.We first construct a CTC instance on a tree based on a given SSP instance.We then prove sufficient conditions for feasibility of a solution and show a lower bound of the objective; see Lemma 3.8.This can be used to prove that the optimal value of the CTC instance exceeds a specific threshold value if the corresponding SSP instance is feasible; see Lemma 3.9.The bulk of the proof characterizes optimal solutions of the specific CTC instance; see Lemmas 3.10-3.15.We finally use these properties to prove that if the SSP is infeasible, optimal technical capacities in the specific CTC instance do not exceed the threshold value.
For an arbitrary SSP instance, we construct an instance of (4) using capacitated linear flows as follows.The graph G(SSP) is given by We specify entries V + , exits V − , and inner nodes V 0 by In the following, we use the abbreviation δ = (n + 1) −1 .We now define the lower and upper arc flow bounds q − a , q + a for a ∈ A in G(SSP) as follows These arc flow bounds satisfy q − a ≤ 0 ≤ q + a for a ∈ A due to Z i ≤ M for i ∈ {1, . . ., n}.A graphical representation of G(SSP) is given in Figure 1.
We denote nonnegative technical capacities by q C .We note that the capacity of inner nodes is set to zero and, thus, we neglect these nodes w.r.t.technical capacities.We determine the nonzero coefficients of the weight vector d as follows: We note that G(SSP) is a tree and q C = 0 are feasible technical capacities for G(SSP) because of q − a ≤ 0 ≤ q + a for all a ∈ A. Further, we note that for a given instance of SSP, we can build G(SSP) in polynomial time and its coding length is polynomially bounded above by the coding length of the given SSP instance.
Due to the tree structure of G(SSP), we can check the feasibility of technical capacities in G(SSP) in polynomial time; see Theorem 3.7.Lemma 3.6 implies that for checking the feasibility of technical capacities in G(SSP) we have to verify the conditions for i ∈ {1, . . ., n}.
The instance G(SSP) is constructed in such a way that the threshold of the objective value for deciding the feasibility of SSP is given by We next prove sufficient conditions for the feasibility of technical capacities in G(SSP).Lemma 3.8.Let qC ∈ C be technical capacities in G(SSP) that satisfy the conditions hi < Z i , for i ∈ {1, . . ., n}.Then, qC are feasible technical capacities in G(SSP) and d qC ≥ T − M holds.Furthermore, such a qC always exists.Proof.To construct such a qC , one can use any fractional solution of the SSP.It is easy to verify that the capacities qC satisfy Conditions (3).For checking the feasibility of qC , it is left to verify Conditions (11).Due to the construction of qC , the Conditions (11a) and (11c)-(11f) are satisfied.For Condition (11b), we now distinguish for i ∈ {1, . . ., n} two cases depending on qC hi .First, let qC hi = Z i .Consequently, which implies Condition (11b).Second, let qC hi < Z i .Consequently, which implies Condition (11b).Thus, the feasibility of qC follows from Lemma 3.6 and the objective value of qC satisfies We can directly use the previous lemma to show that if the given SSP instance is feasible, then optimal technical capacities in G(SSP) exceed the threshold value T .Lemma 3.9.Let the given SSP be feasible, i.e., there exists I ⊆ {1, . . ., n} with i∈I Z i = M .Further, let q C ∈ C be optimal technical capacities in G(SSP).Then, d q C ≥ T holds.
Proof.Let I be a feasible solution of SSP, then we construct the following technical capacities: The technical capacities qC are feasible because they satisfy the conditions of Lemma 3.8.Let i ∈ {1, . . ., n}.We now compute the objective value of the ith branch of G(SSP), i.e., If i ∈ I holds, then from the construction of qC the ith branch (12) evaluates to −q C hi + qC vi = −Z i + M + δ, which also holds for i / ∈ I. Thus, the objective value of qC is given by Consequently, the claim follows because qC are feasible technical capacities.
In what follows, we characterize optimal solutions; see Lemmas 3.10-3.15.Using the obtained properties we prove that if SSP is infeasible, the threshold T value is not exceeded by optimal technical capacities in G(SSP).
We first bound the technical capacity of certain nodes.
Additionally, we prove that the technical capacity of entry h i is bounded above by Z i in an optimal solution.Lemma 3.11.Let q C ∈ C be optimal technical capacities in G(SSP).Then, q C hi ≤ Z i holds for all i ∈ {1, . . ., n}.Proof.We prove the claim by contraposition, i.e., we now assume that i ∈ {1, . . ., n} with q C hi > Z i exists and then prove that q C are not optimal technical capacities.From Condition (11a) it follows u∈V−\{vi} q C u ≤ Z i .Thus, we obtain the bounds q C s ≤ Z i and q C vj ≤ Z i for j ∈ {1, . . ., n} \ {i}.Using Lemma 3.10, we can bound the objective value corresponding to q C from above as follows: For the latter inequality, we also used that Z i ≤ M holds.The upper bound (13) of the objective value for q C and the objective value of the feasible point in Lemma 3.8 show that q C is not optimal.
We next prove that the optimal technical capacity of entry t is at its upper bound δ.Lemma 3.12.Let q C ∈ C be optimal technical capacities in G(SSP).Then, q C t = δ holds.
Proof.Let q C be feasible technical capacities.Due to Lemma 3.10, q C t ≤ δ holds.We now prove the claim by contraposition, i.e., we show that if q C t < δ holds, then we can construct a better solution qC .We set ε ≥ 0 such that q C t + ε = δ holds and construct a new solution qC by . ., n} .We now check the feasibility of qC .To this end, we first verify that qC satisfies Conditions (3).Conditions (3a) are satisfied due to qC s ≥ qC u for u ∈ V + .We next show that Conditions (3b) hold.To this end, we distinguish between two cases.
First, assume q C w ≤ nε for all w ∈ V − .Consequently, qC s = max qC u : u ∈ V + and qC vi = 0 for i ∈ {1, . . ., n} are satisfied, which implies Conditions (3b).Second, assume there exists v ∈ V + with q C v > nε.If additionally max qC w : w ∈ V − = max qC u : u ∈ V + = qC s holds, then Conditions (3b) directly follow.Otherwise, from the feasibility of q C and the construction of qC , follows, which implies (3b).Thus, Conditions (3) are satisfied by qC .For checking the feasibility of qC , it is left to show that Conditions (11) are satisfied for qC .Due to the optimality of q C , we can apply Lemma 3.11 and, thus, q C hi ≤ Z i for i ∈ {1, . . ., n}.Due to this and the construction of qC , Conditions (11a) are satisfied.Thus, qC t ≤ δ as well as Conditions (11c) and (11e) are satisfied.We next show that (11d) holds for qC .The construction of qC and q C hi ≤ Z i ≤ M for i ∈ {1, . . ., n} leads to This, together with the feasibility of Condition (11d) for q C , leads to which implies the feasibility of Condition (11d) for qC .From Lemma 3.10, the construction of qC , and the feasibility of q C Condition (11f) follows.
We now show the feasibility of Condition (11b).For i ∈ {1, . . ., n}, we prove Otherwise, an entry w ∈ V + \ {t, h i } with q C w > ε exists and Using (14), the feasibility of q C , and the construction of qC , we show the feasibility w.r.t.Condition (11b) for qC by Consequently, Conditions (11) are satisfied by qC and, thus, qC are feasible technical capacities due to Lemma 3.6.Lastly, we compare the objective values of qC and q C by Consequently, qC is a strictly better solution if ε > 0.
In what follows, we show that the aggregated capacity of certain entries is bounded for optimal technical capacities in G(SSP).Lemma 3.13.Let q C ∈ C be optimal technical capacities in G(SSP).Then, Proof.We prove the claim by contraposition.To this end, we assume that u∈V+\{t} q C u > M holds.This together with Lemma 3.12 implies q C t = δ and, hence, By Lemma 3.6, the feasible technical capacities q C satisfy Conditions (11).Because of the assumption, the inequality q C s ≤ M follows from Condition (11d).Due to Lemma 3.11, q C hi ≤ Z i for i ∈ {1, . . ., n}.This, Inequality (15), and Condition (11b), imply q C vi ≤ M + δ − Z i for i ∈ {1, . . ., n}.We now bound the objective value of q C by Thus, from Lemma 3.8 it follows that q C is not optimal.
With the next two lemmas, we bound the objective value of the ith branch of G(SSP) in optimal technical capacities depending on the amount of flow, which is supplied to this branch.In doing so, the ith branch consists of the subtree that includes the nodes o, h i , and v i .Lemma 3.14.Let q C ∈ C be optimal technical capacities and i ∈ {1, . . ., n}.If Proof.Let q C ∈ C be optimal technical capacities and i ∈ {1, . . ., n}.Due to u∈V+\{hi} q C u > M +δ−Z i and the feasibility of q C , it follows from Conditions (11b) that q C is only feasible if q C vi ≤ M + δ − Z i holds.Using this, Z i ≤ M + δ, the optimality of q C , d vi > 0, Lemmas 3.10-3.12,and Conditions (11) leads to q C vi = M + δ − Z i , which shows the claim.Lemma 3.15.Let q C ∈ C be optimal technical capacities and i ∈ {1, . . ., n}.If Proof.Let q C ∈ C be optimal technical capacities, which satisfy the requirements and i ∈ {1, . . ., n}.Due to Conditions (3b), the inequality q C vi ≤ u∈V+ q C u is satisfied.For any assignment q C vi ∈ [0, u∈V+ q C u ], the Conditions (11) are satisfied by q C due to u∈V+\{hi} q C u ≤ M + δ − Z i and Lemmas 3.10-3.12.Thus, the optimality of q C , and d vi > 0, q C vi = u∈V+ q C u holds and the claim follows.We now derive an upper bound for the objective value if the given SSP instance is infeasible while the aggregated entry capacity is M + q C t .Lemma 3.16.Let the given SSP be infeasible, i.e., there exists no subset I ⊆ {1, . . ., n} with i∈I Z i = M .Let q C ∈ C be optimal technical capacities in G(SSP) with u∈V+\{t} q C u = M .Then, d q C < T holds.
Proof.Due to Lemma 3.12, q C t = δ holds.Consequently, u∈V+ q C u = M + δ is satisfied.We now compute an upper bound for the ith branch (12) in G(SSP) depending on i ∈ {1, . . ., n}.Due to Lemma 3.11, Hence, we apply Lemma 3.14, and thus, (12) Consequently, we can apply Lemma 3.15 and, thus, ( 12) evaluates to M + δ − Z i .From Lemma 3.11, it follows q C hi ∈ [0, Z i ] for i ∈ {1, . . ., n}.Due to this, the infeasibility of SSP, q C t = δ, and u∈V+\{t} q C u = M , an index j ∈ {1, . . ., n} exists with q C hj ∈ (0, Z j ).Also using Lemma 3.10, we can bound the objective value of q C by We now prove an upper bound for the objective value of optimal technical capacities independent of the SSP being feasible while the aggregated entry capacity is below M + q C t .Lemma 3.17.Let q C ∈ C be optimal technical capacities in G(SSP) and Proof.Due to Lemma 3.12, q C t = δ holds, which implies u∈V+ q C u = M + δ − ε.We now compute an upper bound for the ith branch (12) of G(SSP) depending on i ∈ {1, . . ., n}.Let i ∈ {1, . . ., n}.
We apply Lemma 3.14 and, thus, the ith branch (12) evaluates to We now apply Lemma 3.15, which together with q C hi ≥ Z i − ε, Conditions (3), and the requirements implies that the objective of the ith branch ( 12) is bounded by Due to this and the above, we can bound the objective value of q C from above by The next theorem describes the relation between deciding the feasibility of a given SSP instance and computing optimal technical capacities in G(SSP).
Lemma 3.18.The SSP problem is solvable if and only if the optimal technical capacities q C ∈ C in G(SSP) satisfy Proof.Let the SSP problem be solvable and q C be optimal technical capacities in G(SSP).We apply Lemma 3.9 and, thus, ( 16) is satisfied.Let now q C ∈ C be optimal technical capacities in G(SSP) that satisfy (16).We now assume that SSP is infeasible.Due to the optimality of q C and Lemma 3.13, we know that u∈V+\{t} q C u ≤ M holds.If u∈V+\{t} q C u = M holds, then we apply Lemma 3.16, which is a contradiction to q C satisfying ( 16).If u∈V+\{t} q C u = M −ε for a fixed ε ∈ (0, M ] holds, we apply Lemma 3.17, which is a contradiction to q C satisfying ( 16).
We finally prove that CTC is NP-complete on trees.Theorem 3.19.CTC with capacitated linear flows is NP-complete on trees.On general graphs, it is at least NP-hard.
Proof.The feasibility of given technical capacities can be verified in polynomial time on trees; see Theorem 3.7.For a given SSP instance, we can construct the CTC instance G(SSP) in polynomial time and its coding length is polynomially bounded above by the coding length of the given SSP instance.Hence, from Lemma 3.18 it follows that CTC is NP-hard on trees, since G(SSP) is a tree.

Computing Technical Capacities for Nonlinear Potential-Based Flows
We now consider a nonlinear potential-based flow model of gas transport.Thus, the flows depend on the potentials at the incident nodes.In contrast to the capacitated linear flow case, the flows in potential-based networks follow additional physical laws that make it unique.On the one hand, the potentials provide additional structure for the analysis of nominations, bookings, and technical capacities.On the other hand, the coupling between potentials and flows is usually nonlinear, which results in a harder class of optimization problems.For capacitated linear flows it is shown that checking the feasibility of technical capacities, respectively bookings, is coNP-complete on general networks; see [18].In [22], this result is extended, i.e., verifying the feasibility of technical capacities, respectively bookings, is in coNP in general, but can be solved in polynomial time on networks with linear potential-based flows; see [21].Moreover, checking the feasibility of technical capacities, respectively bookings, can be done in polynomial time on trees and single cycle networks in case of nonlinear potential-based flows; see [21,22].For the complexity of CTC with potential-based flows, only exponential upper complexity bounds are known so far; see [18].
In this section, we prove that CTC is NP-complete for nonlinear as well as linear potential-based flows.We first prove this for the nonlinear potential-based case.Afterward, we show that the linear potential-based case can be proven in analogy with the help of minor adaptions.
We now explicitly state the considered nonlinear potential-based flow model.To this end, we introduce a bounded potential variable p u for every node u ∈ V .Additionally, the potentials are coupled to arc flows.Thus, for a nomination ∈ N the Constraints (1) are given by (2) and the classical Weymouth pressure drop conditions where Λ a > 0 is a constant for every arc a ∈ A; see [27,35] and the chapter [9] in the book [20].Furthermore, the pressures are bounded, i.e., Consequently, the Constraints (1) are given by In contrast to the capacitated linear flow model, no arc flow bounds exist in the potential-based model.Instead, potential bounds are now included.We can check the feasibility of technical capacities in tree-shaped networks with potential-based flows in polynomial time due to [21].
Lemma 4.1.Let q C ∈ C be technical capacities in the tree G = (V, A).Then, we can decide if q C is feasible and satisfies Condition (3) in polynomial time.In particular, this implies that CTC with nonlinear potential-based flows on trees is in NP.
Proof.Conditions (3) can obviously be checked in polynomial time.The feasibility of q C can be checked in O(|V | 2 ) due to Theorem 20 in [21].
We note that checking the feasibility of q C in polynomial time also follows from adapting Theorem 4 in [28].
Considering a nonlinear potential-based flow model, we now prove that CTC is NP-hard in tree-shaped networks.To this end, we reduce CTC with capacitated linear flows to CTC with nonlinear potential-based flows.The case of capacitated linear flows is NP-hard due to the results of Section 3. Thus, we now focus on the reduction instances G(SSP) of the capacitated linear flow case; see Section 3.
We now transform a given G(SSP) instance of the capacitated linear flow to the potential-based case.To this end, we take the same graph G(SSP) = (V, A) and the objective coefficients d as in the previous section.We remove the flow bounds.Moreover, we set Λ (t,s) = (M + δ) 2 10 2 d 2 t and Λ a = 1 for all remaining arcs a ∈ A \ {(t, s)}.The squared potential bounds are given in Table 2. Intuitively, K = 2(M + δ) is a pressure value that is chosen high enough such that the pressure never drops below zero in the network.We denote the constructed instance by G pot (SSP).We further note that for a given instance of G(SSP), we can build G pot (SSP) in polynomial time and its coding length is polynomially bounded above by the coding length of the given G(SSP) instance.
We first prove that feasible technical capacities in G(SSP) with capacitated linear flow are also feasible for G pot (SSP) in the potential-based case.Lemma 4.2.Let q C ∈ C be feasible technical capacities in G(SSP) with capacitated linear flow.Then, q C are feasible technical capacities in G pot (SSP) in the potentialbased model.
Proof.Since q C are feasible technical capacities for G(SSP), they satisfy Conditions (3).Let ∈ N (q C ) be a nomination and q its corresponding flow, which is unique due to the tree structure of the underlying graph.We now prove that this nomination is also feasible in G pot (SSP).To this end, we construct the potentials corresponding to q and i ∈ {1, . . ., n} as follows: Since with its unique flows q is feasible for G(SSP), they satisfy the flow bounds (10).
Replacing the arc flows in ( 19) by the upper, respectively lower, arc flow bounds of G(SSP), given by ( 10), shows that for any arc flows satisfying (10) the potentials given in (19) are within the lower and upper potential bounds of Table 2. Consequently, (q, p) satisfy Constraints (1) for the potential-based case and thus, is a feasible nomination for G pot (SSP).Since is an arbitrary booking-compliant nomination w.r.t.q C , this shows the claim.
We note that not all feasible technical capacities in G pot (SSP) for the potentialbased case are also feasible in G(SSP) with capacitated linear flow.For instance, technical feasible capacities with q C t > δ exist that are feasible for G pot (SSP) but not for G(SSP).
In contrast to feasible points, we now show that all optimal technical capacities in G pot (SSP) are also feasible in G(SSP).To this end, we prove an upper bound for q C t and an analogous result to Lemma 3.11 for the potential-based case.Lemma 4.3.Let q C ∈ C be feasible technical capacities in G pot (SSP).Then, q C t ≤ δ + 1/(10d t ) holds.Proof.From Conditions (3), the squared potential bounds of Table 2,(17), and t being a leaf node of G pot (SSP), it follows Lemma 4.4.Let q C ∈ C be optimal technical capacities in G pot (SSP).Then, q C hi ≤ Z i holds for all i ∈ {1, . . ., n}.Proof.We prove the claim by contraposition.Thus, we assume that i ∈ {1, . . ., n} with q C hi > Z i exists.From the tree structure of G pot (SSP), Lemmas 3.4 and 3.5, Conditions (3), and the potential bounds in Table 2, it follows that n j=1,j =i q C vj + q C s ≤ Z i .Thus, we obtain the bounds q C s ≤ Z i , and q C vj ≤ Z i for j ∈ {1, . . ., n} \ {i}.
Moreover, we obtain Due to Lemma 4.3, q C t ≤ δ + 1/(10d t ) holds.Furthermore, d hj q C hj ≤ 0 holds for j ∈ {1, . . ., n} \ {i} and, thus, we can neglect these terms for bounding the objective value corresponding to q C by A comparison of the upper bound (20) for the objective value corresponding to q C and the objective value of the feasible solution qC in Lemma 3.8, which is also feasible for the potential-based case due to Lemma 4.2, leads to Hence, q C is not optimal.
We now prove that in an optimal solution q C t is bounded above by δ, which is also the case for the capacitated linear flow model; see Lemma 3.12.Lemma 4.5.Let q C ∈ C be optimal technical capacities in G pot (SSP).Then, q C t ≤ δ holds.Proof.We prove the claim by contraposition.Thus, we assume q C t > δ.Due to this, Lemmas 3.4 and 3.5, and the potential bounds in Table 2, it follows u∈V−\{s} q C u ≤ δ.Consequently, u∈V−\{s} d u q C u ≤ δ holds due to d u ≤ 1 for all u ∈ V − \ {s}.Further, from the potential bounds, Lemma 4.3, and Conditions (3), the inequality q C s ≤ M + δ + 1/(10d t ) follows.We now compare the objective value of q C with the corresponding objective value of the solution qC of Lemma 3.8.
First, assume that q C s ≥ M + δ holds.Due to Conditions (3) and q C t ≤ δ + 1/(10d t ), which follows from Lemma 4.3, u∈V+\{t} q C u ≥ M − 1/(10d t ) > 0 holds.Consequently, a comparison of the objective values of q C and qC of Lemma 3.8 leads to Since n ≥ 2 holds, q C is not optimal.Second, assume that q C s < M + δ holds.Thus, ε > 0 with q C s + ε = M + δ exists.Due to Conditions (3) and q C t ≤ δ + 1/(10d t ), which follows from Lemma 4.3, u∈V+\{t} q C u ≥ max {0, M − ε − 1/(10d t )} holds.Consequently, a comparison of the objective values of q C and qC of Lemma 3.8 leads to Sketch of the proof.Checking the feasibility of technical capacities with linear potential-based flows in a general graph can be done in polynomial time due to Theorem 12 in [21].Consequently, CTC with linear potential-based flow is in NP.
For proving NP-hardness, we adapt the previous results for the nonlinear potentialbased case.We first replace the original value Λ (t,s) = (M + δ) 2 10 2 d 2 t by Λ (t,s) = (M + δ)10d t .In analogy, we replace in Table 2 every squared value by its nonsquared value.Furthermore, Table 2 now represents the potential bounds p − and p + instead of (p − ) 2 and (p + ) 2 .Finally, we replace the terms |q a |q a by q a and p 2 u by p u in (19).After these modifications, we can prove Lemmas 4.2-4.8for the linear potential-based case in analogy to the nonlinear case-keeping in mind that the potentials are now coupled by (22), which simplifies some of the calculations.This implies that CTC for linear potential-based flows is NP-hard on general graphs.

Conclusion
In this paper, we proved that computing maximal technical capacities in the European entry-exit gas market is NP-hard.To this end, we showed that the problem is NP-complete on trees for a capacitated linear flow model as well as for potential-based flows.We first reduced the Subset Sum problem to computing maximal technical capacities with capacitated linear flows on trees.Afterward, we used this result to reduce the case of capacitated linear flows to the case of potential-based flows.In contrast to the situation in the literature on the feasibility of bookings, our hardness results for CTC are already obtained for the easiest case, i.e., on tree-shaped networks and capacitated linear flow models as well as potentialbased flows.Consequently, computing technical capacities is also hard for more general graph classes including trees, i.e., especially for general graphs.Another interesting question regarding the complexity of CTC is whether it is Σ P 2 -complete for capacitated linear or nonlinear potential-based flows.

Definition 2 . 2 .
A nomination is a balanced load flow , i.e., σ = 0.The set of nominations is given by N := { ∈ L : σ = 0}.Nominations and bookings are connected as follows.Definition 2.3.A booking is a vector b = (b u ) u∈V ∈ R V ≥0 , with b u = 0 for all u ∈ V 0 .A nomination is called booking-compliant w.r.t. the booking b if ≤ b holds, where "≤" is meant component-wise.The set of booking-compliant (or b-compliant) nominations is given by N (b) := { ∈ N : ≤ b}.Obviously, N (b) ⊆ N ⊆ L holds for finite b.

Definition 2 . 5 .
We say that a booking b is feasible if all booking-compliant nominations ∈ N (b) are feasible.The set of feasible bookings is denoted by F B .

Figure 1 .
Figure 1.The graph G(SSP).Entry nodes are indicated by circles, exits by boxes, and inner nodes by diamonds. q