{'fraction_non_alphanumeric': 0.04986906523966754, 'fraction_numerical': 0.017647728566549014, 'mean_word_length': 3.730057219791316, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Ramanujan graphs in cryptography

In this paper we study the security of a proposal for Post-Quantum Cryptography from both a number theoretic and cryptographic perspective. Charles-Goren-Lauter in 2006 [CGL06] proposed two hash functions based on the hardness of finding paths in Ramanujan graphs. One is based on Lubotzky-Phillips-Sarnak (LPS) graphs and the other one is based on Supersingular Isogeny Graphs. A 2008 paper by Petit-Lauter-Quisquater breaks the hash function based on LPS graphs. On the Supersingular Isogeny Graphs proposal, recent work has continued to build cryptographic applications on the hardness of finding isogenies between supersingular elliptic curves. A 2011 paper by De Feo-Jao-Pl\^{u}t proposed a cryptographic system based on Supersingular Isogeny Diffie-Hellman as well as a set of five hard problems. In this paper we show that the security of the SIDH proposal relies on the hardness of the SIG path-finding problem introduced in [CGL06]. In addition, similarities between the number theoretic ingredients in the LPS and Pizer constructions suggest that the hardness of the path-finding problem in the two graphs may be linked. By viewing both graphs from a number theoretic perspective, we identify the similarities and differences between the Pizer and LPS graphs.


Introduction
Supersingular Isogeny Graphs were proposed for use in cryptography in 2006 by Charles, Goren, and Lauter [CGL06]. Supersingular isogeny graphs are examples of Ramanujan graphs, i.e. optimal expander graphs. This means that relatively short walks on the graph approximate the uniform distribution, i.e. walks of length approximately equal to the logarithm of the graph size. Walks on expander graphs are often used as a good source of randomness in computer science, and the reason for using Ramanujan graphs is to keep the path length short. But the reason these graphs are important for cryptography is that finding paths in these graphs, i.e. routing, is hard: there are no known subexponential algorithms to solve this problem, either classically or on a quantum computer. For this reason, systems based on the hardness of problems on Supersingular Isogeny Graphs are currently under consideration for standardization in the NIST Post-Quantum Cryptography (PQC) Competition [PQC]. [CGL06] proposed a general construction for cryptographic hash functions based on the hardness of inverting a walk on a graph. The path-finding problem is the following: given fixed starting and ending vertices representing the start and end points of a walk on the graph of a fixed length, find a path between them. A hash function can be defined by using the input to the function as directions for walking around the graph: the output is the label for the ending vertex of the walk. Finding collisions for the hash function is equivalent to finding cycles in the graph, and finding pre-images is equivalent to path-finding in the graph. Backtracking is not allowed in the walks by definition, to avoid trivial collisions.
In [CGL06], two concrete examples of families of optimal expander graphs (Ramanujan graphs) were proposed, the so-called Lubotzky-Phillips-Sarnak (LPS) graphs [LPS88], and the Supersingular Isogeny Graphs (Pizer) [Piz98], where the path finding problem was supposed to be hard. Both graphs were proposed and presented at the 2005 and 2006 NIST Hash Function workshops, but the LPS hash function was quickly attacked and broken in two papers in 2008, a collision attack [TZ08] and a pre-image attack [PLQ08]. The preimage attack gives an algorithm to efficiently find paths in LPS graphs, a problem which had been open for several decades. The PLQ path-finding algorithm uses the explicit description of the graph as a Cayley graph in PSL 2 (F p ), where vertices are 2 × 2 matrices with entries in F p satisfying certain properties. Given the swift discovery of attacks on the LPS path-finding problem, it is natural to investigate whether this approach is relevant to the path-finding problem in Supersingular Isogeny (Pizer) Graphs. In 2011, De Feo-Jao-Plût [DFJP14] devised a cryptographic system based on supersingular isogeny graphs, proposing a Diffie-Hellman protocol as well as a set of five hard problems related to the security of the protocol. It is natural to ask what is the relation between the problems stated in [DFJP14] and the path-finding problem on Supersingular Isogeny Graphs proposed in [CGL06].
In this paper we explore these two questions related to the security of cryptosystems based on these Ramanujan graphs. In Part 1 of the paper, we study the relation between the hard problems proposed by De Feo-Jao-Plût and the hardness of the Supersingular Isogeny Graph problem which is the foundation for the CGL hash function. In Part 2 of the paper, we study the relation between the Pizer and LPS graphs by viewing both from a number theoretic perspective.
In particular, in Part 1 of the paper, we clearly explain how the security of the Key Exchange protocol relies on the hardness of the path-finding problem in SSIG, proving a reduction (Theorem 3.2) between the Supersingular Isogeny Diffie Hellmann (SIDH) Problem and the path-finding problem in SSIG. Although this fact and this theorem may be clear to the experts (see for example the comment in the introduction to a recent paper on this topic [AAM18]), this reduction between the hard problems is not written anywhere in the literature. Furthermore, the Key Exchange (SIDH) paper [DFJP14] states 5 hard problems, including (SSCDH), with relations proved between some but not all of them, and mentions the paper [CGL06] only in passing (on page 17), with no clear statement of the relationship to the overarching hard problem of path-finding in SSIG.
Our Theorem 3.2 clearly shows the fact that the security of the proposed post-quantum key exchange relies on the hardness of the path-finding problem in SSIG stated in [CGL06]. Theorem 4.9 counts the chains of isogenies of fixed length. Its proof relies on elementary group theory results and facts about isogenies, proved in Section 4. In Part 2 of the paper, we examine the LPS and Pizer graphs from a number theoretic perspective with the aim of highlighting the similarities and differences between the constructions.
Both the LPS and Pizer graphs considered in [CGL06] can be thought of as graphs on where Γ is a discrete cocompact subgroup, where Γ is obtained from a quaternion algebra B. We show how different input choices for the construction lead to different graphs. In the LPS construction one may vary Γ to get an infinite family of Ramanujan graphs. In the Pizer construction one may vary B to get an infinite family. In the LPS case, we always work in the Hamiltonian quaternion algebra. For this particular choice of algebra we can rewrite the graph as a Cayley graph. This explicit description is key for breaking the LPS hash function. For the Pizer graphs we do not have such a description. On the Pizer side the graphs may, via Strong Approximation, be viewed as graphs on adèlic double cosets which are in turn the class group of an order of B that is related to the cocompact subgroup Γ. From here one obtains an isomorphism with supersingular isogeny graphs. For LPS graphs the local double cosets are also isomorphic to adèlic double cosets, but in this case the corresponding set of adèlic double cosets is smaller relative to the quaternion algebra and we do not have the same chain of isomorphisms. Part 2 has the following outline. Section 6 follows [Lub10] and presents the construction of LPS graphs from three different perspectives: as a Cayley graph, in terms of local double cosets, and, to connect these two, as a quotient of an infinite tree. The edges of the LPS graph are explicit in both the Cayley and local double coset presentation. In Section 6.4 we give an explicit bijection between the natural parameterizations of the edges at a fixed vertex. Section 7 is about Strong Approximation, the main tool connecting the local and adelic double cosets for both LPS and Pizer graphs. Section 8 follows [Piz98] and summarizes Pizer's construction. The different input choices for LPS and Pizer constructions impose different restrictions on the parameters of the graph, such as the degree. 6-regular graphs exist in both families. In Section 8.2 we give a set of congruence conditions for the parameters of the Pizer construction that produce a 6-regular graph. In Section 9 we summarize the similarities and differences between the two constructions.

Part 1 Cryptographic applications of supersingular isogeny graphs
In this section we investigate the security of the [DFJP14] key-exchange protocol. We show a reduction to the path-finding problem in supersingular isogeny graphs stated in [CGL06]. The hardness of this problem is the basis for the CGL cryptographic hash function, and we show here that if this problem is not hard, then the key exchange presented in [DFJP14] is not secure.
We begin by recalling some basic facts about isogenies of elliptic curves and the key-exchange construction. Then, we give a reduction between two hardness assumptions. This reduction is based on a correspondence between a path representing the composition of m isogenies of degree ℓ and an isogeny of degree ℓ m .

Preliminaries
We start by recalling some basic and well-known results about isogenies. They can all be found in [Sil09]. We try to be as concrete and constructive as possible, since we would like to use these facts to do computations.
An elliptic curve is a curve of genus one with a specific base point O. This latter can be used to define a group law. We will not go into the details of this, see for example [Sil09]. If E is an elliptic curve defined over a field K and char(K) = 2, 3, we can write the equation of E as where a, b ∈ K. Two important quantities related to an elliptic curve are its discriminant ∆ and its j-invariant, denoted by j. They are defined as follows. ∆ = 16 · (4 · a 3 + 27 · b 2 ) and j = −1728 · a 3 ∆ .
Two elliptic curves are isomorphic overK if and only if they have the same j-invariant.
Definition 2.1. Let E 0 and E 1 be two elliptic curves. An isogeny from E 0 to E 1 is a surjective morphism φ : which is a group homomorphism.
An example of an isogeny is the multiplication-by-m map [m], The degree of an isogeny is defined as the degree of the finite extensionK(E 0 )/φ * (K(E 1 )), whereK( * ) is the function field of the curve, and φ * is the map of function fields induced by the isogeny φ. By convention, we set deg([0]) = 0.
The degree map is multiplicative under composition of isogenies: and for an integer m > 0, the multiplication-by-m map has degree m 2 .
Theorem 2.2. [Sil09] Let E 0 → E 1 be an isogeny of degree m. Then, there exists a unique isogenŷ We callφ the dual isogeny to φ. We also have that For an isogeny φ, we say φ is separable if the field extensionK(E 0 )/φ * (K(E 1 )) is separable. We then have the following lemma.
In this paper, we only consider separable isogenies and frequently use this convenient fact. From the above, it follows that a point P of order m defines an isogeny φ of degree m, We will refer to such an isogeny as a cyclic isogeny (meaning that its kernel is a cyclic subgroup of E). For ℓ prime, we also say that two curves E 0 and E 1 are ℓ-isogenous if there exists an isogeny φ : We define E[m], the m-torsion subgroup of E, to be the kernel of the multiplication-by-m map. If char(K) > 0 and m ≥ 2 is an integer coprime to char(K), or if char(K) = 0, then the points of If an elliptic curve E is defined over a field of characteristic p > 0 and its endomorphism ring overK is an order in a quaternion algebra, we say that E is supersingular. Every isomorphism class overK of supersingular elliptic curves in characteristic p has a representative defined over F p 2 , thus we will often let K = F p 2 (for some fixed prime p).
We mentioned above that an ℓ-torsion point P induces an isogeny of degree ℓ. More generally, a finite subgroup G of E generates a unique isogeny of degree #G, up to automorphism. Supersingular isogeny graphs were introduced into cryptography in [CGL06]. To define a supersingular isogeny graph, fix a finite field K of characteristic p, a supersingular elliptic curve E over K, and a prime ℓ = p. Then the corresponding isogeny graph is constructed as follows. The vertices are theK-isomorphism classes of elliptic curves which areK-isogenous to E. Each vertex is labeled with the j-invariant of the curve. The edges of the graph correspond to the ℓ-isogenies between the elliptic curves. As the vertices are isomorphism classes of elliptic curves, isogenies that differ by composition with an automorphism of the image are identified as edges of the graph. I.e. if E 0 , E 1 areK-isogenous elliptic curves, φ : E 0 → E 1 is an ℓ-isogeny and ǫ ∈ Aut(E 1 ) is an automorphism, then φ and ǫ • φ are identified and correspond to the same edge of the graph.
If p ≡ 1 mod 12, we can uniquely identify an isogeny with its dual to make it an undirected graph. It is a multigraph in the sense that there can be multiple edges if no extra conditions are imposed on p. Three important properties of these graphs follow from deep theorems in number theory: 3. Supersingular isogeny graphs are optimal expander graphs, in particular they are Ramanujan.
Remark 2.4. In order to avoid trivial collisions in cryptographic hash functions based on isogeny graphs, it is best if the graph has no short cycles. Charles, Goren, and Lauter show in [CGL06] how to ensure that isogeny graphs do not have short cycles by carefully choosing the finite field one works over. For example, they compute that a 2-isogeny graph does not have double edges (i.e. cycles of length 2) when working over F p with p ≡ 1 mod 420. Similarly, we computed that a 3-isogeny graph does not have double edges for p ≡ 1 mod 9240. Given that 420 = 2 2 · 3 · 5 · 7 and 9240 = 2 3 · 3 · 5 · 7 · 11, we conclude that neither the 2-isogeny graph nor the 3-isogeny graph has double edges for p ≡ 1 mod 9240. For our experiments (described in Section 4), we were interested in studying short walks, for example of length 4, in a setting relevant to the Key-Exchange protocol described below. The smallest prime p with the property p ≡ 1 mod 9240 that also satisfies 2 4 · 3 4 | p − 1 is p = 2 4 · 3 4 · 5 · 7 · 11 + 1.

The [DFJP14] key-exchange
Let E be a supersingular elliptic curve defined over F p 2 , where p = ℓ n A ·ℓ m B ± 1, ℓ A and ℓ B are primes, and n ≈ m are approximately equal. We have players A (for Alice) and B (for Bob), representing the two parties who wish to engage in a key-exchange protocol with the goal of establishing a shared secret key by communicating via a (possibly) insecure channel. The two players A and B generate their public parameters by each picking two points P A , Q A such that P A , Q A = E[ℓ n A ] (for A), and two points P B , Q B such that P B , Q B = E[ℓ m B ] (for B). Player A then secretly picks two random integers 0 ≤ m A , n A < ℓ n A . These two integers (and the isogeny they generate) will be player A's secret parameters. A then computes the isogeny φ A Player B proceeds in a similar fashion and secretly picks 0 ≤ m B , n B < ℓ m B . Player B then generates the (secret) isogeny So far, A and B have constructed the following diagram.
To complete the diamond, we proceed to the exchange part of the protocol. Player A computes the points φ A (P B ) and φ A (Q B ) and sends {φ A (P B ), φ A (Q B ), E A } along to player B. Similarly, player B computes and sends {φ B (P A ), φ B (Q A ), E B } to player A. Both players now have enough information to construct the following diagram, where Player A can use the knowledge of the secret information m A and n A to compute the isogeny to obtain E AB . Player B can use the knowledge of the secret information m B and n B to compute the isogeny φ ′ A , by quotienting to obtain E AB . A separable isogeny is determined by its kernel, and so both ways of going around the diagram from E result in computing the same elliptic curve E AB .
The players then use the j-invariant of the curve E AB as a shared secret.
Remark 3.1. Given a list of points specifying a kernel, one can explicitly compute the associated isogeny using Vélu's formulas [Vél71]. In principle, this is how the two parties engaging in the key-exchange above can compute Vél71]. However, in practice for cryptographic size subgroups, this would be impossible, and thus a different approach is taken, based on breaking the isogenies into n (resp. m) steps, each of degree ℓ A (resp. ℓ B ). This equivalence will be explained below.

Hardness assumptions
The security of the key-exchange protocol is based on the following hardness assumption, which was introduced in [DFJP14] and called the Supersingular Computational Diffie-Hellman (SSCDH) problem.
Problem 1. (Supersingular Computational Diffie-Hellman (SSCDH)): Let p, ℓ A , ℓ B , n, m, E, Let φ A be an isogeny from E to E A whose kernel is equal to [m A ]P A + [n A ]Q A , and let φ B be an isogeny from E to E B whose kernel is equal to [m B ]P B + [n B ]Q B , where m A ,n A (respectively m B ,n B ) are integers chosen at random between 0 and ℓ m A (respectively ℓ n B ), and not both divisible by ℓ A (resp. ℓ B ).
Given the curves E A , E B and the points φ In [CGL06], a cryptographic hash function was defined: based on the Supersingular Isogeny Graph (SSIG) for a fixed prime p of cryptographic size, and a fixed small prime ℓ = p. The hash function processes the input string in blocks which are used as directions for walking around the graph starting from a given fixed vertex. The output of the hash function is the j-invariant of an elliptic curve over F p 2 which requires 2 log(p) bits to represent, so m = 2⌈log(p)⌉. For the security of the hash function, it is necessary to avoid the generic birthday attack. This attack runs in time proportional to the square root of the size of the graph, which is the Eichler class number, roughly ⌊p/12⌋. So in practice, we must pick p so that log(p) ≈ 256. The integer r is the length of the bit string input to the hash function. If ℓ = 2, which is the easiest case to implement and a common choice, then r is precisely the number of steps taken on the walk in the graph, since the graph is 3-regular, with no backtracking allowed, so the input is processed bit-by-bit. In order to assure that the walk reaches a sufficiently random vertex in the graph, the number of steps should be roughly log(p) ≈ 256. A CGL-hash function is thus specified by giving the primes p, ℓ, the starting point of the walk, and the integers r ≈ 256, s. (Extra congruence conditions were imposed on p to make it an undirected graph with no small cycles.) The hard problems stated in [CGL06] corresponded to the important security properties of collision and preimage resistance for this hash function. For preimage resistance, the problem [CGL06, Problem 3] stated was: given p, ℓ, r > 0, and two supersingular j-invariants modulo p, to find a path of length r between them: Problem 2. (Path-finding [CGL06]) Let p and ℓ be distinct prime numbers, r > 0, and E 0 and E 1 two supersingular elliptic curves over F p 2 . Find a path of length r in the ℓ-isogeny graph corresponding to a composition of r ℓ-isogenies leading from E 0 to E 1 (i.e. an isogeny of degree ℓ r from E 0 to E 1 ).
It is worth noting that, to break the preimage resistance of the specified hash function, you must find a path of exactly length r, and this is analogous to the situation for breaking the security of the key-exchange protocol. However, the problem of finding *any* path between two given vertices in the SSIG graphs is also still open. For the LPS graphs, the algorithm presented in [PLQ08] did not find a path of a specific given length, but it was still considered to be a "break" of the hash function.
Furthermore, the diameter of these graphs, both LPS and SSIG graphs, has been extensively studied. It is known that the diameter of the graphs is roughly log(p) (it is c log(p), where c is a constant between 1 and 2, (see for example [Sar18])). That means that if r is greater than c log(p), then given two vertices, it is likely that a path of length r between them may exist. The fact that walks of length greater than c log(p) approximate the uniform distribution very closely means that you are not likely to miss any significant fraction of the vertices with paths of that length, because that would constitute a bias. Also, if r ≫ log(p) then there may be many paths of length r. However, if r is much less than log(p), such as 1 2 log(p), there may be no path of such a short length between two given vertices. See [LP15] for a discussion of the "sharp cutoff" property of Ramanujan graphs.
But in the cryptographic applications, given an instance of the key-exchange protocol to be attacked, we know that there exists a path of length n between E and E A , and the hard problem is to find it. The set-up for the key-exchange requires p = ℓ n A ℓ m B ± 1, where n and m are roughly the same size, and ℓ A and ℓ B are very small, such as ℓ A = 2 and ℓ B = 3. It follows that n and m are both approximately half the diameter of the graph (which is roughly log(p)). So it is unlikely to find paths of length n or m between two random vertices. If a path of length n exists and Algorithm A finds a path, then it is very likely to be the one which was constructed in the key exchange. If not, then Algorithm A can be repeated any constant number of times. So we have the following reduction: Theorem 3.2. Assume as for the Key Exchange set-up that p = ℓ n A · ℓ m B + 1 is a prime of cryptographic size, i.e. log(p) ≥ 256, ℓ A and ℓ B are small primes, such as ℓ A = 2 and ℓ B = 3, and n ≈ m are approximately equal. Given an algorithm to solve Problem 2 (Path-finding), it can be used to solve Problem 1 (Key Exchange) with overwhelming probability. The failure probability is roughly Proof. Given an algorithm (Algorithm A) to solve Problem 2, we can use this to solve Problem 1 as follows. Given E and E A , use Algorithm A to find the path of length n between these two vertices in the ℓ A -isogeny graph. Now use Lemma 4.4 below to produce a point R A which generates the ℓ n A -isogeny between E and E A . Repeat this to produce the point R B which generates the ℓ m Bisogeny between E and E B in the ℓ B -isogeny graph. Because the subgroups generated by R A and R B have smooth order, it is easy to write Using the knowledge of m A , n A , m B , n B , we can construct E AB and recover the j-invariant of E AB , allowing us to solve Problem 1.
The reason for the qualification "with overwhelming probability" in the statement of the theorem is that it is possible that there are multiple paths of the same length between two vertices in the graph. If there are multiple paths of length n (or m) between the two vertices, it suffices to repeat Algorithm A to find another path. This approach is sufficient to break the Key Exchange if there are only a small number of paths to try. As explained above, with overwhelming probability, there are no other paths of length n (or m) in the Key Exchange setting.
In the SSIG corresponding to (p, ℓ A ), the vertices E and E A are a distance of n apart. Starting from the vertex E and considering all paths of length n, the number of possible endpoints is at most ℓ n A + ℓ n−1 A (See Corollary 4.8 below). Considering that the number of vertices in the graph is roughly ⌊p/12⌋, then the probability that a given vertex such as E A will be the endpoint of one of the walks of length n is roughly This estimate does not use the Ramanujan property of the SSIG graphs. While a generic random graph could potentially have a topology which creates a bias towards some subset of the nodes, Ramanujan graphs cannot, as shown in [LP15, Theorem 3.5].

Composing isogenies
Let k be a positive integer. Every separable k-isogeny φ : E 0 → E 1 is determined by its kernel up to composition with an automorphism of the elliptic curve E 1 . Thus the edge corresponding to φ is uniquely determined by ker(φ) and vice versa. This kernel is a subgroup of the k-torsion E 0 [k], and the latter is isomorphic to Z/kZ × Z/kZ if k is coprime to the characteristic of the field we are working over. Hence, fixing a prime ℓ and working over a finite field F q which has characteristic different from ℓ, the number of ℓ-isogenies φ : E 0 → E 1 that correspond to different edges of the graph is equal to the number of subgroups of Z/ℓZ × Z/ℓZ of order ℓ. It is well known that this number is equal to ℓ + 1. In other words, E is ℓ-isogenous to precisely ℓ + 1 elliptic curves.
However, some of these ℓ-isogenous curves may be isomorphic. Therefore, in the isogeny graph (where nodes represent isomorphism classes of curves), E has degree ℓ + 1 and may have ℓ + 1 neighbors or fewer.
Using Vélu's formulas, the equations for an edge can be computed from its kernel. Hence for computational purposes, it is important to write down this kernel explicitly. This is best done by specifying generators. Let P, Q ∈ E 0 be the generators of E 0 [ℓ] ∼ = Z/ℓZ × Z/ℓZ. Then the subgroups of order ℓ are generated by Q and P + iQ for i = 0, . . . , ℓ − 1.
We now study isogenies obtained by composition, and isogenies of degree a prime power. It turns out that these correspond to each other under certain conditions. The first condition is that the isogeny is cyclic. Notice that every prime order group is cyclic, therefore all ℓ-isogenies are cyclic (meaning they have cyclic kernel). However, this is not necessarily true for isogenies whose order is not a prime. The second condition is that there is no backtracking, defined as follows: . . , m − 1 and any ǫ ∈ Aut(E i+1 ), since this corresponds to a walk in the ℓ-isogeny graph without backtracking.
In the following, we show that chains of ℓ-isogenies of length m without backtracking correspond to cyclic ℓ m -isogenies. Recall that we are only considering separable isogenies throughout.
Proof. Assume that φ = E 0 → E, and that its kernel is P 0 ⊆ E 0 , where P 0 has order ℓ m . For i = 1, . . . , m, let We show that φ i is an ℓ-isogeny for i ∈ {1, . . . , m} by observing that ℓ m−i P i−1 has order ℓ. The statement is trivial for Finally, we show that there is no backtracking in φ m •. . .•φ 1 . Contrarily, assume that there is an Remark 4.3. It is clear that in the above lemma, if φ is defined over a finite field F q , then all φ i are also defined over this field. Namely, if E 0 is defined over F q and the kernel is generated by an F q -rational point, then by Vélu we obtain F q -rational formulas for φ 1 , which means that φ 1 is defined over F q , and so on.
Lemma 4.4. Let ℓ be a prime, let E i be elliptic curves for i = 0, . . . , m, and let φ i : Proof. The degree of isogenies multiplies when they are composed, see e.g. [Sil09, Ch. III.4]. Hence we are left with proving that the composition of the isogenies is cyclic.
First note that all φ i are cyclic since they have prime degree, and denote by P i−1 ∈ E i−1 the generators of the respective kernels. Let Q m−1 be a point on E m−1 such that ℓQ m−1 = P m−1 . Notice that such a point always exists over the algebraic closure of the field of definition of the curve. Let R m−2 =φ m−1 (Q m−1 ), where the hat denotes the dual isogeny.
Next we show that R m−2 has order ℓ 2 , which implies that it generates the kernel of Since P m−1 has order ℓ, this implies that P m−1 generates the kernel ofφ m−1 . However, P m−1 also generates the kernel of φ m , so ǫ •φ m−1 = φ m for some ǫ ∈ Aut(E m ). But this is a contradiction to the assumption of no backtracking.
By iterating this argument, we obtain a point R 0 which generates the kernel of φ m • . . . • φ 1 , and hence this isogeny is cyclic.
Combining Lemmas 4.2 and 4.4, we obtain the following correspondence.
Corollary 4.5. Let ℓ be a prime and m a positive integer. There is a one-to-one correspondence between cyclic separable ℓ m -isogenies and chains of separable ℓ-isogenies of length m without backtracking. (Here we do not distinguish between isogenies that differ by composition with an automorphism on the image.) Next, we investigate how many such isogenies there are. We start by studying ℓ m -isogenies. The following group theory result is crucial.
A direct consequence of the above statement is that there are where ǫ m = 0 if k is odd and 1 otherwise. This proves the first statement. For the second statement, let H be a cyclic subgroup of Z/ℓ m Z × Z/ℓ m Z of order l m . Then H is generated by an element of Z/ℓ m Z × Z/ℓ m Z of order l m , and contains l m − l m−1 elements of order l m . Therefore, the number of such subgroups is the number of elements of Z/ℓ m Z × Z/ℓ m Z of order l m divided by l m − l m−1 .
Let (a, b) be an element of Z/ℓ m Z × Z/ℓ m Z of order l m . Then one of a or b has order l m . If a has order l m , then there are ϕ(ℓ m ) = l m − l m−1 choices for a, and l m for b. That is, there are l m · (l m − l m−1 ) choices in total.
Otherwise, there are l m−1 choices for a (representing the number of elements of order at most l m−1 ), and l m − l m−1 choices for b. That is, there are l m−1 · (l m − l m−1 ) choices in total. This means the total number of cyclic subgroups of Z/ℓ m Z × Z/ℓ m Z of order l m is Remark 4.7. One could also see the first statement in the lemma above by noting that this is the same as the degree of the Hecke operator T ℓ m which is σ 1 (ℓ m ). We thank the referee for pointing this out.
Corollary 4.8. There are ℓ m+1 −1 ℓ−1 separable ℓ m -isogenies originating at a fixed elliptic curve, and ℓ m + ℓ m−1 of them are cyclic. (Here we are counting isogenies as different if they differ even after composition with any automorphism of the image.) Using the correspondence from Corollary 4.5, we then obtain the following. This last result can be observed in a much more elementary way, which is also enlightening. We consider chains of ℓ-isogenies of length m. To analyze the situation, it is helpful to draw a graph similar to an ℓ-isogeny graph but that does not identify isomorphic curves. This graph is an (ℓ + 1)-regular tree of depth m. The root of the tree has ℓ + 1 children, and every other node (except the leaves) has ℓ children. The leaves have depth m. It is easy to work out that the number of leaves in this tree is (ℓ + 1)ℓ m−1 , and this is also equal to the number of paths of length m without backtracking, as stated in Theorem 4.9.
Finally, this graph also helps us count the number of chains of ℓ-isogenies of length m including those that backtrack. By examining the graph carefully, we can see that the number of such walks is ℓ m + ℓ m−1 + . . . + ℓ + 1, and according to Corollary 4.8, this corresponds to the number of ℓ m -isogenies that are not necessarily cyclic.
These results were also observed experimentally using Sage. The numbers match the results of our experiments for small values of ℓ and m, over various finite fields and for different choices of elliptic curves, see Table 1. Notice that the images under isogenies with distinct kernels may be isomorphic, leading to double edges in an isogeny graph that identifies isomorphic curves. Hence, the number of isomorphism classes of images (i.e. the number of neighbors in the isogeny graph) may be smaller than the number of isogenies stated in the

Part 2 Constructions of Ramanujan graphs
In this section we review the constructions of two families of Ramanujan graph, LPS graphs and Pizer graphs. Ramanujan graphs are optimal expanders; see Section 5 for some related background. The purpose is twofold. On the one hand we wish to explain how equivalent constructions on the same object highlight different significant properties. On the other hand, we wish to explicate the relationship between LPS graphs and Pizer graphs. Both families (LPS and Pizer) of Ramanujan graphs can be viewed (cf. [Li96, Section 3]) as a set of "local double cosets", i.e. as a graph on where Γ is a discrete cocompact subgroup. In both cases, one has a chain of isomorphisms that are used to show these graphs are Ramanujan, and in both cases one may in fact vary parameters to get an infinite family of Ramanujan graphs.
To explain this better, we introduce some notation. Let us choose a pair of distinct primes p and l for an (l + 1)-regular graph whose size depends on p. (An infinite family of Ramanujan graphs is formed by varying p.) Let us fix a quaternion algebra B defined over Q and ramified at exactly one finite prime and at ∞, and an order of the quaternion algebra O. Let A denote the adèles of Q and A f denote the finite adèles. For precise definitions see Section 5.
In the case of Pizer graphs, let B = B p,∞ be ramified at p and ∞, and take O to be a maximal order (i.e. an order of level p). 1 Then we may construct (as in [Piz98]) a graph by giving its adjacency matrix as a Brandt matrix. (The Brandt matrix is given via an explicit matrix representation of a Hecke operator associated to O.) Then we have (cf. [CGL09, (1)]) a chain of isomorphisms connecting (3) with supersingular isogeny graphs (SSIG) discussed in Part 1 above: This can be used (cf. [CGL09, 5.3.1]) to show that the supersingular l-isogeny graph is connected, as well as the fact that it is indeed a Ramanujan graph.
In the case of LPS graphs the choices are very different. Let B = B 2,∞ now be the Hamiltonian quaternion algebra. The group Γ in (3) is chosen as a congruence subgroup dependent on p. This leads to a larger graph whose constructions fits into the following chain of isomorphisms: The isomorphic constructions and their relationship will be made explicit in Sections 6.1-6.3 and Section 7.2. We shall also explain how properties of the graph, such as its regularity, connectedness and the Ramanujan property, are highlighted by this chain of isomorphisms. For now we give only an overview, to be able to compare this case with that of Pizer graphs. The quotient PGL 2 (Q l )/PGL 2 (Z l ) has a natural structure of an infinite tree T. This tree can be defined in terms of homothety classes of rank two lattices of Q l × Q l (see Section 6.2). One may define a group G ′ = B × /Z(B × ) and its congruence subgroups Γ(2) and Γ(2p), and show that the discrete group Γ(2) acts simply transitively on the tree T, and hence Γ(2p)\T is isomorphic to the finite group Γ(2)/Γ(2p). Using the Strong Approximation theorem, this turns out to be isomorphic to the group PSL 2 (F p ). The latter has a structure of an (l + 1)-regular Cayley graph. A second application of the Strong Approximation Theorem with K 2p 0 , an open compact subgroup of G ′ (A f ), shows that H 2p is a finite index normal subgroup of G ′ (A).
Note that an immediate distinction between Pizer and LPS graphs is that the quaternion algebras underlying the constructions are different: they ramify at different finite primes (p and 2, respectively). In addition, the size of the discrete subgroup Γ determining the double cosets of (3) is different in the two cases. Accordingly, the size of the resulting graphs is different as well. We shall see that (under appropriate assumptions on p and l) the Pizer graph has p−1 12 vertices, while the LPS graph has order |PSL 2 (F p )| = p(p 2 −1) 2 . One may consider an order O LP S such that (O LP S [l −1 ]) × ∼ = Γ(2p) analogously to the relationship of O and Γ in the Pizer case and (4). However, this order O LP S is unlike the Eichler order from the Pizer case. (It has a much higher level.) In particular, there is a discrepancy between the order of the class set ClO LP S and the order of the LPS graph. This is a numerical obstruction indicating that an analogue of the chain (4) for LPS graphs is at the very least not straightforward.
The rest of the paper has the following outline. In Section 6 we explore the isomorphic constructions of LPS graphs from (5). We give the construction as a Cayley graph in Section 6.1. The infinite tree of homothety classes of lattices is given in Section 6.2. In Section 6.3 we explain how local double cosets of the Hamiltonian quaternion algebra connect these constructions. Section 6.4 makes one step of the chain of isomorphisms in (5) completely explicit in the case of l = 5 and l = 13, and describes how the same can be done in general. In Section 7 we give an overview of how Strong Approximation plays a role in proving the isomorphisms and the connectedness and Ramanujan property of the graphs. In Section 8 we turn briefly to Pizer graphs. We summarize the construction, and explain how various restrictions on the prime p guarantee properties of the graph. Section 8.2 contains the computation of a prime p where the existence of both an LPS and a Pizer construction is guaranteed (for l = 5). In Section 9 we say a bit more of the relationship of Pizer and LPS graphs, having introduced more of the objects mentioned in passing above.
Throughout this part of the paper we aim to only include technical details if we can make them fairly self-contained and explicit, and otherwise to give a reference for further information.

Background on Ramanujan graphs and adèles
In this section we fix notation and review some definitions and facts that we will be using for the remainder of Part 2.
Expander graphs are graphs where small sets of vertices have many neighbors. For many applications of expander graphs, such as in Part 1, one wants (l + 1)-regular expander graphs X with l small and the number of vertices of X large. If X is an (l + 1)-regular graph (i.e. where every vertex has degree l + 1), then l + 1 is an eigenvalue of the adjacency matrix of X. All eigenvalues λ satisfy −(l + 1) ≤ λ ≤ (l + 1), and −(l + 1) is an eigenvalue if and only if X is bipartite. Let λ(X) be the second largest eigenvalue in absolute value of the adjacency matrix. The smaller λ(X) is, the better expander X is. Alon-Boppana proved that for an infinite family of (l + 1)-regular graphs of increasing size, lim inf (X) λ(X) ≥ 2 √ l [Alo86]. An (l + 1)-regular graph X is called Ramanujan if λ(X) ≤ 2 √ l. Thus an infinite family of Ramanujan graphs are optimal expanders. For a finite prime p, let Q p denote the field of p-adic numbers and Z p its ring of integers. Let Q ∞ = R. We denote the adèle ring of Q by A and recall that it is defined as a restricted direct product in the following way, We denote the ring of finite adèles by A f , that is p for all but a finite number of p < ∞ .
More generally for an indexed set of locally compact groups {G v } v∈I with a corresponding indexed set of compact open subgroups {K v } v∈I we may define the restricted direct product of the G v with respect to the K v by the following If we define a neighborhood base of the identity as v U v : U v neighborhood of identity in G v and U v = K v for all but a finite number of v then G is a locally compact topological group.

LPS Graphs
We describe the LPS graphs used in [CGL06] for a proposed hash function. They were first considered in [LPS88], for further details see also [Lub10]. We shall examine the objects and isomorphisms in (5) in more detail. We review constructions of these graphs in turn as Cayley graphs and graphs determined by rank two lattices or, equivalently, local double cosets. Throughout this section, let l and p be distinct, odd primes both congruent to 1 modulo 4. We shall give constructions of (l +1)-regular Ramanujan graphs whose size depends on p. We shall also assume for convenience 2 that p l = 1, i.e. that p is a square modulo l.
6.1 Cayley graph over F p .
This description follows [LPS88, Section 2]. The graph we are interested in is the Cayley graph of the group PSL 2 (F p ). We specify a set of generators S below. The vertices of the graph are the p(p 2 −1) 2 elements of PSL 2 (F p ). Two vertices g 1 , g 2 ∈ PSL 2 (F p ) are connected by an edge if and only if g 2 = g 1 h for some h ∈ S.
Next we give the set of generators S. Since l ≡ 1 mod 4 it follows from a theorem of Jacobi [Lub10, Theorem 2.1.8] that there are l + 1 integer solutions to In this case we will also have 2|x i for all i > 0. Let S be the set of solutions of (6). Since p ≡ 1 mod 4 we have −1 p = 1. Let ε ∈ Z such that ε 2 ≡ −1 mod p. Then to each solution of (6) we assign an element of PGL 2 (Z) as follows: Note that the matrix on the right-hand side has determinant l mod p. Since l p = 1 this determines an element of PSL 2 (F p ). The l + 1 elements of PSL 2 (F p ) determined by (7) form the set of Cayley generators. Let us abuse notation and denote this set with S as well. This graph is connected. To prove this fact, one may use the theory of quadratic Diophantine equations [LPS88, Proposition 3.3]. Alternately, the chain of isomorphisms (5) proves this fact by relating this Cayley graph to a quotient of a connected graph [Lub10, Theorem 7.4.3]: the infinite tree we shall describe in the next section.

Infinite tree of lattices
Next we shall work over Q l . We give a description of the same graph in two ways: in terms of homothety classes of rank two lattices, and in terms of local double cosets of the multiplicative group of the Hamiltonian quaternion algebra. The description follows [Lub10,5.3,7.4]. Let B = B 2,∞ be the Hamiltonian quaternion algebra defined over Q.
First we review the construction of an (l + 1)-regular infinite tree on homothety classes of rank two lattices in Q l × Q l following [Lub10,5.3]. The vertices of this infinite graph are in bijection with PGL 2 (Q l )/PGL 2 (Z l ). To talk about a finite graph, we shall then consider two subgroups Γ(2) and Γ(2p) in B × /Z(B × ). It turns out that Γ(2) acts simply transitively on the infinite tree, and orbits of Γ(2p) on the tree are in bijection with the finite group Γ(2)/Γ(2p). Under our assumptions the latter turns out to be in bijection with PSL 2 (F p ) above and the finite quotient of the tree is isomorphic to the Cayley graph above.
First we describe the infinite tree following [Lub10,5.3]. Consider the two dimensional vector space Q l × Q l with standard basis e 1 = t 1, 0 , e 2 = t 0, 1 . A lattice is a rank two Z l -submodule L ⊂ Q l × Q l . It is generated (as a Z l -module) by two column vectors u, v ∈ Q l × Q l that are linearly independent over Q l . We shall consider homothety classes of lattices, i.e. we say lattices L 1 and L 2 are equivalent if there exists an 0 = α ∈ Q l such that αL 1 = L 2 . Writing u, v in the standard basis e 1 , e 2 maps the lattice L to an element M L ∈ GL 2 (Q l ). Let u 1 , v 1 , u 2 , v 2 ∈ Q l × Q l and let L i = Span Z l {u i , v i } (i = 1, 2) be the lattices generated by these respective pairs of vectors, with M L 1 and M L 2 the corresponding matrices. Let M ∈ GL 2 (Q l ) so that M L 1 M = M L 2 . Then L 1 = L 2 (as subsets of Q l × Q l ) if and only if M ∈ GL 2 (Z l ). It follows that the homothety classes of lattices are in bijection with PGL 2 (Q l )/PGL 2 (Z l ). Equivalently, we may say that PGL 2 (Q l )/PGL 2 (Z l ) acts simply transitively on homothety classes of lattices. The We show that this relation defines an undirected (l + 1)-regular graph. By the transitive action of GL 2 (Q l ) on lattices we may assume that L ′ 1 = Z l × Z l = Span Z l {e 1 , e 2 }, the standard lattice and L ′ 2 ⊂ Z l × Z l . The map Z l → Z l /lZ l ∼ = F l induces a map from Z l × Z l to F 2 l . Since the index of L ′ 2 in Z l × Z l is l, the image of L ′ 2 is a one-dimensional vector subspace of F 2 l . This implies that L ′ 2 ⊃ {le 1 , le 2 }, i.e. L ′ 2 ⊃ lL ′ 1 and the graph is undirected. 3 Furthermore, since there are l + 1 one-dimensional subspaces of F 2 l , the graph is (l + 1)-regular. The l + 1 neighbors of the standard lattice can be described explicitly by the following matrices: For any of the matrices M t (0 ≤ t ≤ l) the columns of M t span a different one-dimensional subspace of F l × F l . The matrices determine the neighbors of any other lattice by a change of basis in Q l × Q l . By the above we can already see that T is isomorphic to the graph on PGL 2 (Q l )/PGL 2 (Z l ) with edges corresponding to multiplication by generators (8) above. To show that T is a tree it suffices to show that there is exactly one path from the standard lattice Z l × Z l to any other homothety class. This follows from the uniqueness of the Jordan-Hölder series in a finite cyclic l-group as in [Lub10,p. 69].
In the next section, we show that the above infinite tree is isomorphic to a Cayley graph of a subgroup of B × /Z(B × ). In Section 6.4 we give an explicit bijection between the Cayley generators and the matrices given in (8) above.

Hamiltonian quaternions over a local field
To turn the above infinite tree into a finite, (l + 1)-regular graph we shall define a group action on its vertices. Let B be the algebra of Hamiltonian quaternions defined over Q. Let G ′ be the Q-algebraic group B × /Z(B × ). In this subsection we shall follow [Lub10,7.4] to define normal subgroups Γ(2p) ⊂ Γ(2) of Γ = G ′ (Z[l −1 ]) such that Γ(2) acts simply transitively on the graph T. The quotient Γ(2p)\T will be isomorphic to the Cayley graph of the finite quotient group Γ(2)/Γ(2p). This graph is isomorphic to the Cayley graph of PSL 2 (F p ) defined in Section 6.1 above. Thus we have the following equation.
To see the action of Γ(2) on T note that B splits over Q l and hence B(Q l ) ∼ = M 2 (Q l ). Since −1 ∈ (F × l ) 2 there exists an ǫ ∈ Z l such that ǫ 2 = −1. Then we have an isomorphism σ : B(Q l ) → M 2 (Q l ) [Lub10, p. 95] given by Observe that σ(B × (Z[l −1 ])) ⊆ GL 2 (Q l ) and σ maps elements of the center into scalar matrices, and hence this defines an action of Γ (and hence Γ(2), Γ(2p)) on T. This action preserves the graph structure. Then we have the following. Observe that σ maps the elements of S ⊆ Γ into the congruence subgroup of PGL 2 (Z l ) modulo 2.
Proof. See loc.cit. for details of the proof. Transitivity follows from the fact that T is connected and elements of S map a vertex of T to its distinct neighbors. The group Γ(2) = S is a discrete free group, hence its intersection with a compact stabilizer PGL 2 (Z l ) is trivial. This implies that the neighbors are distinct and the stabilizer of any vertex is trivial.
We summarize the contents of this section.
Theorem 6.2. [Lub10, Theorem 7.4.3] Let l and p be primes so that l ≡ p ≡ 1 mod 4 and l is a quadratic residue modulo 2p. Let S ⊂ PSL 2 (F p ) be the (l + 1)-element set corresponding to the solutions of (6) via the map (7) and Cay(PSL 2 (F p ), S) the Cayley graph determined by the set of generators S on the group PSL 2 (F p ). Let T be the graph on PGL 2 (Q l )/PGL 2 (Z l ) with edges corresponding to multiplication by elements listed in (8). Let B be the Hamiltonian quaternion algebra over Q and Γ(2p) the kernel of the map π 2p in (11) (a cocompact congruence subgroup). Then Γ(2p) acts on the infinite tree T and we have the following isomorphism of graphs: These are connected, (l + 1) regular, non-bipartite, simple, graphs on p 3 −p 2 vertices.

Explicit isomorphism between generating sets
We have seen above that the LPS graph can be interpreted as a finite quotient of the infinite tree of homothety classes of lattices. In this case, the edges are given by matrices that take a Z l -basis of one lattice to a Z l -basis of one of its neighbors. On the other hand, the edges can be given in terms of the set of generators S. Proposition 6.1 states that σ(S) = Γ(2) ⊂ G ′ (Z[l −1 ]) acts simply transitively on the tree T. The proof of the proposition (cf. [Lub10,Lemma 7.4.1]) implicitly shows that there exists a bijection between elements of σ(S) ⊂ PGL 2 (Z l ) and the matrices given in (8).
In this section we wish to make this bijection more explicit. For a fixed α ∈ S we find the matrix from the list (8) determining the same edge of T . As in Section 6.3 we write σ(α) ∈ PGL 2 (Z l ) for the elements of σ(S). This amounts to finding the matrix M from the list in (8) such that σ(α) −1 M ∈ PGL 2 (Z l ).
To pair up matrices from (8) with the corresponding elements of S, we introduce the following notation. Let us number the solutions to αα = l as α 0 , . . . , α l−1 , α l so that we have the correspondence σ(α h ) −1 M h ∈ PGL 2 (Z l ) for 0 ≤ h ≤ l. By giving an explicit correspondence, we mean that given an α ∈ σ −1 (S), we determine 0 ≤ h ≤ l such that α = α h .
Elements of σ(S) ⊂ PGL 2 (Z l ) are given in terms of an ǫ ∈ Z l such that ǫ 2 = −1. Let a, b be the positive integers such that a 2 + b 2 = l and a is odd. Let 0 ≤ e ≤ l − 1 so that eb = a. Then in Z l we have either ǫ ∈ e + lZ l and ǫ −1 = −ǫ ∈ −e + lZ l or ǫ ∈ −e + lZ l and ǫ −1 = −ǫ ∈ e + lZ l .
Let α = x 0 + x 1 i + x 2 j + x 3 k so that σ(α) ∈ S, and a, b, e, ǫ are as above. Let and Then by (15) we have that x 3 ) 2 = l and x 0 is positive, this implies that (x Note that by the assumptions in Section 6.1, a ± bi, a ± bj, a ± bk ∈ S. A straightforward computation now shows the following. ǫ ∈ e + lZ l ⇒ α l = a + bi, α 0 = a − bi, α e = a − bj, α l−e = a + bj, α 1 = a − bk, α l−1 = a + bk ǫ ∈ −e + lZ l ⇒ α l = a − bi, α 0 = a + bi, α e = a − bj, α l−e = a + bj, α 1 = a + bk, α l−1 = a − bk (16) Now let us assume that for α = x 0 + x 1 i + x 2 j + x 3 k we have that x 0 − x 1 ǫ / ∈ lZ l . This implies that It remains to determine the h such that α = α h when α is not one of the solutions covered by (16). In that case, we may assume h / ∈ {0, 1, e, l − e, l − 1, l} and we have A straightforward computation based on αα = l shows that (17) and (18) are satisfied by the same element in F l = Z/lZ. The element is well defined, since x 0 − x 1 ǫ / ∈ lZ l , furthermore, it uniquely determines an 0 ≤ h ≤ l. For a fixed α not covered by (16), one may thus find h such that α = α h .
We give two explicit examples.
Example 6.3. When l = 5, then a = 1, b = 2 and e = 3. Then (20) gives the bijection between the list in (8) and solutions of αα = 5 in B(Q 5 ). In this case the list in (16) is exhaustive.
Example 6.4. When l = 13, we have a = 3, b = 2 and e = 8. The cases listed in (16) are no longer exhaustive. The correspondence is given in Table 2.

Strong Approximation
In this section we briefly explain the significance of Strong Approximation to Ramanujan graphs and particularly the LPS graphs above. As discussed in Section 5 we may consider G(A), the adelic points of a linear algebraic group G defined over Q. The group G(Q) embeds diagonally into G(A), and it is a discrete subgroup. The groups G(Q v ) are also subgroups of G(A), and G(A) has a well-defined projection onto G(Q v ). Similarly, for a finite set of places S we may take G S , the direct product of G(Q v ) for v ∈ S.
Strong Approximation (when it holds) is the statement that for a group G and a finite set of places S the subgroup G(Q)G S is dense in G(A). This implies that For example, Strong Approximation holds for G = SL 2 and any set of places S = {v}. However, in the form written above it does not hold for GL 2 or PGL 2 . However one can prove results similar to (21) for GL 2 adding restrictions on the subgroup K: Here we shall have and the condition of being "sufficiently large" can be made precise by requiring that the determinant map det : K v → Z × v be surjective for all v ∈ S. Strong Approximation holds for the algebraic group of elements of a quaternion algebra of unit norm [Vig80, Théorème 4.3]. We shall use this statement to prove a statement like (22) for the algebraic group of invertible quaternions. A similar statement then holds for G ′ = B × /Z(B × ) and a subgroup K ′ that is not quite "large enough." The implications for Pizer graphs and LPS graphs will be discussed in Sections 7.2 and 7.3 below.
These statements coming from Strong Approximation are crucial for proving that the various constructions produce Ramanujan graphs. As seen in Section 5 the Ramanujan property of a graph can be expressed in terms of its eigenvalues. Given a graph (constructed e.g. via local double cosets as seen above) the Strong Approximation theorem can be used to relate its spectrum to the representation theory of G(A). In that context a theorem of Deligne resolves the issue by proving a special case of the Ramanujan conjecture (see [Lub10,

Approximation for invertible quaternions
The argument below is adapted from [Gel75, Section 3] and [Lub10, 6.3]. 5 Let B be a (definite) quaternion algebra over Q, B × its invertible elements and B 1 = {b ∈ B | N (b) = 1} its elements of reduced norm 1, recall N (b) = bb. Let l be a prime where B is split. Then by [Vig80,Théorème 4 v is open and K v = B 1 (Z v ) for all but finitely many places v. It follows that given any open subgroups K for all but finitely many places v we have that To make a similar statement for B × it will be necessary to impose a restriction on the open subgroups K v .
for all but finitely many v, and the norm map N : Note that by [Voi18,Lemma 13.4.6] the norm map N : Proof. Let b ∈ B × (A), we need to show b is contained on the right-hand side. To write b as a product according to the right-hand side of (25) we shall use (24), strong approximation for B 1 . Observe first that it suffices to show that any b ∈ B × (A) can be written as This is because the intersections at all but finitely many places). It thus follows from (24) (choosing K (26) is contained on the right-hand side of (25). It follows that then b = rhk is contained on the right-hand side of (25) as well. (Note that here the factors of h and k belonging to different components B × (Q v ) commute.) So we must show that any b ∈ B × (A) decomposes as in (26).
Then n Q ∈ Q >0 , n Q ∈ Z v × for every v / ∈ T, v < ∞ and hence n −1 Q n v ∈ Z v × for every finite place v.
It is a fact that there is an r ∈ B × (Q) such that N (r) = n Q . Then for this r we have that the norm of every other place. This follows from the fact that the norm map N : . It follows from the choice of k that h l and h ∞ are the identity element of B × (Q l ) and B × (R) respectively, and N (h v ) = 1 at every other place v. This implies that indeed h ∈ B 1 (A). This completes the proof that a decomposition as in (26) exists, and in turn the proof of (25).

Strong Approximation for LPS graphs
This section is based on [Lub10, 6.3]. (In particular, we recall and elaborate on the proof of the first statements in [Lub10, Proposition 6.3.3] in the special case when N = 2p. This is relevant to understanding the last step in (5).) We apply a similar formula to (25) with a particular choice of open subgroups K ′ v to prove a statement that relates double cosets such as in (9) to adelic double cosets. Let B = B 2,∞ be the algebra of Hamiltonian quaternions, ramified at 2 and ∞. Recall from Section 6.3 that G ′ is the Q-algebraic group B × /Z(B × ). Let us fix the prime l ≡ 1 mod 4 as in Section 6. In a similar manner to the proof of (25) is follows that Recall that since B splits at l we have G ′ (Q l ) ∼ = PGL 2 (Q l ). We wish to have a statement similar to (28) above, replacing G ′ (Z v ) at v = 2 and v = p by congruence subgroups K ′ 2 and K ′ p . (This p is the one fixed above in Section 6.) Then isomorphism will no longer hold, but the right-hand side will be a finite index normal subgroup of G ′ (A).
The choice of the smaller subgroups K ′ 2 and K ′ p is as follows. For v ∈ {2, p} let Here

and let us define
If g l and g ′ l ∈ G ′ (Q l ) are mapped to the same coset on the right hand side then there exists g q ∈ G ′ (Q), g r ∈ G ′ (R) and k = l =v<∞ k v ∈ l =v<∞ K ′ v such that g l = g q g ′ l g r k. This is equivalent to saying g l = g q g ′ l and g q ∈ K ′ v for all l = v < ∞. By the definitions of the K ′ v s this last condition implies g q ∈ Γ(2p). Thus we see that Strong approximation in the manner discussed above is used to prove that LPS graphs are Ramanujan. First one shows that the finite (l + 1)-regular graph Γ(2p)\T is Ramanujan if and only if all irreducible infinite-dimensional unramified unitary representations of PGL 2 (Q l ) that appear in L 2 (P GL 2 (Q l )/Γ(2p)) are tempered [Lub10, Corollary 5.5.3]. Then by the isomorphism above which follows from Strong Approximation, one can extend a representation ρ ′ l of PGL 2 (Q l ) to an automorphic representation ρ ′ of G ′ (A) in L 2 (G ′ (Q)\G ′ (A)). By the Jacquet-Langlands correspondence, ρ ′ corresponds to a cuspidal representation ρ of PGL 2 (A) in L 2 (PGL 2 (Q)\PGL 2 (A)) such that ρ v is discrete series for all v where B ramifies (so in our case, 2 and ∞) [Lub10, Theorem 6.2.1]. Finally, Deligne has proved the Ramanujan-Peterson conjecture in this case of holomorphic modular forms [Lub10, Theorem 6.1.2], [Del71], [Del74] which says that for ρ a cuspidal representation of PGL 2 (A) in L 2 (PGL 2 (Q)\PGL 2 (A)) with ρ ∞ discrete series, ρ l is tempered [Lub10, Theorems 7. 1.1 and 7.3.1]. Under the Jacquet-Langlands correspondence, the adjacency matrix of our graph X corresponds to the Hecke operator T l [Lub10, 5.3] and the Ramanujan conjecture is equivalent to saying that |λ| ≤ 2 √ l for all of its eigenvalues λ = ±(l + 1).

Strong Approximation for Pizer graphs
Now we turn to discussing how strong approximation is useful in establishing the bijections in (4). In Section 8 we will discuss Pizer's construction of Ramanujan graphs. These graphs are isomorphic to supersingular isogeny graphs. Their vertex set is the class group of a maximal order O in the quaternion algebra B p,∞ . This set is in bijection with an adelic double coset space, which in turn is in bijection with a set of local double cosets. Let us now fix a prime l where B splits. The same argument as in Section 7.1 works restricted to B × (A f ) (the finite adèles). It follows that we have Proposition 7.2. We have the bijections (cf. [CGL09, (1)]) Proof. The first bijection follows from (32) and an argument similar to the proof of (31). Indeed, (32) implies that there is a surjection Now two elements g l , g ′ l ∈ B × (Q l ) land in the same double coset via this bijection if and only if g l = g q g ′ l k in B × (A f ). Then g l = g q g ′ l (from equality at the place l) and g q ∈ B × (Z v ) (from equality at the places l = v < ∞). Consider the element g q ∈ B(Q), for example in terms of its coordinates in the standard basis {1, i, j, k} of B. Since g q ∈ B × (Z v ) we have that g q ∈ O(Z[l −1 ]), and g q ∈ B × (Q l ) implies that in fact g q ∈ (O(Z[l −1 ])) × . This completes the proof of the first bijection in (33). Now the second bijection follows from the fact that B splits at the prime l and hence B × (Q l ) ∼ = GL 2 (Q l ) with the unique maximal order GL 2 (Z l ).
Finally, we wish to also address the bijection between the adelic double coset object and the class group of the maximal order O. This fact follows from the fact that ideals of O are locally principal. We omit defining ideals of an order O or defining the class group here and instead refer the reader to [Vig80,§4], [Che10,§2.3] or [Voi18]. For the statement about the bijection between the class group Cl(O) and the adelic double cosets in (33) above, see for example [Che10, Theorem 2.6].

Pizer Graphs
In this section we give an overview of Pizer's [Piz98] construction of a Ramanujan graph. The graphs constructed by Pizer are isomorphic to the graphs of supersingular elliptic curves over F p 2 [CGL09, Section 2]. These graphs were considered by Mestre [Mes86] and Ihara [Iha66] before (cf. [JMV05]), but Pizer's construction reveals their connection to quaternion algebras, proving their Ramanujan property. In Section 9 we shall compare the resulting graphs to the LPS construction described above.
Pizer's description is in terms of a quaternion algebra and a pair of prime parameters p, l. We shall aim to keep technical details to a minimum, and focus on the choice of quaternion algebra and parameters. This elucidates the connection with the LPS construction. Recall that the meaning of the parameters is similar in both cases: the resulting graphs are (l + 1)-regular and their size depends on the value of p. Varying p (subject to some constraints) produces an infinite family of (l + 1)-regular Ramanujan graphs. However, we shall see that the constraints imposed on the parameters {p, l} by the LPS and Pizer constructions do not agree. In Section 8.2 we give an explicit comparison between the admissible values of the parameter p in the example when l = 5.
First we wish to summarize the construction via Pizer [Piz98]. In particular we wish to explain the elements of [Piz98, Theorem 5.1]. Details are kept to a minimum; the reader is encouraged to consult op.cit. for details, in particular [Piz98,4.]. We mention one feature of Pizer's approach in advance: we shall see that here the graph is given via its adjacency matrix. Note that this is of a different flavor from the LPS case. There the edges of the graph were specified "locally:" given a vertex of the graph (as an element of a group in Section 6.1 or as a class of lattices in Section 6.2), its neighbors were specified directly. (See Section 6.4 for an explicit parametrization of the edges at a vertex.) In Pizer's approach the adjacency matrix, a Brandt matrix (associated to an Eichler order in the quaternion algebra) specifies the edge structure of the graph.
LPS construction as well. The following table summarizes the size of G(p, l) and G(p 2 , l) for the case where l p = 1 (and p > 3). It turns out that the above conditions together already guarantee that B(N, l) determines a Ramanujan graph. This is the content of the following theorem. Recall that the quaternion algebra B underlying the construction above is ramified at exactly two places, p and ∞. This uniquely determines the algebra B = B p,∞ (cf. [Piz98, Proposition 4.1]). Given a specific l one may ask for what p primes and N = p are the conditions trB(N, l) = 0 and trB(N, l 2 ) = H(N ) satisfied. This can be answered by translating the conditions to modular conditions on p. This is carried out for l = 2 in [Piz98, Example 2]. In the LPS construction above we were interested in l + 1 regular graphs where l ≡ 1 mod 4. To compare the families of Ramanujan graphs emerging from the two constructions, in the next section we carry out the same computation for l = 5.

The size of a six-regular Pizer graph
We wish to consider a special case of Pizer's construction in [Piz98,Section 5] where the order O is a (level p) maximal order in B p,∞ and the Ramanujan graph is l + 1 regular. In particular, we are interested in the case where l = 5. (Since the LPS construction discussed in Section 6 requires l ≡ 1 mod 4, this is the smallest l where a comparison can be made.) In this section we follow the methods of [Piz98, Example 2] to give explicit modular conditions on p to satisfy Pizer's construction. The Brandt matrix B(p; 5) associated to the maximal order O ⊂ B p,∞ (of level p) is a square matrix of size H(p). It follows from Theorem 8.1 [Piz98, Proposition 5.1] that it is the adjacency matrix of a 6-regular simple Ramanujan graph if the following conditions hold: 1. p ≡ 1 mod 12 2. trB(p, 5) = 0 3. trB(p, 5 2 ) = ClO Note that here Condition 1 guarantees that the graph is symmetric, and Condition 2 that it has no loops. By [Piz98,Proposition 4.4] the condition p ≡ 1 mod 12 gives Cl(O) = M assO = p−1 12 . The Conditions 2 and 3 concern the trace of the Brandt matrices B(p, 5) and B(p, 25) associated to O of level p. These can be computed using [Piz98,Proposition 4.9]. In particular, loc. cit. guarantees that Conditions 2 and 3 hold under certain conditions. To state these conditions we must introduce some notation. For m = 5 and m = 25 respectively, let s be an integer such that ∆ = s 2 − 4m is negative. Let t and r be chosen such that ∆ = s 2 − 4 · m = t 2 r 0 > r ≡ 1 mod 4 t 2 4r 0 > r ≡ 2, 3 mod 4 (38) Let f be any positive divisor of t We summarize the modular conditions on p in the following corollary.
The Corollary describes the set of primes p for which G(p, 5) is a six-regular Ramanujan graph. The condition p ≡ 1 mod 4, p ≡ 1, 4 mod 5 = l guarantees that for these primes the LPS construction is a six-regular graph as well.
Remark 8.3. The smallest prime satisfying all the congruence conditions of Corollary 8.2 is 53881. This corresponds to a 6-regular Pizer graph with 4490 vertices. Amongst the first one million primes, 1670 satisfy all these congruence conditions.

Relationship between LPS and Pizer constructions
We wish to compare the two different approaches to constructing Ramanujan graphs that we have discussed. Throughout the previous sections, we have seen that the constructions of LPS and Pizer (recall the latter agree with supersingular isogeny graphs for particular choices) have similar elements. In this section, we wish to further highlight these similarities, as well as the discrepancies between the two approaches.
First let us revisit the chains of graph isomorphisms/bijections that the respective constructions fit into. These are as follows: (Pizer) Recall that in the first line, we have the LPS construction in terms of a Cayley graph on the group PSL 2 (F p ); it corresponds to the "local double coset graph" defined by taking a finite quotient of an infinite tree of homothety classes of lattices. The vertex set of this graph is in bijection with the adelic double cosets on the right-hand side. (For the sake of this comparison we omitted the infinite place.) On the right-hand end of the second line, we have the supersingular isogeny graphs discussed in Part 1. These are symmetric simple graphs isomorphic to G(p, l) constructed by Pizer (see Section 8) when p ≡ 1 mod 12. The vertex set of G(p, l) is the class group of a maximal order O in the quaternion algebra B p,∞ . This set is in bijection with the adelic double cosets. Via strong approximation (see Section 7.3) these adelic double cosets are in bijection with local double cosets, which at a place l where B p,∞ splits can be written as the left-hand side object.
Despite the similarities between these chains of bijections, there are significant discrepancies between the two objects. First of all, there is a discrepancy in the underlying quaternion algebras. For the LPS graphs we considered the underlying algebra of Hamiltonian quaternions (B 2,∞ ). Varying the parameter p we get different Ramanujan graphs by changing the congruence subgroup Γ(2p) without ever changing the underlying algebra. On the other hand the Pizer graphs were constructed using B = B p,∞ . The underlying quaternion algebra varies with the choice of the parameter p. We note that the construction in LPS can be carried out for any B ramified at ∞ and split at l, and would still result in Ramanujan graphs (see [Lub10,Theorem 7.3.12]). However, in this more general case we do not have a clear path for obtaining an explicit description of these graphs as Cayley graphs. For additional details see [Lub10,Remark 7.4.4(iv)]. If one took B p,∞ for both the LPS and Pizer cases, the infinite families of Ramanujan graphs formed would differ because the LPS family is formed by varying the subgroup Γ(2p) (or more generally Γ(N ) for l a quadratic residue mod N ) while the Pizer family is formed by varying the quaternion algebra B p,∞ .
Let us consider the choice of parameters next. For the LPS graphs we required only that l ≡ 1 mod 4 and that p is odd and prime to l. If −1 is a quadratic residue modulo p then the resulting graph is isomorphic to a subgroup of PGL 2 (Z/pZ) [Lub10,Theorem 7.4.3]. Furthermore, if l is a quadratic residue modulo 2p then this graph is non-bipartite and isomorphic to the Cayley graph of PSL 2 (F p ) with p 3 −p 2 elements. In the case of the Pizer graphs G(N, l) we must have N = pM coprime to l. Further congruence conditions on N guarantee properties of the resulting graph (see Section 8), e.g. p ≡ 1 mod 12 guarantees that the adjacency matrix is symmetric. The number of vertices in G(N, l) is then H(N ), the class number of an order of level N in B p,∞ . For example if N = p ≡ 1 mod 12, then this results in a graph of size p−1 2 . To compare the two in the simplest case when l ≡ 1 mod 4, i.e. l = 5, recall that Corollary 8.2 gives the exact congruence conditions on p so that the Pizer construction of the graph G(p, 5) is a six-regular Ramanujan graph on p−1 12 vertices. For these primes, the LPS construction also produces a Ramanujan graph. The size of the two graphs is very different. Notice however that when both graphs exist the size of the LPS graph is divisible by the size of the Pizer graph (cf. for the LPS construction. This is much larger than the congruence subgroup Γ(2p) ≤ Γ that appears in the local double coset objects in that case.
The fact that the LPS construction involves this smaller congruence subgroup Γ(2p) also accounts for the discrepancy between the two lines at the adelic double cosets. Recall from Section 7.2 that H 2p was not the entire G ′ (A) but instead a finite index normal subgroup of it. We note that if one replaced Γ(2p) in the LPS construction with Γ(2N ), where p | N , the LPS graph Γ(2N )\PGL 2 (Q l )/PGL 2 (Z l ) is a finite cover of Γ(2p)\PGL 2 (Q l )/PGL 2 (Z l ) [Li96, Section 3].
One may wonder if an object analogous to Cl(O) could be appended to the chain of bijections for LPS graphs. Or even if, in the local double coset object for LPS graphs Γ(2p) could be written as (O 2p (Z[l −1 ])) × as well, for a quaternion order O 2p . (More precisely, if Γ(2p) agrees with the image of (O 2p (Z[l −1 ])) × under the map B × → G ′ for some order O 2p .) The answer to the second question is affirmative. Using the basis 1, i, j, k for B = B 2,∞ the requisite relationship holds between O 2p and Γ(2p) for the order O 2p spanned by {1, 2pi, 2pj, 2pk}. Note that this order has level 2 5 p 3 , hence it is not an Eichler order.
We remark that the size of the class set of this O 2p can be computed using [Piz80, Theorem 1.12] and it turns out to be 4p 2 (p+1)+4 3 or 4p 2 (p+1) 3 if p ≡ 1 mod 3 or p ≡ 2 mod 3 respectively. This is clearly different from the size of PSL 2 (F p ) which is a numerical obstruction to extending the chain of isomorphisms for LPS graphs analogously to the row for Pizer graphs.