Finding the terms of a continued fraction

53 Views Asked by At

Let $\lfloor · \rfloor$ be the floor function, i.e. |$x$| := sup{$k ∈ \mathbb Z : k ≤ x$} assigns to every rational (or real) number $x$ the greatest integer that is less than or equal to $x$.

Let $r =\frac{355}{113}$ .

(a) Let $q'_0 = r, q_0 = \lfloor q'_0 \rfloor$, $q'_j =\frac{1}{q'_{j−1} − q_{j−1}}, q_j = \lfloor q'_j \rfloor$ where $j = 1, 2, . . . , n$.

Calculate $q_0, . . . , q_n$ in this way (until the process terminates, i.e. $q'_{n+1} = 0$).

(b) Verify using the recursion relations that the continued fraction with the terms $q_0, q_1, . . . , q_n$ is indeed equal to $\frac{355}{113}$ .

(c) Can you compute the numbers $a, b$$\mathbb Z$ in Bezout’s identity $a · 355 + b ·113 = 1$ using the procedure above?

I'm having troubles in starting with part a). For instance, $q'_1 =\frac{1}{q'_{0} − q_{0}}$, and then $q_1 = \lfloor q'_1 \rfloor$ which is the integer less than or equal to $q'_1$, the thing is that I have $q'_0$ but how to get $q_0$? Any help please?

Then part b) is easy, I apply the recursion relations

and part c) can be solved by Euler's Algorithm.