Improved distributed degree splitting and edge coloring

The degree splitting problem requires coloring the edges of a graph red or blue such that each node has almost the same number of edges in each color, up to a small additive discrepancy. The directed variant of the problem requires orienting the edges such that each node has almost the same number of incoming and outgoing edges, again up to a small additive discrepancy. We present deterministic distributed algorithms for both variants, which improve on their counterparts presented by Ghaffari and Su (Proc SODA 2017:2505–2523, 2017): our algorithms are significantly simpler and faster, and have a much smaller discrepancy. This also leads to a faster and simpler deterministic algorithm for (2+o(1))Δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(2+o(1))\varDelta $$\end{document}-edge-coloring, improving on that of Ghaffari and Su.


19:2
Improved Distributed Degree Splitting and Edge Coloring passing, where in each round each node can send a message to each of its neighbors. At the end of the algorithm each node should output its own part of the solution, e.g., the colors of its incident edges in the edge coloring problem. The time complexity of an algorithm is the number of synchronous rounds.
Degree Splitting Problems. The undirected degree splitting problem seeks a partitioning of the graph edges E into two parts so that the partition looks almost balanced around each node. Concretely, we should color each edge red or blue such that for each node, the difference between its number of red and blue edges is at most some small discrepancy value κ. In other words, we want an assignment q : E → {+1, −1} such that for each node v ∈ V , we have e∈E (v) q(e) ≤ κ, where E(v) denotes the edges incident on v. We want κ to be as small as possible.
In the directed variant of the degree splitting problem, we should orient all the edges such that for each node, the difference between its number of incoming and outgoing edges is at most a small discrepancy value κ.
Why Should One Care About Distributed Degree Splittings? On the one hand, degree splittings are natural tools for solving other problems with a divide-and-conquer approach. For instance, consider the well-studied problem of edge coloring, and suppose that we are able to solve degree splitting efficiently with discrepancy κ = O (1). We can then compute an edge coloring with (2 + ε)∆ colors, for any constant ε > 0; as usual, ∆ is the maximum degree of the input graph G = (V, E). For that, we recursively apply the degree splittings on G, each time reapplying it on each of the new colors, for a recursion of height h = O(log ε∆). This way we partition G in 2 h edge-disjoint graphs, each with maximum degree at most We can then edge color each of these graphs with 2∆ − 1 colors, using standard algorithms (simultaneously in parallel for all graphs and with a separate color palette for each graph), hence obtaining an overall coloring for G with 2 h · (2∆ − 1) ≤ 2∆ + 2 h κ = (2 + ε)∆ colors. We explain the details of this relation, and the particular edge coloring algorithm that we obtain using our degree splitting algorithm, later in Section 2.
On the other hand, degree splitting problems are interesting also on their own: they seem to be an elementary locally checkable labeling (LCL) problem [16], and yet, even on bounded degree graphs, their distributed complexity is highly non-trivial. In fact, they exhibit characteristics that are intrinsically different from those of the classic problems of the area, including maximal independent set, maximal matching, ∆ + 1 vertex coloring, and 2∆ − 1 edge coloring. All of these classic problems admit trivial sequential greedy algorithms, and they can also be solved very fast distributedly on bounded degree graphs, in Θ(log * n) rounds [15]. In contrast, degree splittings constitute a middle ground in the complexity: even on bounded degree graphs, deterministic degree splitting requires Ω(log n) rounds, as shown by Chang et al. [6], and randomized degree splitting requires Ω(log log n) rounds, as shown by Brandt et al. [4]. These two lower bounds were presented for the sinkless orientation problem, introduced by Brandt et al. [4], which can be viewed as a very special case of directed degree splitting: In sinkless orientation, we should orient the edges so that each node of degree at least d, for some large enough constant d, has at least one outgoing edge. For this special case, both lower bounds are tight [11].
What is Known? First, we discuss the existence of low-discrepancy degree splittings. Any graph admits an undirected degree splitting with discrepancy at most 2. This is the best possible, as can be seen on a triangle. This low-discrepancy degree splitting can be viewed as a special case of a beautiful area called discrepancy theory (see e.g. [7] for a textbook coverage), which studies coloring the elements of a ground set red/blue so that each of a collection of given subsets has almost the same number of red and blue elements, up to a small additive discrepancy. For instance, by a seminal result of Beck and Fiala from 1981 [2], any hypergraph of rank t (each hyperedge has at most t vertices) admits a red/blue edge coloring with per-node discrepancy at most 2t − 2. See [5,3] for some slightly stronger bounds, for large t. In the case of standard graphs, where t = 2, the existence proof is straightforward: Add a dummy vertex and connect it to all odd-degree vertices. Then, take an Eulerian tour, and color its edges red and blue in an alternating manner. In directed splitting, a discrepancy of κ = 1 suffices, using the same Eulerian tour approach and orienting the edges along a traversal of this tour.
In the algorithmic world, Israeli and Shiloach [13] were the first to consider degree splittings. They used it to provide an efficient parallel (PRAM model) algorithm for maximal matching. This, and many other works in the PRAM model which later used degree splittings (e.g., [14]) relied on computing Eulerian tours, following the above scheme. Unfortunately, this idea cannot be used efficiently in the distributed setting, as an Eulerian tour is a non-local structure: finding and alternately coloring it needs Ω(n) rounds on a simple cycle.
Inspired by Israeli and Shiloach's method [13], Hanckowiak et al. [12] were the first to study degree splittings in distributed algorithms. They used it to present the breakthrough result of a polylog(n)-round deterministic distributed maximal matching, which was the first efficient deterministic algorithm for one of the classic problems. However, for that, they ended up having to relax the degree splitting problem in one crucial manner: they allowed a δ = 1/ polylog n fraction of nodes to have arbitrary splits, with no guarantee on their balance. As explained by Czygrinow et al. [8], this relaxation ends up being quite harmful for edge coloring; without fixing that issue, it seems that one can get at best an O(∆ log n)-edge coloring.
Very recently, Ghaffari and Su [11] presented solutions for degree splitting without sacrificing any nodes, and used this to obtain the first polylog n round algorithm for (2 + o(1))∆edge coloring, improving on prior polylog(n)-round algorithms that used more colors: the algorithm of Barenboim and Elkin [1] for ∆ · exp(O( log ∆ log log ∆ )) colors, and the algorithm of Czygrinow et al. [8] for O(∆ log n) colors. The degree splitting algorithm of Ghaffari and Su [11] obtains a discrepancy κ = ε∆ in O((∆ 2 log 5 n)/ε) rounds. Their method is based on iterations of flipping augmenting paths (somewhat similar in style to blocking flows in classic algorithms for the maximum flow problem [9]) but the process of deterministically and distributedly finding enough disjoint augmenting paths is quite complex. Furthermore, that part imposes a crucial limitation on the method: it cannot obtain a discrepancy better than Θ(log n). As such, this algorithm does not provide any meaningful solution in graphs with degree o(log n).

Our Contributions.
Our main result is a deterministic distributed algorithm for degree splitting that improves on the corresponding result of [11]. The new algorithm is (1) simpler, (2) faster, and (3) it gives a splitting with a much lower discrepancy.
An important corollary of this splitting result is a faster and simpler algorithm for (2 + o(1))∆-edge coloring, which improves on the corresponding result from [11]. The related proof is deferred to the full version [10].
This is significantly faster than the O(log 11 n/ε 3 )-round algorithm of [11]. Furthermore, we are hopeful that with the future improvements in edge coloring for low-degree graphs, this splitting result will play an even more important role. Ideally, in the ultimate solution for edge coloring, say with (1 + o(1))∆ colors, this splitting will be one half of the solution: This half brings down the degree to a small value, with a negligible (1 + o(1)) factor loss, and the other half would hopefully color those small degree graphs efficiently.
Theorem 1 has another fascinating consequence. Assume that we have a graph in which all nodes have an odd degree. If ε < 1/∆, we get a directed degree splitting in which each node v has outdegree either d(v)/2 or d(v)/2 . Note that the number of nodes for which the outdegree is d(v)/2 has to be exactly n/2. We therefore get an efficient distributed algorithm to exactly divide the number of nodes into two parts of equal size in any odd-degree graph. For bounded-degree graphs, the algorithm even runs in time O(log n).
Our Method in a Nutshell. The main technical contribution is a distributed algorithm that partitions the edge set of a given graph in edge-disjoint short paths such that each node is the start or end of at most δ paths. We call such a partition a path decomposition and δ its degree. Now if we orient each path of a path decomposition with degree δ consistently, we obtain an orientation of discrepancy at most δ. Moreover, such an orientation can be computed in time which is linear in the maximum path length.
To study path decompositions in graph G, it is helpful to consider an auxiliary graph H in which each edge {u, v} represents a path from u to v in G; now δ is the maximum degree of graph H. To construct a low-degree path decomposition where δ is small, we can start with a trivial decomposition H = G, and then repeatedly join pairs of paths: we can replace the edges {u, v 1 } and {u, v 2 } in graph H with an edge {v 1 , v 2 }, and hence make the degree of u lower, at a cost of increasing the path lengths-this operation is called a contraction here.
If each node u simply picked arbitrarily some edges {u, v 1 } and {u, v 2 } to contract, this might result in long paths or cycles. The key idea is that we can use a high-outdegree orientation to select a good set of edges to contract: Assume that we have an orientation in H such that all nodes have outdegree at least 2k. Then each node could select k pairs of outgoing edges to contract; this would reduce the maximum degree of H from δ to δ − 2k and only double the maximum length of a path.
In essence, this idea makes it possible to amplify the quality of an orientation algorithm: Given an algorithm A that finds an orientation with a large (but not optimal) outdegree, we can apply A repeatedly to reduce the maximum degree of H. This will result in a low-degree path decomposition of G, and hence also provide us with a well-balanced orientation in G.
Outline. In Section 2 we show how to partitioning graphs into edge-disjoint short paths. In Section 3 we use these results to prove our main result on the distributed computation of edge-splittings (Theorem 1). The proof of Corollary 2 is deferred to the full version of the paper [10].

Short Path Decompositions
The basic building block of our approach is to find consistently oriented and short (length O(∆)) paths in an oriented graph. The first crucial observation is that an oriented path going through a node v is "good" from the perspective of v in the sense that it provides exactly one incoming and one outgoing edge to v. Another important feature is that flipping a consistently oriented path does not increase the discrepancy between incoming and outgoing edges for any non-endpoint node along the path. Following these observations, we recursively decompose a graph into a set of short paths, and merge the paths to ensure that every node is at the end of only a few paths. If a node v is at the end of δ(v) paths an arbitrary orientation of these paths will provide a split with discrepancy at most δ(v) for v. The recursive graph operations may turn graphs into multigraphs with self-loops. Thus throughout the paper a multigraph is allowed to have self-loops and the nodes of a path v 1 , . . . , v k do not need to be distinct; however, a path can contain each edge at most once. A self-loop at a node v contributes two to the degree of v.

Orientations and Edge Contractions
The core concept to merge many paths in parallel in one step of the aforementioned recursion is given by the concept of weak k(v)-orientations. We begin by extending and adapting prior work [11] on weak orientations to our needs.
is an orientation of the edges E such that each node v ∈ V has outdegree at least k(v).
Note that a weak 1-orientation is a sinkless orientation. By earlier work, it is known that a weak 1-orientation can be found in time O(log n) in simple graphs of minimum degree at least three.

Lemma 4 (sinkless orientation, [11]). A weak 1-orientation can be computed by a deterministic algorithm in O(log n) rounds in simple graphs with minimum degree 3 (and by a randomised algorithm in O(log log n) rounds in the same setting).
In our proofs, we may face multigraphs with multiple self-loops and with nodes of degree less than three and thus, we need a slightly modified version of this result.
Corollary 5 (sinkless orientation, [11]). Let G = (V, E) be a multigraph and W ⊆ V a subset of nodes with degree at least three. Then, there is a deterministic algorithm that finds an orientation of the edges such that every node in W has outdegree of at least one and runs in O(log n) rounds (and a randomised algorithm that runs in O(log log n) rounds).
Proof. For every multi-edge, both endpoints pick one edge and orient it outwards, ties broken arbitrarily. For every self-loop, the node will orient it arbitrarily. This way, every node with an incident multi-edge or self-loop will have an outgoing edge.
From here on, let us ignore the multi-edges and self-loops and focus on the simple graph H remaining after removing the multi-edges. For every node v with degree at most 19:6 Improved Distributed Degree Splitting and Edge Coloring two in H, we connect v to 3 − d(v) copies of the following gadget U . The set of nodes of U = {u 1 , u 2 , u 3 , u 4 , u 5 } is connected as a cycle. Furthermore, we add edges {u 2 , u 4 } and {u 3 , u 5 } to the gadget and connect u 1 to v. This way, the gadget is 3-regular.
In the simple graph constructed by adding these gadgets, we run the algorithm of Lemma 4. Thus, any node of degree at least three in the original graph that was not initially adjacent to a multi-edge or self-loop gets an outgoing edge. Since we know that every node incident to a multi-edge or self-loop in G also has an outgoing edge, the claim follows.
The sinkless orientation algorithm from Corollary 5 immediately leads to an algorithm which finds a weak d(v)/3 -orientation in multigraphs in time O(log n).
Proof. Partition node v into d(v)/3 nodes and split its adjacent edges among them such that d(v)/3 nodes have exactly three adjacent edges each and the remaining node, if any, has d(v) mod 3 adjacent edges. Note that the partitioning may cause self-loops to go between two different copies of the same node. Then, use the algorithm from Corollary 5 to compute a weak 1-orientation of the resulting multigraph where degree two or degree one nodes do not have any outdegree requirements. If we undo the partition but keep the orientation of the edges we have a weak d(v)/3 -orientation of the original multigraph.
The techniques in this section need orientations in which nodes have at least two outgoing edges. Lemma 6 provides such orientations for nodes of degree at least six; but for nodes of smaller degree it guarantees only one outgoing edge. It is impossible to improve this for nodes with degree smaller than five (cf. [10, Theorem 7.1]) in time o(n). But we obtain the following result for the nodes with degree five. Its proof relies on different techniques than the techniques in this section, and therefore it is deferred to the full version of the paper. The concept of weak orientations can be extended to both indegrees and outdegrees.
is an orientation of the edges E such that each node v ∈ V has both indegree and outdegree at least k(v).

Path Decompositions
We now introduce the concept of a path decomposition. The decomposition proves to be a strong tool due to the fact that it can be turned into a strong orientation (cf. Lemma 11). Definition 9. Given a multigraph G = (V, E), a positive integer λ, and a function δ : V → R ≥0 , we call a partition P of the edges E into disjoint paths P 1 , . . . , P ρ a (δ, λ)-path decomposition if for every v ∈ V there are at most δ(v) paths that start or end in v, each path P i is of length at most λ. For each path decomposition P, we define the multigraph G(P) as follows: the vertex set of G(P) is V , and there is an edge between two nodes u, v ∈ V if P has a path which starts at u and ends at v or vice versa. The degree of v in P is defined to be its degree in G(P) and the maximum degree of the path decomposition P is the maximum degree of G(P). Note that we used a graph with small node degrees for illustration purposes. We cannot quickly compute an orientation with large outdegree for nodes with degree less than five.
Notice that δ(v) is an upper bound on the degree of v in P and max v∈V δ(v) is an upper bound on the maximum degree of the path decomposition.
is always even. To make proofs more to the point instead of getting lost in notation, we often identify G(P) with P and vice versa. A distributed algorithm has computed a path decomposition P if every node knows the paths of P it belongs to. Note that it is trivial to compute a (d(v), 1)-path decomposition in 1 round, because every edge can form a separate path.
Let · * denote the function which rounds down to the previous even integer, that is, x * = 2 x/2 . The following virtual graph transformation, which we call edge contraction, is the core technical construction in this section.

Disjoint Edge Contraction
The The first two illustrations show that selecting the outgoing edges for a contraction can be seen as dividing the node into a set of virtual nodes, each incident to two outgoing edges. Then, in the third illustration, the contraction is obtained by removing the virtual nodes but keeping the connection alive. The last two illustrations show how an orientation on contracted edges is used to orient the edges of the original graph such that virtual nodes obtain an equal split (and such that the original node obtains a good split).
Edge contractions can be used to compute path decompositions, e.g., an edge which is created through a contraction of two edges can be seen as a path of length two. If an edge {u, v} represents a path from u to v in G, e.g., when recursively applying edge contractions on the graph G(P) for some given path decomposition P, each contraction merges two paths of P. If each node simply picked arbitrarily some edges to contract, this might result in long paths or cycles. The key idea is to use orientations of the edges to find large sets of edges which can be contracted in parallel. If every node only contracts outgoing edges of a given orientation all contractions of all nodes can be performed in parallel.
If we start with a trivial decomposition, i.e., each edge is its own path, and perform k iterations of parallel contraction, where, in each iteration, each node contracts two edges, we obtain a (d(v)−2k, 2 k )-path decomposition. If we want the degrees d(v)−2k to be constant we have to choose k, i.e., the number of iterations, in the order of ∆ which implies exponentially long paths and runtime as the path lengths (might) double with each contraction.
The technical challenge to avoid exponential runtime is to achieve a lot of parallelism while at the same time reducing the degrees quickly. We achieve this with the help of weak orientation algorithms: An outdegree of f (v) at node v allows the node to contract f (v) * edges at the same time and in parallel with all other nodes. If f (v) is a constant fraction of d(v) this implies that O(log ∆) iterations are sufficient to reach a small degree. As the runtime is exponential in the number of iterations and the constant in the O-notation might be large, this is still not enough to ensure a runtime which is linear in ∆, up to polylogarithmic terms. Instead, we begin with the weak orientation algorithm from the previous section and iterate it until a path decomposition with a small (but not optimal!) degree is obtained. Then we use it to construct a better orientation algorithm. Then, we use this better orientation to compute an even better one and so on. Recursing with the correct choice of parameters leads to a runtime which is linear in ∆, up to polylogarithmic terms. We take the liberty to use the terms recursion and iteration interchangeably depending on which term is more suitable in the respective context. Refer to Figure 2 for an illustration of the edge contraction technique with a given orientation.
We will now apply a simple version of our contraction technique to obtain a fast and precise path decomposition algorithm in ∆-regular graphs for ∆ = O (1). The result can also be formulated for non-regular graphs, but here we choose regular graphs to focus on the proof idea which is the key theme throughout most proofs of this section. Proof. We recursively compute k multigraphs H 1 , . . . , H k where H k corresponds to the resulting path decomposition. To obtain H 1 , we begin by computing a weak 2-orientation π of G with the algorithm from Lemma 6 (note that by assumption we have k ≥ 1 and therefore ∆ ≥ 6). Then, every node contracts a pair of outgoing incident edges. Notice that contractions of adjacent nodes are always disjoint. The degree of v is reduced to ∆ − 2 and each edge in the resulting multigraph H 1 consists of a path in G of length at most two.
Applying this method recursively with recursion depth k yields multigraphs H 1 , . . . , H k where the maximum degree of H i is ∆ − 2i and each edge in H i corresponds to a path in G of length at most 2 i . Thus, H k corresponds to a (∆ − 2k, 2 k )-path decomposition. Note that there is one execution of Lemma 6 in each recursion level and it provides a weak 2-orientation of the respective graph because the degree of each node is at least six due to i ≤ k ≤ ∆/2 − 2.
One communication round in recursion level i can be simulated in 2 i rounds in the original graph. Thus, the runtime is dominated by the application of Lemma 6 in recursion level k which yields a time complexity of O(2 k log n).
Next, we show how to turn a (δ, λ)-path decomposition efficiently into a strong orientation. The strong orientation obtained this way has δ(v) as an upper bound on the discrepancy between in-and outdegree of node v.

Lemma 11. Let G = (V, E) be a multigraph with a given (δ, λ)-path decomposition P.
There is a deterministic algorithm that computes a strong 1 2 Proof. Let H = G(P) be the virtual graph that corresponds to P and let π H be an arbitrary orientation of the edges of H. Let (u, v) be an edge of H oriented according to π H and let P = u 1 , . . . , u k , where u 1 = u and u k = v, be the path in the original graph G that corresponds to edge (u, v) in H. Now, we orient the path P in a consistent way according to the orientation of (u, v), i.e., edge {u i , u i+1 } is directed from u i to u i+1 for all 1 ≤ i ≤ k. Since every edge in G belongs to exactly one path in the decomposition, performing this operation for every edge in H provides a unique orientation for every edge in G. Let us denote the orientation obtained this way by π G .
Consider some node v and observe that orienting any path that contains v but where v is not either the start or the endpoint adds exactly one incoming edge and one outgoing edge for v. Therefore, the discrepancy of the indegrees and outdegrees of v in π G is bounded from above by the discrepancy in π H , which is at most δ(v) by the definition of a (δ, λ)-path decomposition. It follows that π G is a strong 1 2 (d(v) − δ(v))-orientation. Finally, since the length of any path in P is bounded above by λ, consistently orienting the paths takes λ communication rounds finishing the proof.
In the following, we formally use weak orientations to compute a path decomposition. This lemma will later be iterated in Corollary 13 Lemma 12. Assume that there exists a deterministic distributed algorithm that finds a weak 1 2 − ε d(v) − 2 -orientation in time T (n, ∆). Then, there is a deterministic distributed algorithm that finds a 1 2 + ε d(v) + 4, 2 -path decomposition in time O (T (n, ∆)).
Proof. Let G be a multigraph with a weak 1 2 − ε d(v) − 2 -orientation given by the algorithm promised in the lemma statement. Now every node v arbitrarily divides the outgoing edges into pairs and contracts these pairs yielding a multigraph with degree at most D I S C 2 0 1 7

Improved Distributed Degree Splitting and Edge Coloring
Observing that all of the chosen edge pairs are disjoint yields that the constructed multigraph is a 1 2 + ε d(v) + 4, 2 -path decomposition. The contraction operation requires one round of communication.
In the following corollary we iterate Lemma 12 to obtain an even better path decomposition. Furthermore, more care is required in the details to avoid rounding errors and to obtain the correct result when the degrees get small. Corollary 13 will be applied many times in proceeding subsections. Corollary 13. Let 0 < ε ≤ 1/6. Assume that T (n, ∆) ≥ log n is the running time of an algorithm A that finds a weak T (n, ∆)).
Proof. Let i be a positive integer. We define algorithm B such that it uses algorithm A to recursively compute graphs H 0 , H 1 , . . . , H i , H i+1 , . . . , H i+5 and path decompositions P 1 , P 2 , . . . , P i , P i+1 , . . . , P i+5 . Let G = (V, E) be a multigraph. For j = 0, . . . , i − 1 we set H 0 = G and H j+1 = H j (P j+1 ), where P j+1 is the path decomposition which is returned by applying Lemma 12 with algorithm A on H j . This guarantees that path decomposition P i has maximum degree ( 1 2 + ε) i d(v) + 12. The remaining five graph decompositions are computed afterward (see the end of this proof) and reduce the additive 12 to an additive 4.
Properties of P 1 , . . . , P i . We first show that for j = 1, . . . , i the path decomposition P j is a (z j (v), 2 j )-path decomposition with With every application of Lemma 12 the length of the paths at most double in length which implies that the path length of P j is upper bounded by 2 j . We now prove by induction that the variables z j (v), j = 1, . . . i behave as claimed: Base case: z 1 (v) = 1 2 + ε d(v) + 4 follows from the invocation of Lemma 12 with A on H 0 = G. Inductive step: Using the properties of Lemma 12 we obtain Using the geometric series to bound the last sum and then ε ≤ 1/6 we obtain that Reducing the Additive Term. Now, we compute the five further path decompositions P i+1 , . . . , P i+5 to reduce the additive term in the degrees of the path decomposition from 12 to 4; in each path decomposition this additive term is reduced by two for certain nodes.
In each of the first four path decompositions nodes with degree at least six in the current path decomposition reduce the additive term by at least two: we compute a weak d(v)/3orientation (using Lemma 6) and then every node with degree at least six contracts two outgoing edges. In the last path decomposition we compute an orientation in which every node with degree at least five in the current path decomposition has two outgoing edges (using Lemma 7) and then each of them contracts two incident edges. Thus in the last path decomposition the additive term of nodes with degree five is reduced by two.
To formally prove that we obtain the desired path decomposition let x i+j (v) be the actual degree of node v in G(P i+j ) for j = 0, . . . , 5. First note that the degree of a node never increases due to an edge contraction, not even due to an edge contraction which is performed by another node.
Constructing P i+1 , . . . , P i+4 . To compute path decomposition P i+j+1 , j = 0, . . . , 3, we compute an orientation of G(P i+j ) in which every node v with x i+j (v) ≥ 6 has outdegree at least two (one can use the algorithm described in Lemma 6). Then P i+j+1 is obtained if every node with x i+j (v) ≥ 6 contracts two of its incident outgoing edges. So, whenever Otherwise, for some j = 0, . . . , 3, we have Constructing P i+5 . For nodes with x i+4 (v) = 5 we compute one more path decomposition. We use Lemma 7 to compute an orientation of G(P 4 ) in which each node with degree at least five has two outgoing edges; then each node with at least two outgoing edges contracts one pair of its incident outgoing edges. Thus the degree of nodes with degree five reduces by two and we obtain that the path decomposition P i+5 is a ( 1 2 + ε) i d(v) + 4, 2 i+5 -path decomposition.
Running Time. The time complexity to invoke algorithm A or the algorithms from Lemma 6 or Lemma 7 on graph H j is O(2 j T (n, ∆)) because the longest path in H j has length 2 j and T (n, ∆) ≥ log n. Thus, the total runtime is O i+5 j=0 2 j T (n, ∆) = O 2 i T (n, ∆) .

Amplifying Weak Orientation Algorithms
Now, we use Corollary 13 to iterate a given weak orientation algorithm A to obtain a new weak orientation algorithm B. The goal is that B has an outdegree guarantee which is much closer to (1/2)d(v) than the guarantee provided by algorithm A.

5.
Using the construction twice more, once with ε 1 = 1/ log log ∆ and ε 2 = 1/ log ∆ and once with ε 1 = 1/ log ∆ and ε 2 = 1/∆, yields a weak 1 The following technical result is used to simplify running times; it is proved in the full version of the paper with a Taylor expansion.
In the following lemma we perform steps 1-3 of the aforementioned agenda.

orientation and runs in time T (n, ∆). Then there is a deterministic weak
Proof. Let i = log 2 (ε 2 )/ log 2 (1/2 + ε 1 ). By Lemma 14, we get that i ≤ (1 + 24ε 1 ) log 2 (1/ε 2 ); thus it is sufficient to show the left hand side of (1). By applying Corollary 13 with parameter i and algorithm A, we get a distributed algorithm that finds a (1/2 + ε 1 ) The degree of node v in the path decomposition is upper bounded by 1 2 We close the section by performing steps 4-5 of the agenda. Note that the theorem is more general than the outlined agenda as it contains an additional parameter δ which can be used to tune the running time at the cost of the quality of the weak orientation algorithm.
(c) C: Proof. Each statement is proven by applying Lemma 15 with different values for ε 1 and ε 2 .

Short and Low Degree Path Compositions Fast
Our higher level goal is to compute a path decomposition where the degree is as small as possible to obtain a directed split with the discrepancy as small as possible (with methods similar to Lemma 11, also see the proof of Theorem 1). As we will show in the next theorem, with the methods introduced in this section and the appropriate choice of parameters, we can push the maximum degree of the path decomposition down to εd(v) + 4 for any ε > 0. This is the true limit of this approach because we cannot compute weak 2-orientations of 4-regular graphs in sublinear time (see [ Choosing ε = 1/(2∆) in Lemma 17 yields the following corollary.
Remark. For any positive integer k smaller than log * (α)±O(1) one can improve the runtime of Lemma 17 to O α · (log (k) α) 0.71 · log n · Π k j=1 log (j) α , where log (j) (·) denotes the j times iterated logarithm, α = 2/ and the constant in the O-notation grows exponentially in k. This essentially follows from a version of Theorem 16 that turns a weak (

Directed and Undirected Splits
First note that an arbitrary consistent orientation of the paths in the best path decomposition of Section 2 would result in a splitting in which each node v has discrepancy at most ε·d(v)+4.
In the case of directed splitting we slightly tune this by consistently orienting the paths in such a way that each node has at least one outgoing and one incoming path. As the graph corresponding to the path decomposition is a low degree graph this is the same as finding sinkless and sourceless orientations in low-degree graphs; the following corollary states that these orientations can be computed efficiently. Its proof can be found in the full version of the paper [10].
Corollary 19 (sinkless and sourceless orientation). The following problem can be solved in time O(log n) with deterministic algorithms and O(log log n) with randomised algorithms: given any multigraph, find an orientation such that all nodes of degree at least 3 have outdegree and indegree at least 1.
We are now ready to prove our main result: Proof of (b) Nodes color each path of P alternating with red and blue. Because the length of a path in P is bounded by O(1/ε) this can be done in O(1/ε) rounds. Consider some node v and observe that v has one red and one blue edge for any path where v is not a startpoint or endpoint. Thus the discrepancy of node v is bounded above by δ(v) ≤ εd(v) + 4.
Proof of (a) Use Corollary 19 to compute an orientation π P of G(P) in which all nodes which have degree at least three in G(P) have at least one incoming and one outgoing edge. Then orient paths in the original graph according to π P as in the proof of Lemma 11 and denote the resulting orientation of the edges of G with π G .
Consider some node v and observe that orienting any path that contains v but where v is not a startpoint or endpoint adds exactly one incoming edge and one outgoing edge for v. Therefore, the discrepancy of the indegrees and outdegrees of v in π P bounds from above the discrepancy of the indegrees and outdegrees in π G . The goal is to upper bound this discrepancy as desired.
Therefor let d P (v) denote the degree of v in G(P). If d P (v) is at least three then its discrepancy in π P is bounded by d P (v) − 2 as the algorithm from Corollary 19 provided one incoming and one outgoing edge for v in G(P). Furthermore we obtain that d P (v) and d(v) have the same parity because d(v) = d P (v) + 2x holds where x is the number of paths that contain v but where v is neither a startpoint nor an endpoint. We have the following cases. d P (v) ≥ 3: εd(v) ≥ 1: v's discrepancy in π G is bounded by d P (v) − 2 ≤ εd(v) + 1. εd(v) < 1, d(v) even: v's discrepancy in π G is bounded by d P (v) − 2 ≤ 2. εd(v) < 1, d(v) odd: As d P (v) has to be odd and 3 ≤ d P (v) ≤ δ(v) = 4 holds we have d P (v) = 3. Thus v's discrepancy in π G is bounded by d P (v) − 2 ≤ 1.
d P (v) < 3: d(v) even: We have d P ∈ {0, 2} and v's discrepancy in π G is also 0 or 2. d(v) odd: We have d P = 1 and v's discrepancy in π G is also 1. In all cases we have that the discrepancy of node v is upper bounded by εd(v) + 1 if d(v) is even and by εd(v) + 2 if d(v) is even, which proves the result.