{'fraction_non_alphanumeric': 0.0390132111081154, 'fraction_numerical': 0.01881908870315449, 'mean_word_length': 4.111065178448395, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 15, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Twisting, ladder graphs and A-polynomials

We extend recent work by Howie, Mathews and Purcell to simplify the calculation of A-polynomials for any family of hyperbolic knots related by twisting. The main result follows from the observation that equations defining the deformation variety that correspond to the twisting are reminiscent of exchange relations in a cluster algebra. We prove two additional results with analogues in the context of cluster algebras: the Laurent phenomenon, and intersection numbers appearing as exponents in the denominator. We demonstrate our results on the twist knots, and on a family of twisted torus knots for which A-polynomials have not previously been calculated.


Introduction
The A-polynomial is an invariant of a one-cusped 3-manifold that was originally introduced in 1994 [5]. It is a 2-variable polynomial in L and M , describing the relationship between the eigenvalues of the meridian and longitude of the cusp under representations of the fundamental group into SL (2, C). This polynomial carries a number of important properties including the ability to detect boundary slopes of incompressible surfaces in the knot complement. The A-polynomial is also known in connection to the coloured Jones polynomial through the so-called AJ conjecture [11]. Unfortunately, the A-polynomial is difficult to compute in general, and effective methods of computation remain elusive. In a recent paper by Howie, Mathews and Purcell [18], equations involved in the calculations of A-polynomials were shown to resemble exchange relations of a cluster algebra. In this paper, we make use of this rich algebraic structure to simplify the calculations of A-polynomials for infinite families of knots related by twisting.
1.1. The A-polynomial. To compute an A-polynomial of a knot we may set up a system of polynomial equations that ensure SL(2, C)-representations preserve the relations of the knot group. Using this method, the number of equations in the system scales linearly with the number of relations in the fundamental group. Eliminating unwanted variables gives the A-polynomial. This approach is effective so long as the number of relations is small, and as such, the A-polynomial is known for knots with simple fundamental group presentations, such as the twist knots: a recursive formula was given by Hoste and Shanahan [17] (recovered and generalised later by Peterson [26]), and was made explicit by Mathews [21,22]. It is a well known problem in elimination theory that finding resultants in a system of polynomial equations becomes computationally difficult when the number of equations is large or the degree of the polynomials is high. This is a recurring challenge in the calculation of A-polynomials, which we partially address in this paper.
Based on Thurston's study of the deformation variety of hyperbolic knots [28], Champanerkar [3] developed a method for computing an analogue of the SL(2, C) A-polynomial. He showed that this method results in a polynomial that is a divisor of a PSL(2, C) version of the A-polynomial, which is explicitly related to the SL(2, C) A-polynomial. In particular, Champanerkar's polynomial is guaranteed to include a factor that corresponds to the complete hyperbolic structure on the knot complement [3]. This factor is equal to a corresponding factor in the PSL(2, C) A-polynomial containing the discrete, faithful representation associated with the complete structure. As such, we call this factor of the PSL(2, C) A-polynomial, or the corresponding factor of the SL(2, C) Apolynomial, the geometric factor. Champanerkar showed that his polynomial also detects boundary slopes of incompressible surfaces in the knot complement.
Champanerkar's polynomial can be calculated directly for hyperbolic knots that are built from a small number of tetrahedra; however, once the number of tetrahedra required to triangulate the knot complement becomes too large, calculations are again impeded by the limitations of elimination theory. Culler developed a numerical method for computing divisors of the SL(2, C) A-polynomial that contain the geometric factor, which also uses the deformation variety. He set up a database of these polynomials for knots with small crossing numbers and knots with low triangulation complexity [6].
To date, A-polynomials, or divisors containing the geometric factor, are known for all knots with up to eight crossings, many knots with nine crossings and some knots with ten crossings, as well as all hyperbolic knots that can be triangulated by up to seven ideal tetrahedra [6]. There also exist explicit formulas for the A-polynomials of the torus knots [5], the twist knots [21,22], iterated torus knots [25], and knots with Conway's notation C(2n, 3) [16]. Recursive formulas exist for the A-polynomials of certain classes of two-bridge knots [17,26], and a family of pretzel knots [13,27].
This family of pretzel knots is found by 1/n Dehn fillings of what Garoufalidis calls a favorable link [12]. That is, the geometric factors of A-polynomials for the 1/n fillings of this link satisfy a particular recurrence. Indeed, Garoufalidis proves more generally that there exists a recurrent sequence of rational functions containing the geometric factor of the A-polynomial for any family of knots related by twisting (see Theorem 3.1. of [12]). Our results lead to a similar observation but where the rational functions are given explicitly rather than recursively.
In Section 4.1 we add to the list of known A-polynomials by giving explicit formulas for rational functions that contain the geometric factor of the A-polynomials for the twisted torus knots T (5, −5n − 14, 2, 2) and T (5, 5n + 11, 2, 2) for n ≥ 1. Indeed, our results apply more broadly than this. Our main theorem, stated generally below, applies to any family of knots related by twisting. In fact, our methods also apply to one-cusped manifolds more generally, but we restrict our focus to knots in the 3-sphere. Theorem 1.1. Let K n be the sequence of knots obtained by performing 1/n Dehn fillings on an unknotted component of a two-component link in S 3 . Then, for sufficiently large |n|, the A-polynomial of K n may be defined by a finite number of fixed polynomial equations corresponding to the parent link and a single polynomial equation depending on n that corresponds to the Dehn filling. This is stated precisely in Theorem 3.11.
1.2. Connections to cluster algebras. Howie, Mathews and Purcell [18] performed a change of basis on the equations used in Champanerkar's method [3] that is similar to work of Dimofte [7]. When they studied the resulting equations in the context of knots related by Dehn filling, they observed that the equations corresponding to the Dehn filling are reminiscent of exchange relations in a cluster algebra. A cluster algebra is a commutative ring for which generators and relations are not defined at the outset. Instead, cluster variables are defined inductively using a process called mutation. Cluster variables belong to sets called clusters and any two overlapping clusters are related by an exchange relation that replaces one cluster variable with a new one.
Cluster algebras were first defined by Fomin and Zelevinsky in the early 2000s when they were studying dual canonical bases and total positivity in semisimple Lie groups [9]. Since then, applications of cluster algebras have been found in a wide range of contexts, including quiver representations, discrete dynamical systems, tropical geometry, and Teichmüller theory [10]. One intriguing property of a cluster algebra, known as the Laurent phenomenon, is that every cluster variable can be written as an integer Laurent polynomial in the initial cluster variables [9].
A cluster algebra may be of either finite or infinite type, depending on the number of clusters they contain. The simplest cluster algebra of infinite type [2] can be defined using the initial cluster {x 1 , x 2 } and the exchange relation x n−1 x n+1 = x 2 n + 1. The equations of Howie, Mathews and Purcell are comparable to this exchange relation, where we instead use variables γ s corresponding to edge classes in the triangulation, indexed by their slope s.
With this comparison in mind we may exploit what is known about cluster algebras. In particular, we may adapt a formula that exists for all of the cluster variables in the simplest cluster algebra of infinite type. There are three distinct proofs of this formula, given by Caldero and Zelevinsky [2], Musiker and Propp [23], and Zelevinsky alone [29]. We use arguments similar to Musiker and Propp to prove the following result.
Theorem 1.2. The single polynomial equation of Theorem 1.1 corresponding to the Dehn filling can be used to express the variable γ h as an integer Laurent polynomial in the variables γ f , γ o , γ p . This is stated precisely in Theorem 3.2. Note that f, h, o, p are specific slopes that will be defined in due course.
In the context of cluster algebras associated with triangulations of surfaces, Fomin, Shapiro and Thurston proved that the cluster variables carry information about certain intersection numbers [8].
In particular, the exponents of the terms in the denominator of the Laurent polynomial are equal to intersection numbers in the corresponding triangulation (see Theorem 8.6 in [8] for details). We show that a similar result applies in our context with the intersection numbers arising from the Farey triangulation. To state the following result we use the fact that each cluster variable can be associated to a rational number (or infinity) and hence to an ideal vertex in the Farey triangulation. This is stated precisely in Theorem 3.10.
1.3. Structure of this paper. In Section 2 we outline some relevant background, first summarising the work of Howie, Mathews and Purcell, then presenting definitions and results from combinatorics that play a role in our main proofs. Precise statements of our results are given in Section 3, along with their proofs, which rely heavily on perfect matchings of appropriately weighted ladder graphs. We present the results that have connections to cluster algebras first, then apply these to the context of A-polynomial calculations. We end in Section 4 with examples of how our method can be used to explicitly compute A-polynomials for two families of knots related by twisting: the twisted torus knots T (5, 1 − 5n, 2, 2), and the twist knots J(2, 2n).

Acknowledgements. This research was supported by an Australian Government Research
Training Program (RTP) Scholarship. The author thanks Jessica Purcell and Daniel Mathews for their support and guidance. The author is also very grateful to Josh Howie, Stephan Tillmann and Norm Do for giving valuable feedback on a draft of the paper.

Background
In this section we review the method for calculating A-polynomials described by Howie, Mathews and Purcell in [18], including the construction of a layered solid torus and its relationship to the Farey triangulation. We also summarise some relevant combinatorial concepts that appear in later proofs.
2.1. The A-polynomial from Ptolemy equations. In Champanerkar's work [3], the A-polynomial is defined by the set of gluing equations and cusp equations for an ideal triangulation of a knot complement. This information can be stored in the Neumann-Zagier (NZ) matrix [24]. Neumann and Zagier showed that this matrix exhibits symplectic properties [24] and in 2013, Dimofte [7] used this symplectic structure to perform a change of basis. The result of this is a set of equations, one per tetrahedron, that defines the deformation variety.
Howie, Mathews and Purcell [18] analysed the equations resulting from Dimofte's change of basis and observed Ptolemy-like structure similar to the equations defining Goerner and Zickert's  enhanced Ptolemy variety [14]. In addition, they observed that the equations corresponding to Dehn fillings were particularly simple and were reminiscent of the exchange relations in a cluster algebra (see Section 1.2).
2.1.1. Layered solid tori and the Farey triangulation. Howie, Mathews and Purcell were particularly interested in the behaviour of the Ptolemy-like equations corresponding to Dehn fillings. To perform Dehn fillings on triangulated link complements they used layered solid tori. Layered solid tori were originally introduced by Jaco and Rubinstein in [20] but the construction used here more closely resembles the work of Gueritáud and Schleimer [15].
To Dehn fill one cusp of a two-component link complement using a layered solid torus, the link complement must have an ideal triangulation in which only two ideal vertices from two distinct tetrahedra meet the cusp to be filled. Howie, Mathews and Purcell show that this is always possible in Proposition 5.1 of [18]. Given such a triangulation, we may remove the two tetrahedra meeting the cusp, leaving a once-punctured torus boundary component. We glue the layered solid torus to this once-punctured torus boundary. Figure 1 shows this process schematically.
To begin constructing the layered solid torus, we glue two adjacent faces of an ideal tetrahedron to the once-punctured torus boundary. Note that this does not change the topology of the link complement but it does introduce a new once-punctured torus boundary with a different triangulation. The new boundary triangulation shares two edges with the previous one, while the third edge is flipped (see Figure 2). This is referred to as a diagonal exchange. We continue layering ideal tetrahedra onto the boundary until the desired boundary triangulation is obtained. 1 At this point, the tetrahedra we have introduced form a complex that is homotopy equivalent to a thickened once-punctured torus. To form a solid torus we close up the inner-most layer by identifying the two exposed ideal triangles. We do so by gluing across an edge with a twist. The tetrahedra that have been introduced now form a solid torus in which a particular edge is homotopically trivial.
Importantly, this construction allows boundary curves with any rational slope to be made homotopically trivial. The original boundary triangulation consists of three ideal edges, each with a well-defined slope in terms of the meridian and longitude of the torus boundary. As a tetrahedron is added, the diagonal exchange introduces a new edge with a different slope. However, there are only three possible slopes that the new edge may have, depending on which edge is covered by the diagonal exchange. This behaviour is well-understood and is captured by the structure of the Farey triangulation.
The Farey triangulation is an ideal triangulation of H 2 , with edges connecting vertices labelled by rational slopes a/b and c/d whenever |ad−bc| = 1 (see Figure 3). Since one-vertex triangulations of the torus consist of three edges whose pairwise intersection number is one, each triangle in the Farey triangulation corresponds to a triangulation of the once-punctured torus. In particular, the boundary triangulations seen during the construction of a layered solid torus each correspond to a triangle in the Farey triangulation. Moreover, since consecutive boundary triangulations only differ by a diagonal exchange, they appear as adjacent triangles in the Farey triangulation. As a result, we may use a walk in the Farey triangulation to encode the construction of a layered solid torus.
A walk in the Farey triangulation passes through a sequence of triangles. We label these triangles T 0 , T 1 , . . . , T N +1 and refer to the step between T k and T k+1 as the k th step. In the construction of a layered solid torus we never perform a diagonal exchange on an edge that was introduced by the previous layer. 2 This rule ensures that the corresponding walk in the Farey triangulation contains no backwards steps. Therefore, once T 0 and T 1 have been identified, all subsequent steps may be viewed as either a left step or a right step. As such, the construction of a layered solid torus can be completely described by the initial information T 0 , T 1 along with a sequence of left and right steps. 1 It is possible to define degenerate layered solid tori consisting of either no tetrahedra or one tetrahedron but we will not need these constructions here. Descriptions of these can be found in [18]. 2 An astute reader may have noticed that the complex in the right of Figure 1 disobeys this rule! Figure 4. Left: Slope labels for the initial step. Right: Slope labels for the k th step.
Note that the step from T N to T N +1 corresponds to the folding that closes the layered solid torus, rather than the addition of a new tetrahedron.
Definition 2.1 (Anatomy of a layered solid torus). Let W be a word in L's and R's describing the sequence of left and right steps in the construction of a layered solid torus X.
• The final letter in W , corresponding to the fold in X, is the tip of W .
• The maximal string of either L's or R's immediately preceding the tip of W is the tail of W and the corresponding tetrahedra form the tail of X. • The string of L's and R's in W preceding the tail of W form the body of W and the corresponding tetrahedra form the body of X. • The tetrahedron in X that corresponds to the 0 th step is the head of X.

2.1.2.
Ptolemy equations corresponding to a layered solid torus. Let us now establish notation for the slopes in a layered solid torus with reference to the corresponding walk in the Farey triangulation. For the initial step, we label the slope that is being left behind o 0 and the slope that is being introduced h 0 . We label the slope to the left in the Farey triangulation f 0 and the slope to the right p 0 (see Figure 4, left). For the k th step, we label the old slope o k and the slope we are heading towards h k . The slope that the k th step pivots around is labelled p k and the slope that fans out is labelled f k (as in Figure 4, right). Note that the labelling of the initial step is as though it were a right step.
Following Howie, Mathews and Purcell, we assign γ variables to each edge class in the triangulation and label these variables by the slope of the edge. That is, an edge with slope p/q is assigned the variable γ p/q . Now, with slopes labelled as above, Theorem 3.17(ii) of [18] can be stated as follows.
Theorem 2.2 (Howie, Mathews & Purcell, Theorem 3.17(ii) of [18]). With slopes labelled according to the corresponding walk of length N in the Farey triangulation, the Ptolemy equations for the tetrahedra in a layered solid torus are When k = N we pick up the folding equation γ p N = γ f N .

Combinatorial tools.
In this section we recall definitions and results from combinatorics that will be used in Section 3. A ladder graph is a graph on 2n vertices arranged in two rows of n vertices, with edges connecting adjacent vertices in each row and column. A weighted graph is a graph in which each edge is assigned a number or variable, called a weight. A perfect matching of a graph G is a subset S of edges in G such that each vertex belongs to exactly one edge in S (see Figure 5 for an example). The weight w(S) of a perfect matching is defined to be the product of the weights of its constituent edges. In a perfect matching of a ladder graph, if one horizontal edge is included, then the horizontal edge directly above or below it must also be included. Notice that a perfect matching of a ladder graph is completely determined by which pairs of horizontal edges are contained in the perfect matching. Moreover, adjacent horizontal edges cannot be simultaneously included. Choosing a perfect matching of a 2 × n ladder graph is therefore equivalent to choosing a subset of the integers [1, n − 1] without choosing any consecutive integers.
With this in mind we have the following combinatorial result, which is an important piece in a later proof. Remark 2.4. This differs from the statement in [23] in the following ways: we require only the first of the two cases (where N is odd), and we replace n with n − 1, q with a, and r with b.

Simplifying A-polynomial calculations
In this section we give precise statements of our results along with their proofs. First we consider the results that have analogues in the context of cluster algebras and later we see how this structure can be used to simplify the calculation of A-polynomials.
3.1. Results related to cluster algebras. For ease of notation, let us define the following family of polynomials.
Recall that the tail of a layered solid torus is the subset of tetrahedra corresponding to the maximal string of L's or R's preceding the tip of the word that describes its construction (see Definition 2.1). Also recall that the k th step is the step between triangles T k and T k+1 in the Farey triangulation.
Theorem 3.2. Suppose a layered solid torus has a tail of length n ≥ 1 beginning at the k th step. Then, using the Ptolemy equations corresponding to each tetrahedron, γ h k+n−1 can be expressed as Thus, γ h k+n−1 can be expressed as an integer Laurent polynomial in the variables γ f k , γ o k and γ p k .
To prove this theorem we first establish a relationship between H n and the perfect matchings of a weighted ladder graph G n . Let G n be a 2 × n ladder graph with edges weighted as in Figure 6. Vertical edge weights alternate between γ p k and −γ p k , starting with γ p k on the left. Horizontal edge weights alternate between γ f k and γ o k , starting with γ f k on the left. Definition 3.3. Let S be the set of all perfect matchings of the graph G n . We define a polynomial P n in the variables γ f k , γ o k and γ p k to be the sum of the weights of all perfect matchings in S. That is, Figure 6. The graph G n for even n, with edges weighted as described.
We show that H n is equivalent to P 2n . Proof. To see this, note that all perfect matchings of G n can be found by choosing pairs of parallel horizontal edges with the condition that no consecutive edges are chosen. Pairs of parallel edges weighted γ f k are in one-to-one correspondence with the odd integers between 1 and n − 1, while pairs of parallel edges weighted γ o k are in one-to-one correspondence with the even integers between 1 and n − 1.
Remark 3.5. Note that a perfect matching as described above must also include n/2 −a−b vertical edges each weighted γ p k and n/2 − a − b vertical edges each weighted −γ p k . Hence, when n = 2N , the number in question is the coefficient of the term Recall from Theorem 2.3 that the number of ways to choose a subset S ⊂ {1, 2, . . . , 2n − 1} such that S contains a odd elements, b even elements, and no consecutive elements is Lemma 3.6. For H n and P n as described above, we have H n = P 2n .
Proof. Consider the graph G 2n . With notation as above, observe that a can range between 0 and n, since there are n odd integers between 1 and 2n−1. Similarly, b can range between 0 and n−1, since there are n − 1 even integers between 1 and 2n − 1. Moreover, since we cannot choose consecutive integers, the sum of a and b is at most n − 1, except in the case where b = 0 and a = n. With this, along with the observation in Remark 3.5, we have Lemma 3.7 and Lemma 3.8 establish recursive properties of the polynomials P n .
Lemma 3.7. The polynomials P n satisfy the recurrence , for all n ≥ 3. Proof. Assume n ≥ 3. A perfect matching of G n can be considered as either: a perfect matching of G n−1 , plus the vertical edge at the far right of weight −γ p k (if n is even) or γ p k (if n is odd); or a perfect matching of G n−2 , plus the pair of horizontal edges on the far right, which are weighted either γ f k (if n is even) or γ o k (if n is odd). This observation gives us the following: We rearrange the first and third equations for P 2n−1 and P 2n−3 , respectively, then substitute these into the second equation to get Lemma 3.8. The polynomials P n satisfy the recurrence All perfect matchings of G 6 are shown in Figure 7. From this, we have that This establishes the base case. Now let m > 4 and assume for induction that (1) Hence, by induction, Lemma 3.9. The polynomials H n satisfy the following recurrence, for any n ≥ 4.
Proof. Since H n = P 2n , the result follows from Lemma 3.8.
We are now in a position to prove Theorem 3.2.
Proof of Theorem 3.2. We proceed by induction on the length of the tail. When n = 1, the tail of the layered solid torus consists of one tetrahedron. The corresponding Ptolemy equation is γ o k γ h k + γ 2 p k − γ 2 f k = 0, which we rewrite as Meanwhile, When n = 2, the tail of the layered solid torus consists of two tetrahedra and the corresponding Ptolemy equations are γ o k γ h k + γ 2 p k − γ 2 f k = 0 (as above) and γ o k+1 γ h k+1 + γ 2 p k+1 − γ 2 f k+1 = 0. Rearranging the second equation gives However, in the tail we have Hence, making these substitutions and using equation (2), we have Meanwhile, Thus,

Now, suppose m > 2 and assume for induction that
, for all n < m.
In a tail of length m there are m tetrahedra. The Ptolemy equation corresponding to the m th tetrahedron is Observe that the following variables are equivalent in the tail:

Now, using the inductive assumption we write
Hence, to prove the result, we need

But this is equivalent to showing that
for m > 2, which is the recurrence in Lemma 3.9. Hence, the claim follows by induction. Proof. Denote the set of edges in the Farey triangulation by F and let |α s ∩ F| be the number of transverse intersections between the geodesic α s and all edges in F. In each of the accompanying figures, α f k is shown in dark blue, α o k is shown in green, and α p k is shown in light blue.
For this proof we consider the Farey triangulation of the upper half-space model of H 2 . After applying the appropriate (not necessarily orientation-preserving) isometry of H 2 , we may assume that f k = 1/0, o k = −1/1, p k = 0/1 and h k = 1/1. Note that this choice of slopes ensures that h k+n−1 = 1/n for all n ≥ 1. In other words, when considering a tail of length n, the common endpoint of α f k , α o k and α p k is 1/n. We prove the claim by induction on the length of the tail. When n = 1 we have the situation shown in Figure 8. In particular, we see that α f k and α p k are each parallel to edges in the Farey triangulation and therefore |α f k ∩ F | = |α p k ∩ F | = 0. Meanwhile, α o k intersects one edge in the Farey triangulation so |α o k ∩ F | = 1. From Theorem 3.2, we know that the denominator of Laurent polynomial for γ h k is Hence, the base case holds. In Figure 9 we see that increasing the length of the tail by 1 increases each of |α o k ∩ F| and |α f k ∩ F| by 1, while |α p k ∩ F | is always 0. Hence, the claim follows by induction.

3.2.
Applications to A-polynomial calculations. From Theorem 2.58 in [18], we know that setting one of the γ variables to 1 and solving the system of Ptolemy equations gives the geometric factor of the PSL(2, C) A-polynomial. Moreover, by first making appropriate substitutions for the variables corresponding to the meridian and longitude, we obtain a rational function in L and M that contains the geometric factor of the SL(2, C) A-polynomial (see Corollary 2.59 in [18]). However, finding solutions to such a system directly is again impeded by the increasing number of equations as the triangulation grows. Fortunately, we may use Theorem 3.2 to simplify this computation.
Theorem 3.11. Suppose a knot K n is obtained from a link complement by Dehn filling using a layered solid torus. Suppose the tail of the layered solid torus has length n ≥ 1 and begins at step k, In the proof of Theorem 3.2, we saw that the set of n tail equations is equivalent to the equation The folding equation corresponding to the tip in the same direction as the tail is γ p k+n = γ f k+n , however, we also have that γ p k+n = γ p k and γ f k+n = γ h k+n−1 . Hence, we set γ h k+n−1 equal to γ p k and rearrange to get H n − γ n−1 f k γ n o k γ p k = 0, as desired.  On the left is the standard pretzel diagram and on the right, we see an alternative diagram that elucidates why 1/n Dehn fillings generate the T (5, 1 − 5n, 2, 2) twisted torus knots.
H n − γ n−1 f k γ n o k γ p k contains the geometric factor of the SL(2, C) A-polynomial for the corresponding knot.
Proof. This follows from the previous theorem and Corollary 2.59 of [18].
Once we have γ f k , γ o k , and γ p k expressed in terms of L and M , Theorem 3.11 gives a family of rational functions in L and M depending only on n. This means that the main barrier to effective computation of these rational functions is in finding γ f k , γ o k , and γ p k in terms of L and M , which depends on the Ptolemy equations of the tetrahedra required to triangulate the parent link complement. In particular, this means that if a parent link admits an appropriate triangulation consisting of few tetrahedra, the A-polynomials for fillings of this link are readily computable. We now demonstrate the power of this result by applying it in the context of two families of knots related by twisting.

Example calculations
In this section we see how Theorem 3.11 can be applied to A-polynomial calculations for two families of knots related by twisting: the twisted torus knots T (5, 1 − 5n, 2, 2) and the twist knots J(2, 2n).

4.1.
A family of twisted torus knots. The (−2, 3, 8)-pretzel link, shown in Figure 10 (left), is a two-component link with a simple triangulation. It may also be presented as an augmented twisted torus knot as in Figure 10 (right). Notice that one of the components (shown in blue) is unknotted. By performing 1/n Dehn fillings on the blue component we generate the infinite family of twisted torus knots T (5, 1 − 5n, 2, 2) [19]. Note that we are using the twisted torus knot notation used in [4].
Howie, Mathews, Purcell and the author study this link in [19], using the triangulation given in Figure 11 (with notation as in Regina [1]). Observe that tetrahedra 2 and 3 glue only to each other and one face each of tetrahedra 0 and 1. Vertices 2(0) and 3(0) meet the unknotted cusp and all other vertices meet the other cusp. To perform Dehn fillings on the unknotted cusp we remove tetrahedra 2 and 3, leaving a once-punctured torus boundary triangulated by the faces 0(012) and 1(012). We may then glue an appropriate layered solid torus to these exposed faces to make the Dehn filling slope homotopically trivial.
The Ptolemy equations for the outside tetrahedra were determined in [19]. Here we have multiplied through by powers of L and M to remove negative exponents. We have  4.1.1. Using the Farey triangulation. To apply Theorem 3.11, we must determine paths in the Farey triangulation describing the construction of appropriate layered solid tori. This was done in [19]. We determine that the starting Farey triangle has slopes 3/1, 4/1, and 1/0. To perform positive 1/n Dehn fillings we follow the path indicated in blue in Figure 12 and to perform negative 1/n Dehn fillings we follow the path indicated in orange. These paths can be described by the words LLRL. . . L and LLLR. . . R, respectively. Theorem 3.11 applies for tails of length m ≥ 1 with the tip in the same direction, so here we consider Dehn fillings with slopes 1/n for n ≥ 4 and n ≤ −3. The tails for both the positive and negative Dehn fillings each start at step 4. Steps 0, 1 and 2 are the same for both paths, and using Theorem 2.2, we obtain their corresponding Ptolemy equations For positive Dehn fillings, step 3 is a right step and hence corresponds to the Ptolemy equation (9) γ 1/0 γ 1/2 + γ 2 1/1 − γ 2 0/1 = 0. The tail begins at step 4 and we have o 4 = 1/1, p 4 = 0/1 and f 4 = 1/2. Hence, by Theorem 3.11, the equations for the tail of length m ≥ 1 are equivalent to the equation For negative Dehn fillings, step 3 is a left step and therefore corresponds to the Ptolemy equation The tail begins at step 4 and we have o 4 = 1/0, p 4 = 0/1 and f 4 = −1/1. Hence, by Theorem 3.11, the equations for the tail of length m ≥ 1 are equivalent to the equation Again, we set γ 3/1 = 1 and use equations (4) through (8) and equation (11) to write γ 1/0 , γ −1/1 and γ 0/1 entirely in terms of L and M . These can also be found in Appendix A. With these substitutions, (12) becomes a formula for rational functions that contain the geometric factor of the A-polynomials for the twisted torus knots T (5, 5m + 11, 2, 2), with m ≥ 1.
4.1.4. Changing basis. As discussed in [19], the choice of generators for the cusp homology were not the standard basis for the link in S 3 . While we used the actual meridian, we did not use the preferred longitude.

4.1.5.
Comparing with what is known. The twisted torus knots T (5, 16, 2, 2) and T (5, −19, 2, 2) are equivalent to the census knots K7 3 and K7 4 , respectively. After changing basis as above, and multiplying through by powers of L and M to remove negative exponents, the largest factors seen in the output of our formulas match the A-polynomials found by Culler [6]. For example, with substitutions as given in Appendix A, and with n = 1, equation (12) gives a polynomial with four factors, the largest of which has 455 terms. After changing basis, this factor is identical to the A-polynomial given for K7 3 on Culler's website [6].
The knots T (5, 21, 2, 2) and T (5, −24, 2, 2) are equivalent to the census knots K8 3 and K8 4 , respectively, and our formula immediately gives a rational function containing the geometric factor of their A-polynomials despite their very large size; the largest factors of these have 784 and 952 terms, respectively. Since the A-polynomials for these knots do not appear on Culler's database we cannot compare.   Figure 14. A triangulation of the Whitehead link complement in Regina notation.

The twist knots.
It is well known that the twist knots may be obtained by 1/n Dehn fillings of the complement of the Whitehead link (shown in Figure 13, left). We use the notation J(2, k) to mean the twist knot with k right-handed crossings in the bottom twist region (as seen in Figure 13, right). Positive 1/n Dehn fillings of the Whitehead link therefore generate the family of twist knots J(2, 2n) and negative 1/n Dehn fillings generate the family J(2, −2n).
In this section we apply Theorem 3.11 to the family of twist knots obtained by Dehn filling the Whitehead link using layered solid tori. We use the same triangulation as in [18], which is given in Regina notation in Figure 14. The Dehn fillings are performed by replacing tetrahedra 3 and 4 with layered solid tori. Each of the three outside tetrahedra contribute a Ptolemy equation, which were found in [18]. We make the substitutions = L 2 and m = M 2 , and multiply through by powers of L and M to remove negative exponents. This gives us the equations The paths in the Farey triangulation corresponding to the 1/n Dehn fillings of the Whitehead link were determined by Howie, Mathews and Purcell in [18] and are shown in Figure 15 For positive 1/n Dehn fillings, step 2 is a right step and therefore corresponds to the Ptolemy equation (18) γ 1/2 γ 1/0 + γ 2 0/1 − γ 2 1/1 = 0.
Meanwhile, for negative Dehn fillings, the A-polynomial for J(2, −2m − 4) contains a factor of the rational function given by Again, conjugation is needed to remove fractional exponents.

4.2.1.
Comparing with what is known. The A-polynomials for the twist knots were shown by Hoste and Shanahan to be irreducible. As such, we expect the output of our formulas to contain precisely the A-polynomial of each twist knot. Using the explicit formulas of Mathews [21,22], we verify that the largest factor of our output is indeed the A-polynomial for each of the twist knots J(2, 2n) for n ∈ [−8, −3] ∪ [4,8]. Note that a change of basis is required, namely (L, M ) → (−LM −2 , M ). This change of basis does not depend on the Dehn filling slope, since the linking number of the two components of the Whitehead link is 0. The behaviour seen in the output of our formulas uncovers a new recursive relationship in the A-polynomials of twist knots. In the following, we let  A + n−1 · A + n+1 = (A + n ) 2 + y n−2 zM 4 (L + M 2 ) 3 , for n > 1, and A − n−1 · A − n+1 = (A − n ) 2 + y n−1 z(L + M 2 ), for n > 0. Initial conditions: Proof. We use the recursive relationship found by Hoste and Shanahan [17], which can be rewritten in our notation as follows, with x, y, and initial conditions as above.
We prove the positive case by showing that

Applying Hoste and Shanahan's relation repeatedly to the left-hand side gives
Substituting in the expressions for x, y, A + 1 and A + 2 , we find that , thus recovering the right-hand side.
An analogous argument shows that Again by substituting, we find that , which proves the negative case. In order to express equations (10) and (12) entirely in terms of L and M we need the variables γ 1/0 , γ 1/1 , γ 0/1 , γ −1/1 and γ 1/2 in terms of L and M . These are summarised below. With these substitutions, equations (10) and (12) become formulas for rational functions that contain the geometric factor of the A-polynomial for the twisted torus knots T (5, 1 − 5n, 2, 2).