The rotor-routing torsor and the Bernardi torsor disagree for every non-planar ribbon graph

Let $G$ be a ribbon graph. Matthew Baker and Yao Wang proved that the rotor-routing torsor and the Bernardi torsor for $G$, which are two torsor structures on the set of spanning trees for the Picard group of $G$, coincide when $G$ is planar. We prove the conjecture raised by them that the two torsors disagree when $G$ is non-planar.


Introduction
This paper is aimed at completing the proof of the following conjecture proposed by Matthew Baker and Yao Wang in [2]. The "if" part of the conjecture has been proved in [2] and we will show the "only if" part is also true: Theorem 1.2. Let G be a connected non-planar ribbon graph without loops or multiple edges. The Bernardi and rotor-routing torsors b v and r v do not agree for some vertex v of G.
What does the conjecture mean? Let us give a brief introduction here. One can also see the introduction in [2].
Let G be a connected graph on n vertices. The Picard group Pic 0 (G) of G (also called the sandpile group, Jacobian group, or critical group) is a discrete analogue of the Jacobian of a Riemann surface. The cardinality of Pic 0 (G) is the determinant of any (n − 1) × (n − 1) principal sub-minor of the Laplacian matrix of G and hence equals the cardinality of the set S(G) of spanning trees of G by Kirchhoff's Matrix-Tree Theorem.
It is natural to look for bijections between the group Pic 0 (G) and the set S(G). However, since one of the objects is a group, people can ask for more than a bijection. Indeed, one can define a torsor for a group P to be a set S together with a simply transitive action of P on S. If the set S(G) has a torsor structure for the group Pic 0 (G), then their cardinalities are equal.
We are interested in two kinds of torsors. Both of them are defined for a ribbon graph together with a basepoint vertex v. One can think of the ribbon graph as a graph drawn on a closed orientable surface and hence having a cyclic ordering of the edges around each vertex.
Holroyd et al. [5] defined the rotor-routing torsor r v . Then Melody Chan, Thomas Church, and Joshua A. Grochow [4] proved that the rotor-routing torsor is independent of the basepoint if and only if G is a planar ribbon graph.
Matthew Baker and Yao Wang [2] observed that one could use the Bernardi bijection in [3] to define the Bernardi torsor b v and proved that the Bernardi torsor is independent of the basepoint if and only if G is a planar ribbon graph. Moreover, they proved that in the planar case b v and r v agree. Then they raised Conjecture 1.1, which is the target of this paper.
This paper can be viewed as a complement to [2]. We adopt notation, terminology, and some useful lemmas from [2], which are reviewed briefly in Section 2. In Section 3, we prove some technical lemmas, which categorize all the non-planar ribbon graphs into two types, called type A and type B. In either case, the graph is decomposed into two parts so that in Section 4 we can handle the computation of the rotor-routing and Bernardi process and hence prove Theorem 1.2.
In an independent work, Farbod Shokrieh and Cameron Wright also solved this conjecture [7].

Background
In this section we introduce notation and review briefly the rotor-routing torsor, the Bernardi torsor, and some useful lemmas from [2] . We refer to [2] for more details.
For any positive integer n, we denote by [n] the set {1, 2, · · · , n}. Let G be a graph, by which we mean a finite connected graph, possibly with loops and multiple edges. We use V (G) to denote the vertex set of G, and E(G) the edge set of G. Recall that a divisor on G is a formal sum of vertices with integer coefficients, written as v∈V (G) a v (v), where a v ∈ Z. The degree of this divisor is v∈V (G) a v , and the set of divisors of degree d is denoted by Div d (G). Given an oriented edge − → e = − → uv, we denote by ∂ − → e the divisor (v) − (u). The group of principal divisors on G, denoted by Prin(G), is the subgroup of Div 0 (G) generated by We say that two divisors D and D ′ are linearly equivalent, written D ∼ D ′ , if D − D ′ ∈ Prin(G). We denote the linear equivalence class of a divisor D by [D]. The Picard group of G is defined to be Pic 0 (G) = Div 0 (G)/Prin(G).
To define the two torsors, the graph G must be endowed with a ribbon structure, meaning the edges around each vertex of G have a cyclic ordering. We call a graph with such a structure a ribbon graph. In this paper, we draw a ribbon graph on a plane (possibly with edges crossing) such that around each vertex the counterclockwise orientation indicates the cyclic ordering of the edges. For example, in Figure 1, the cyclic ordering around the vertex c is (ca, cd, cf ) and the cyclic ordering around the vertex b is (bf, ba, bd). A non-planar ribbon graph is a ribbon graph that cannot be drawn on a plane with no crossings respecting the ribbon structure. In the example, by ignoring the ribbon structure one can draw the graph on a plane with no crossings, but as a ribbon graph it is non-planar.
For the rotor-routing torsor, we need to recall the meaning of the notation T ′ = ((x) − (y)) y (T ), where T, T ′ are spanning trees and x, y are vertices. The vertex y is viewed as a fixed sink. The input is the spanning tree T . The output T ′ = ((x) − (y)) y (T ) is determined by an algorithm called rotor-routing process. Initially we orient the edges of T towards y and put a chip at x. Then in each step of the rotorrouting process, we (i) turn the rotor around the chip, meaning rotating the unique oriented edge whose tail locates the chip to the next one according to the ribbon structure, and (ii) move the chip along the newly oriented edge to its head. In each step, the set of the oriented edges is called a rotor configuration. It is proved in [5] that at the end of this process the chip reaches the sink y and the rotor configuration forms a spanning tree, which is the output T ′ . This defines how an element (x) − (y) of Div 0 (G) acts on the set S(G) of the spanning trees of G. Because Div 0 (G) is freely generated by the divisors {(x) − (y) : x ∈ V (G)\{y}}, one can define the action of Div 0 (G) on S(G) in a natural way. It is proved in [5] that this action descends to a simply transitive action r y of Pic 0 (G) on S(G), which is called the rotor-routing torsor.
In Figure 1, let T be the spanning tree {ca, cf, ab, bd}. If one puts the sink at d and the chip at c, then in one step the chip will reach the sink d and hence get the spanning tree T ′ = ((c) − (d)) d (T ) = {cd, cf, ab, bd}. See also Figure 13 for a more complicated example.
For the Bernardi torsor, we need to recall the meaning of the notation β (v,e) (T ), where T is a spanning tree, v is a vertex, e is an edge incident to v, and β (v,e) is the Bernardi bijection from S(G) to the set of break divisors B(G). The break divisors are certain divisors of degree g and have the property (cf. [1,Theorem 4.21]) that each linear equivalence class of Div g (G) contains exactly one break divisor, where g = #E(G) − #V (G) + 1 is the nullity 2 of G. The map β (v,e) is induced by the Bernardi process. Informally the Bernardi process uses a tour on the surface where the ribbon graph G is embedded. The tour begins with (v, e), goes along the edges in the spanning tree T , and cuts through the edges not in T . Note that in the process each edge not in T is cut twice. Each time we first cut an edge we put a chip at the corresponding endpoint. When the process is over, we put totally g chips and hence get a divisor of degree g, denoted by β (v,e) (T ). It is proved implicitly in [3] that β (v,e) is a bijection. The paper [2] gives another proof, uses β (v,e) to define the Bernardi torsor b v , and proves that b v does not depend on the choice of e for any fixed vertex v. In brief, the action b v of Pic 0 (G) on S(G) is defined by In Figure 1, the red tour shows how the Bernardi process goes and we get β Comparing the two torsors, we get the following lemma, which is obviously true and used a few times in [2], although [2] does not state it as lemma.
where T is a spanning tree of G and all the oriented edges are oriented away from v.
The next lemma is Lemma 5.3 in [2], but we state it in a different way. The original proof still works for our statement.  To conclude this section, let us prove that the two torsors b d and r d disagree in the above example (Figure 1), which serves as a prototype of Proposition 4.3. In order to show the two torsors b d and r d disagree it suffices to prove that , then the edge bf should be a cut by the lemma, which leads to a contradiction.

Technical Lemmas:a decomposition of non-planar ribbon graph
We will use Lemma 2.1 to prove the main theorem. In general it is very hard to compute T ′ = ((x) − (y)) y (T ) and β (y,e) (T ′ ) − β (y,e) (T ). Our strategy is to decompose a graph into two parts so that the computation is easier.
Note that if G is connected, then G 1 and G 2 are also connected. To decompose a non-planar ribbon graph in the sense of Definition 3.1, we start by introducing a classical result. See, e.g., [6](Lemma 30) for a proof.
Lemma 3.2. For any non-planar ribbon graph G, there exists a subgraph (with the inherited ribbon structure) which is of either type I or type II (defined as follows). Figure 2) (1) We say that a ribbon graph is of type I if it consists of three paths whose vertex sequences are (c, a 1 , · · · , a n , b), (c, d 1 , · · · , d m , b), and (c, f 1 , · · · , f k , b), respectively, where all the vertices are distinct and n, m, k could be 0, and the cyclic ordering of the edges around each vertex is indicated as in the figure. To be precise, the cyclic ordering around c is (ca 1 , cd 1 , cf 1 ) and the cyclic ordering around b is (bf k , ba n , bd m ).

Definition 3.3. (See
(2) We say that a ribbon graph is of type II if it consists of two cycles whose vertex sequences are (c, a 1 , · · · , a n , c) and (c, f 1 , · · · , f k , c), respectively, where all the vertices are distinct and n, k could be 0, and the cyclic ordering of the edges around each vertex is indicated as in the figure. To be precise, the cyclic ordering around c is (ca 1 , cf k , ca n , cf 1 ). Figure 2. Type I and II Furthermore, we want to show any non-planar ribbon graph G is of either type A or type B as defined below. Figure 3) (1) Assume a ribbon graph G contains a subgraph H of type I. Denote the cyclic ordering of the edges around c in G by (ca 1 , cx 1 , · · · , cx N , cd 1 , cy 1 , · · · , cy M ), where N ≥ 0, M > 0, and f 1 ∈ {y 1 , · · · , y M }. Let G 1 be the subgraph of G induced by all the edges that are connected to one of the edge cx i 's by a path where c can only be used at the two endpoints. Let G 2 be the subgraph of G induced by the edges not in G 1 . In the case that G i (i ∈ {1, 2}) does not contain any edge, set G i to be the one single vertex graph c. We call (H, G 1 , G 2 ) the H-decomposition 3 of G.
(2) We call a non-planar ribbon graph G of type A if it contains a subgraph H of type I such that the subgraph G 1 in the H-decomposition does not contain any vertex in V (H)\{c}.

Figure 3. Type I and A
3 Strictly speaking, in Definition 3.4 and Definition 3.6 the H-decomposition depends not only on G and H but also on c and ca 1 , so there are more than one H-decomposition when G and H are given. However, any H-decomposition will work for the remaining part of the paper. Remark 3.5. Adopt the notation G, H, G 1 , G 2 of Definition 3.4.
(1) All the edge cx i 's are in G 1 . When N = 0, G 1 has no edge.
Definition 3.6. (See Figure 4) (1) Assume a ribbon graph G contains a subgraph H of type II. Denote the cyclic ordering of the edges around c in G by (ca 1 , cx 1 , · · · , cx N , ca n , cy 1 , · · · , cy M ), where N > 0, M > 0, and f k ∈ {x 1 , · · · , x N }, f 1 ∈ {y 1 , · · · , y M }. Let G 1 be the subgraph of G induced by all the edges that are connected to one of the edges cx i 's by a path where c can only be used at the two endpoints. Let G 2 be the subgraph of G induced by the edges not in G 1 . In the case that G 2 does not contain any edge, set G 2 to be the one single vertex graph c. We call (H, G 1 , G 2 ) the H-decomposition of G.
(2) We call a non-planar ribbon graph G of type B if it contains a subgraph H of type II such that the subgraph G 1 in the H-decomposition does not contain any of the vertices a 1 , · · · , a n .
Type B a n a 1 G 1 Figure 4. Type II and B Remark 3.7. Adopt the notation G, H, G 1 , G 2 of Definition 3.6.
(1) All the edge cx i 's are in G 1 , and the cycle {cf 1 , f 1 f 2 , · · · , f k c} is also in G 1 .
(2) If G is of type B, then G 2 contains the cycle {ca 1 , a 1 a 2 , · · · , a n c}.
Lemma 3.8. If a non-planar ribbon graph G contains a subgraph H of type I, then G is of type A.
Proof. Let G 1 be as in the first part of Definition 3.4. If G 1 does not contain any vertex in V (H)\{c}, then G is already of type A. Otherwise, by the construction of G 1 there exists a path with vertex sequence (z 0 , z 1 , z 2 , · · · , z l ) where z 0 = c, z 1 ∈ {x 1 , · · · , x N }, z 1 , z 2 , z 3 , · · · , z l−1 = c, and z l ∈ V (H)\{c}. Without loss of generality, we may assume that z l is the unique vertex in V (H)\{c} on the path. The strategy is to find a "smaller" subgraph H ′ of type I to substitute H. Here by "smaller" we mean the number N in the cyclic ordering (ca 1 , cx 1 , · · · , cx N , cd 1 , cy 1 , · · · , cy M ) is smaller. There are 5 cases based on the different positions of z l and sometimes the cyclic ordering around z l . (See Figure 5) In this case, the subgraph H ′ can be obtained by replacing the path (c, d 1 , · · · , z l ) in H with the path (z 0 , z 1 , z 2 , · · · , z l ).
This case is similar to Case 1 because the graph H is "symmetric" about the path (c, f 1 , · · · , f k , b).
In this case, the subgraph H ′ can be obtained by replacing the path (c, d 1 , · · · , d m , b) in H with the path (z 0 , z 1 , z 2 , · · · , z l ). Case 4: z l = f j , j ∈ [k], and the cyclic ordering of edges This case is similar to Case 3 because the graph H is "symmetric" about the path (c, f 1 , · · · , f k , b).
This case can be viewed as a special case of Case 1 or Case 2. In all these cases, the new subgraph H ′ is of type I and N decreases strictly. Hence by repeating this process, we can get a subgraph H satisfying the second part of Definition 3.4. Lemma 3.9. If a non-planar ribbon graph G does not contain a subgraph H of type I, then G is of type B.
Proof. By Lemma 3.2 the graph G must contain a subgraph H of type II. Let G 1 be as in the first part of Definition 3.6. If G 1 does not contain any of the vertices a 1 , · · · , a n , then G is already of type B. Otherwise, by the construction of G 1 there exists a path with vertex sequence (z 0 , z 1 , z 2 , · · · , z l ) where z 0 = c, z 1 ∈ {x 1 , · · · , x N }, z 1 , z 2 , z 3 , · · · , z l−1 = c, and z l ∈ {a 1 , · · · , a n }. Without loss of generality, we may assume that z l is the unique vertex in {a 1 , · · · , a n } on the path. Similar to the proof of Lemma 3.8, the strategy is to find a "smaller" subgraph H ′ of type II to substitute H.
The key fact here is that the path cannot contain any of the vertices f 1 , · · · , f k . Otherwise, we can get a subgraph H of type I, which leads to a contradiction. Indeed, let z j be the last vertex in the set {f 1 , · · · , f k } on the path and say z j = f j ′ . Then we consider the subpath L = (z j , z j+1 , · · · , z l )(see Figure 6). If the cyclic ordering of edges , then we can obtain H of type I by replacing the path (c, a n , · · · , z l ) in H with the path L. If the cyclic ordering of edges , then we can obtain H of type I by replacing the path (c, a 1 , · · · , z l ) in H with the path L. The remaining part of the proof is similar to the proof of Lemma 3.8. Set f k = x i , z 1 = x j for some i, j ∈ [N](see Figure 7). Note that i = j because f k is not in the path. If j > i, we can get H ′ by replacing the path (c, a n , · · · , z l ) in H by the path (z 0 , z 1 , z 2 , · · · , z l ); if j < i, we can get H ′ by replacing the path (c, a 1 , · · · , z l ) in H by the path (z 0 , z 1 , z 2 , · · · , z l ). In both cases, H ′ is of type II and the number N in the cyclic ordering (ca 1 , cx 1 , · · · , cx N , ca n , cy 1 , · · · , cy M ) decreases strictly. So by repeating this process, we can get a subgraph H making G of type B. c · · · a n a 1 Proof. This is a direct consequence of Lemma 3.8 and Lemma 3.9.

Proof of the main result
In this section we present the proof of Theorem 1.2. It consists of two parts: one is for type A and the other is for type B.
We first state a basic lemma. Let G be a graph. Assume G = G 1 ∨ c G 2 , where G 1 and G 2 are two subgraphs. Because Div 0 (G) is freely generated by and the composition φ : Div 0 (G) −→ Div 0 (G 1 ) ⊕ Div 0 (G 2 ) is D → (D 1 , D 2 ) such that D can be uniquely written as D = D 1 + D 2 , where D i ∈ Div 0 (G i ), i = 1, 2. Furthermore, we have the following isomorphism. Proof. The proof is left to the reader.
Notation: Given a decomposition G = G 1 ∨ c G 2 , we denote by ∼ i the linear equivalence relation with respect to G i , i = 1, 2. Similarly, we denote by β i (v i ,e i ) the Bernardi bijection with respect to G i , i = 1, 2.
We are now ready to prove Theorem 1.2 for ribbon graphs of type A. Proof. Let G and (H, G 1 , G 2 ) be as in Definition 3.4. Recall that the cyclic ordering of the edges around c in G is denoted by (ca 1 , cx 1 , · · · , cx N , cd 1 , cy 1 , · · · , cy M ). Because G is of type A, G 2 contains H and G 1 contains all the edge cx i 's. We want to prove that b d 1 = r d 1 .
Let T be a spanning tree of G that contains every edge in H except cd 1 and bf k (see Figure 8). Let d 1 be the sink and put the chip at c. Then by applying the rotorrouting process, we get another spanning tree We claim that T ′ 2 = T 2 ∪ {cd 1 }\{ca 1 } (see Figure 9). It is because in the rotorrouting process after the chip goes into G 1 , the process does not affect G 2 until the chip quits G 1 along the edge cd 1 and thereby reaches the sink d 1 .
Now consider β (d 1 ,d 1 c) (T ′ ) and β (d 1 ,d 1 c) (T ). We have By comparing the Bernardi tours of T 2 and T ′ 2 (see Figure 10), we will write (4.1) where B is a partial orientation of G 2 which we now define. The following 6-step process describes the tour of T 2 and we regroup them into four parts. Figure 9. The rotor-routing process for T ′ = ((c) − (d 1 )) d 1 (T ). The oriented edges indicate the rotor configuration and the square indicates the chip. The rotor configuration inside G 1 is omitted. Similarly, the following 6-step process describes the tour of T ′ 2 and we regroup them into four parts. The key observation is that the two tours share Parts II, III, IV, but the order of visits of Parts II and III is exchanged. Now we can calculate the left hand side of (4.1). One finds that Parts II, III, IV contribute the divisor − → e ∈B ∂ − → e , where B is the partial orientation of G 2 consisting of the arcs going from Part II to Part III, and the difference between Part I and Part I' contributes the divisor (c) − (d 1 ). So (4.1) holds. It remains to show − → e ∈B ∂ − → e ≁ 2 0. Assume by contradiction that − → e ∈B ∂ − → e ∼ 2 0. Then by Lemma 2.3, B is a disjoint union of directed cuts in G 2 . Note that B contains at least one arc − → bf k , so B contains a directed cut and hence G 2 \{edges in B} is disconnected. This contradicts the fact that T 2 is a spanning tree of G 2 .
It remains to prove Theorem 1.2 for ribbon graphs of type B, which is Proposition 4.5. We need the following lemma. Recall that the cyclic ordering of the edges around the vertex c in G is denoted by (ca 1 , cx 1 , · · · , cx N , ca n , cy 1 , · · · , cy M ) and all the edges cx i 's are in G 1 . We further assume that G has no loops or multiple edges, Proof. All the following arguments and calculations are made with respect to G 1 .
Assume by contradiction that − → e ∈B ∂ − → e ∼ 1 0. Because G 1 has no loops or multiple edges, B contains no directed cycle. By Lemma 2.3, B is a disjoint union of directed cuts of G 1 .
In particular, − → cf k belongs to a directed cut − → C of G 1 , which is a subset of B. Because the intersection of a cut and a cycle contains at least two edges, so there is another However, − → f 1 c and − → cf k cannot be in one directed cut. We reach a contradiction. Now we are ready to prove the following proposition. The proof is technical, so we give an example (Example 4.6) after the proof. Proof. Let G and (H, G 1 , G 2 ) be as in Definition 3.6. Recall that the cyclic ordering of the edges around c in G is denoted by (ca 1 , cx 1 , · · · , cx N , ca n , cy 1 , · · · , cy M ). Because G is of type B, G 2 contains the cycle {ca 1 , a 1 a 2 , · · · , a n c} and G 1 contains all the edge cx i 's. We want to prove that b an = r an or b c = r c .
Let T be a spanning tree of G that contains {ca 1 , a 1 a 2 , · · · , a n−1 a n } (see Figure 11). Let a n be the sink and put the chip at c. Then by applying the rotor-routing process, we get another spanning tree T ′ = ((c) − (a n )) an (T ).
We focus on G 1 . We rewrite the above identity as β (an,anc) (T ′ ) − β (an,anc) (T ) = (c) − (a n ) + D + β 1 (c,cy 1 ) (T ′ 1 ) − β 1 (c,cx 1 ) (T 1 ), c · · · T a n a 1 G 1 c · · · T ′ a n a 1 G 1 Figure 11. The rotor-routing process for T ′ = ((c) − (a n )) an (T ). An edge is dashed if and only if it is not in the tree. The oriented edges indicate the rotor configuration and the square indicates the chip. We only show the rotor configuration for the edges in the cycle {ca 1 , a 1 a 2 , · · · , a n c}. c β (an,anc) (T ) a n a 1 G 1 c · · · a n a 1 G 1 · · · β (an,anc) (T ′ ) Figure 12. The Bernardi tours of T and T ′ . The key information is that the tour of T (T ′ ) enters G 1 via the edge cx 1 (cy 1 ).
By Lemma 2.1, this implies that b c = r c .
Example 4.6. Here we give an example to demonstrate how the proof of Proposition 4.5 works. In Figure 13 and Figure 14, the graph G consists of 6 vertices and 6 edges and it is of type B. Let the spanning tree T be {ca 1 , a 1 a 2 , cf 1 , cf 2 }. Then T 1 = {cf 1 , cf 2 }, T 2 = {ca 1 , a 1 a 2 }. Focusing on G 2 , one can see that T ′ 2 is {ca 2 , a 1 , a 2 }, whatever the tree T 1 is. Focusing on G 1 , one can get T ′ 1 = T 1 ) = ((f 2 ) − (c)) c (T 1 ), which is exactly Step 1 to Step 4 by ignoring − → cf 2 . Because G 1 is planar, the two torsors agree at c and hence the example