. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Exact real arithmetical algorithms in binary continued fractions - - PowerPoint PPT Presentation
Exact real arithmetical algorithms in binary continued fractions - - PowerPoint PPT Presentation
Exact real arithmetical algorithms in binary continued fractions Petr K urka Center for Theoretical Study Academy of Sciences and Charles University in Prague 22nd IEEE Symposium on Computer Arithmetic Lyon, june 24, 2015 . . . . . .
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Exact real computation: arbitrary precision The first k digits of x + y, xy, . . . depend only on the first nk digits of x and y Exact real computation is possible in redundant number systems whose digits represent M¨
- bius
transformations.
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
M¨
- bius transformations
M(z) = az + b cz + d , det(M) = ad − bc ̸= 0 M : R → R = R ∪ {∞} the extended real line The space M(R) of transformations is a group. F = {Fa : R → R : a ∈ A} M¨
- bius iterative system
Fu = Fu0Fu1 · · · Fun−1, u ∈ An
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
The convergence space XF = {u ∈ Aω : lim
n→∞ Fu[0,n)(i) ∈ R}
u ∈ XF ⇐ ⇒ ∀z ∈ C \ R, lim
n→∞ Fu[0,n)(z) ∈ R
Φ : XF → R the value map Φ(u) = lim
n→∞ Fu[0,n)(i) ∈ R, u ∈ XF
M¨
- bius number system (F, Σ):
Σ ⊆ XF is a subshift Φ : Σ → R is continuous and surjective.
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Subshifts D ⊆ A∗: forbidden words ΣD = {u ∈ AN : ∀v ∈ D, v ̸⊑ u} the language of a subshift: L(Σ) = {v ∈ A∗ : ∃u ∈ Σ, v ⊑ u} Σ is a sofic subshift if L(Σ) is regular. L(Σ): labels of paths of a finite labelled graph
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Positional systems β > 1: base A = [p, p + 1, . . . , q] ⊂ Z alphabet Fa(z) = z+a
β
transformations Fu(z) = u0 β + · · · + un−1 βn + z βn Φ(u) =
∞
∑
n=0
un βn+1, Φ : Aω → [ p β − 1, q β − 1 ] F0(x) = βx: number systems for R Φ(0
nu) = ∞
∑
k=0
ukβn−k−1
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Simple continued fractions A = {0, 1} F1(z) = z + 1, F0(z) =
z z+1 = 1 1+ 1
z
F a
1 (z) = a + z, F a 0 (z) =
1 a + 1
z
u = 1a00a11a2 · · · 1a2n, ai > 0 for i > 0 Fu(x) = a0 + 1 a1+...+ 1 a2n + x = a0 + 1 a1+ 1 a2+ · · · + 1 a2n + x
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Simple continued fractions u = 1a00a11a2 · · · 0a2n+1, ai > 0 for i > 0 Fu(x) = a0 + 1 a1+...+ 1 a2n+1 + 1
x
= a0 + 1 a1+ 1 a2+ · · · + 1 a2n+1+ 1 x u = 1a00a11a20a3 · · · , ai > 0 for i > 0 Φ(u) = a0 + 1 a1+ 1 a2+ · · ·, Φ : {0, 1}ω → [0, ∞]
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Symmetric continued fractions A = {0, 1, 2, 3} Σ = {0, 1}ω ∪ {2, 3}ω F0(x) = x x + 1, F1(x) = x + 1, F2(x) = x 1 − x , F3(x) = x − 1 V+ = [0, ∞] = F0(V+) ∪ F1(V+) = [0, 1] ∪ [1, ∞] V− = [∞, 0] = F3(V−) ∪ F2(V−) = [∞, −1] ∪ [−1, 0] Vλ = R = F0(V+) ∪ F1(V+) ∪ F2(V−) ∪ F3(V−)
- +
2,3 0,1 2,3 0,1 λ
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Sofic number system (F, G, V ) over A F = {Fa : a ∈ A}: iterative system G = (B, E, i), E ⊆ B × A × B: labelled graph ΣG: labels of paths in G (p, a, q) ∈ E ⇐ ⇒ p
a − → q
V = {Vp : p ∈ B} closed intervals Vp = ∪ {Fa(Vq) : p
a − → q}, Vi = R
If p
a − → q then Fa is contractive on Vq
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
The unary graph (X, p, q) ∈ M(R) × B × B : X(Vp) ⊆ Vq vertices (X, p, q) a,λ
− → (XFa, r, q) if p a − → r
absorption edge (X, p, q) λ,a
− → (F −1 a X, p, r) if q a − → r, X(Vp) ⊆ Fa(Vr)
emission edge If (X, i, i) u,v
− → then Φ(v) = X(Φ(u)).
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Modular systems: det(Fa) = 1 Theorem[Raney] In symmetric continued fractions, the unary algorithm can be computed by a finite state transducer. Theorem[Delacourt and K˚ urka] In modular systems the norm of the state matrix of the unary algorithm remains bounded. Theorem[K˚ urka and V´ avra] M¨
- bius transformations
are the only analytic functions computable by finite state transducers.
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Fractional bilinear functions P(x, y) = axy + bx + cy + d exy + fx + gy + h , M(x) = ax + b cx + d (P∗x)(y) = P(x, y), (P∗y)(x) = P(x, y) P∗x, P∗y are transformations. (P∗M)(x, y) = P(M(x), y), (P∗M)(x, y) = P(x, M(y)), (MP)(x, y) = M(P(x, y)) P∗M, P∗M, MP are fractional bilinear functions.
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
The bilinear graph (X, p, q, r) : X(Vp, Vq) ⊆ Vr: vertices (X, p, q, r)
a,λ,λ − →
(X ∗Fa, p′, q, r) if p
a − → p′
(X, p, q, r)
λ,a,λ − →
(X∗Fa, p, q′, r) if q
a − → q′
(X, p, q, r)
λ,λ,a − →
(F −1
a X ∗, p, q, r ′) if r a − → r ′,
X(Vp, Vq) ⊆ Fa(V ′
r )
If (X, i, i, i) u,v,w
− → then Φ(w) = X(Φ(u), Φ(v)).
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Modular systems are not redundant and converge slowly
0/1 1/3 1/2 1/1 2/1 3/1 1/0
- 3/1
- 2/1
- 1/1
- 1/2
- 1/3
1 2 3
00 01 1 10 1 11 2 22 2 23 3 32 3 33
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
The binary and prefix codes b : N → {0, 1}+: the binary code p : {1, 2, . . . , ∞} → {0, 1}+ ∪ {1ω} n = 2k + 2k−1u0 + · · · uk−1 p(n) = 1k0u, |p(n)| = 2⌈ln n⌉ n b(n) p(n) 0 − 1 1 0 2 10 100 3 11 101 4 100 11000 n b(n) p(n) 5 101 11001 6 110 11010 7 111 11011 8 1000 1110000 9 1001 1110001 ∞ − 1ω
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
The compression code is continuous and one-to-one c : {0, 1}ω ∪ {2, 3}ω → {0, 1}ω c(0a01a10a2 · · · ) = 00p(a0)p(a1)p(a2) · · · c(1a00a11a2 · · · ) = 01p(a0)p(a1)p(a2) · · · c(2a03a12a2 · · · ) = 10p(a0)p(a1)p(a2) · · · c(3a02a13a2 · · · ) = 11p(a0)p(a1)p(a2) · · · ∀i, ai > 0
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Binary continued fractions Φ : {0, 1}ω ∪ {2, 3}ω → R: Symmetric CF Ψ = Φ ◦ c : {0, 1}ω → R : BCF The unary and binary algorithms use the compression and decompression transducers with states (s, a, b, n) ∈ {0, 1}3 × N, u = 0a01a1 · · · 0ak = ⇒ n = ⌈ln ak⌉ State matrices of the unary algorithm are bounded. State matrices of the binary algorithm grow slowly.
. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .
Binary continued fractions
0/1 1/3 1/2 1/1 2/1 3/1 1/0
- 3/1
- 3
/ 2
- 1/1
- 1/2
- 1/3