Article Stable Multicommodity Flows OPEN ACCESS

We extend the stable flow model of Fleiner to multicommodity flows. In addition to the preference lists of agents on trading partners for each commodity, every trading pair has a preference list on the commodities that the seller can sell to the buyer. A blocking walk (with respect to a certain commodity) may include saturated arcs, provided that a positive amount of less preferred commodity is traded along the arc. We prove that a stable multicommodity flow always exists, although it is PPAD-hard to find one.


Introduction
Just as network flows generalize bipartite matchings, the stable marriage problem can be generalized to stable flows.An acyclic network model was presented by Ostrovsky [1], while Fleiner [2] introduced a stable flow model where the network is not necessarily acyclic.The aim of this paper is to extend the model of Fleiner to multicommodity flows, but first we briefly describe his model and results.
An instance of the stable flow problem consists of a network on digraph D = (V, A) with s, t ∈ V and capacities c ∈ R A + , and additionally for each node v ∈ V a linear order < v on the arc set incident to v. We assume that s has no incoming arcs and t has no outgoing arcs.The network along with the set of these preference orders is called a network with preferences.We note that outgoing arcs are never compared with incoming arcs, so the information that we really need is a linear order on the set of outgoing arcs δ out (v) and one on the set of incoming arcs δ in (v).
We refer to directed walks simply as walks in this paper.Let f be a flow of network (D, s, t, c).A walk P = (v 1 , a 1 , v 2 , a 2 , . . ., a k−1 , v k ) is said to block f if the following hold: (i) each arc a i is unsaturated in f , (ii) v 1 = s or there is an arc a = v 1 u for which f (a ) > 0 and a < v 1 a 1 , (iii) v k = t or there is an arc a = wv k for which f (a ) > 0 and a < v k a k−1 .
A flow is called stable if there is no walk blocking it.Note that this definition is slightly different from the one in [2], but it is equivalent.
The problem can be motivated by a network trading model: the nodes are traders that can buy and sell amounts of a certain product along the arcs of the digraph, and have preferences with whom they would like to trade (a < v a means that trader v prefers trading along a to trading along a).A blocking walk represents a possible chain of transactions that offers a better selling option for the first trader of the walk than the current f , and also offers a better buying option for the last trader.In this interpretation, nodes s and t represent the producers and the consumers.
Since it will be convenient in the proofs to consider only finitely many walks, we introduce a finite subclass of walks that already determines stability.A walk It is easy to see that every blocking walk contains a blocking quasi-path, so we may restrict the condition of stability to quasi-paths.
Fleiner [2] proved the following result, by reducing the stable flow problem to the stable allocation problem of Baïou and Balinski [3].A different proof based on the Gale-Shapley algorithm, as well as an extension to flows over time, was given by Cseh, Matuschke, and Skutella [4].
Theorem 1.1 (Fleiner [2]).Every network with preferences has a stable flow.If the capacities are integral, then there is an integral stable flow.

Stable Multicommodity Flows
In this paper we present a way to include multiple commodities in the above network trading model.In the multicommodity setting, every arc has individual capacities for specific commodities as well as a cumulative capacity, and each trader has a preference order for each commodity on the possible buyers and sellers, so the preferred trading partners may be different for different commodities.In addition, for each trading pair (i.e., arc in D) there is a preference order on the commodities, which expresses that the pair is more inclined to trade certain goods than others.
A blocking walk in our model represents a chain of transactions for a specific commodity, with which the first and the last trader of the walk would be more pleased than before (the chain may also start at the producers, or end at the consumers), and each intermediate transaction either corresponds to an arc with free capacity or it can replace the trade of a less preferred commodity.
The formal definitions are as follows.The network consists of a digraph D = (V, A) with capacities c ∈ R A + (these will be called cumulative capacities, in order to distinguish from capacities of individual commodities).There are commodities, and each has its own capacity bound c j ∈ R A + (j ∈ [ ]).Each commodity has a source s j ∈ V and a sink t j ∈ V .Sources and sinks of different commodities may coincide, but we assume that c j is 0 on every arc entering s j and on every arc leaving t j .
For each commodity j ∈ [ ], there are linear orders < j v for each node v ∈ V \ {s j , t j } on the arc set incident to v.In addition, for each arc a ∈ A there is a linear order < a on the set of commodities.The network, together with these preference orders, is called a multicommodity network with preferences.
We say that f = (f 1 , . . ., f ) is a feasible multicommodity flow of the network if f j : A → R + satisfies Kirchhoff's law at every node except at s j and t j , f j (a) ≤ c j a for every a ∈ A and j ∈ [ ], and j=1 f j (a) ≤ c a for every a ∈ A.
) is said to be blocking with respect to commodity j if the following hold: or there is an arc a = wv k for which f j (a ) > 0 and a < j v k a k−1 , (iv) if an arc a i of P is saturated by f , i.e., j=1 f j (a i ) = c a i , then there is a commodity j such that f j (a i ) > 0 and j < a i j.
The last condition expresses that a chain of transactions can be blocking even if some of them have to replace transactions of other commodities, provided that the latter are less preferred commodities for the trading pairs.A feasible multicommodity flow is called stable if there is no walk blocking it.As in the single flow case, it is enough to prohibit blocking quasi-paths, since each blocking walk contains a blocking quasi-path.
Remark.It can be decided in polynomial time if a feasible multicommodity flow is stable.To see this, we show that for a given commodity j and nodes u, v, checking whether there is a blocking walk from u to v with respect to commodity j can be done in polynomial time.Conditions (i) and (iv) restrict the possible arcs that can appear in the walk.Among these, condition (ii) determines which arcs can be the starting arcs of the walk, and condition (iii) determines the possible ending arcs.Any uv-walk using only these arcs is automatically blocking, and we can use BFS to decide if such a walk exists.
Before proving the main result on the existence of stable multicommodity flows, we describe a version of Sperner's Lemma that serves as the main tool in our proof.

A Polyhedral Version of Sperner's Lemma
The following polyhedral version of Sperner's Lemma was introduced in [5], and it was used in [6] to give an alternative proof of Theorem 1.1.An extreme direction of a polyhedron is an extreme ray of its characteristic cone.For a colouring of the facets of a pointed polyhedron P , a vertex of P is multicoloured if it lies on facets of every colour.

Theorem 1.2 ([5]
).Let P ⊆ R n be an n-dimensional pointed polyhedron whose characteristic cone is generated by n linearly independent vectors.If the facets of the polyhedron are coloured with n colours such that facets containing the i-th extreme direction do not get colour i, then there is a multicoloured vertex.
We note that there is no known polynomial algorithm to find a multicoloured vertex; in fact, it is shown in [7] that this problem is PPAD-complete.

Existence of a Stable Multicommodity Flow
Theorem 2.1.In every multicommodity network with preferences there exists a stable multicommodity flow.
Proof.Let us consider a multicommodity network with preferences, as defined in Section 1.1.Let P denote the set of all quasi-paths, and for an arc a ∈ A let P a be the set of quasi-paths that contain a.Furthermore, for a node v ∈ V , let P out v and P in v denote the set of quasi-paths that start and end at v, respectively.
Let us introduce the variables x j P (j ∈ [ ], P ∈ P) and y j a (j ∈ [ ], a ∈ A).Given a set of quasi-paths P ⊆ P, we use the notation x j (P ) for P ∈P x j P .These variables do not have a clear meaning in terms of the problem that we want to solve; in order to help understanding their role, we describe the overall structure of the proof.We will define a full-dimensional polyhedron Π in the space of these variables that satisfies the conditions of Theorem 1.2, and has the property that we remain in Π if we decrease a coordinate x j P or if we increase it to 0, and we remain in Π if we increase a coordinate y j a or if we decrease it to c j a .In place of Kirchhoff's law, we use the inequalities that at every node in V \ {s j , t j } the incoming x j is at most the outgoing y j , and the outgoing x j is at most the incoming y j .The face F = {(x, y) ∈ Π : x j P = 0 if P is not a single arc, x j a = y j a for every a ∈ A and j ∈ [ ]} corresponds to the set of multicommodity flows.We will prove the following: • We can define a suitable colouring of the facets of Π such that any multicoloured vertex of Π is on the face F , • We show that a multicoloured vertex corresponds to a stable multicommodity flow.This is where the variables x j P (where P has length at least 2) play a role: in some sense, they correspond to possibilities of changing a feasible solution along a blocking quasi-path.
Let us turn to the details of the proof.We consider the polyhedron Π described by the following inequalities: x j (P ) − y j a ≤ 0 x j (P ) ≤ c j a x j (P ) − y j (δ ) ≤ c j (δ in (v) \ δ ) x j (P ) − y j (δ ) ≤ c j (δ out (v) \ δ ) First let us determine the set of extreme directions of Π. Clearly −x j P for P ∈ P, j ∈ [ ] and y j a for a ∈ A, j ∈ [ ] give infinite directions.Since x j P is bounded from above and y j a from below, there is no infinite direction that is not in the cone of the above.So the number of extreme directions equals the dimension.Now let us assign colours (that is, variables, since each variable corresponds to an extreme direction of Π) to each inequality: • to an inequality of type (1) or type (2) we assign y j a , • to an inequality of type (3) we assign x j P for a longest possible quasi-paths P ∈ P , • to an inequality of type (4) we assign x j P for a quasi-path P ∈ P in which the outgoing arc from v is smallest possible in the order < j v from P , and among these, we choose P to be one of the longest quasi-paths, • to an inequality of type (5) we assign x j P for a quasi-path P ∈ P in which the incoming arc to v is smallest possible in the order < j v from P , and among these, we choose P to be one of the longest quasi-paths, • to an inequality of type (6) we assign x j P where j is the commodity that is smallest in the order < a among those with nonempty P j , and from P j we choose P to be one of the longest quasi-paths.
Since the assigned colour of each inequality is a coordinate with nonzero coefficient, the colouring fulfils the criteria of Theorem 1.2.Thus there exists a multicoloured vertex (x, y) of Π. Claim 2.2.x ≥ 0, and y j ≤ c j for every j ∈ [ ].
Proof.Suppose that x j P is negative for some P ∈ P. Then by increasing x j P to zero we get a vector that is still in Π, because every inequality where x j P has positive coefficient is also present with the coefficient changed to zero (except for the inequalities where P = {P }, but changing the coefficient of x j p in those to zero is satisfied too since y j a and c j a are nonnegative).On the other hand we know that −x j P is an infinite direction, so (x, y) could not have been a vertex.Thus x j P is nonnegative for every P ∈ P and j ∈ [ ]. Similarly we get that y j a ≤ c j a for every a ∈ A and j ∈ [ ]. ♦ Claim 2.3.x j (P a ) = y j a for every arc a ∈ A and j ∈ [ ]. Proof.Since (x, y) is multicoloured, there is a tight inequality that has colour y j a .If this inequality is of type (1), then using Claim 2.2 we have 0 ≤ x j (P a ) ≤ y j a = 0, thus equality holds.If the tight inequality is of type (2) for some P ⊆ P a , then by Claim 2.2, x j (P a ) ≥ x j (P ) = y j a ≥ x j (P a ), so equality holds again.♦ Claim 2.4.For every j ∈ [ ], x j P = 0 for every quasi-path P that has at least 2 arcs.Proof.Suppose that x j P > 0 for a quasi-path P = (v 1 , a 1 , . . ., v k ), where k ≥ 3. Let Q be the one-arc path (v 1 , a 1 , v 2 ) and let R be the quasi-path (v 2 , a 2 , . . ., v k ).
Consider the inequality that (x, y) satisfies with equality and has colour x j Q .It cannot be of type (3), since because of P , we would not have chosen x j Q as colour.It also cannot be of type ( 4) or type (6) for the same reason.Thus it is of type (5).This means that there exists some P ⊆ P in v 2 and δ ⊆ δ out (v 2 ) for which x j (P ) − y j (δ ) = c j (δ out (v 2 ) \ δ ).Using Claim 2.2, this holds also for the whole sets P in v 2 and Using x j P > 0, and considering the sum of inequalities of type (2) for the arcs in δ in (v 2 ), we get By the same argument for the subwalk R, we get which is a contradiction.♦ We obtained that x is positive only on the arcs (that is, on quasi-paths of length 1), and by Claim 2.3, x j a = y j a for every arc a and every j ∈ [ ].By inequalities ( 4) and ( 5), we have for every v ∈ V \ {s j , t j }, so y j is a flow.By inequality (3), it satisfies the capacity constraints for commodity j, and by inequality ( 6), y satisfies the cumulative capacity constraints, so it is a feasible multicommodity flow.We are done by proving our last claim.
Claim 2.5.No quasi-path blocks y with respect to any commodity.
Proof.Let P = (v 1 , a 1 , . . ., v k ) be an arbitrary quasi-path and j an arbitrary commodity.Since (x, y) is a multicoloured vertex, there is a tight inequality of colour x j P .If it is of the form (3), then the arc a is saturated for commodity j, so P does not block y with respect to commodity j.
If it is of the form (4) for node v 1 , P ⊆ P out v 1 and δ ⊆ δ in (v 1 ), then a / ∈ P whenever a ∈ δ out (v 1 ) and a < j v 1 a 1 .Thus x j a = 0, because if x j a was positive, then adding x j a to this tight inequality would not hold for (x, y), although it is also an inequality of the system.This implies that P does not block the flow y with respect to commodity j.
The case when the tight inequality of colour x j P is of type ( 5) is analogous.Finally, if the inequality of colour x j P is of type (6), then the arc a is saturated, and furthermore a / ∈ P j whenever j < a j since x j P is selected as colour.This implies that x j a = 0 whenever j < a j: if x j a > 0 would hold, then by adding a to P j we would obtain an inequality that is violated by (x, y).Again, this means that P is not blocking for commodity j. ♦ We obtained that there is no blocking quasi-path, so y is a stable multicommodity flow.
We remark that even if the capacities are integer, there might be no integer stable multicommodity flow.In fact, for any integer N there is an instance where there is no stable solution with denominators at most N .As an example, consider the network consisting of nodes v 1 , . . ., v n and arcs v i v i+1 (i ∈ [n]), where we use the notation v n+1 = v 1 .There are n commodities; the sources and sinks are defined by s j = v j+1 , t j = v j , and the capacity c j is 1 on all arcs except for v j v j+1 where it is 0. This means that commodity j has a unique quasi-path from s j to t j , namely (v j+1 , v j+2 , . . ., v 1 , . . ., v j ), so the preference orders at the nodes do not play any role.The cumulative capacity c is 1 everywhere.The preference order at arc a commodity i does not appear in the ordering because it has capacity 0 on this arc).We claim that the only stable multicommodity flow is obtained by setting f j (a) = 1 n−1 on every arc a except for v j v j+1 .Indeed, the all-zero flow is not stable, and if f is a nonzero feasible multicommodity flow different from the above, then there must be an index j such that commodity j has positive flow and the arc v j v j+1 is unsaturated.It can be checked that the path (v j+2 , v j+3 , . . ., v 1 , . . ., v j+1 ) is blocking with respect to commodity j + 1.

PPAD-Hardness
In this section, we prove that it is PPAD-hard to find a stable multicommodity flow.This is true even if the digraph is acyclic, a special case relevant for example in economic applications like supply chains (see [1]).The problem that we reduce to it is the following stable fractional hypergraph matching problem.We are given a hypergraph H = (V, E), and for every node v ∈ V a linear order ≺ v on the hyperedges containing v. A fractional matching of H is a vector x ∈ R E + such that e v x e ≤ 1 for every v ∈ V .
A fractional matching is stable if for every e ∈ E there exists v ∈ e for which e v e x e = 1 .
Kintali et al. [8] showed that finding a stable fractional hypergraph matching is PPAD-complete.We reduce this problem to the stable multicommodity flow problem in order to prove the following theorem.Theorem 3.1.It is PPAD-hard to find a stable multicommodity flow in a multicommodity network with preferences, even if the network is acyclic.
Proof.Let (H = (V, E), ≺) be an instance of the stable fractional hypergraph matching problem.We use the notation V = {v 1 , v 2 , . . ., v n } and |E| = m.We construct a network whose node set consists of nodes s e , t e (e ∈ E) and v i , v i (i ∈ [n]).There are m commodities, one corresponding to each hyperedge e ∈ E, with source s e and sink t e .The arc set of the network contains the arcs v i v i (i ∈ [n]) with cumulative and individual capacities all 1.Furthermore for each hyperedge e, whose elements are v i 1 , v i 2 , . . ., v i k with increasing indices, we add the arcs s e v i 1 , v i 1 v i 2 , . . ., v i k−1 v i k , v i k t e .On these edges we set the cumulative capacity and the capacity of the commodity e to 1, and the other individual capacities to 0.
By the construction, each commodity has only one possible path, so we do not have to define precedence orderings for the nodes.In addition, only the arcs v i v i can be used by more than one commodity, so it is enough to define precedence orderings for these arcs: let the ordering < v i v i be the same as ≺ v i .
It is easy to see that the feasible multicommodity flows of this network correspond to the fractional matchings of the hypergraph H. Furthermore, the stability of a multicommodity flow is equivalent to the stability of the corresponding fractional matching.Since the constructed network is acyclic, this proves the theorem.