Научная статья на тему 'О цепных дробях с рациональными неполными частными'

О цепных дробях с рациональными неполными частными Текст научной статьи по специальности «Математика»

CC BY
2
1
i Надоели баннеры? Вы всегда можете отключить рекламу.
Журнал
Чебышевский сборник
Scopus
ВАК
RSCI
Область наук
Ключевые слова
цепные дроби / континуант / наибольший общий делитель / Диофантовы приближения. / continued fraction / continuant / greatest common divisor / Diophantine approximation.

Аннотация научной статьи по математике, автор научной работы — Д А. Долгов

Алгоритм Соренсона с левым сдвигом – один из быстрых алгоритмов вычисения наибольшего общего делителя двух натуральных чисел. В начале его работы фиксируется натуральное число 𝑘 > 2, которое является параметром. На каждом шаге алгоритма выполняется поиск линейной комбинации входных чисел текущего шага, причем наименьшее из них предварительно домножается на параметр 𝑘, пока не начнет превосходить наибольшего. После этого наибольшее число замещается абсолютным значением линейной комбинации. Результатом работы алгоритма является наибольший общий делитель исходных чисел, умноженный на некоторое число, называемое побочным множителем. Для алгоритма Соренсона была доказана оценка числа шагов в худшем случае, приведен пример. Фиксация некоторой бесконечной последовательности 𝐾 натуральных чисел больших двух позволяет получить обобщенный алгоритм Соренсона. В нем на каждом шаге вместо числа 𝑘 будет задействовано определенное значение параметра 𝑘𝑖 ∈ 𝐾, соответствующее текущему шагу алгоритма. В остальном алгоритмы полностью совпадают друг с другом. Цепные дроби с рациональными неполными частными c левым сдвигом возникают в ходе применения к отношению натуральных чисел 𝑎, 𝑏 обобщенного 𝑘-арного алгоритма Соренсона с левым сдвигом. С ними связаны особые формы континуантов, то есть многочленов, при помощи которых выражаются числитель и знаменатель подходящей дроби. Для таких континуантов найдены формулы, позволяющие представить континуант 𝑛-го порядка в виде некоторой комбинации континуантов меньших порядков. Были найдены условия при которых последовательность континуантов увеличивающегося порядка является строго возрастающей. Также были найдены условия, при которых приближения рациональных чисел, выполненные при помощи цепных дробей с рациональными неполными частными, можно однозначно сравнивать.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

On the continued fraction with rational partial quotients

The Sorenson left shift 𝑘-ary gcd algorithm is one of the fastest greatest common divisor algorithms of two natural numbers. At the beginning a natural number 𝑘 > 2 is fixed, which is a parameter of algorithm. At each step we multiply smaller of two input numbers of current step, until it does not become greater of the second number. Then we calculate linear combination between this number and the bigger of two input numbers. After that we replace the bigger of two input numbers by absolute value of the linear combination. At the end of the algorithm we obtain greatest common divisor of the two original numbers, which has been multiplied by some natural number. Spurious factor has appeared in the answer. We have proven estimation of the worst case of steps and obtained example of this case. Fixation of some endless sequence 𝐾 of natural numbers (each value is greater than 2) allows us to obtain the generalized Sorenson left shift 𝑘-ary gcd algorithm. There at 𝑖-th step the value of 𝑘𝑖 ∈ 𝐾 is used instead of fixed parameter 𝑘. Both algorithms are completely coincide except this moment. Continued fractions with rational partial quotients with left shift arise at applying of the generalized Sorenson left shift 𝑘-ary gcd algorithm to the ratio of two natural numbers 𝑎 and 𝑏. We can bind these continued fractions and polynomials of the special form, which called continuants. Numerator and denominator of such continued fractions can be expressed by continuants. Formulas have been found that allow us to express continuants of the 𝑛-th order as some combination of continuants of a smaller order. Conditions were found at which a sequence of continuants of increasing order is strictly increasing. We also found conditions that allow unambiguous comparison of convergents of rational numbers that had performed by using continued fractions with rational partial quotients

Текст научной работы на тему «О цепных дробях с рациональными неполными частными»

ЧЕБЫШЕВСКИИ СБОРНИК

Том 25. Выпуск 2.

УДК 511.41

DOI 10.22405/2226-8383-2024-25-2-43-66

О цепных дробях с рациональными неполными частными1

Д. А. Долгов

Долгов Дмитрий Александрович — Институт вычислительной математики и информационных технологий, Казанский (Приволжский) федеральный университет (г. Казань). e-mail: Dolgov.kfu@gmail.com

Алгоритм Соренсона с левым сдвигом - один из быстрых алгоритмов вычисения наибольшего общего делителя двух натуральных чисел. В начале его работы фиксируется натуральное число к > 2, которое является параметром. На каждом шаге алгоритма выполняется поиск линейной комбинации входных чисел текущего шага, причем наименьшее из них предварительно домножается на параметр к, пока не начнет превосходить наибольшего. После этого наибольшее число замещается абсолютным значением линейной комбинации. Результатом работы алгоритма является наибольший общий делитель исходных чисел, умноженный на некоторое число, называемое побочным множителем. Для алгоритма Соренсона была доказана оценка числа шагов в худшем случае, приведен пример. Фиксация некоторой бесконечной последовательности К натуральных чисел больших двух позволяет получить обобщенный алгоритм Соренсона. В нем на каждом шаге вместо числа к будет задействовано определенное значение параметра к^ € К, соответствующее текущему шагу алгоритма. В остальном алгоритмы полностью совпадают друг с другом.

Цепные дроби с рациональными неполными частными с левым сдвигом возникают в ходе применения к отношению натуральных чисел а, Ь обобщенного ^-арного алгоритма Соренсона с левым сдвигом. С ними связаны особые формы континуантов, то есть многочленов, при помощи которых выражаются числитель и знаменатель подходящей дроби. Для таких континуантов найдены формулы, позволяющие представить континуант п-го порядка в виде некоторой комбинации континуантов меньших порядков. Были найдены условия при которых последовательность континуантов увеличивающегося порядка является строго возрастающей. Также были найдены условия, при которых приближения рациональных чисел, выполненные при помощи цепных дробей с рациональными неполными частными, можно однозначно сравнивать.

Ключевые слова: цепные дроби, континуант, наибольший общий делитель, Диофантовы приближения.

Библиография: 17 названий. Для цитирования:

Д. А. Долгов. О цепных дробях с рациональными неполными частными // Чебышевский сборник, 2024, т. 25, вып. 2, с. 43-66.

Аннотация

1 Работа выполнена за счет средств Программы стратегического академического лидерства Казанского (Приволжского) федерального университета («ПРИОРИТЕТ-2030»).

CHEBYSHEVSKII SBORNIK Vol. 25. No. 2.

UDC 511.41 DOI 10.22405/2226-8383-2024-25-2-43-66

On the continued fraction with rational partial quotients2

D. A. Dolgov

Dolgov Dmitry Alexandrovich — Institute of Computational Mathematics and Information Technologies, Kazan (Volga Region) Federal University (Kazan). e-mail: Dolgov.kfu@gmail.com

Abstract

The Sorenson left shift k-ary gcd algorithm is one of the fastest greatest common divisor algorithms of two natural numbers. At the beginning a natural number k > 2 is fixed, which is a parameter of algorithm. At each step we multiply smaller of two input numbers of current step, until it does not become greater of the second number. Then we calculate linear combination between this number and the bigger of two input numbers. After that we replace the bigger of two input numbers by absolute value of the linear combination. At the end of the algorithm we obtain greatest common divisor of the two original numbers, which has been multiplied by some natural number. Spurious factor has appeared in the answer. We have proven estimation of the worst case of steps and obtained example of this case. Fixation of some endless sequence K of natural numbers (each value is greater than 2) allows us to obtain the generalized Sorenson left shift fc-ary gcd algorithm. There at i-th step the value of ki G K is used instead of fixed parameter k. Both algorithms are completely coincide except this moment.

Continued fractions with rational partial quotients with left shift arise at applying of the generalized Sorenson left shift fc-ary gcd algorithm to the ratio of two natural numbers a and b. We can bind these continued fractions and polynomials of the special form, which called continuants. Numerator and denominator of such continued fractions can be expressed by-continuants. Formulas have been found that allow us to express continuants of the n-th order as some combination of continuants of a smaller order. Conditions were found at which a sequence of continuants of increasing order is strictly increasing. We also found conditions that allow unambiguous comparison of convergents of rational numbers that had performed by using continued fractions with rational partial quotients.

Keywords: continued fraction, continuant, greatest common divisor, Diophantine approximation.

Bibliography: 17 titles. For citation:

D. A. Dolgov, 2024. "On the continued fraction with rational partial quotients" , Chebyshevskii sbornik, vol. 25, no. 2, pp. 43-66.

1. Introduction

The Euclidean algorithm is one of the most famous algorithms for calculating the greatest common divisor (gcd) of two natural numbers 3 a, b (here and further a > b > 1). At each step

2This paper has been supported by the Kazan Federal University Strategic Academic Leadership Program ("PRIORITY-2030").

3Natural numbers are the non-negative integers without zero.

input number a is replied by input number fe, input number b is replaced by smallest non-negative remainder r from division of a by b:

a = bt + r, t = [a/b\, 0 ^ r <t.

The algorithm runs until the second argument vanishes. Then first argument is equals to gcd(a, b). The classical Euclidean algorithm corresponds to the expansion of the number a/b into a (regular) continued fraction

a

т = to + b

1

ti +

1

1

+ s

of the length h = h(a/b), where t0 is integer, and the numbers t\, ■ ■ ■, th are natural, ti ^ 2, i ^ 1. The integers t0, ti, ..., th are called partial quotients. Note that continued fractions are related to many other mathematical objects (refer to fl], [2]).

In addition to the Euclidean algorithm, there are other algorithms that calculate gcd of two natural numbers. Among them, it is worth noting fc-arv algorithms first introduced by Sorenson: the right-shift algorithm and the left-shift algorithm (refer to [3]). They quickly calculate the gcd, which is used in various mathematical algorithms (refer to [4, 5, 6]). Modification of the first algorithm allows us to increase its performance (refer to [7, 8]), calculate multiplicativelv inverse elements in the ring of integers modulo a number (refer to [9]), and also allows to get rid of spurious factors that arise during execution of algorithm (refer to [10]).

In what follows we will need the Sorenson fc-arv left-shift gcd algorithm. Here is its description. Let us fix some integer k > 2 and set a0 = a, b0 = b. At each step of this algorithm a pair of input numbers (ai,bi) is replaced by new pair (ai+i, bi+i) by the next rule. First we find the integer e^ from the following relation:

Ci ^ ai < kci,

where Ci = bikei. ^rther integers Xi and yi are selected that satisfy the conditions

for which the inequality holds

Ci Xi

ai yi

After that we select a new pair of numbers

gcd(xi,yi) = 1, 0 <yi ^ к, 1

<

Уг (к + 1)'

(1)

(2) (3)

(ai+i,bi+i) = (bi, \yiCi - Xiai\) ,if i ^ 0, (4)

or

(ai+i,bi+i) = (bi+i,ai+i) ,if bi+i > ai+i. (5)

We will assume that the number Xi belongs to the interval (0, k] because all other cases of choosing this number do not satisfy inequality (3). The choice of numbers Xi, yi is carried out by enumerating possible variants and checking the feasibility of this inequality. The existence of such numbers is guaranteed by Dirichlet's lemma on Diophantine approximations (refer to [11, chapter X lemma 2]).

The algorithm terminates when one of the arguments a^ bi vanishes: in this case, the second argument becomes the answer. However, during algorithm execution at the ¿-th step a "spurious"

Algorithm 1 Main loop of the left-shift fc-arv gcd if a < b then swap(a, b) end if

while b = 0 do

compute c = keb such that c ^ a < ck find x,y ^ k such that c/a & x/y a = lyc — xal if a < b then

factor ai = gcd(bi,Xi) may appear, therefore, the result of the Sorenson algorithm will be a certain number that differs from the gcd(a, b) by the factor Y\.'i=1 ai- In Sorenson's paper, this factor was removed using a special phase of the algorithm, performed after the main loop, called "trivial division". It consists of searching through possible divisors of the answer among all prime numbers from 2 to k and then removing them. This phase was also performed at the beginning of the algorithm in order to find small common divisors of the input numbers. Subsequently, they were stored as a product by which each input number a0, b0 was divided. At the end, the saved product was added to the answer obtained as a result of running the "trivial division" phase again. This made it possible to save small common divisors of the input numbers because they could have been deleted regardless of the presence of a spurious factor. Here, usage of this phase of the algorithm is omitted, as well as precomputation of some numbers, which is used during the performing algorithm.

Instead of the precomputation phase, you can take the answer an obtained during the main loop in n steps and find gcd using the following scheme (this idea was proposed in modification of the Sorenson right shift fc-arv gcd algorithm (refer to [12])):

besides these two gcd calculation are performed using algorithms, in which there are no any spurious factors. For example, it is Euclidean algorithm or binary algorithm (refer to [13]).

Below is an example of how the algorithm works. Let us fix parameter fc to 7, input numbers a0 and b0 equals to 4415 and 60, respectively. At the zero step, first we find the value of e0. It equals to 2. After that we select the values of the numbers x0, y0, so that inequality (3) is performed. Let us set them to 2 and 3, respectively. Further, we calculate a new pair of numbers a^ b1 according to rules (4), (5). It equals to (60,10) ft is easy to see that the gcd(a1, b1) is equals to 10, although gcd of the input numbers a0 and bo is equals to 5. Result does not match, due to the fact that at this step of the algorithm a spurious factor gcd(b0,x0) equals to 2 is appeared. The next step also begins with searching value of e^. ft equals to 0. The numbers x1 = 1, y1 =6 satisfy inequality (3). At the end of this step search for a new pair of numbers (a2, b2) is performed again. Value of b2 is equals to 0, so the number a2, which equals to 10, will be the answer after division by the spurious factor, which equals to 2.

Sorenson showed that for pairs of numbers (a, b), that are chosen according to the rules

swap(a, b)

end if end while

gcd(gcd(ao ),bo),

m

the number of steps is equal torn + 1, and for the nu mber m the next estimate will be fair

m, = Q(log(ab)/log(fc)).

(7)

Estimate (7) has been proven only for numbers of type (6). Subsequently, for two numbers having n binary digits, Sorenson proved the asymptotic of the number of steps in the worst case equal to &(n/ log(fc))v using estimate (7). No worst-case examples of the algorithm work were given. Also, the question of the constant in the estimate bounded from above remained open until now. In paragraph 4, we give an example of the worst case of the algorithm, and prove the following result:

Theorem 1. For arbitrary integers a ^ b > 1 the main loop of the Sorenson left-shift k-ary algorithm calculates gcd in no more than |_log(a)/log(fc)J + [log(6)/ log(fc)J + 1 steps.

Using the Sorenson right-shift fc-arv gcd algorithm, we can obtain continued fractions with rational partial quotients with right shift. For brevity, we call such fractions as continued fractions of the first kind. There are two main types of such fractions: continued fractions of the first type

УоЪ XqPO

+

ко

f УгХоРоЪ 7о xi/3i

+

ki

V

+

kn-1

Уп

П

0^i<n, i=n (mod 2)

Xiftj

П

O^t^n, t=n (mod 2)

It

\

П

O^j^n, j=n (mod 2)

Xj fi

П

0^m<n, m=n (mod 2)

7m

//

and continued fractions of the second type

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Уо7о хоРо

+

коЪ

хоРо

V

У ill

Xifil

+

kiii

kn—l^ln—lXn fin

V

•• +

1-lfin-iynlnJ J

The numerators and denominators of such fractions can be expressed using polynomials of a special kind called continuants. Previously, the properties of extreme values of such continuants with restrictions on the variables were studied, and a construction similar to the triangle of Fibonacci polynomials was obtained (refer to [14]).

This paper is introduced a generalized Sorenson left-shift fc-arv gcd algorithm, finite continued fractions with rational partial quotients with left shift and corresponding continuants. We have obtained formulas expansion of continuants. We give conditions, under which it is possible to construct strictly increasing sequences of continuants, convergents of rational numbers. Also in this paper, we present an accurate estimate of the number of steps of the Sorenson left-shift fc-arv gcd algorithm in the worst case.

x

2. The Generalized Sorenson algorithm

Consider the following generalized Sorenson algorithm. Instead of the number k, some infinite sequence of numbers K = [ki}°=0 is fixed, consisting of natural numbers ki ^ 2. At the next step of the algorithm, a pair of numbers (ai+\,bi+\) is constructed using formulas that are obtained from (1) - (5) by replacing k to ki. If we multiply each half of inequality (3) by the number yi, come to the one denominator on the left side, and then flip each parts of the inequality, then we

get expression a^/|yici — Xiail ^ (ki + 1). This fact ensures convergence of the generalized Sorenson algorithm to the solution.

Let k = min(ki) ki £ K. Then the number of steps of the generalized Sorenson algorithm does not exceed the magnitude |_log(a)/ log(k)J + [log(6)/ log(k)J + 1. The author suggests that this estimate, made by analogy with theorem 1, can be improved.

3. Finite continued fractions with rational partial quotients

a/

continued fraction with rational partial quotients with a left shift 4, which for brevity we will call continued fraction of the second kind. Denote by gi the four numbers (yi, Xi, ki, ei). The number yo is integer, and Xo, x^ yi are non-zero integers when i is greater than one.

a/

second kind. For brevity, we will call them expansions of the third and fourth types. The third type continued fraction has the following form

^koe° + Xo

o

( Xoj/l,

Xi

V

kiei +

l

= bo; gi..^ gn]3

(8)

ynkn

+

n <

i<n, i=n (mod 2)

V

> n

j<n, j=n (mod 2)

where the value Si = Si(ai, a,xi, yi) is defined as

i=

{—1 •

— 1, liciVi — Xiai ^ 0. if Ciyi — Xiai < 0.

(9)

Theorem 2. Let the finite sequences of numbers {xi}rn=o, {^i}n=o have been obtained by applying

a

K

ai > bi > ly^i — Xiail,

a/

(10)

The proof of the theorem and all following results are given in a separate section. If continued fractions have been contained a large number of elements, and besides that each element needs to be shown, then it is not always convenient to represent such fractions with formula (8). In such cases it is convenient to use an alternative notation of the continued fraction, so that the sum of the elements will be written in a line:

yoko

eo

Xo

- +

o

i

2

Xoyiki

ei

Xi

+

Xiy2k2 62 + XoX2y^k3 63 +

X2 Xo

X3Xi

4The left shift in the name is a reference to the Sorenson left-shift fc-ary gcd algorithm, which is used when decomposing the number a/b. If we select fc = 2s, then multiplication by fc is the same as performing a bitwise left shift operation by s positions (refer to [15]). This analogy is reflected in the name of the algorithm.

e

X

The fourth type continued fraction has the following form n-1 Vikiei i-1 S- xn n-1 6i

X. + TTTT^ IIX = 91,..., 9n}4 , (ii)

. „ Xl . „ X J ynkn „ X%

t=0 j=0J t=0

where the value Si is defined as in theorem 2.

Theorem 3. Let the finite sequences of numbers {Xi}™=0, {yi}i=0 have been obtained by applying the generalized Sorenson left-shift k-ary gcd algorithm for the input numbers a, b and a pre-fixed infinite sequence K of natural numbers greater than two. If the following inequalities are true for each j under the condition 0 ^ j ^ n — 1

bi < 1 yjcj — Xiai1 <a, (12)

and for j equal to n, conditions (10) are satisfied, then the number a/b can be represented as a fourth type continued fraction.

The indices "3" and "4" after the square brackets to the right of the continued fraction in theorems 2, 3 mean the third and fourth types of expansion into continued fractions of the second

n

fraction formula (10) will be fulfilled instead of conditions (12).

The fourth type continued fraction has another form of notation:

^k^« + Xo

So

Xo

(13)

frn

Xi

—kiei +

i

Xi

V

(i I 1 ke"-i

У n-ikn-i

Xn— i

+

Sn- i

Xn—iynkn

V V Xn ) ) )

previous steps of the algorithm, then we can obtain the following:

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Угкг

Xi

■ +

Si

У iki i"1 Si1 yiCi — Xidi\

^\yiCi - Xidil

Xi

+

Xi

(14)

The right part is obtained by opening the brackets in the left part and writing all the values in a line. Then, continued fraction (13) can be represented as (11). Here and further we will use continued fraction (11) as more compact.

n

n a/

fourth type continued fraction and at least one more step is required, on which condition (10) must be satisfied, then in this case we will assume that we are dealing with a combination of fractions of the fourth and third types.

Expansion into continued fractions of the third and fourth types is ambiguous. This is due to the fact that at each step of the algorithm there can be several pairs of numbers (x, y) that satisfy inequality (3). For example, the inequality |8/13 — x/y| < 1/(4y) is satisfied by pairs (1, 2) (2, 3).

n

X

Example 1. Consider an example of expansion into a third type continued fraction. The following table shows the calculation results:

Step № ai bi \yiC-i ki ei Xi yi Si

0 1117 505 107 3 0 1 2 1

1 505 107 30 5 0 1 5 -1

2 107 30 17 3 1 1 1 1

3 30 17 5 5 0 3 5 1

4 17 5 2 3 1 1 1 1

5 5 2 0 7 0 2 5 -1

Using this table and formula (8), we can get at a fraction

1117 1

= 2 +-

505

5 -

3 +

51

77 +

31

3 +

3 I ( 5 2

(a

Example 2. Consider an example of expansion into a fourth type continued fraction. The following table shows the calculation results:

1

Step № ai bi \yi^i Xiai\ ki ei Xi Vi Si

1 291 11 54 4 2 2 3 1

2 54 11 12 3 1 1 2 -1

3 12 11 1 11 0 1 1 1

4 11 1 0 13 0 1 11 -1

Using this table and formula (11), we can get at a fraction

291 3 1 ( 1\\

-= - x 16 + - x 3 x 2 - 1 + — .

11 2 2 I I 11J J

This expansion ended at the third step, since at the fourth step b4 = 1 and a4 <k4. In general, when given a certain sequence K, the expansion into a continued fraction can end much earlier. If in this example at the second step we take the number 54 as the parameter hi, and define the pair (xi, yi) as (11, 54), then expansion into a continued fraction will be finished at the second step. This means that the ratio of the numbers 54/11 will not actually expand into any continued fraction. In this case, the last element in formula (11) will disappear and it will take the following form:

i=1 s.

E^MI

3

xi x j

i=0 1 J=0 J

Such cases of "stopping" number expansion into a continued fraction are not considered in the article.

For given integers a, b, a combination of continued fractions of type (8), (11) is observed, when conditions (10) and (12) alternate subject to condition i = j. Expansion of the number a/b into a

second kind continued fraction is not the only one, since at the next step of the algorithm there may be several pairs of numbers Xi, yi that satisfy conditions (1) - (3).

The numerator and denominator of a continued fraction of the second kind can be expressed using continuant. A continuant of the third type is defined as a determinant

{go,gl, ...,дп)з = det

fyokae0 ¿0 0 0 0 • • 0\

-x1 yiki61 Si 0 0 • • 0

det 0 —X2 У2к2е2 52 0 • • 0

(15)

i

J

\0 ••• 0 0 0 -xn ynkn

where Xi, yi, hi, ei are elements of corresponding continued fracion, and the value of bi is determined according to rule (9). In particular, (go)3 = yokoe°, (go,gi)3 = yoyikoe°kiei + 50x\. Moreover, by definition we assume ()3 = 1.

Lemma 1. Let [g0; gi,g2,..., gn}3 be the expansion of the number a/b into a third type continued fraction, with n ^ 3. Then the following formulas are true:

1. (go,...,gn )3 = ynkn n ...,gn-i)3 + Sn-iXn ...,gn-2)3;

2. (go,gi, ...,gn)3 = yokoe° (gi, ...,gn)3 + 5oxi (g2, ...,gn)3;

3. ^ ...,gn)3 = (go, ...,gj^ (gj+i, ...,gn)3 + Sjxj+i (go, ...,gj-i)3 (gj+2, ...,gn):i, where the number j satisfies the condition 1 ^ j ^ n.

Moreover, the following equality is true:

a = (go,gl,g2, ...,gn)3 à xo (gi,g2,...,gn)3 '

A continuant of the fourth type is defined as a determinant

det

/00 0 0 0 0 • •• 0 0 (-l)n+iW0 0

x1 Si 0 0 0 • •• 0 0 (-l)n+2Wi 0

0 X2 02 0 0 • •• 0 0 (-l)n+3W2 0

0 0 x3 5з 0 • •• 0 0 {-\)n+4W3 0

0 0 0 0 0 • • • àn-з 0 (-l)2n—2Wn—3 0

0 0 0 0 0 • • • Хп-2 Sn-2 (-l)2n—iWn—2 0

0 0 0 0 0 • •• 0 Хп— i Wn—i Ön—i

0 0 0 0 0 • •• 0 0 Xn Wn /

(16)

where Wi = yikiei. Again Xi, yi, ki, ei are elements of continued fraction, and the function 5i is defined according to rule (9). Continuants of the fourth type are denoted as (g0,..., gn)4- In particular, (go)4 = yoko60, (go,gi)4 = yoyikoe°kiei + 5oXU ()4 = 1.

Lemma 2. Let [go; gi,g2, ...,gn]4 be the expansion of the number a/b into a fourth type continued fraction, with n ^ 3. Then the following formulas are true:

n— 1

(go, ...,gn)A = öo(gl, ...,gn)A + (go)4(gn)^Y\ Xi

Moreover, the following equality is true:

i=1

a = (go,gi,g2, • •• дП)4 Ь (i9п)4 ПП=0 '

Due to the fact that matrix (16) is not diagonal, a continuant of the fourth type of n-th order can not be represented as a sum of products of continuants of lower orders by performing an arbitrary partition of the original continuant following the example of paragraph 3 of lemma 1.

Lemma 3. If at least one of the conditions is performed

• 5i = 1 for any 0 ^ i < n,

• Sj = —1 and yikiei — Xi > 1 for any 0 ^ i ^ n, 0 ^ j <n, (17)

• Sn-i = —1 an d ynknen — xn > 1, and for other values Si = 1, 0 ^ i <n — 1,

then for an arbitrary n the following inequalities are true:

0 < (go)s < {90,91)3 < ...(go,g\, ...,gn)z. (18)

If one of three conditions (17) is performed at expansion into the third type continued fraction, then the third type continuants, with the help of which the numerators and denominators are expressed, will strictly increase.

Example 3. Consider an example of an increasing sequence of the third type continuants. The following table shows the calculation results:

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Step № ai bt \yiC-i Xitti\ ki ei Xi yi Si Condition

0 117520 1371 173 7 2 4 7 -1 true

1 1371 173 13 2 3 1 1 -1 true

2 173 13 5 3 2 2 3 -1 true

3 13 5 0 13 0 5 13 -1 true

The following values of the continuants are obtained: (g0)3 = 73 = 343, (g0,gi)3 = 73 x 8 — 1 = = 2743, (go,g\,g2)3 = 2743x9x3—2x343 = 73375, (go,gi,g2,g3)3 = 73375x13—5x2743 = 940160. The last column in the table shows the fulfillment of inequality (3), which corresponds to the "true" value. Hence we get that (go)3 < (go,g\)3 < (go,gi,g2)3 < (go,gi,g2,g3)3-

Growth the sequence of continuants of the fourth type is equivalent to fulfillment several inequalities, as indicated by the following

Lemma 4. If at least one of conditions (17) is satisfied for zero- and first-order continuants, if (g0,gi,g2)4 > (g0,gi)4, S-1 = 1, and also for all 2 < i ^ n the following inequality holds

i-1 i-1

5o5i ■■■ Si-2((g%-i ,9i ,gi+i )i — (gi-i,gi)4) > ((g^i — Xi(gi+i)A5j-iyjkje^ ^, (19)

j=0 z=j+i

then for an arbitrary n the following inequalities are true:

0 < (go)i < (go,gi)i < ...(go,gi, ...,gn)i. (20)

Example 4. Consider an example of an increasing sequence of the fourth type continuants. The following table shows the calculation results:

Step № ai bt \yiC-i Xiai\ ki ei Xi yi Si Condition

0 518 11 221 3 2 1 3 1 false

1 221 11 112 6 1 2 5 1 false

2 112 11 2 5 1 1 2 1 true

3 11 2 0 11 0 2 11 -1 true

Using this table, we will find the corresponding values of the continuants. So, we get the following values: (go)i = 27, (go,gi)i = 3x9x5x6+2 = 812, (go,gi,g2)i = (5x6x2x5+1)+3x32x2x2x5 = = 841. Now find the value of the fourth-order continuant. So, we get the following values: (g2,g3)4 = = 2x5x11+2 = 112, (gi, g2,gs)i = 112+5x 6x11 = 442, (go, gi, g2,gs)i = 442+3x32 x2x 11 = 1036. We get that (go)i < (go,gi)i < (go,gi,g2)i < (go,gi,g2,ga)i-

In example 4 condition (3) is not always taken into account. This means that a pair of numbers (xi, yi) may be not the best approximation to the fraction bikiei/a% in the general case. The last column "Condition" indicates that this condition is fulfilled (true) or not fulfilled (false). The question of the existence of an increasing sequence of continuants of arbitrary length (n ^ 3) remains open, provided that formula (3) is fulfilled.

Definition 1. The rational numbers

Pi,(o,o) r , Pi,(o,i) r ! Pi,(o,2) r ! Pi,(o,n) r !

-= [go\i,-= [go; gik,-= [go; gi, g2\%, ■■■,-= [go; gi, ■■■, gn\%

Qi,(o,o) 1i,(o,i) Qi,(o,2) %(o,n)

P/ [ o; i , ■ ■ ■ ,

gn \j-

The first numeral in the index of convergent of the number Pi^oj)/Qi,(o,j) indicates the appropriate type of continued fraction. For example, when i = 3, we use third type continued fraction. If some part of the continued fraction is considered, for example, [gi; gi+i, ■ ■ ■ , gn]i, then the corresponding convergents also begin from the Z-th element: Pi,(i,i)/Qi,(i,i), Pi,(i,i+i)/Qi,(i,i+i), Pi,(i,i+2)/Qi,(i,i+2) etc.

The following lemma allows us to calculate convergents of the third type without resorting to calculating the values of the continuants. You just need to perform the product of matrices.

Lemma 5. Let the number n > 1 and the product of matrices A = H™=o Ai are set, where

Ai = | h yjkjei j , A = ^) , (21)

^Xo Xi / then

p = Sn(g i, ■■■ , gn-i)3 p, (g u ■■■ , gn)3

Corollarv 1.

Y\i=ixi Y\i=ixi

„ (go, ••• , дп-\)г w (go, ••• , дп)з , , ^ g =-ffn XX.-,Q = Г[п x. , det(A)^| -.

Q _ P3,(0,n-1) Q' _ P3,(0,n)

P Q3,(0,n-1)' P' 1з,(0,п)

The proof of corollary 1 follows automatically from lemmas 1, 5.

Consider convergents of rational numbers, which had been obtained using (regular) continued fractions. Let's number them in order, adding the corresponding index to them. All convergents with even indices form a strictly increasing sequence, and all convergents with odd indices form a strictly decreasing sequence (refer to [16]). But despite this, in the general case nothing similar can be done for convergents Pi,(o,o)/Qî,(o,o),Pî,(o,i)/Qi,(o,i), -- Look at example 1 again. We calculate all convergents of the number 1117/505. Then we get

P3,(0,0) _ P3,(0,i) _ 10 + 1 _ 11 Pi,(0,2) _ 3-11 - 2 _ 31 Ps,(0,3) _ 5-31 + 3-11 _ 188 93,(0,0) ' l3,(0,i) 5 5 ' q3,(0,2) 5-3 - 1 14 ' q3,(o,3) 5-14 + 3-5 85 '

P3,(0,4) _ 3 ■ 188 + 31 _ 595 P3,(0,5) _ 5 ■ 595 + 2 ■ 188 _ 1117 q3(0A) _ 85 ■ 3 + 14 _ 269 ' q3i(0}5) _ 5 ■ 269 + 2 ■ 85 _ ~505~ '

Let's compare all convergents with each other:

P3,(0,0) < P3,(0,l) < P3,(0,3) < P3,(0,5) < P3,(0,4) < P3,(0,2) 13,(0,0) l3,(0,i) 13,(0,3) 13,(0,5) 13,(0,4) 13,(0,2)

It is possible to identify conditions, under which successive convergents will be strictly greater or lesser than each other. Comparison of convergents of the third type n and n + 1 order p3,(0,n)/q3,(0,n)> P3,(0,n+i)/Q3,(0,n+i) is equivalent to comparing magnitudes Ô0q:i,(i,n)/P3,(i,n), ^0l3,(i,n+i)/P3,(i,n+i)-Their calculation can be simplified. To do this, you need to perform a certain number of expansions of the continuants in numerators and denominators, grouping the common parts together. This idea underlies the following results. Moreover, in some cases it is not even necessary to completely calculate the value of continuant.

Theorem 4. If the following inequality is true

{.9n-i'9n)3 > {gn-i'9n'9n+i)3 ^^

{9n )3 {9n'9n+i)3 '

5j _ 1 for all 0 ^ j < n and the number n is odd, then

P3,(0,n) > P3,(0,n+i) ^^

Q3,(0,n) Q3,(0,n+i)

If condition (22) is performed, ôj _ 1 for all 0 ^ j < n and the number n is even, then

P3,(0

, n)

P3,(0,n+i) l3,(0,n) l3,(0,n+i)

Theorem 5. If inequality (22) is true, ôj _ —1 for all 0 ^ j < n, then inequality (23) is true.

Theorem 6. If for all positive integers t the equalities 62t _ 1, fat+i _ —1 are satisfied, condition (22) is true, and for a natural number n and a positive integer i, 0 ^ i ^ n — 1, condition

• n — 1 = 0 (mod 4) or n — 1 = 2 (mod 4) is true, then for i = 0 (mod 4) and i = 1 (mod 4) inequality

P3,(n-i-i,n) P3,(n-i-i,n+i) fr>4\ - > --(24)

13,

13,(

n— i—i,n+i)

is true, and for i = 2 (mod 4) and i = 3 (mod 4) inequality (24) is satisfied with a minus sign "<".

• n — 1 = 1 (mod 4) or n — 1 = 3 (mod 4) is true, then for i = 0 (mod 4) md i = 2 (mod 4) inequality (24) is true, and for i = 1 (mod 4) an d i = 3 (mod 4) inequality (24) is satisfied with a minus sign "<".

Theorem 6 can also be used to compare two convergents. To do this, you only need to know the remainder of dividing the number n — 1 by 4 and use one of the conditions.

If in condition (22) sign will change to the opposite, then signs of comparisons in inequalities of theorems 4, 6, 5 will also change.

It is quite difficult to obtain results similar to theorems 4, 6, 5 for convergents of the fourth type. Nevertheless, this task can be reduced to comparing the following magnitudes.

Proposition 1. The task of comparing convergents of the fourth type

P4,(0,n) ^ P4,(0,n+1)

l4,(0,n)

is equivalent to comparing magnitudes

<i4,,(0,n+1)

So(gh • • • ,gnU and $o(gh • • • ,дП)4

(g n)4

xn (g n+i)±

4. Estimation of the number of steps in the Sorenson algorithm

Proof op theorem 1.

Proof of this theorem, as in the Sorenson theorem (refer to [3], lemma 3.2) is based on the method of mathematical induction. Let s, m are positive integers, s ^ m, and the numbers a, b are defined as

a =

^ tik\ b = ^ qjkj, (25)

i=0 j=0

where U, qi £ {1,2, ■ ■ ■ ,k — 1}. Hence the inequalitv 0 < b ^ a < ks+1 is true. Let's prove that gcd( a, b) is calculated at |_log( a)/log(k)J + Llog(6)/log(k)J + 1 step.

a [1 , k — 1] m

value of e is equal to zero, and as a pair of numbers (x, y), satisfying inequality (3), we can take (b, a). If they are not coprime (refer to formula (2)), then divide both numbers x, y by their gcd. Thus, it will take 1 step to calculate gcd(a, b).

Let the inequalities 0 < m ^ M, 0 < s ^ M are true. Suppose that for all pairs of numbers ( a, )

2m + 1 in the worst case. We prove the induction hypothesis for pairs of numbers (a', b') defined using the magnitudes m = M + 1, s = S, m < s:

M +1

a = Y,^k\ b' = ^ q'jkj, 1 ^ tq'j ^ k,a' ^ b'.

(26)

i=0

j=0

After the value e' has been calculated and the numbers (x', yr) has been choosen that satisfy inequality (3), we obtain

a'' = \b'ke' y' — ^x' I < a <

k + 1

k

^t'i+ik\a" > b'.

(27)

i=0

Further, for the input numbers (a", b'), we calculate e', select the numbers (x',yr) and find a

a

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

a''. This procedure continues for no more than S — M — 1 step, including the one described. After that the number a" can be represented as the sum of the powers of k, and each of them will be

k

a

to M + 1. If a" < V, then swap their values. After that we again calculate e\ select the numbers (x', y') and find a linear combination of the numbers a", b', as in formula (27):

a" = \b'ke y' — a"x'\. (28)

The new value of a" is Y^iL0 t'land the inequality 0 ^ t'( < k is true. If at this step a" < b', then swap their values again and run another step of the procedure described above.

As a result, we obtain that the numbers a", V are expressed as the sums

u^ziLo t" kj,

moreover the inequality 0 ^ ti,t"k is true. And for such numbers, according to the assumption of induction, the number of steps does not exceed 2m + 1.

We have done no more than S — M — 1 linear combinations after that we could perform a total of 2 exchanges and linear combinations. As a result, the total number of steps does not exceed 5 — M — 1+2+2M + 1 = 5 + (M + 1) + 1. The proof is done. □

Here is an example of how the algorithm works in the worst case. Let the following numbers be given: a = 1000351 b = 38530, k = 25. The following table shows the calculation results. Columns named "polv(a)", "polv(b)", means representation of the numbers a, b as sum of the powers of k. The fourth column, named r, contains all the values \ybke — ax\. Note that the last step, where one of the numbers is zero, is not included in the total number of steps, since no calculations occur there. In the end there were 8 steps.

a b r poly (a) poly(b) e X y

1000351 38530 37101 2k4 + 13k3 + 25k2 + 14k + 1 2k3 + 11k2 + 16k + 5 1 1 1

38530 37101 1429 2k3 + 11k2 + 16k + 5 2k3 + 9k2 + 9k + 1 0 1 1

37101 1429 1376 2k3 + 9k2 + 9k + 1 2k2 + 7k + 4 1 1 1

1429 1376 53 2k2 + 7k + 4 2k2 + 5x + 1 0 1 1

1376 53 51 2k2 + 5>x + 1 2k + 3 1 1 1

53 51 2 2k + 3 2k + 1 0 1 1

51 2 1 2k + 1 2 1 1 1

2 1 0 2 1 0 1 2

In example, at each step of algorithm, ratio between the numbers a, bke is approximately equal to one. The numbers x, y are equal to one (except for the last step of algorithm). All this leads to the fact that at each step ratio of largest of the numbers and result of the linear combination is approximately equal to k, which is consistent with inequality (3): \byke — xa\ ^ a/(k + 1).

5. Proofs

All proofs in this article is presented in full without abbreviations.

Proof of theorem 2. Let a0 and b0 are the input numbers of the generalized Sorenson left-shift gcd algorithm, and the magnitude Si is equal to \yici — Xiai\. Using rules (4), (5) and determining magnitude (9), you can get the formula ¿0s0 + y0c0 = x0a0. Division both parts by x0b0 leads to the expression

an _ y0k0eo , §0 . -

X0 I —

(5)

At the first step of the algorithm, we move on to a pair of numbers (a\, b\) = (b0, s0), moreover b0 > s0. In view of this, at expansion of the numbers ai, b\ into a continued fraction of the third type, expression (29) is represented as

ао bo

У о ко

ео

Хо

+

o

yiXokiei Х\

+

¿1

(30)

£ <

Further, the process of expansion into a continued fraction of the third type continues similarly to the previous steps. We will assume that formula (8) is correct at the t steps of algorithm. Using the principle of mathematical induction, we prove that it is also true at the (t + 1)-th step, where the value of t + 1 does not exceed n. Consider expansion of the number at/bt taking into account all the multipliers Xi obtained in the previous steps of the algorithm:

Vtkt

et

П :

i<t, i^t (mod 2)

Xt

П

3<t, j=t (mod 2)

+

5„

3 ( hxt П Xj\ j<t, j=t (mod 2)

St П Xi i<t,

\ i^t (mod 2) y

(31)

Now let's perform expansion of the number at+i/bt+i = btJst. The denominator of the right term can be written as

yt+ikt+iet+1

П

3<t+1, j^t+1 (mod 2)

Xt+1

П

i<t, i=t+1 (mod 2)

- +

t

( bt+1Xt+1

П

i<t, i=t+1 (mod 2)

X

Л

(32)

s t+1

V

П

3<t+1, j^t+1 (mod 2)

X j

/

Thus, we obtained the necessary product of the elements Xi in numerators and denominators of formula (32). The proof is done. □

proof of theorem 3. The zero step of the algorithm completely coincides with its description in the proof of theorem (2). As a result of this step, we can obtain the expression

ао _ Уокоео + ¿qsq bo Xo Xobo '

(33)

At the first step of the algorithm, we get a pair of numbers ( a\, b\) = (So, b0), moreover so ^ b0-In view of this, at expansion the numbers ai, b\ into a continued fraction of the fourth type, expression (33) is represented in the form

ао_ bo

У о ко

ео

Xo

о

+ — Xo

( У1к1е1 + (МЛ

I X1 X1b1 I

(34)

Then the process of expansion into a fourth type continued fraction continues in the same way

the principle of mathematical induction, we prove that it's also true at the (t + 1)-th step, where the value of t + 1 does not exceed n. Consider expansion of the number at/bt taking into account

Xi

t-1

£

i=0

ei i-i S

—n -

X ' x

Vit

j=0

st ^ Si

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

' i=0

(35)

Now let's perform expansion of number at+1/bt+1 = bt/st. Fraction (35) can be written as

Vikt

t-l „. i„ei t-1 $

£

^ + j-J h f ytktet + fahN i=o Xi j=oXj i=o Xi\ Xt Xtbt)

(36)

If t + 1 is the last step of the algorithm, then this means that conditions (10) are performed instead of conditions (12). Then, the number bt/St will be represented as yt+ih+iet+1 /xt+i and substituted into formula (36). This proves formula (11). □

T. Muir introduced continuant (refer to [17]), as a determinant of the tridiagonal matrix E1,fl:

det(E1,,n) = det

hi i 0 0 0 0 0

mi h2 12 0 0 0 0

0 m2 h3 3 0 0 0

0 0 mn-2 hn— 1 ln-1

\0

0

0

mn-1

(37)

He obtained a formula for the expansion of a continuant of arbitrary order (refer to [17, p. 518]). We write this formula in terms of the expansion of determinant of the matrix E\,n of n-th order:

det( E1,ra) = det(E1,r) det(Er+1,ra) — lr-1mr-1 det(E1,r-1) det(Er+2,ra). The matrix Ejj is defined in the same way as the matrix E\,n\

(38)

det(Ei,j ) = det

/hi k 0 0 0

mi hi+i li+i 0 0 0 mi+i hi+2 li+2 0

0 0 0

0 0 0

0 0

mj-2 hj-i lj-i 0 mj-1 hj

"Proof of lemma 1. It is easy to see that the formulas of points 1-3 are obtained by simply substituting the corresponding values of the matrix elements from formula (15) to formula (38).

Since third type continued fractions are connected to the generalized Sorenson left-shift algorithm, then to prove the last point of the lemma we use integer sequences {ai}f=0, {bi}f=0 defined using the algorithm and principle of mathematical induction. At the penultimate step of the algorithm, we can obtain formula (29), in which all indices are equal ton — 1. Expanding the number bn-1/sn-1 into a continued fraction we obtain the expression

On-1 _ Un-ikn-1

b n— 1

%n-1

+

n

'n— 1

Vn^n-ikn

Xn

( g n-l, 9n)3 Xn-i{gn}3 '

(39)

Consider the ratio of the magnitudes at, bt at the (t + 1)-th step of algorithm. Let condition 0 <t<nis satisfied and the formula

a± = (gt,gn)3 bt x^gt+u..^ gn)3

n

is true. Consider the ratio of the magnitudes at-i, bt-i at the t-th step of algorithm:

at-\ _ yt-ih-iet-1 + 5t-i _ yt-ih-iet-1 + ¿t-ixCfft+b ..y 9n)3 ^

bt-i xt-i (xt-iat\ xt-i xt-i<gt,..., gn)3 '

V bt )

After several mathematical operations, we obtain the same denominator for both fractions in formula (40) and obtain expression

at-i <9t-i,..., 9n)3

bt-i xt-i<gt,..., gn)3

The lemma is proved. □

Proof of lemma 2. It is easy to see that the formula of continuant expansion is obtained from the formula of matrix determinant expansion (16) by the first row.

As in the proof of lemma (1), here we again use integer sequences {ai}f=0, {bi}f=0, which are determined using algorithm, and also the principle of mathematical induction. At the penultimate step of the algorithm, expanding the number bn-i/sn-i into a fraction, we obtain formula (39). It's equals to <gn-i,gn)4/(xn-i<gn)4).

Consider the ratio of the magnitudes at, bt at the (t + 1)-th step of algorithm. Let condition 0 <t<nis satisfied and the formula

at <gt, gt+u gt+2, ••• , gn)4

bt (gnU П

n— 1

i=t x

is true. Consider the ratio of the magnitudes at-i, bt-i at the i-th step of algorithm:

at-i _ yt-ikt-iet-1 + 5t-iat _ yt-ikt-iet-1 + St-i<gt,gt+i,gt+2, • •• gn)i _ bt-i xt-i xt-ibt xt-i xt-i<gn)4 n?-tixi .

<gt-i)4<gn)4 U7=tixi + St-l<gt,gt+ugt+2, • • • ,gn)4 _ <gt-u • • • ,gn)4 xt-i< gn)4 n?- xi <9n)4 n^-i xi

proof of lemma 3. The numbers x^ j/i are positive (refer to introduction), and xi ^ yi (refer to inequality (3)). It follows that for Si _ 1 and for all ^ i <n continuants of the third and fourth types are strictly positive and form a strictly increasing sequence. If ^ _ —1, then the situation is already ambiguous, and each case needs to be analyzed separately. At the beginning, instead of a certain comparison sign, we will put a question mark, which will be replaced by a comparison sign as the proof progresses.

To prove inequalities (18), we use the method of mathematical induction. Obviously, <g0)3 > 0. Now let's compare the zeroth and first order continuants:

yoyikoe°kie1 — xi ? yokoe°

Division by yokoe° will allow us to compare yikie1 — xi/(y0k0e°) ? 1. If the second condition from system (17) is satisfied, then instead of the sign "?" you can put a ">" sign. Further, assume

n

conditions 5j _ 1, 0 ^ j < n or yikf1 — xi > 1 for all 0 ^ i ^n).

Division by y0k0e° will allow us to compare yikie1 — xi/(y0k0e°) ? 1. If the second condition from system (17) is satisfied, then instead of the sign "?" you can put a ">" sign. Further, assume

n

conditions 5j _ 1, 0 ^ j < n or yikf1 — xi > 1 to all 0 ^ i ^ n ). We will prove this formula for

continuants of (n + 1)-th order by comparing a continuant of (n + 1)-th order with a continuant of n-th order, simultaneously performing an expansion of the first of them (the magnitude 5n is equal to -1 according to the initial guess):

yn+ikn+ien+1 (go^.^gn)3 -Xn+l(go,...,gn—l)3 ? (go^.^gn)3.

Since the induction assumption is valid for all previous continuants, then division both sides by (g0,..., gn)3 > 0, we obtain the expression

, e„+1 (go,gn-i)3 9

Vn+lkn+ie"+1 -Xn+l—,-p- ? 1.

(go,..., gn )3

Condition 2 from formula (17) is satisfied. This allows you to replace the "?" sign to the ">" sign. □

proof of lemma 4. Consider the continuants of i + 1 and i order, compare them with each other and simultaneously perform an expansion of each of them. As in previous proofs, we will put a question mark at the beginning when comparing two magnitudes. So,

(go,..., gi+i)4 ?(go,..., gi)4

i i— l $o(g b gi+i)4 + (go)4(gi+i)^\\ xj ? $o(g u..., gi)4 + (go)4(gi)^\\ Xz

j=l z=l

Perform another expansion of the continuants, grouping them with each other. We get expression

i—l i—l SoSi((g2,..., gi+l)4 - (92,..., gi)4) ? (go)4 n Xz((gi)4 - Xi(gi+l)4) + So(gi)4 n Xz((9i)4 - Xi(gi+l)4)

z=l z=2

Performing further expansion of continuants, taking into account condition = 1, allows us to obtain expression

i-1 i-1

ÔQÔi...Si-2({gi-i,giygi+i)4 - {g%-i,Sj-i(gj>4 II ^- Xi{gi+i)A). (41)

3=0 z=j+i

If instead of the sign "?" we put ">", then the original continuant of the ( i + 1)-th order will be greater than continuant of the f-th order. Execution of formula (41) for all 2 < i ^n, together with the other conditions, which is specified in condition of the lemma, allows us to construct a strictly increasing sequence of continuants. □

proof of lemma 5. At the beginning, we will prove formulas for the magnitudes P, Q, P', Q'. Product of the matrices A0, Ai is equal to

( h yikiei \

xi xi

yokoe° Si yoyiko e°kiei + SqXI

(42)

V xoxl xoxl /

It is easy to verify veracity of the statement for resulting matrix. Now let's assume that for the first n matrices, statement of the theorem is true. We prove this for n + 1 products of matrices. We get expressions

Р

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Q -

$n+i{gl, • • • ,9п)з <W 1{9o, • • • , 9п)з

■ ■(

■=(

$п{д 1, • • •, дп-1)з + Уп+1К+1 e"+1 {д 1, • • • , 9п)з

ГЬ=1 хг

Хп+1

ГЬ=1 хг

Q , Sn{go, • • • , 9п-1)з + Уп+1кп+1еп+1 {go, ••• , д-п)

Q - I 1-гп +

О

(43)

Il^Xi ' v V Xn+1 rr=0^

Usage of lemma 1 makes it easy to prove formulas for the magnitudes PQ'. Now we can prove the formula for the determinant of the matrix. In the case of matrix (42) determinant is equal to 5o/xo. Let the formula to the determinant obtained by multiplying n matrices be fulfilled. Let's find the determinant of matrix (43). It' equals to

Sn+i{(gi, • • • ,gn)3(go, • • • ,gn+i)3 — (go, • • • ,gn)3(g 1, • • • ,gn+i)3)

^Xij (ie

Performing the expansion of (n + 1)-th order continuants, we obtain the expressions

<W 1 Snjjgu • • •, gn)з(go, • • • ,gn-i)3 — (go, • • •, gn)3(gu • • • ,gn-i)3) {W^Xi )(ttn=oXJ) '

n

1п=0 хз

$п+15п5п-1({дî, • • • ,дп-2)з{до, • • • ,дп-1)з - {до, • • • ,дп-2)з{дъ • • • ,дп-1 )з)

тп— 1

ГЬ=1 Xi) ( П,=0 х3

Continuing this procedure, we obtain the final formula for the determinant of matrix (43). □

proof of theorem 4. Instead of some comparison sign, for now we will put the sign "?". We will define the comparison sign at the end of the proof. Let us decompose numerators and denominators of convergents. We get inequality

yokoe° + 8oXi(g2,..., gn)3 ? yokoe° + boX\(g2,..., gn+i)3 xo xo(gi,...,gn)3 ' xo Xo(g 1,...,gn+i)3 ' Subtract yokoe°/xo from each part, multiply by xo, invert the ratio of continuants and obtain the inequality

0

0

i ^ъ..^9п)з A i \х1{д2,..., дп)з) V

{gl,g п+1 )з N хl{g2,дп+1)з^

Further we will perform n — 2 decompositions of continuants and n — 2 upheavals. We will get

continued fractions

0

/У1к

ei

х1

■ +

1

( х1У2к2е 2 х2

+

2

+

п- 2

хЛ

( {дп-ъ дп)з П

0^г <п-1, г^п-1 (mod 2)

хп-1{ дп)з П :

0^<п-1, ]=п-1 (mod 2) J

and

¿0

(Viki

ei

X1

+

¿1

(45)

/ ^1^2

\

X2

+

¿2

V

•• +

Sn-2

( (gn-i,gn,gn+i)^ H Xi\

0^i<n-1, i^.n—1 (mod 2)

V

1 (gn,gn+i}3 n

V

0^j<n-1, j=n— 1 (mod 2) J

//

In the resulting formulas, only the terms differ

(gn-1,gn}3 n :

0^i<n-1, i^.n—1 (mod 2)

xn-1(gn}3 II a

0^j<n-1, j=n—1 (mod 2)

and

(gn-1,gn,gn+1}3 n xi

0^i<n-1, i^.n—1 (mod 2)

xn-1(gn,gn+1}3 H Xj'

0^j<n-1, j=n—1 (mod 2)

(46)

Taking into account condition (22), and the sequence {¿¿} fixed bv condition, and necessity to flip over the ratio of continuants, we can conclude that

P3,(n-2,n) < P3,(n-2,n+l)

Q3,(n-2,n) Q3,(n-2,n+\)

Further comparing the convergents P3,(n-3,n)/^3,(n-3,n^d P3,(n-3,n+i)/Q3,(n-3,n+i), we get that they will change the sign of comparison:

P3,( n-3,n) P3,(

93, (n-3,n+l)

After a few steps, in a similar way the ratio of continuants will be considered, in which the first element will be g\. We perform their comparison, after which we change its sign to the opposite one due to the necessity reverse the ratio of continuants. This ratio is multiplied by ¿o (refer to formulas (44), (45)). Therefore, the comparison sign will depend only on the parity or oddness of n under conditions specified above. □

proof of theorem 5. The proof is similar to the proof of theorem 4. After (n — 1) expansion of continuant and upheaval of the ratio of continuants, formulas (44), (45) will be obtained. The only different terms will be elements of formula (46).

Taking into account condition (22), and fixed sequence {¿¿} by condition, as well as the need to reverse the ratio of continuants, we can conclude that

P3,(n-2,n) > P3,(n-2,n+\)

93,(n-2,n) 93,(n-2,n+\)

Further, comparing the convergents P3,(n-3,n)/93,(n-3,n) ^ P3,(n-3,n+i)/93,(n-3,n+i), we obtain that they have the same comparison sign again:

P3,

(n-3,n)

P3,

(n-3,n+l)

13, (n-3,n) 13, (n-3,n+l)

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

proof of theorem 6. Let n — 1 = 0 (mod 4). Condition (22) is satisfied. Let us denote by fs,t result of the following expression:

j

(д s, ••• , 9th II хг ys П хг

0^i<s, 0^i<s,

i^s (mod 2) i^s (mod 2) Og

^ - + 7-. (47)

Xs{gs+1, ••• , gt}3 EI Xj Xs II Xj fs+1,t 04i<s, 0^i<s,

i=s (mod 2) i=s (mod 2)

We can compare the elements of the sequences of magnitudes {fs,t}, {fs,t+i] with each other. Taking into account the results of lemma 1, the following inequalities are true:

fn-1,n > fn—1,n+1, fn-2,n > fn—2,n+1, fn-3,n+1 < fn—3,n+1, fn-4,n < fn—4,n+1, fn-5,n > fn-5,n+l.

Let the following inequalities are true for natural v, 1 < v < (n — 4)/4:

fn-4v-1,n > fn—4v—1,n+1, fn-4v-2,n > fn—4v—2,n+1, fn-4v-3,n+1 < fn—4v—3,n+1, fn-4v-4,n < fn—4v—4,n+1,

Consider the following 4 values of the elements of each of the sequences { fs,t}, { fs,t+1} separately. According to the definition of magnitude fs,t, it can be expressed in terms of magnitude fs+1,t-Inasmuch as n — 1 = 0 (mod 4), then n — 1 = 0 (mod 2). Hence, n — 4v — 5 is even number, so 5n-4v-5 = 1. Therefore, comparing magnitudes fn-4v-5,n and fn-4v-5,n+1, we obtain inequality

yn-4v—^Yi Xi yn-4v—^Yi Xi

<n-4v-5, <n-4v-5,n,

i^n-4v-5 (mod 2) 1 i^n-4v-5 (mod 2) 1

Xn—4v—5 Г1 Xj fn—4v-4,n Xn—4v— 5,n Г1 Xj fn—4v—4,n+1

0^j<n—4v—5, 0^j<n—4v—5,

j=n—4v—5 (mod 2) j=n—4v—5 (mod 2)

The number n — 4v — 6 is odd, so therefore, expanding the value of magnitudes fn—4v—6,,, fn—4v—6,n+i, we get inequality

yn—4v—6 П Xi yn—4v—6 П Xi

0^.i<n—4v—6, 0^.i<n—4v—6,n,

i^.n—4v—6 (mod 2) 1 i^n—4v—6 (mod 2) 1

— - -—

Xn-4v-6 J! Xj fn-4v-5,n Xn-4v—6,nY\ Xj fn-4v-5,n+1

0^j<n-4v-6, 0^j<n-4v-6,

j=n-4v-6 (mod 2) j=n-4v-6 (mod 2)

The following inequality can also be proven by comparison magnitudes 1/ fn-4v-6>n and 1/ jn-4v-6n+1. Hence, the inequalitv fn-4v-7,n < fn-4v-7,n+1 is obtained. Comparing expressions with each other —1/f,n-4v-7,n^d —1/f,n-4v-7,n+1, we get inequality fn-4v-8,n < fn-4v-8,n+1■ This proves the first point of the theorem. The remaining points can be proved in the same way. □

Proof of proposition 1. Let us write down fourth type continued fractions corresponding to the convergents under consideration, and also perform an expansion of continuants. We get expressions

§0{g 1, ••• , gn }4 + {g0 U{gnU n^Xi d $0{g 1, ••• , 9^+1)4 + {g0)4{gn+1)4 Eku Xi

( 9n)4]A n=01Xi (gn+l)4U ni=0 Xi

Multiply both parts by nn=01 Xi, then we get expression

fio{gl, ••• ,9п)^ , v тпг j ^9^ ••• ,9n+i)^ , v inr Reducing common parts, we obtain the required values. □

6. Conclusion

In this paper, the generalized Sorenson left-shift gcd algorithm was introduced. It coincides with the original Sorenson algorithm, except that instead of the parameter k, an infinite sequence of natural numbers К is fixed, each element of which is greater than two. For the original Sorenson algorithm, an estimate of the number of steps in the worst case is obtained, an example is given. An evaluation of the generalized algorithm is also given. However, the author believes that it can be improved.

Also in this article, continued fractions with rational partial quotients with a left shift were introduced, and continuants, with the help of which one can express the numerator and denominator of such fractions. The question of search conditions, under which the sequence of continuants with increasing order is strictly increasing was investigated. Conditions have been found, under which convergents of rational numbers made using continued fractions with rational partial quotients can be unambiguously compared. Applying these conditions to all obtained convergents allows us to determine whether such sequence will be strictly increasing or not.

СПИСОК ЦИТИРОВАННОЙ ЛИТЕРАТУРЫ

1. Morier-Genoud S., Ovsienko V. Farev Boat: Continued Fractions and Triangulations, Modular Group and Polygon Dissections. // Jahresber. Dtsch. Math. 2019. Vol. 121, pp. 91-136.

2. Qanakgi I., Schiffler R. Snake graphs and continued fractions // European Journal of Combinatorics. 2020. Vol. 86.

3. Sorenson J. Two Fast GCD Algorithms // J. of Algorithms. 1994. Vol. 16, № 1, pp. 110-144.

4. Morrison D., Angel E. Speeding Up Bresenham's Algorithm // IEEE Computer Graphics and Applications. 1991. Vol. 11, №6. P. 16-17.

5. Zhang Z. Finding сэ-strong pseudoprimes // MATHEMATICS OF COMPUTATION. 2004. Vol. 74, № 250, pp. 1009-1024.

6. Xiao L., Xia X. -G. ., Wang W. Multi-Stage Robust Chinese Remainder Theorem // IEEE Transactions on Signal Processing. 2014. Vol. 62, № 18. P. 4772-4785.

7. Weber, K. The Accelerated Integer GCD Algorithm // ACMTrans.Math. Software. 1995. Vol. 21, № 1. P. 111-122.

8. Dolgov, D. GCD calculation in the search task of pseudoprime and strong pseudoprime numbers // Lobachevskii J Math. 2016. Vol. 37, № 6. P. 734-739.

9. Долгов Д. А. О расширенном алгоритме Джебелеана-Вебера-Седжелмаси вычисления наибольшего общего делителя // Чебышевский сборник. 2018. Vol. 19, №2. Р. 421-431.

10. Долгов Д. А. К-арный алгоритм вычисления НОД без побочных множителей // XVI Международная конференция «Алгебра, теория чисел и дискретная геометрия: современные проблемы, приложения и проблемы истории» , Тула. 2019. Р. 162-165.

11. Карацуба А. А. Основы аналитической теории чисел// Наука, Москва. 1983.

12. Jebelean Т. A generalization of the binary GCD algorithm // ISAAC, Kiev. 1993. P. 1-5.

13. Stein J., Computational problems associated with Racah algebra //J. Сотр. Phvs. 1967. Vol. 1, №3. P. 397-405.

14. Долгов Д. А. О континуантах цепных дробей с рациональными неполными частными// Дискрет, матем. 2022. Vol. 34, № 3. Р. 34-51.

15. Straustrup В. The С++ Programming Language // Addison-Wesley Professional. 2013.

16. Bosma W., Kraaikamp C., Hommersom S., Keune M., Kooloos C., van Loon W., Loos R., Omiljan E., Popma G., Venhoek D., Zwart M. // Continued fractions. URL: https://www.math.ru.nl/ bosma/Students/CF.pdf 2012.

17. Muir T. A Treatise on the Theory of Determinants // Dover Publications. 1960. P. 766. REFERENCES

1. Morier-Genoud, S., Ovsienko, V., 2019. "Farev Boat: Continued Fractions and Tr¿angulations, Modular Group and Polygon Dissections", Jahresber. Dtsch. Math., vol. 121, pp. 91-136.

2. Qanakgi, I., Schiffler, R., 2020. "Snake graphs and continued fractions", European Journal of Combinatorics, vol. 86.

3. Sorenson, J., 1994. "Two Fast GCD Algorithms", J. of Algorithms, vol. 16, no. 1, pp. 110-144.

4. Morrison, D., Angel, E., 1991. "Speeding Up Bresenham's Algorithm", IEEE Computer Graphics and Applications, vol. 11, no. 06, pp. 16-17.

5. Zhang, Z., 2004. "Finding сэ-strong pseudoprimes" MATHEMATICS OF COMPUTATION, vol. 74, no. 250, pp. 1009-1024.

6. Xiao, L., Xia X. -G., Wang W., 2014. "Multi-Stage Robust Chinese Remainder Theorem", IEEE Transactions on Signal Processing, vol. 62, no. 18, pp. 4772-4785.

7. Weber, K., 1995. "The Accelerated Integer GCD Algorithm", ACMTrans.Math. Software, vol. 21, no. 1, pp. 111-122.

8. Dolgov, D., 2016. "GCD calculation in the search task of pseudoprime and strong pseudoprime numbers", Lobachevskii J Math, vol. 37, no. 6, pp. 734-739.

9. Dolgov, D.A., 2018. "An extended Jebelean-Weber-Sedjelmaci GCD algorithm (in russian)", Chebyshevskii Sbornik, vol. 19, no. 2, pp. 421-431.

10. Dolgov, D.A., 2019. "The K-arv gcd algorithm without spurious factors (in russian)", XVI International Conference "Algebra, number theory and discrete geometry: Modern problems, applications and problems of history", Tula, pp. 162-165.

11. Karatsuba, A. A., 1983. "Principles of Analytic Number Theory", Nauka, Moscow.

12. Jebelean, Т., 1993. "A generalization of the binary GCD algorithm", ISSAC, KIEV, pp. 1-5.

13. Stein, J., 1967. "Computational problems associated with Racah algebra", J. Сотр. Phys., vol. 1, no. 3, pp. 397-405.

14. Dolgov, D. А., 2022. "Continuants of continued fractions with rational incomplete quotients (in russian)", Diskr. Mat, vol. 34, no. 3, pp. 34-51.

15. Straustrup, В., 2013. "The С++ Programming Language", Addison-Wesley Professional.

16. Bosma, W., Kraaikamp, C., Hommersom, S., Keune, M., Kooloos, C., van Loon, W., Loos, R., Omiljan, E., Popma, G., Venhoek, D., Zwart, M., 2012. "Continued fractions". URL: https://www.math.ru.nl/ bosma/Students/CF.pdf

17. Muir, Т., 1960. "A Treatise on the Theory of Determinants", Dover Publications, p. 766.

Получено: 08.01.2024 Принято в печать: 28.06.2024

i Надоели баннеры? Вы всегда можете отключить рекламу.