A Lochs-Type Approach via Entropy in Comparing the Efﬁciency of Different Continued Fraction Algorithms

: We investigate the efﬁciency of several types of continued fraction expansions of a number in the unit interval using a generalization of Lochs theorem from 1964. Thus, we aim to compare the efﬁciency by describing the rate at which the digits of one number-theoretic expansion determine those of another. We study Chan’s continued fractions, θ -expansions, N -continued fractions, and Rényi-type continued fractions. A central role in fulﬁlling our goal is played by the entropy of the absolutely continuous invariant probability measures of the associated dynamical systems.


Introduction
The purpose of this paper is to compare the efficiency of some continued fractions in approximating a real number in the unit interval. For any irrational x ∈ (0, 1), suppose we have two known expansions x = [a 1 , a 2 , . . .] 1 and x = [b 1 , b 2 , . . .] 2 . A natural question is: Which of these continued fraction expansions is more "efficient"? In mathematical terms, "efficiency" means: Which of the two sequences [a 1 , a 2 , . . . , a n ] 1 and [b 1 , b 2 , . . . , b n ] 2 converges more quickly to x as n → ∞? It is therefore relevant to ask how much information (e.g., in terms of the digits in the second expansion) can be determined once we know n digits of the first expansion. Suppose we approximate x by keeping the first n digits of its first expansion. To attain the same degree of accuracy, we need to keep the first m = m(n, x) digits of the second expansion. What can we say about the ratio m(n, x)/n in general? We show that the relative speed of approximation of two different expansions (almost everywhere) is related to the quotient of the entropies of the transformations that generate these expansions. The strategy used in this paper fits for all pairs of number-theoretic fibered maps (NTFMs) for which the generating partition has finite entropy.

Motivation
The ancient charms of number theory have been replaced by the modern fascination of an algorithmic thinking. When analytic number theory was being formulated in the nineteenth century, probability theory was not yet a reputable branch of mathematics. Nowadays, probabilistic techniques are routinely used in number theory. The field of probabilistic number theory is currently evolving very rapidly and uses more and more refined probabilistic tools and results. It is well-known that continued fractions lie at the heart of a number of classical algorithms such as Euclid's greatest common divisor or the lattice reduction algorithm of Gauss [1]. Thus, continued fractions arise naturally in the theory of approximation to real numbers by rationals. To this day, the Gauss map, on which metrical theory of regular continued fraction is based, has fascinated researchers from various branches of mathematics and science, with many applications in computer science, cosmology, and chaos theory. Apart from the regular continued fraction expansion, many other continued fraction expansions have been studied. In the last century, mathematicians broke new ground in this area. Since there are several continued fraction algorithms, we ask ourselves which of them provides the best approximation of a real number. The representation of a real number by a continued fraction can be viewed as a source of information about the number. For this purpose, we need the notion of entropy, a rigorous tool at the crossroads of probability, information theory, and dynamical systems [2,3].

Entropy
As is well known, entropy is an important concept of information in physics, chemistry, and information theory [4]. The connection between entropy and the transmission of information was first studied by Shannon [5]. Thus, entropy can be seen as a measure of randomness of the system or the average information acquired under a single application of the underlying map. Entropy also plays an important role in ergodic theory. Thus, Shannon's probabilistic notion of entropy was first introduced into the ergodic theory by Kolmogorov [6] via a measure theoretic approach. The contribution of Kolmogorov to modern dynamics was the discovery of the concept of entropy, which was made rigorous by Sinai [7]. This concept provides an important generalization of Shannon entropy. Kolmogorov-Sinai (K-S) entropy measures the maximal loss of information for the iteration of finite partitions in a measure preserving transformation. The concept has shown its strength through the adequate answers to problems in the classification of dynamical systems. Two metrically isomorphic dynamical systems have the same K-S entropy, so this concept is a tool for distinguishing non-isomorphic (non-conjugate) dynamical systems.
We briefly review this very important concept of K-S entropy in Ergodic Theory. Given a measure preserving system (X, X , µ, T), we say α = {A i : i ∈ I} is a partition of X if X = i∈I A i , where A i ∈ X for each i ∈ I and A i ∩ A j = ∅ for i = j, i, j ∈ I. Here, I is a finite or countable index set. For a partition α of X, we define the entropy of the partition α as In this definition, T does not appear. However, the entropy of the dynamical system is defined by the entropy of the transformation T as follows.
Given a partition α, we consider the partition Then, the entropy of transformation T with respect to α is given by The entropy of T is defined as In general, it does not seem possible to calculate the entropy straight from its definition. First, let us define that a partition α of X is a generator with respect to a non-invertible transformation T if σ ∞ i=0 T −i α = X up to sets of µ-measure zero.
In computation of h(T), the K-S Theorem is very useful. For completeness, we recall this theorem. Let α be a partition of X such that H(α) < ∞. If α is a generator with respect to T, then h(T) = h(α, T).
We also have the following classical Shannon-McMillan-Breiman theorem [8]. Let (X, X , µ, T) be an ergodic measure preserving system and let α be a finite or countable partition of X satisfying H(α) < ∞. The Shannon-McMillan-Breiman theorem says,if A n (x) denotes the unique element A n ∈ α n such that x ∈ A n , then for almost every x ∈ X we have: lim In 1964, Rohlin [9] showed that, when Rényi's condition is satisfied, the entropy of a µ-measure preserving operator T : X → X is given by the formula: The Rény's condition means that there is a constant C ≥ 1 such that where u n := T n | α n −1 .

Lochs' Theorem
Expansions that furnish increasingly good approximations to real numbers are usually related to dynamical systems. In 1964, Lochs [10] compared the decimal expansion and the regular continued fraction (RCF) expansion. Although comparing dynamical systems seems difficult, using detailed knowledge of the continued fraction operator, Lochs was able to relate the relative speed of approximation of decimal and regular continued fraction expansions (almost everywhere) to the quotient of the entropies of their dynamical systems. Thus, roughly 97 RCF digits are determined by 100 decimal digits, which indicates that the RCF expansion is slightly more efficient compared to the decimal expansion at representing irrational numbers.

Decimal Expansions
It is a common known fact that any real number x ∈ [0, 1) can be written as where d i = d i (x) ∈ {0, 1, 2, . . . , 9} for i ∈ N + := {1, 2, 3, . . .}. The representation of x in (9), denoted by x = 0.d 1 d 2 . . ., is called the decimal expansion of x. We can generate the decimal expansions by iterating the decimal map where · denotes the floor (or entire) function. In other words, T d is given by Thus, we obtain: where and Since

Regular Continued Fraction Expansions
Beside decimal expansions, there are many other possible representations of real numbers in terms of a sequence of integers. We refer to the regular continued fractions as another famous example. Any irrational number x ∈ [0, 1) has a unique regular continued fraction expansion where a n ∈ N + for any n ≥ 1. This expansion is obtained by applying repeatedly the Gauss map or the regular continued fraction transformation Therefore, it follows that the digits a 1 , a 2 , . . . are related by a n = a n ( where If we denote by [a 1 , a 2 , . . .] G the expansion in (16), we have [a 1 , a 2 , . . . , a n ] G → x as n → ∞.

Comparing the Efficiency of Decimal Expansion and RCF Expansion
In [10], Lochs answered the question which of these developments is more efficient, namely which of the two sequences in (15) and (20) converges more quickly to x as n → ∞.
Suppose that the irrational number x ∈ (0, 1) has the decimal expansion x = 0.d 1 d 2 . . . and the RCF expansion x = [a 1 , a 2 , . . .] G . Let y = 0.d 1 d 2 . . . d n be the rational number determined by the first n decimal digits of x, and let z = y + 10 −n . Then, [y, z] is the nth-order decimal cylinder containing x, which we also denote by C n (x). Now, let y = [b 1 , . . . , b l ] G and z = [c 1 , c 2 , . . . , c k ] G be the RCF expansions of y and z. Let In other words, m(n, x) is the largest integer such that C n (x) ⊂ D m(n,x) (x), where D j (x) denotes the jth-order RCF cylinder containing x. Lochs [10] proved that, for almost every irrational x ∈ (0, 1), we have lim n→∞ m(n, x) n = 6 log 2 log 10 For example, Lochs [11] computed the first 968 RCF digits of π from its first 1000 decimals, and Brent and McMillan [12] computed the first 29,200 RCF digits of Euler-Mascheroni constant from its first 30,100 decimals.

Extended Lochs' Theorem
Dajani and Fieldsteel [13] proved a generalization of Lochs' theorem showing that we can compare any two expansions of numbers which are generated by number-theoretic fibered maps, i.e., surjective interval maps S : [0, 1) → [0, 1) that satisfy the following conditions: (1) There exists a finite or countable partition of [0, 1) into intervals such that S restricted to each interval is strictly monotonic and continuous. Consider NTFMs S 1 and S 2 on [0, 1) with invariant measures µ 1 and µ 2 (equivalent to Lebesgue measure) and with partitions P and Q, respectively. Denote by P n (x) the nth-order cylinder that contains x ∈ [0, 1) (a similar definition for Q n (x)). Let Under the conditions just stated and with the understanding that m S 1 ,S 2 (n, x) is exactly the number of digits in the S 2 -expansion of x that can be determined from knowing the first n digits in the S 1 -expansion, we have where h(S 1 ) and h(S 2 ) denote the entropy of S 1 and S 2 , respectively, with h(S 1 ) > 0 and h(S 2 ) > 0.

Other Continued Fraction Expansions
Apart from the RCF expansions, there is a wide variety of continued fraction expansions. Here, we mention only a few of the expansions studied from the metrical point of view by the authors over time, namely Chan's continued fractions [14,15], θ−expansions [16,17], N-continued fraction expansions [18,19], and Rényi-type continued fraction expansions [20][21][22].
In this paper, we ask the question which of these expansions is more effective. To apply the result of Dajani and Fieldsteel [13] in Section 2.4, we briefly present these expansions, calculating the entropy of each map that generates these expansions.

Chan's Continued Fractions
Fix an integer ≥ 2. Then, any x ∈ [0, 1) can be written in the form where a n (x)s are non-negative integers. Define . . , a n (x)] the n-convergent of x by truncating the expansion on the right-hand side of (25), that is, This continued fraction is associated with the following transformation T on [0, 1]: We notice that T maps the set of irrationals in [0, 1] into itself. For any x ∈ (0, 1), put a n = a n (x) = a 1 T n−1 (x) , n ∈ N + , with T 0 (x) = x and The transformation T which generates the continued fraction expansion (25) is ergodic with respect to an invariant probability measure, G , where with and B [0,1] is the σ-algebra of Borel subsets of [0, 1]. An n-block (a 1 , a 2 , . . . , a n ) is said to be admissible for the expansion in (25) if there exists x ∈ [0, 1) such that a i (x) = a i for all 1 ≤ i ≤ n. If (a 1 , a 2 , . . . , a n ) is an admissible sequence, we call the set I (a 1 , a 2 , . . . , a n ) = {x ∈ [0, 1] : a 1 (x) = a 1 , a 2 (x) = a 2 , . . . , a n (x) = a n }, the nth-order cylinder. Define (u ,i ) i∈N by We observe that u ,a 1 a 2 ...a n = T n I (a 1 ,a 2 ,...,a n ) −1 . Therefore, I (a 1 , a 2 , . . . , a n ) = {u ,a 1 ...a n (t) : t ∈ [0, 1)} which is an interval with the endpoints Before applying Rohlin's formula, we must check Rényi condition (8). We use directly, without mentioning them here, some properties proved in [14]. Thus, we have u ,a 1 ...a n (t) u ,a 1 ...a n (r) = q ,n + r( − 1) a n q ,n−1 q ,n + t( − 1) a n q ,n−1 2 ≤ q ,n + ( − 1) a n q ,n−1 q ,n 2 ≤ 2 . (36) Applying Rohlin's formula (7), we obtain: As examples, we have the values of h(T ) for different values of and the graph of h(T ) in Table 1 and Figure 1, respectively.
We now check Rényi condition (8). We use directly, without mentioning them here, some properties proved in [16]. Thus, we have We compute the entropy h(T θ ) by the Rohlin's formula (7): As examples, we have the values of h(T θ ) for different values of s = 1/θ 2 and the graph of h(T θ ) in Table 1 and Figure 1, respectively.

N-Continued Fraction Expansions
Fix an integer N ≥ 1. The measure-theoretical dynamical system ([0, 1], B [0,1] , T N , G N ) is defined as follows: and The probability measure G N is T N -invariant, and the dynamical system For any 0 < x < 1, put ε 1 (x) = N/x and ε n (x) = ε 1 T n−1 N (x) , n ∈ N + , with T 0 N (x) = x. Then, every irrational 0 < x < 1 can be written in the form where ε n s are non-negative integers, ε n ≥ N, n ∈ N + . We call (49) the N-continued fraction expansion of x and p N, An n-block (ε 1 , ε 2 , . . . , ε n ) is said to be admissible for the expansion in (49) if there exists x ∈ [0, 1) such that ε i (x) = ε i for all 1 ≤ i ≤ n. If (ε 1 , ε 2 , . . . , ε n ) is an admissible sequence, we call the set the nth-order cylinder.
We observe that u N,ε 1 ε 2 ...ε n = T n N I N (ε 1 ,ε 2 ,...,ε n ) −1 . Therefore, which is an interval with the endpoints We now check Rényi condition (8). We use directly, without mentioning them here, some properties proved in [19]. Thus, we have Using Rohlin's entropy formula (7), we have: where Li 2 denotes the dilogarithm function, defined by As examples, we have the values of h(T N ) for different values of N and the graph of h(T N ) in Table 1 and Figure 1, respectively.

Rényi-Type Continued Fraction Expansions
Fix an integer N ≥ 2. Let the Rényi-type continued fraction transformation R N : [0, 1] → [0, 1] be given by For any irrational x ∈ [0, 1], R N generates a new continued fraction expansion of x of the form Here, r n s are non-negative integers greater than or equal to N defined by and with R 0 N (x) = x. The sequence of rationals {p R,n /q R,n } := [r 1 , r 2 , . . . , r n ] R , n ∈ N + are the convergents to x in [0, 1].
The dynamical system [0, 1], B [0,1] , R N , ρ N is measure preserving and ergodic, where the probability measure ρ N is defined by An n-block (r 1 , r 2 , . . . , r n ) is said to be admissible for the expansion in (58) if there exists x ∈ [0, 1) such that r i (x) = r i for all 1 ≤ i ≤ n. If (r 1 , r 2 , . . . , r n ) is an admissible sequence, we call the set the nth-order cylinder.
We observe that u R,r 1 r 2 ...r n = R n N I R (r 1 ,r 2 ,...,r n ) −1 . Therefore, which is the interval p R,n −p R,n−1 q R,n −q R,n−1 , p R,n q R,n . Such intervals form a partition of [0, 1]. Before applying Rohlin's formula, we must check Rényi condition (8). We use directly, without mentioning them here, some properties proved in [20]. Thus, we have u R,r 1 ...r n (t) u R,r 1 ...r n (r) The entropy h(R N ) is given by where Li 2 is as in (56). As examples, we have the values of h(R N ) for different values of N and the graph of h(R N ) in Table 1 and Figure 1, respectively.

Comparing the Efficiency of Some Expansions
In this section, we apply the Extended Lochs' theorem presented in Section 2.4 and compare two by two the expansions presented in the previous section. First, we observe that, for various values of the parameters involved, the entropies h(T θ ) and h(T N ) are equal. Since entropy is an isomorphism invariant, we conjecture the following result.
For this reason, we make only the following pairs: N-continued fractions and Chan's continued fractions, N-continued fractions and Rényi-type continued fractions, and Rényitype continued fractions and Chan's continued fractions.
We observe that the transformations T N , T and R N satisfy the two conditions from Extended Lochs' theorem (see Section 2.4).

N-Continued Fractions and Chan's Continued Fractions
Let I x N (ε 1 , ε 2 , . . . , ε n ) denote the nth-order cylinder of the N-continued fraction that contains x and I x (a 1 , a 2 , . . . , a m ) denote the mth-order cylinder of the Chan's continued fraction that contains x. Then, m N (n, x) := sup{m : I x N (ε 1 , ε 2 , . . . , ε n ) ⊂ I x (a 1 , a 2 , . . . , a m )} represents the number of digits in the Chan's expansion of x in (25) that can be determined from knowing the first n digits in the N-continued fraction in (49). Therefore, applying (24), we have where h(T N ) and h(T ) are as in (55) Thus, roughly, if we approximate a number from the unit interval by keeping the first 1000 digits of the N-continued fraction expansion, to retain the same degree of accuracy, we need to keep about 1462 digits in the Chan's continued fraction expansion.

N-Continued Fractions and Rényi-Type Continued Fractions
Let I x N (ε 1 , ε 2 , . . . , ε n ) denote the nth-order cylinder of the N-continued fraction that contains x and I x R (r 1 , r 2 , . . . , r m ) denote the mth-order cylinder of the Rényi-type continued fraction that contains x. Then, m NR (n, x) := sup{m : I x N (ε 1 , ε 2 , . . . , ε n ) ⊂ I x R (r 1 , r 2 , . . . , r m )} represents the number of digits in the Rényi-type continued fraction of x in (58) that can be determined from knowing the first n digits in the N-continued fraction in (49). Therefore, applying (24), we have where h(T N ) and h(R N ) are as in (55) and (67), respectively. Given the values in Table 1, we observe that N-continued fraction expansion is more effective than Rényi-type continued fraction expansion regardless of the values taken by the parameter N.
As N grows, the entropies are very close, which means that the efficiency of the two continued fraction expansions are about the same.

Rényi-Type Continued Fractions and Chan's Continued Fractions
Let I x R (r 1 , r 2 , . . . , r n ) denote the nth-order cylinder of the Rényi-type continued fraction that contains x and I x (a 1 , a 2 , . . . , a m ) denote the mth-order cylinder of the Chan's continued fraction that contains x. Then, m R (n, x) := sup{m : I x R (r 1 , r 2 , . . . , r n ) ⊂ I x (a 1 , a 2 , . . . , a m )} represents the number of digits in the Chan's continued fraction of x in (25) that can be determined from knowing the first n digits in the Rényi-type continued fraction in (58). Therefore, applying (24), we have where h(R N ) and h(T ) are as in (67) and (37), respectively. Given the values in Table 1, we observe that Rényi-type continued fraction expansion is more effective than Chan's continued fraction expansion regardless of the values taken by the parameters N and , respectively. As examples, we have,

Final Remarks
N-continued fractions are more efficient than Rényi-type continued fractions at representing a number in the unit interval. Since the entropies are h(T N ) ≥ 2.37314 for N ≥ 1, h(R N ) ≥ 2.37314 for N ≥ 2 and h(T G ) = π 2 /(6 log 2) = 2.37314, it follows that N-continued fractions and Rényi-type continued fractions are more efficient than regular continued fractions (RCFs). Since the entropy is h(T ) ≤ 1.62258 for ≥ 2, it follows that RCFs are more efficient than Chan's continued fractions. Thus, N-continued fractions are the most efficient at representing a number in the unit interval, with a very close efficiency being Rényi-type continued fractions.
Our paper is a systematic presentation of continued fraction expansions that have been investigated by us during the last ten years. Having always in view the classical RCF expansion, we consider some interval maps that generate expansions and that admit an invariant density with suitable ergodic properties. However, these ergodic properties, recently studied, are not enough to yield rates of convergence for mixing properties. For this a Gauss-Kuzmin-type theorem is needed. There are still many open questions closely related to this problem. On the other hand, to extend our references list [14][15][16][17][18][19][20][21][22], we consider the opportunity of starting new investigations such as the efficiency of pairs of maps for which the generating partition has finite entropy. In these circumstances, we review sufficient conditions on the latter to belong to a class of number-theoretic fibered maps for which the generating partition has finite entropy.
Author Contributions: All authors contributed equally on writing this paper. All authors have read and agreed to the published version of the manuscript.