Determining the circular flow number of a cubic graph

A circular nowhere-zero r-flow on a bridgeless graph G is an orientation of the edges and an assignment of real values from [1, r − 1] to the edges in such a way that the sum of incoming values equals the sum of outgoing values for every vertex. The circular flow number, φc(G), of G is the infimum over all values r such that G admits a nowhere-zero r-flow. A flow has its underlying orientation. If we subtract the number of incoming and the number of outgoing edges for each vertex, we get a mapping V (G)→ Z, which is its underlying balanced valuation. In this paper we describe efficient and practical polynomial algorithms to turn balanced valuations and orientations into circular nowhere zero r-flows they underlie with minimal r. Using this algorithm one can determine the circular flow number of a graph by enumerating balanced valuations. For cubic graphs we present an algorithm that determines φc(G) in case that φc(G) 6 5 in time O(20.6·|V (G)|). If φc(G) > 5, then the algorithm determines that φc(G) > 5 and thus the graph is a counterexample to Tutte’s 5-flow conjecture. The key part is a procedure that generates all (not necessarily proper) 2-vertex-colourings without a monochromatic path on three vertices in O(20.6·|V (G)|) time. We also prove that there is at most 20.6·|V (G)| of them. Mathematics Subject Classifications: 05C21, 05C30, 05C85

refinement of the flow number-the circular flow number. A circular nowhere-zero (CNZ) r-flow on a bridgeless graph G is an orientation of the edges of G and an assignment of real values from [1, r − 1] to the edges in such a way that the sum of the incoming values equals the sum of the outgoing values for every vertex. The circular flow number (CFN), denoted by φ c (G), of G is the infimum over all values r such that G admits a CNZ r-flow. The CFN was introduced by Goddyn, Tarsi and Zhang as the dual concept to the circular chromatic number and as a natural refinement of the ordinary flow number [3]. It is known that the infimum from the definition is attained for finite graphs and that the flow number is the ceiling of the CFN [3]. The concept has various associations to different areas of graph theory. That is why, despite the fact that the CFN was introduced only in the 90's, several important results can be found in older literature where equivalent results were obtained using related concepts. E.g. Jaeger published his (now disproved [8]) circular flow conjecture [11] in the 80's. Jaeger's result that connects CNZ r-flows, orientations, and balanced valuations is even older [10].
Let G be a graph on n vertices and m edges. A flow has its orientation. If we take an orientation and we subtract the number of edges incoming and the number of edge outgoing to each vertex we get a mapping V (G) → Z, a balanced valuation. This relation of flows, orientations, and balanced valuations plays an important role in our paper. Although the arguments of Jaeger [10] and the arguments in a referenced paper of Hakimi [7] are not constructive, with some care they can be turned into polynomial algorithms. As the implementation in [4] does not use the result of [7]. Thus we feel necessary to provide these algorithms. We significantly modify the arguments of Jaeger and Hakimi to obtain efficient algorithms to change a balanced valuation into an orientation (O(m 1.5 ) time) and an orientation into a CNZ r-flow with r minimal (O(m 1.5 · log 2 (m)) time). The algorithms use the algorithm of Goldberg and Rao [5] to solve maximum flow instances (if graphs are dense, another version of Goldberg's and Rao's algorithms provide better running times, but we are mostly interested in sparse graphs). This implies that given a graph G with d i vertices of degree i can determine its CFN in O( For the main result of the paper we focus on cubic graphs. Cubic graphs play an important role in the study of flows as several important problems (Four Colour Theorem, Tuttes' 5-flow Conjecture, etc.) can be naturally reduced to cubic graphs. The problem of determining the CFN is NP-hard even when in the class of cubic graph (CFN is > 4 is equivalent to 3-edge-colourability, which is NP complete [9]). A natural approach to determine circular flow number is to enumerate all balanced valuations of a graph and compute its circular flow number [4].
Assuming that the Tutte's 5-flow conjecture holds the CFN of a bridgeless graph is at most 5. If a balanced valuation of a cubic graph contains a path on three positive (or negative) vertices, its CFN is at least 5. This allows us to cut the balanced valuations we need to consider significantly [4]. Goedgebeur, Mattiolo, and Mazzuoccolo used this approach to devise and implement a practical algorithm to determine the CFN of a cubic graph. However, in their paper they do not address the problem of generating the "interesting" balanced valuations and they give no bounds on the time complexity of their algorithm. Besides the algorithm that generates an optimal CNZ flow from a balanced valuation we give an algorithm to generate all (not necessarily proper) 2-vertex-colourings of cubic graph without three consecutive vertices of the same colour. The algorithm runs in O(2 0.6n ). We also prove that the number of such colourings is at most 2 0.6n (we even sketch how to improve the constant 0.6 slightly). Together this yields an algorithm that either determines the CFN of a cubic graph, or it says that the CFN of the graph is > 5 and has running time O(2 0.6n ) (To deal with the case that CFN = 5 we use a standard approach based on path decompositions). The algorithms are fairly practical to implement.
The paper is structured as follows. In Section 2 we discuss the relation between balanced valuations, orientations, and CNZ r-flows. We describe algorithms that take a balanced valuation/orientation/CNZ flow and return a corresponding object of a different type. In Section 3 we discuss how this correspondence can be used to determine the CFN. Section 4 is devoted to the key part of O(2 0.6n ) algorithm. We show how to generate all relevant balanced valuations efficiently. This process is what determines the complexity of the algorithm. Finally, in Section 5 we discuss several marginal improvements of the algorithms (this is why we can drop the polynomial factors from the resulting time complexities) and the applicability of the algorithm to the dual concept of circular colourings.

Balanced valuations, orientations and flows
Let G be a graph. Consider a mapping b : V (G) → R, let S ⊆ V (G), and let O be an orientation of G. We define b(S) = v∈S b(v). By ∂(S) we denote the number of edges of G with exactly one end in S.
we denote the number of edges with exactly one end in S oriented towards (away from) a vertex of S.
There is an easy correspondence between CNZ r-flows, orientations, and balanced valuations. Given a CNZ r-flow φ we have its underlying orientation O. From O we can produce a balanced valuation b by setting b The fact that φ is a CNZ r-flow restricts both O and b. As the maximal flow value is r − 1 and the minimal one is 1, We define the minimal r such that (1) holds as the CFN of O and the minimal r such that (2) holds as the CFN of b. Now we are ready to state Jaeger's result in our terms.
[10] Let G be a graph. Then the following statements are equivalent: • G admits a CNZ r-flow • G admits an orientation with CFN at most r.
• G admits a balanced valuation with CFN at most r.
Turning a CNZ r-flow into an orientation with CFN at most r is easy and so is turning an orientation into a balanced valuation. Thus we focus on the opposite direction. Let O A be an arbitrary orientation of G and let b A be its underlying balanced valuation. We construct an auxiliary graph G and its orientation O from G and O A as follows. We start modifying G by adding two auxiliary vertices w + and w − . We set O to be such that each edge has the opposite orientation as in we do not add any new edges. Note that the outdegree of w + equals the indegree of w − . Also in this way the number of edges from w + to v minus the number of edges from v to w − equals We solve the maximum flow problem on G , O with source w + and sink w − with all capacities set to 1. As the capacities are integers so is some optimal flow. If the maximum flow transfers value ∂ − O (w + ) from source to sink 2 , then all edges incident with w + and w − are saturated. Then we can get O from O A by swapping the orientation of edges of G that were used in the integral optimal flow of G , O . To show that O defined in this way has b as its underlying balanced valuation consider the decomposition of the edges in the optimal flow into disjoint paths.
and the value is changed by −2 and +2, respectively. Thus by doing this for all such paths the value is increased by as desired, for each v ∈ V (G). Note that as b is underlying to some orientation, it is a balanced valuation.
On the other hand, if there is no flow in G , O that transfers value ∂ − O (w + ), then there exists a cut that separates w + and w − and this cut contains less than ∂ − O (w + ) edges oriented from the part containing w + to the part containing w − . Let S be the part of the cut containing w + and let As the optimal flow does not saturate edges incident with w + we have Due to the construction of G , Thus b is not a balanced valuation.
The time complexity of the algorithm is dominated by the construction of the maximum flow. As the capacities are 1 this can be done in O(|E(G)| 1.5 ) time [6].
It is easy to find out if an orientation admits a flow, it just suffices to check if the graph is strongly connected (there exists a directed path between each pair of vertices). Thus we may assume that the orientation makes a strongly connected oriented graph. The problem of finding the flow number of an orientation can be easily solved by solving the following linear program.
Note that this linear program can be solved in strongly polynomial time [14]. We propose a different approach. We start with an auxiliary algorithm that tries to find a CNZ p/q-flow for given p and q.
Theorem 3. Let G be a graph and let O be an orientation of G. Let p and q be two positive integers, p 2q. Then there is an algorithm that either calculates a CNZ p/qflow φ such that O is underlying φ or it decides that the CFN of O is more that p/q. The algorithm runs in O(|E(G)| 1.5 · log(|E(G)|) time.
Proof. We construct an auxiliary graph G with an orientation O and a capacity labelling c : E(G ) → N as follows. We start with G and add two new vertices w + and w − to the graph. For each e ∈ E(G) we do the following. Assume e is oriented from u to v. We set c(e) = p − 2q. We add an edge e + from w + to v and an edge e − from u to w − , both with capacity q. We find a maximum flow on G , O , c with source w + and sink w − . Let φ be the optimal flow. If the value of the flow is |E(G)| · q, then all edges incident with w + are saturated. We obtain the flow φ on G, O by setting φ(e) = φ (e)/q +1 = (φ (e)+φ (e + ))/q for every e ∈ E(G). This is a CNZ p/q-flow as each value is between 1 and p/q − 1.
On the other hand, if there is no such flow there exists a cut separating w + and w − with capacity less than |E(G)| · q. Let S be the part of the cut containing w + and let S = S − {w + }. Let a be the number of edges between w + and a vertex not in S. Clearly, all the other edges incident to w + go to S thus the number of incoming edges to S is at least ∂(w + ) − a = |E(G)| − a and their capacity is at least (|E(G)| − a) · q. On the other hand, the capacity on outgoing edges from S is less than |E(G)| · q, thus the capacity on edges outgoing from S in G is less than (|E(G)| − a) · q. We conclude that the capacity of edges between w + and S is less than the capacity of edges outgoing from S. We will compute and compare these amounts in the following paragraphs. Now consider the edges from G and examine the boundary of S in G . If an edge e of G has both endpoints in S, then in G there is an edge e + from w + to S and an edge e − from S to w − . Both have capacity q. If e starts in S but ends outside of S then e is outgoing from S with capacity p − 2q, moreover, e − is outgoing from S with capacity q. Finally, if e starts outside of S and ends in S, then e + in G goes from w + to S with capacity q. There is also an edge e in G that incoming to S but it does not come from w + and thus is irrelevant in our computations.
Let a be the number of edges in G that are inside S. The capacity of edges of G between w + and a vertex of S is a q + ∂ + O (S) · q. The capacity of edges outgoing S is a q + ∂ − O (S) · (p − 2q + q). We have Thus the CFN of O is more than p/q. The running time of the algorithm is dominated by the search of maximum flow. As capacities are integral we can use the algorithm of Goldberg and Gao [5]. Note that the CFN of G, O can be expressed as p * /q * with q * < |E(G)|. Thus if q |E(G)| then instead of running the algorithm with p and q we can run the algorithm with p and q such that p /q p/q, q < |E(G)|, and there is no rational number p * /q * with q * < |E(G)| with p /q < p * /q * < p/q. Theorem 4. Let G be a graph and let O be an orientation of G such that G with O is strongly connected. Then there is an algorithm that calculates the CFN r of O and a NZC r-flow φ such that O is the underlying orientation of φ and runs in time O(|E(G)| 1.5 · log 2 (|E(G)|)).
Proof. Theorem 1 together with the definition of the flow number of an orientation imply that r = p/q, where p, q ∈ N and q < |E(G)| ([12, Theorem 2.2] can be used to improve the constants). Similarly r < |E(G)|. Then we set q = |E(G)| 2 and using Theorem 3 and binary search we find p such that G, O has CFN at most p/q, and strictly more than (p − 1)/q. As difference between two non equal fractions with denominator less than |E(G)| is more than 1/|E(G)| 2 there is only one rational number with denominator less than |E(G)| in ((p − 1)/q, p/q]. This is the CFN of O. We find the flow by running the algorithm from Theorem 3 again. The algorithm requires O(log(E(G))) calls to the algorithm from Theorem 3, thus its running time is O(|E(G)| 1.5 · log 2 (|E(G)|).
We believe that the running time can be improved to O(|E(G)| 1.5 · log(|E(G)|)) by modifying the Goldberg-Gao algorithm.

Computing the circular flow number of a graph
Given the algorithms from the previous two theorems to calculate the CFN of a graph one just needs to calculate the minimal CFN over its balanced valuations. One needs to consider only balanced valuations b with b(v) < |∂({v})| for each vertex v. Otherwise all edges incident with v would be oriented either towards or away from v and this orientation would not be underlying to any CNZ flow. This approach requires O( v∈V (G) (∂(v) − 1)) calls to the algorithm from Theorem 4. Note that it is significantly better to consider balanced valuations instead of orientations. E.g. if G is 9-regular, it has ≈ 22.63 |V (G)| orientations and one needs to consider at most 8 |V (G)| mappings as a balanced valuation.
For cubic graphs we just need to consider balanced valuations with values in {−1, 1}. Note that if b is not a 3-bisection, its CFN is at least 6. As each bridgeless graph admits a nowhere-zero 6-flow [13], we do not need to consider balanced valuations that are not 3-bisections. Considering this fact we can get some improvement over the trivial 2 |V (G)| generation algorithm, however none of the methods we are aware of provides a significant speedup. Instead of that we will focus on graphs with CFN less than 5.
Tutte's 5-flow conjecture asserts that φ c (G) 5. A balanced valuation with CFN less than 5 is a 2-bisection. Thus if φ c (G) < 5, then one has to consider only 2-bisections. In the next section we show how to generate all of them in O(2 0.6·|V (G)| ) time. To check if φ c (G) 5 one only needs to consider integral flows [3]. This can be done using dynamic programming over path decompositions provided by the algorithm of Fomin and Høie [2] (this runs in O(2 0.34·|V (G)| )). Thus we can also recognise graphs with φ c 5 and determine its CFN in O(2 0.6·|V (G)| ).

Enumerating 2-bisections
In this section we show how to enumerate all 2-bisections of a cubic graph G in O(2 0.6·|V (G)| ). This is also a bound on the number of 2-bisections. In contrast to the previous sections, we assume here that G is simple. Note that this does not make problems in our CNZ flow algorithm as for cubic graphs with a 2-circuit one can simply contract the edges incident to one of its vertices. This produces cubic graph with the same CFN (one can easily extend a CNZ r-flow, r 3, of the contracted graph to the original graph and cubic graphs do not admit CNZ r-flows with r < 3). We also assume that G = K 4 . This is our algorithm: 1. Find a proper 3-vertex-colouring of G.
2. Extend one colour class into a maximal (with respect to inclusion) independent set. The graph induced by the remaining vertices is an union of paths (possibly containing only one vertex) and even circuits. An easy recursive enumeration shows, that the number of improper 2-colourings avoiding three consecutive vertices of the same colour on a path with i vertices is 2F i+1 (F i denotes the i-th Fibonacci number). The number of 2-colourings of cycles on i vertices is at most 2F i+1 (for the exact value see Corollary in [1]). For cycles of length 4 we use the exact value 6.
Consider the complement of the independent set from Step 2 of the algorithm. Let p i be the number of paths on i vertices and let c i be the number of cycles on i vertices. Then the number of colourings c is at most the electronic journal of combinatorics 28(1) (2021), #P1.49 The number of vertices of such a graph is After some calculation

Concluding remarks
First, we sketch how the running time of our algorithms to calculate the CFN can be marginally improved. We do not provide any involved analysis, we believe that it is obvious that the ideas we present provide a minor improvement of the exponents in the running time. This justifies dropping the polynomial terms in the time complexities given in the introduction. We decided not to pursue these improvements, first, because the improvement is barely worth the increased complexity, and second, there is a good chance that there exists a completely different more efficient approach to generate 2-bisections we are not aware of. We continue by sketching how small improvements to the presented algorithms can be made: Non-cubic case: Thanks to the Seymour's 6-flow theorem [13], we need to examine only balanced valuations that have |b(v)| < 5/6 · ∂(v) for each vertex. This improves the running time if many edges of G are incident with vertices of degree more than 6. On the other hand, if this is not the case, then we can merge many vertices of small degree into quadruples of consecutive vertices. Again, due to Seymour's theorem it is not possible that all four vertices v will have b(v) = ∂(v)−2, and the same holds for b(v) = −(∂(v)−2), reducing the number of mappings we need to consider. Cubic case: The equality in the bound (3) is attained if all components in the complement of the independent set are paths on two vertices. Thus if there aren't many such components, the running time improves. On the other hand if almost all such components are paths on two vertices, then there are many vertices in the independent set neighbouring with at least two such paths. Note that if two vertices of first path belong to one partite and the two vertices of the second path belong to the other one we cannot colour the neighbouring vertex from the independent set. This, again, reduces the number of mappings we need to consider. A finer analysis of this argument can be obtained by discharging. We believe that using these (and several similar) arguments one can improve the running time to approximately O(2 0.56·|V (G)| ).
A circular r-colouring is a vertex labelling c : V (G) → R/rZ such that for each two neighbouring vertices u and v, we have c(u) − c(v) ∈ [1, r − 1]. As circular colourings are dual to circular flows we can use our algorithms to determine the circular colouring number of planar graphs. Our algorithm runs most efficiently on cubic graphs, hence the dual algorithm is most efficient on triangulations. If the graph is not planar we still can use orientations. Similarly as with flow number one can define the circular colouring number of an orientation O as min C∈C(G) |E(C)|/|E + O (C)|, where C(G) denotes the set of oriented circuits in the unoriented graph G (we just take a circuit of G and we assign one of the two orientation of it) and E + O (C) denotes the set of edges of C that have the same orientation in O. We will call |E(C)|/|E + O (C)| as the unbalancednesses of C. Goddyn, Tarsi, and Zhang [3] proved that G admits a circular r-colouring if and only if G admits an orientation with circular colouring number at most r. Given an orientation one can determine its circular chromatic number using linear programming. An interesting question is, whether there exists notion for circular colourings equivalent to the notion of balanced valuation for flows that works also for non-planar graphs.