Exact real arithmetical algorithms in binary continued fractions - - PowerPoint PPT Presentation

exact real arithmetical algorithms in binary continued
SMART_READER_LITE
LIVE PREVIEW

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 . . . . . .


slide-1
SLIDE 1

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-2
SLIDE 2

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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.

slide-3
SLIDE 3

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

  • 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

slide-4
SLIDE 4

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

  • bius number system (F, Σ):

Σ ⊆ XF is a subshift Φ : Σ → R is continuous and surjective.

slide-5
SLIDE 5

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-6
SLIDE 6

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-7
SLIDE 7

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-8
SLIDE 8

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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, ∞]

slide-9
SLIDE 9

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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 λ

slide-10
SLIDE 10

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-11
SLIDE 11

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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)).

slide-12
SLIDE 12

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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.

slide-13
SLIDE 13

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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.

slide-14
SLIDE 14

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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)).

slide-15
SLIDE 15

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-16
SLIDE 16

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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ω

slide-17
SLIDE 17

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

slide-18
SLIDE 18

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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.

slide-19
SLIDE 19

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

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

00 01 10 11 000 001 010 011 100 101 110 111