The Shortest Path Problem for the Distant Graph of the Projective Line Over the Ring of Integers
 770 Downloads
 1 Citations
Abstract
The distant graph \(G=G({\mathbb {P}}(Z), \vartriangle )\) of the projective line over the ring of integers is considered. The shortest path problem in this graph is solved by use of Klein’s geometric interpretation of Euclidean continued fractions. In case the minimal path is nonunique, all the possible splitting are described which allows us to give necessary and sufficient conditions for existence of a unique shortest path.
Keywords
Projective line Distant graph Shortest path problem Continued fractionsMathematics Subject Classification
51C05 05C121 Introduction
The projective line \({\mathbb {P}}(R)\) over any ring R with 1 can be defined using admissible pairs [1]. For some rings, for example for commutative ones, it is equivalent to using unimodular pairs.
One of the basics concerning the projective line over ring \({\mathbb {P}}(R)\) is the distant relation \(\vartriangle \) on the set of points. A pair \((\bar{\mathbf{x }},\bar{\mathbf{y }})\in {\mathbb {P}}(R)\times {\mathbb {P}}(R)\) is in the distant relation if the matrix \([\mathbf{x }',\mathbf{y }']\in GL_2(R)\) for any choice of admissible elements \(\mathbf{x }'\in \bar{\mathbf{x }}\) and \(\mathbf{y }'\in \bar{\mathbf{y }}\). Here, and in the sequel \(\bar{\mathbf{x }}:={\mathbb {R}}\mathbf{x }\) for all admissible \(\mathbf{x }\in {\mathbb {R}}^2\). In that way one defines distant graph \(G=G({\mathbb {P}}(R), \vartriangle )\) for any ring \({\mathbb {P}}(R)\) [4]. The vertices of the distant graph on \({\mathbb {P}}(R)\) are the points of \({\mathbb {P}}(R)\), the edges of the graph are the undirected pairs of distant points. The distance function \(dist(\bar{\mathbf{x }},\bar{\mathbf{y }})\) is the minimal number of edges needed to walk from \(\bar{\mathbf{x }}\) to \(\bar{\mathbf{y }}\). The diameter of the G is the supremum of all distances between its points.
The notion of the distant relation was introduced in the nineties of the previous century (see e.g. [6]). Blunck and Havlicek explored this notion later in [2, 3]. They gave for instance the necessary and sufficient condition for the distant graph to be connected.
We consider the projective line over Z. In this case, points of \({\mathbb {P}}(Z)\) are cyclic modules Z(a, b), where \((a,b)\in Z\times Z\) is a unimodular pair. From Z being a \(GE_2\) ring follows the connectedness of the distant graph [2], but nothing can be said about its diameter. In this paper, we give a simple direct proof that the distant graph of the projective line over Z has the infinite diameter.
The aim of this paper is to analyse paths in the distant graph \(G({\mathbb {P}}(Z), \vartriangle )\) and solve the shortest path problem for it.
The main tool in our considerations is the transition algorithm introduced in [8] (see also [9]) for bases of \(Z^2\) in order to investigate some kind of Markov partitions of automorphisms of the twodimensional torus. This is in fact the reinterpretation of Klein’s geometrization of continued fractions (see e.g. [7]).
The distant graph of a ring is defined in terms of “homogenous” ring coordinates. However, our statements follow from affine setup, hence we present in Sect. 2 the transition algorithm on \(Z\times Z\subset {\mathbb {R}}^2\). This is a repetition of [8] but we do it for seek of completeness.
In the next section, we adopt this algorithm to the language of the projective line. Then we make use of it to find the shortest paths connecting given two nonadjacent vertices. It also allows us to provide necessary and sufficient conditions for existence of exactly one shortest path between them.
For any nonadjacent vertices \(\bar{{\mathbf {x}}}\) , \(\bar{{\mathbf {y}}}\in G({\mathbb {P}}(Z), \vartriangle )\) we define so called cone relations on \({\mathbb {P}}(Z){\setminus }\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}\) with precisely two equivalence classes. Any path entirely contained in one of this classes is called a consistent path. We prove that in each of the equivalence classes of the cone relation there is precisely one shortest path connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) (Theorem 1). All vertices of those two paths together with \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) form the set of vertices of some subgraph, called by us the Klein graph \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\).
If we abandon the assumption of consistency then the issue becomes more complicated. It turns out that in general there may be lots of shortest paths between two nonadjacent vertices. Nevertheless we prove that there is at least one shortest path which is contained in some induced subgraph of \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) called by us a corner graph. This observation allows us to give a recipe to find one of the shortest paths. Consequently, we obtain the formula for the distance dist\((\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) between two vertices (Theorem 2).
Further, the careful insight into the corner graph enables to formulate the necessary and sufficient conditions for the existence of more than one shortest path (Theorem 3).
In [2], Blunck and Havlicek code a path connecting any pair of elements from connected component of the distant graph of a ring R as a product of elementary matrices. In our modification, this product is a decomposition of an element of PGL(2, R) transforming the first pair of elements of the path onto the last one. In the last section, we get from this factorization the formula for the distance in the distant graph in algebraic language. We hope that this algebraic approach allows us to generalize the results to some wider class of rings, for instance to discretely ordered ones.
2 Basic Tools: Klein Sails and Fans of Bases
Formally \({\mathbb {P}}(Z)\) is a set of cyclic modules Z(a, b) generated by unimodular pairs \((a,b)\in Z\times Z\). To follow all considerations of this paper, it is convenient to lift the projective line to \(Z^2\) understood as the subset of the plane \({\mathbb {R}}^2\).
Every two elements \(\bar{{\mathbf {x}}}\), \( \bar{{\mathbf {y}}}\in {\mathbb {P}}(Z)\) determine two lines \(k,\,l\subset {\mathbb {R}}^2\), respectively. Both lines contain the origin and other integer points, hence, are rational. They divide the plane into four closed quadrants. In each of them consider the boundary of the closed convex hull of all integer points distinct from the origin. This boundary is a infinite polyline. It splits into three parts. Two of those parts are contained in lines k and l and the middle one has precisely one common point with each of those lines (see Fig.1). This part is called a Klein sail. A similar construction may be carried out for irrational lines as well. The difference is that one gets a single polyline having no common points with the lines and asymptotic to them. Klein considered those polylines as geometrization of continued fraction expansions of irrational numbers.
By construction every integer point lying on any of Klein sails form a unimodular pair in \(Z\times Z\). We will be interested in the set of those points since every shortest walk between \(\bar{{\mathbf {x}}}\) and \( \bar{{\mathbf {y}}}\) must be contained in the set of Zmodules generated by them. The set of integer points on Klein sails may be found by use of the so called transition algorithm developed in [8] (see also [9]) for bases of \(Z\times Z\) in order to investigate some kind of Markov partitions of automorphisms of the twodimensional torus. Fix \({\mathbf {x}}\in \bar{{\mathbf {x}}}\) and \({\mathbf {y}}\in \bar{{\mathbf {y}}}\) and consider k and l as horizontal and vertical axes positively directed by \({\mathbf {x}}\) and \({\mathbf {y}}\). This gives us the enumeration of four quadrants determined by k and l. To start the transition algorithm first find, using the Extended Euclidean Algorithm, the bisequence \(({\mathbf {c}}_n)_{n\in Z}\) of all vectors with \(\hbox {det}[{\mathbf {x}},{\mathbf {c}}_n]=1\) enumerated in such a way that \({\mathbf {c}}_{n+1}={\mathbf {c}}_n{\mathbf {x}}\). If \({\mathbf {y}}\in \{{\mathbf {c}}_n\}\) then stop the algorithm. Otherwise there is precisely one \(n_0\in Z\) such that \({\mathbf {c}}_{n_0}\) is in the first quadrant and \({\mathbf {c}}_{n_0+1}\) is in the second one. Denote \({\mathbf {e}}_1:={\mathbf {c}}_{n_0}\) and \({\mathbf {f}}_1:={\mathbf {c}}_{n_0+1}\). Obviously \(\beta _1=({\mathbf {e}}_1,{\mathbf {f}}_1)\) forms a basis in \(Z\times Z\) (see the remark after Lemma 1). Assume the \(\beta _k=({\mathbf {e}},{\mathbf {f}})\) is a basis in \(Z\times Z\) with \({\mathbf {e}}\) in the first quadrant and \({\mathbf {f}}\) in the second one. If \({\mathbf {y}}={\mathbf {e}}+{\mathbf {f}}\) then the algorithm stops. Otherwise put \(\beta _{k+1}=({\mathbf {e}}+{\mathbf {f}}, {\mathbf {f}})\) if \({\mathbf {e}}+{\mathbf {f}}\) lies in the first quadrant and \(\beta _{k+1}=({\mathbf {e}},{\mathbf {e}}+{\mathbf {f}})\) lies in the second one.
If the set of bases \(\{\beta _k\}\) were infinite then norms of their vectors would tend to infinity while the areas of parallelograms spanned by them would stay equal to 1, hence the angles would tend to 0 or \(\pi \). In our construction, they converge to 0 since the angles are decreased step by step. It follows that \({\mathbf {y}}\) lies in the interior of the parallelogram spanned be vectors of \(\beta _k\) for large enough k, which is a contradiction (see the remark after Lemma 1). Therefore, the algorithm eventually stops necessarily on \({\mathbf {y}}\).
In order to translate the above algorithm in terms of the projective line we note that it can be rewritten in the following way. First we may assume that \({\mathbf {e}}_1+{\mathbf {f}}_1\) is in the first quadrant. The other case is completely symmetric. If \({\mathbf {e}}_1+{\mathbf {f}}_1={\mathbf {y}}\) then the algorithm stops. Otherwise we add \({\mathbf {f}}_1\) to \({\mathbf {e}}_1\) so many times until the resulting vector stays in the first quadrant. We get the finite sequence of vectors \(({\mathbf {e}}_{A_0}:={\mathbf {e}}_1,{\mathbf {e}}_2,\ldots ,{\mathbf {e}}_{a_1+1} =:{\mathbf {e}}_{A_1})\). By construction \({\mathbf {f}}_2:={\mathbf {e}}_{A_1}+{\mathbf {f}}_1\) lies in the second quadrant. Then we keep adding \({\mathbf {e}}_{A_1}\) to \({\mathbf {f}}_1\) so many times until the resulting vector stays in the second quadrant. We get the finite sequence of vectors \(({\mathbf {f}}_{B_0}:={\mathbf {f}}_1,{\mathbf {f}}_2,\ldots ,{\mathbf {f}}_{b_1+1}=:{\mathbf {f}}_{B_1})\). Then we repeat the construction until the summation of vectors is equal to \({\mathbf {y}}\).
3 Basic Tools in Terms of the Projective Line
This section is devoted to presenting the material of the previous one in terms of the projective line. This allows us to conduct all considerations independently on choice of representative elements of vertices in the projective line.
The basic property of those relations is the following lemma proved in [8]:
Lemma 1
(Lemma 2.1, [8]) If \(\bar{{\mathbf {x}}},\, \bar{{\mathbf {y}}},\,\bar{{\mathbf {x}}}', \, \bar{{\mathbf {y}}}'\,\in {\mathbb {P}}(Z)\) satisfy \(\bar{{\mathbf {x}}}\vartriangle \bar{{\mathbf {y}}}\) and \(\bar{{\mathbf {x}}}'\vartriangle \bar{{\mathbf {y}}}'\) then either \(\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}=\{\bar{{\mathbf {x}}}',\bar{{\mathbf {y}}}'\}\) or precisely one equivalence class of each cone relations \(\sim _{\{\bar{{\mathbf {x}}}, \bar{{\mathbf {y}}}\}}\) and \(\sim _{\{\bar{{\mathbf {x}}}', \bar{{\mathbf {y}}}'\}}\) is contained in the equivalence class of another cone relation.
We will need also the following obvious observation.
Lemma 2
In graph theory, a set of vertices is called a clique if its elements are pairwise adjacent. From Lemma 1, one can easily deduce the following corollary.
Corollary 1
 1.
Any maximal clique in \({\mathbb {P}}(Z)\) has exactly three elements.
 2.
Every pair of adjacent vertices belongs to precisely two maximal cliques.
 3.If \(\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}},\bar{{\mathbf {u}}}\}\) and \(\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}},\bar{{\mathbf {v}}}\}\) are two maximal cliques then$$\begin{aligned} \bar{{\mathbf {u}}}\not \sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\bar{{\mathbf {v}}}. \end{aligned}$$
Transition Algorithm
Given two elements \(\bar{{\mathbf {x}}},\,\bar{{\mathbf {y}}}\in {\mathbb {P}}(Z)\) fix one of them, say \(\bar{{\mathbf {x}}}\).
Using the Extended Euclidean Algorithm find a sequence \((\bar{{\mathbf {c}}}_n)_{n\in Z}\) of all vertices of the distant graph adjacent to \(\bar{{\mathbf {x}}}\). The sequence \((\bar{{\mathbf {c}}}_n)_{n\in Z}\) may be ordered in such a way that \(\{\bar{{\mathbf {c}}}_n,\bar{{\mathbf {c}}}_{n+1},\bar{{\mathbf {x}}}\}\) is a clique for every \(n\in Z\). If \(\bar{{\mathbf {y}}}\in (\bar{{\mathbf {c}}}_n)\) then stop.
If not, there is precisely one \(n_0\in Z\) such that \(\bar{{\mathbf {c}}}_{n_0}\not \sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\bar{{\mathbf {c}}}_{n_0+1}\). Denote \(\bar{{\mathbf {c}}}_{n_0}\) and \(\bar{{\mathbf {c}}}_{n_0+1}\) by \(\bar{{\mathbf {e}}}_1\) and \(\bar{{\mathbf {f}}}_1\) arbitrarily.
Denote \(\bar{{\mathbf {e}}}_2:=\bar{{\mathbf {g}}}_2\). Among all vertices, excluding \(\bar{{\mathbf {e}}}_1\), adjacent to \(\bar{{\mathbf {f}}}_1\) there are precisely two adjacent to each other that are not in the relation \(\sim _{\{\bar{{\mathbf {e}}}_1,\bar{{\mathbf {y}}}\}}\). Moreover in the sequence of vertices adjacent to \(\bar{{\mathbf {f}}}_1\) there are finitely many in the relation \(\sim _{\{\bar{{\mathbf {e}}}_1,\bar{{\mathbf {y}}}\}}\) with \(\bar{{\mathbf {e}}}_2\). We may naturally enumerate them: \((\bar{{\mathbf {e}}}_2,\ldots ,\bar{{\mathbf {e}}}_{a_1+1})\) in such a way that \(\bar{{\mathbf {e}}}_k\vartriangle \bar{{\mathbf {e}}}_{k+1}\). If the next vertex in this sequence and not in the relation \(\sim _{\{\bar{{\mathbf {e}}}_1,\bar{{\mathbf {y}}}\}}\) with \(\bar{{\mathbf {e}}}_{a_1+1}\) is equal to \(\bar{{\mathbf {y}}}\) then stop.
If not, denote the above vertex by \(\bar{{\mathbf {f}}}_2\) and repeat the same construction with \(\bar{{\mathbf {e}}}_{a_1+1}\) and \(\bar{{\mathbf {f}}}_2\) playing the role of \(\bar{{\mathbf {f}}}_1\) and \(\bar{{\mathbf {e}}}_2\), respectively. We get the sequence \((\bar{{\mathbf {f}}}_2,\ldots ,\bar{{\mathbf {f}}}_{b_1+1})\). Note that \(\bar{{\mathbf {f}}}_k\vartriangle \bar{{\mathbf {f}}}_{k+1}\), \(k=2,\ldots ,b_1\), and \(\bar{{\mathbf {f}}}_j\sim _{\{\bar{{\mathbf {f}}}_1,\bar{{\mathbf {y}}}\}}\bar{{\mathbf {f}}}_2\), \(j=2,\ldots ,b_1+1\).
Then repeat the above construction with \(\bar{{\mathbf {e}}}_{a_1+1}\) and \(\bar{{\mathbf {f}}}_{b_1+1}\) playing the role of \(\bar{{\mathbf {e}}}_1\) and \(\bar{{\mathbf {f}}}_1\), respectively. The transition algorithm is depicted in Fig. 1 for \({\mathbf {x}}=[2,3]\) and \({\mathbf {y}}=[3,2]\).
By construction both sequences are contained in different equivalence classes of \(\sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\) and two consecutive vertices in each of them are adjacent. Vertices \(\bar{{\mathbf {e}}}_{A_k}\) and \(\bar{{\mathbf {f}}}_{B_k}\), excluded \(\bar{{\mathbf {y}}}\), will be called corner vertices. Note that by construction \(rl\in \{0,1\}\).
The Klein graph is depicted in Fig. 2. All vertices of the corner graph are marked in black. The bolded edges are edges of the standard path to be defined in the beginning of Sect. 5.
4 Consistent Paths
Definition 1
A path connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) in the distant graph is called consistent if all its elements but \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) are contained in the same equivalence class of \(\sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\).
The length of the shortest consistent path between \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) is denoted by \(d_c(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\).
Theorem 1
 1.The union of each equivalence classes of \(\sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\) and \(\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}\) contains a unique consistent path connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\). The lengths of those two paths are equal towhere the numbers \(A_{r}\) and \(B_{l}\) are taken from the transition algorithm.$$\begin{aligned} d_a(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})=1+A_{r}\;\;\hbox { and } \;\; d_b(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})=1+B_{l}, \end{aligned}$$
In particular the distant graph of \({\mathbb {P}}(Z)\) is connected.
 2.
There are at most two shortest consistent paths connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) in the distant graph.
 3.There is a unique shortest consistent path connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) in the distant graph if and only if$$\begin{aligned} d_a(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\ne d_b(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}). \end{aligned}$$
Proof
Now 2. and 3. immediately follows from 1. \(\square \)
Example 1
Example 2
Definition 2
A Hamiltonian cycle \(p(\bar{{\mathbf {x}}})\) containing \(\bar{{\mathbf {x}}}\in {\mathbb {P}}(Z)\) is called consistent if there is \(\bar{{\mathbf {y}}}\in {\mathbb {P}}(Z)\) such that \(p(\bar{{\mathbf {x}}})\) is a union of two consistent paths connecting \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\).
Formally to run the transition algorithm we have to fix both vertices \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\). But actually we may fix only \(\bar{{\mathbf {x}}}\) and arbitrary finite sequences of positive integers \((a_n)\) and \((b_m)\) whose lengths differ by one. Then we may run the transition algorithm starting from the longer sequence. After using all numbers \(a_n\) and \(b_m\) we get two last corner vertices \(\bar{{\mathbf {e}}}_{A_r}\) and \(\bar{{\mathbf {f}}}_{B_l}\). Then let \(\bar{{\mathbf {y}}}\) be such that it forms a clique with these corner vertices and \(\bar{{\mathbf {e}}}_{A_r}\not \sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\bar{{\mathbf {f}}}_{B_l}\). The above consideration gives the following.
Corollary 2
Note that one can eliminate \(\bar{{\mathbf {y}}}\) from the cycle and get again a Hamiltonian one. In this way one is able to construct decreasing sequence of Hamiltonian cycles containing \(\bar{{\mathbf {x}}}\) that lengths decrease by one. Of course the shortest such cycle has length 3 and forms a clique. In the forthcoming paper it will be shown how to construct all such sequences of Hamiltonian cycles.
5 Nonconsistent Paths
While, as has been shown in the previous section, there are at most two shortest consistent paths between two vertices in the distant graph of the projective line over Z, it turns out that in general you can find many shortest paths if we abandon the assumption of consistency.
Lemma 3
The length of the standard path between nonadjacent \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) is equal to \(r+l+1\) provided \(l>0\). If \(l=0\), then it is equal to 2.
The key observation of this section is the fact that if want to make a shortest walk from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\) then we have to use only vertices of \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) but we may also use only vertices of \(\widetilde{K}(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\).
Lemma 4
Every shortest path between \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) is a subgraph of \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\). Moreover among all the shortest paths at least one is a subgraph of \(\widetilde{K}(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\).
Proof
We intend to show that having a path \(\tilde{p}\) from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\) one can find a path from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\) contained in \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) which is not longer than \(\tilde{p}\).
Let then \(\bar{{\mathbf {z}}}\in \tilde{p} {\setminus } K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\). We have either \(\bar{{\mathbf {z}}}\sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\bar{{\mathbf {e}}}_1\) or \(\bar{{\mathbf {z}}}\sim _{\{\bar{{\mathbf {x}}},\bar{{\mathbf {y}}}\}}\bar{{\mathbf {f}}}_1\). Assuming the former case we can find precisely one k with \(\bar{{\mathbf {z}}}\in C_k\), where \(C_k\) are taken from the proof of Theorem 1. By Lemma 1 all vertices adjacent to \(\bar{{\mathbf {z}}}\) belong to \(C_k\cup \{\bar{{\mathbf {e}}}_k,\bar{{\mathbf {e}}}_{k+1}\}\). Therefore the predecessor as well as the successor of \(\bar{{\mathbf {z}}}\) in \(\tilde{p}\) are contained in the same set, hence \(\{\bar{{\mathbf {e}}}_k,\bar{{\mathbf {e}}}_{k+1}\}\subset \tilde{p}\). Since \(\bar{{\mathbf {e}}}_k\vartriangle \bar{{\mathbf {e}}}_{k+1}\), we may shorten \(\tilde{p}\) rejecting all vertices from \(\tilde{p}\cap C_k\). We argue analogically in the latter case.
Assume now that \(\tilde{p}\) is one of the shortest paths between \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\). We already know that \(\tilde{p} \subset K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\). Let \(1\le m\le r\) and \(A_m<k<A_{m+1}\) be such that \(\bar{{\mathbf {e}}}_k\in \tilde{p}\). In general we have always \(\bar{{\mathbf {e}}}_{A{m+1}}\in \tilde{p}\) since we can not omit \(\bar{{\mathbf {e}}}_{A{m+1}}\in \tilde{p}\) walking from \(\bar{{\mathbf {e}}}_k\) to \(\bar{{\mathbf {y}}}\). Walking from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {e}}}_k\) we must go through \(\bar{{\mathbf {f}}}_{B_m}\) or \(\bar{{\mathbf {e}}}_{A_m}\) so \(\bar{{\mathbf {f}}}_{B_m}\in \tilde{p}\) or \(\bar{{\mathbf {e}}}_{A_m}\in \tilde{p}\). Since \(\bar{{\mathbf {f}}}_{B_m}\vartriangle \bar{{\mathbf {e}}}_{A{m+1}}\) and \(\tilde{p}\) is one of the shortest paths, \(\bar{{\mathbf {f}}}_{B_m}\not \in \tilde{p}\) and \(\bar{{\mathbf {e}}}_{A_{m+1}}\in \tilde{p}\). We know that \(\bar{{\mathbf {e}}}_{A{m}}\vartriangle \bar{{\mathbf {f}}}_{B_{m}}\vartriangle \bar{{\mathbf {e}}}_{A_{m+1}}\) is a path in \(\widetilde{K}(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) of the length 2, hence there are no other vertices between \(\bar{{\mathbf {e}}}_{A{m}}\) and \(\bar{{\mathbf {e}}}_{A_{m+1}}\) but \(\bar{{\mathbf {e}}}_{k}\). We may replace \(\bar{{\mathbf {e}}}_{A{m}}\vartriangle \bar{{\mathbf {e}}}_{k}\vartriangle \bar{{\mathbf {e}}}_{A_{m+1}}\) by \(\bar{{\mathbf {e}}}_{A{m}}\vartriangle \bar{{\mathbf {f}}}_{B_{m}}\vartriangle \bar{{\mathbf {e}}}_{A_{m+1}}\subset \widetilde{K}(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\).
We analogically consider \(\bar{{\mathbf {f}}}_{k}\in \tilde{p}\) instead of \(\bar{{\mathbf {e}}}_{k}\) which ends the proof. \(\square \)
The other case is if all numbers \(c_k\), \(k=1,\ldots ,r+l\), are distinct from 0 (which is equivalent to \(c_2\ne 0\)) and all but \(c_1\) or \(c_{r+l}\) are greater than 1. In such a situation no pairs \((\bar{{\mathbf {e}}}_{A_k},\bar{{\mathbf {e}}}_{A_{k+1}})\), \(k=1,\ldots ,l1\), \((\bar{{\mathbf {f}}}_{B_k},\bar{{\mathbf {f}}}_{B_{k+1}})\), \(k=0,\ldots ,r2\), are adjacent. It means that the shortest walk from \(\bar{{\mathbf {e}}}_{A_k}\) to \(\bar{{\mathbf {e}}}_{A_{k+1}}\) is \(\bar{{\mathbf {e}}}_{A_k}\vartriangle \bar{{\mathbf {f}}}_{B_k}\vartriangle \bar{{\mathbf {e}}}_{A_{k+1}}\). Similarly the shortest walk between \(\bar{{\mathbf {f}}}_{B_k}\) and \(\bar{{\mathbf {f}}}_{B_{k+1}}\) is \(\bar{{\mathbf {f}}}_{B_k}\vartriangle \bar{{\mathbf {e}}}_{A_{k+1}}\vartriangle \bar{{\mathbf {f}}}_{B_{k+1}}\). We have shown the following.
Proposition 1

\(c_2=0\) or

\(c_2>0\) and \(c_k>1\) for all \(k\in \{2,\ldots ,r+l1\}\).
Note that even \(c_1=1\) or \(c_{r+l}=1\) the standard path remains one of the shortest ones. Indeed, if \(c_1=a_1=1\) then \(\bar{{\mathbf {e}}}_1\vartriangle \bar{{\mathbf {e}}}_2\), hence there are two shortest paths from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {e}}}_2\), namely \(\bar{{\mathbf {x}}}\vartriangle \bar{{\mathbf {f}}}_1\vartriangle \bar{{\mathbf {e}}}_2\) and \(\bar{{\mathbf {x}}}\vartriangle \bar{{\mathbf {e}}}_1\vartriangle \bar{{\mathbf {e}}}_2\). Similarly if \(c_{r+l2}=b_{l1}=1\) then \(\bar{{\mathbf {f}}}_{B_{l1}}\vartriangle \bar{{\mathbf {f}}}_{B_l}\vartriangle \bar{{\mathbf {y}}}\) and \(\bar{{\mathbf {f}}}_{B_{l1}}\vartriangle \bar{{\mathbf {e}}}_{A_r}\vartriangle \bar{{\mathbf {y}}}\) are two shortest walks from \(\bar{{\mathbf {f}}}_{B_{l1}}\) to \(\bar{{\mathbf {y}}}\) and if \(c_{r+l2}=a_{r1}=1\) then \(\bar{{\mathbf {e}}}_{A_{r1}}\vartriangle \bar{{\mathbf {e}}}_{A_r}\vartriangle \bar{{\mathbf {y}}}\) and \(\bar{{\mathbf {e}}}_{A_{r1}}\vartriangle \bar{{\mathbf {f}}}_{B_l}\vartriangle \bar{{\mathbf {y}}}\) are two shortest walks from \(\bar{{\mathbf {e}}}_{A_{r1}}\) to \(\bar{{\mathbf {y}}}\).
One can ask what is a necessary and sufficient condition for the Klein graph \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) so that the standard path is the only shortest one. The above considerations immediately convince us that first of all we must have \(c_1>1\) and \(c_{r+l}>1\). We must also have \(c_k>1\) for \(k=2,\ldots ,r+l1\) to assure that the standard path is one of the shortest ones. Assume now that \(c_k=2\) for some \(k\in \{2,\ldots ,r+l1\}\). If \(c_k=a_j\) then \(\bar{{\mathbf {e}}}_{A_{j1}}\vartriangle \bar{{\mathbf {f}}}_{B_{j1}}\vartriangle \bar{{\mathbf {e}}}_{A_j}\) (the standard one) and \(\bar{{\mathbf {e}}}_{A_{j1}}\vartriangle \bar{{\mathbf {e}}}_{A_{j1}+1}\vartriangle \bar{{\mathbf {e}}}_{A_j}\) are two shortest path between \(\bar{{\mathbf {e}}}_{A_{j1}}\) and \(\bar{{\mathbf {e}}}_{A_{j}}\). Similarly if \(c_k=b_j\) then \(\bar{{\mathbf {f}}}_{B_{j1}}\vartriangle \bar{{\mathbf {e}}}_{A_{j}}\vartriangle \bar{{\mathbf {f}}}_{B_j}\) (the standard one) and \(\bar{{\mathbf {f}}}_{B_{j1}}\vartriangle \bar{{\mathbf {f}}}_{B_{j1}+1}\vartriangle \bar{{\mathbf {f}}}_{B_j}\) are two shortest path between \(\bar{{\mathbf {f}}}_{B_{j1}}\) and \(\bar{{\mathbf {f}}}_{B_{j}}\). We have just shown that the necessary and sufficient condition is the following.
Proposition 2

\(c_1>0\), \(c_2=0\) or

\(c_1>1\), \(c_{r+l}>1\) and \(c_k>2\) for all \(k\in \{2,\ldots ,r+l1\}\).
The considerations similar to those above allow us to give a recipe for finding one of the shortest paths in \(\widetilde{K}(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\). First assume the following convention: walking along the standard path we say that we meet the number \(a_{k+1}\) or \(b_{k+1}\) if we are in the vertex \(\bar{{\mathbf {e}}}_{A_k}\) or \(\bar{{\mathbf {f}}}_{B_k}\), respectively. Then the recipe is the following: start from \(\bar{{\mathbf {x}}}\) and walk along the standard path until you meet the number one. Then walk along the consecutive vertices on the same side of the corner graph. Once you meet the number different from one you come back to the standard path. Perform this procedure till you reach \(\bar{{\mathbf {e}}}_{A_r}\) or \(\bar{{\mathbf {f}}}_{B_l}\). Then make one step more to end at \(\bar{{\mathbf {y}}}\). In the sequel the path we have just described is called a standard shortest path.
Theorem 2
6 Uniqueness of the Shortest Paths
In this section we formulate necessary and sufficient conditions for the existence of more than one shortest path between two vertices. In the previous section we described the construction of one of the shortest paths between two nonadjacent vertices. This path may split, but need not to, into more shortest paths because of appearance of 1 or 2 in the sequence \((c_1,\ldots ,c_{r+l})\). Two next lemmas explain the situation.
 (o1)
\(l_1<r_1\le l_2+1\le r_2\) with \(l_2<l+1\) iff \(r=l+1\)
or
 (o2)
\(l_1<r_1\le l_2=r_2=r+1=l+1\)
or
 (o3)
\(0=r_1=l_1\le l_2<r_2\)
or
 (o4)
\( r_1\le l_1\le r_2\le l_2\), where \(l_1\ne 0\) with an additional condition \(r_2<r+1\) iff \(r=l\)
or
 (o5)
\(r_1\le l_1\le l_2<r_2=r+1\).
Lemma 5
Appearance of 1 in the sequence \((c_1,\) \(\ldots ,c_{r+l})\) results in splitting the shortest path iff two blocks of 1’s overlap or \(r=l\) and \(c_i=1\) for all i’s.
Proof
 (s1)
\(b_k=a_k=1\), \(1\le k\le l\);
 (s2)
\(b_k=1\), \(a_{k+1}=1\), \(\bar{{\mathbf {f}}}_k\in p\).
Until now we have assumed that our blocks neither start nor end at \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\). Now we assume opposite.
Assume first \(r_1=l_1=0\). Then in order to have splitting we must have \(r_2>l_2\) which gives (o3). If \(l_1=0\ne r_1\) then \(l_1<r_1\) and necessarily \(r_1\le l_2+1\le r_2\). This gives (o1). If \(r_1=0\ne l_1\) then \(l_1>r_1\) and necessarily \(l_1\le r_2\le l_2\) which is (o4).
Next let \(r=l\) and \(r_2=l_2=r\). Then in order to have splitting we must have \(l_1<r_1\) which is (o2). If \(l_2=l=r\ne r_2\) then \(r_2<r\) which is equivalent to \(r_2<r+1\). Moreover we must have \(r_1\le l_1\le r_2\). This gives the additional condition in (o4). If \(l_2\ne l=r=r_2\) then \(l_2+1\le r_2\) and we must have \(l_1<r_1\le l_2+1\) which is (o1).
Now assume that \(r=l+1\). First consider \(r_2<r\). Then \(r_2<r=l+1=l_2\) and in order to guarantee splitting we must have \(r_1\le l_1\le r_2\). This gives (o4). If \(r_2=r+1\) then to obtain splitting the standard shortest path has to end in the right side of the Klein graph. Therefore if \(r_1\le l_1\) then \(l_2\le l+1<r_2=l+2\) and we get (o5). On the other hand if \(r_1>l_1\) then we must have \(r_1\le l_2+1\) and we have to “jump” into the right side of the Klein graph which forces \(l_2<l+1\). This is the additional condition in (o1).
There is left one case. Namely, \(c_1=\cdots =c_{r+l}=1\). In this case it obvious that one has splitting iff \(r=l\).
We have considered all possible configurations of two blocks of 1’s that result in splitting. Since we get all conditions (o1)–(o5) and each of them obviously forces splitting, we have finished the proof. \(\square \)
Another reason of splitting is appearance of 2 in this sequence. By direct insight into the graph \(K(\bar{{\mathbf {x}}},\bar{{\mathbf {y}}})\) we get the following result.
Lemma 6
 (st1)
there exists \(k\in \{2,\dots ,l\}\) such that \(b_k=2\), \(a_k>1\), \(a_{k+1}>1\) or \(b_1=2\) and \(a_2>1\).
 (st2)
there exists \(k\in \{2,\dots ,l\}\) such that \(a_k=2\), \(b_k>1\) and \(s_k\le t_k\),
Proof
Note that if \(b_k=2\) then necessary and sufficient condition to split the standard shortest path is that it contains vertices \(\bar{{\mathbf {f}}}_{B_{k1}}\), \(\bar{{\mathbf {f}}}_{B_{k}}\) and \(\bar{{\mathbf {e}}}_{A_{k}}\) (see the left side of Fig. 4). The standard shortest path contains \(\bar{{\mathbf {f}}}_{B_{k1}}\) iff \(k>1\) and \(a_k>1\) or \(k=1\) even if \(a_1=1\). It necessarily contains \(\bar{{\mathbf {e}}}_{A_{k}}\) since \(b_k=2>1\). The standard shortest path contains \(\bar{{\mathbf {f}}}_{B_{k}}\) iff \(a_{k+1}>1\).
Now assume that \(a_k=2\). Then necessary and sufficient condition to split the standard shortest path is appearance of vertices \(\bar{{\mathbf {e}}}_{A_{k1}}\), \(\bar{{\mathbf {f}}}_{B_{k1}}\) and \(\bar{{\mathbf {e}}}_{A_{k}}\) (see the right side of Fig. 4). The vertex \(\bar{{\mathbf {e}}}_{A_{0}}=\bar{{\mathbf {e}}}_1\) is never contained in the standard shortest path so k must be greater than 1. The vertex \(\bar{{\mathbf {e}}}_{A_{k1}}\) appears in it iff \(s_k\le t_k\). This path necessarily contains \(\bar{{\mathbf {f}}}_{B_{k1}}\) since \(a_k=2>1\). Then we see that \(\bar{{\mathbf {e}}}_{A_{k}}\) appears in the standard shortest path iff \(b_k>1\).
Observe that in the both cases k must be less then \(r+1\). This gives range of k in the thesis of the lemma. \(\square \)
Theorem 3

two blocks of 1’s overlap or

\(r=l\) and all numbers \(a_k\) and \(b_k\) are equal to one or

one of the conditions of Lemma 6 holds.
7 Algebraic Representation of Paths in the Klein Graph
For any two non distant vertices \(\bar{{\mathbf {x}}}\) and \(\bar{{\mathbf {y}}}\) of the distant graph we express the method of finding the shortest path developed in Sect. 5 in terms of matrices form \(GE_2(Z)\). Fix two representative elements \({\mathbf {x}}\in \bar{{\mathbf {x}}}\) and \({\mathbf {y}}\in \bar{{\mathbf {y}}}\). In order to use the Blunck–Havlicek algorithm we establish as a standard basis in \(Z^2\) the basis \(({\mathbf {x}},\;{\mathbf {f}}_1)\), where \({\mathbf {f}}_1\) is defined in Sect. 2 for \({\mathbf {x}}\) and \({\mathbf {y}}\). Let \({\mathbf {y}}\) represents as [p, q] in the above basis. Then by construction \(q/p\ge 1\). The (TR) case of Sect. 3 requires \({\mathbf {y}}\) to have the slope not less then 2. If \(1\le q/p<2\) then we change the basis to \(({\mathbf {x}},\;{\mathbf {e}}_1)\). In this basis \({\mathbf {y}}\) represents as \([qp,q]\), hence it has the slope not less than 2.
Any change of order of reductions may effect the resulting representation of A as a product of matrices of the form (6). In spite of this all representations that cannot be reduced any more have the same number of matrices since they all represent the shortest paths from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\).
We say that a matrix A represents a path from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\) if in the basis described above for any choice \({\mathbf {x}}\in \bar{{\mathbf {x}}}\) to \({\mathbf {y}}\in \bar{{\mathbf {y}}}\) the product given by the Blunck–Havlicek algorithm is equal to A.
By results of Sect. 5 the matrix given by (7) represents at least one shortest path from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\). There may be other matrices representing such a path. The situations is described in the below proposition whose thesis directly follow from analysis of the Klein graph.
Proposition 3
There are at most two matrices representing the shortest paths from \(\bar{{\mathbf {x}}}\) to \(\bar{{\mathbf {y}}}\), among them there is always a matrix A given by (7).
 1.
either \(d_n>2\) or
 2.
\(d_n1=d_{n1}=\ldots =d_{nk}=1\) and \(d_{nk1}>1\) for some odd \(k\ge 1\).
Notes
Acknowledgments
We would like to express our gratitude to professor Hans Havlicek for attracting our attention to the problem and fruitful discussion on the subject. We also thank to Mariusz Bodzioch, a Ph.D. student of our faculty, for help in preparing the figures. The second named author was partially supported by the NCN (National Science Centre, Poland) Grant 2011/03/B/ST1/04427.
References
 1.Blunck, A., Havlicek, H.: Projective representations I: projective lines over a ring. Abh. Math. Semin. Univ. Hambg. 70, 287–299 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
 2.Blunck, A., Havlicek, H.: The connected components of the projective line over a ring. Adv. Geom. 1, 107–117 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
 3.Blunck, A., Havlicek, H.: On distantisomorphisms of projective lines. Aequationes Math. 69, 146–163 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
 4.Blunck, A., Herzer, A.: KettengeometrienEine Einführung. Shaker Verlag, Aachen (2005)zbMATHGoogle Scholar
 5.Cohn, P.H.: On the structure of the \(GL_2\) of a ring. Inst. Hautes Etudes Sci. Publ. Math. 30, 5–53 (1966)CrossRefGoogle Scholar
 6.Herzer, A.: Chain geometries. In: Buekenhout, F. (ed.) Handbook of Incidence Geometry, pp. 781–842. Amsterdam, Elsevier (1995)CrossRefGoogle Scholar
 7.PopescuPampu, P.: The geometry of continued fractions and the topology of surface singularities. In: Brasselet, J.P., Suwa, T. (eds.) Singularities in Geometry and Topology 2004. Advanced Studies in Pure Mathematics, vol. 46, pp. 119–195. Kinokuniya, Tokyo (2007)Google Scholar
 8.Siemaszko, A., Wojtkowski, M.P.: Counting Berg partitions. Nonlinearity 24, 2383–2403 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
 9.Siemaszko, A., Wojtkowski, M.P.: Counting Berg partitions via Sturmian words and substitution tilings. European Congress of Mathematics Kraków, pp. 779–790. European Mathematical Society Publishing House (2014), 2–7 July 2012Google Scholar
Copyright information
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.