Complexity of Universal Programs Alain Colmerauer

Sep 22, 2004 - Laboratoire d'Informatique de Marseille. CNRS, Universités de ...... For l = 1 and l = 2, and any program Pl for Ml,. |codel(Pl)| = O(nlogn),.
663KB taille 2 téléchargements 308 vues
1.

Complexity of Universal Programs

Alain Colmerauer

St. Petersburg, September 22, 2004

Laboratoire d’Informatique de Marseille CNRS, Universités de Provence et de la Méditerranée

Contents What is a machine and a program? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ..................................................................4 A machine programmed for translating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 A machine programmed for multiplying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 A programmed machine is a dynamic system . . . . . . . . . . . . . . . . . . . . . . . . 7 Formal definition of a programmed machine . . . . . . . . . . . . . . . . . . . . . . . . . 8 The main functions of a programmed machine . . . . . . . . . . . . . . . . . . . . . . . 9 Simulation of a machine by another . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Alan Turing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Current configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Executed instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Next configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Executed instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Next configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Program example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Formal definition of a Turing machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Turing machine with internal direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Program example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Graph of a program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Formal definition of a Turing machine with internal direction . . . . . . . . . 23 Relationship between the two types of Turing machines . . . . . . . . . . . . . . . . . . . . 24 Program transformations f1 and f2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Arithmetic machine with indirect adressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Arithmetic machine with indirect addressing . . . . . . . . . . . . . . . . . . . . . . . . 27 Universal program and coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Universal program for translating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Same universal program for multiplying . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Definition of a universal pair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Example of an universal program running on itself . . . . . . . . . . . . . . . . . . . . . . . . 32 Translating program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Input: English sentence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Universal program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Input: translating program + English sentence . . . . . . . . . . . . . . . . . . . . . . 34 Same universal program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Input: universal program + translating program + English sentence . . 35 Complexity and introspection coefficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

2 Definition of complexity and introspection coefficient . . . . . . . . . . . . . . . 37 Keeping the same complexity and introspection coefficient . . . . . . . . . . . 38 Existence and value of the introspection coefficient . . . . . . . . . . . . . . . . . . . . . . . . 39 Toward the labeling hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Labeling hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Vector B and Matrix A related to δ and ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Vector B and Matrix A related to δ and ϕ, next . . . . . . . . . . . . . . . . . . . . . 43 Properties of A and B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Main theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 Universal pair (U2 , code 2 ) for Turing machine with internal direction . . . . . . 46 Presentation of (U2 , code 2 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Coding function code 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 How program U2 operates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 How program U2 operates, next 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 How program U2 operates, next 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Architecture of program U2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Graph of program U2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Listing of program U2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Listing of program U2 , next 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Listing of program U2 , next 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Complexity and introspection coefficient of (U1 , code 1 ) and (U2 , code 2 ) . . 57 General complexity of (U1 , code 1 ) and (U2 , code 2 ) . . . . . . . . . . . . . . . 58 Complexity of (U1 , code 1 ) and (U2 , code 2 ) on examples . . . . . . . . . . 59 Introspection coefficient of (U1 , code 1 ) and (U2 , code 2 ) . . . . . . . . . . . 60 Universal pair (U3 , code 3 ) for arithmetic machine with indirect adressing . . 61 Execution of P3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Execution of U3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Listing of program U3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Listing of program U3 , next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Complexity and introspection coefficient of (U3 , code 3 ) . . . . . . . . . . . . 65 Matrix A and vector B for U3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Open problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Open problem, next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Final conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

3.

What is a machine and a program?

4

5

A machine programmed for translating

Σ = {t,0,1,...,9,a,b,...,z}

colorlesstgreentideastsleeeptfuriously ⇓ Translating program            

           

instruction 1, instruction 2,       . . .              instruction n   ⇓ destideestvertestincolorestdormenttfurieusement

6

A machine programmed for multiplying

Σ = {t,0,1,...,9,a,b,...,z}

26010x37979721 ⇓ Multiplying program            

           

instruction 1, instruction 2,       . . .              instruction n   ⇓ 9876543210

7

A programmed machine is a dynamic system

x ↓ c0 −−−−→ c1 −−−−→ c2

y ↑ ···

4

cn−1 −−−−→ cn

Formal definition of a programmed machine

8

• A programmed machine is an ordered pair (M, P ), where M is a machine and P a program for M. • A machine M is a 5-tuple (Σ, C, α, ω, I), where Σ, the alphabet of M, is a finite not empty set; C, is a set, generally infinite, of configurations; the ordered pairs (c, c0) of elements of C are called transitions; α, the input function, maps each element x of Σ? to a configuration α(x); ω, the ouput function, maps each configuration c to an element ω(c) of Σ?; I, is a countable set of instructions, an intruction being a set of compatibles transitions, that is to say, whose first components are all distinct. • A program P for a machine M is a finite subsets of the instructions set I of M, such that the [ transitions of P are compatible. The set of configurations occurring in P is denoted by CP . A [ configuration c of M is final for P , if there exists no transition of P starting with c.

The main functions of a programmed machine

9

Let M = (Σ, C, α, ω, I) be a machine and P a program for M. For all words x on Σ and configurations c, c0 of C: orbit M(P, x)

out M(P, x)

   

the longuest sequence c0, c1, c2, . . . with =  [ c0 = α(x) and each (ci, ci+1) an element of P .     %

, if orbit(P, x) is infinite, =  ω(c ), if orbit(P, x) ends with c n n             

the shortest sequence of the form (c0, c1) (c1, c2) (c2, c3) . . . (cn−1, cn), 0 track M(P, c, c ) = with c = c , each (c , c ) ∈ [P , c = c0, 0 i i+1 n         %, if this shortest sequence does not exist,

track M(P, x)

cost M(P, x)

       

the longest sequence of the form = (c0, c1) (c1, c2) (c2, c3) . . .    with orbit(P, x) = c , c , c , . . . . 0 1 2     

∞, if track (P, x) is infinite, =  |track (P, x)|, if track (P, x) is finite,

Simulation of a machine by another

10

• Let M1 and M2 be two machines of same alphabet Σ and let P1 and P2 be the sets of their programs.

• Definition Two programmed machines of the form (M1, P1) and (M2, P2) are equivalent if, for all x ∈ Σ?, out M1 (P1, x) = out M2 (P2, x), cost M1 (P1, x) = cost M2 (P2, x).

• Definition The program transformation f1 : P1 → P2 simulates M1 on M2 if, for all P1 ∈ P1, the programmed machines (M1, P1) and (M2, f1(P1)) are equivalent.

11.

Turing machine

Alan Turing

12

Alan M. Turing, "On computable numbers with an application to the Entsheidungsproblem", Proc. London Math. Society, 2, 42, pp. 230–265, 1936.

13

Current configuration

qi

YAX

14

Executed instruction

[qi, ABR, qj ]

15

Next configuration

qj

YBX

16

Executed instruction

[qi, ABL, qj ]

17

Next configuration

qj

YBX

Program example

u u u o o i u u u ↑ q2 P

• With program                    

    2          2       2 

            

            

[q1, uuR, q ],

[q2, oiR, q ], [q2, ioR, q ], , P =      [q , uuL, q ], 2 3       [q3, ooL, q3], [q3, iiL, q3]

• and input iio, • the machine moves through the sequence of configurations

u u u o o i u u u ↑ q3 P u u u o o i u u u ↑ q3 P u u u o o i u u u ↑ q3 P u u u o o i u u u ↑ q3 P

u u u i i o u u u ↑ q1 P u u u i i o u u u ↑ q2 P u u u o i o u u u ↑ q2 P u u u o o o u u u ↑

• and produces the result ooi

18

Formal definition of a Turing machine

19

A Turing machine has a 5-tuple of the form (Σ, C, I, α, ω) where, • Σ 6= Σu, with Σu = Σ ∪ {u}, • C is the set of 4-tuples of the form [qi, ·x, a, y·], with qi being any state, x, y taken from Σ?u and a taken from Σu, • α(x) = [q1, ε, u, x], for all x ∈ Σ?, • ω([qi, ·x, a, y·]) is the longest element of Σ? beginning y·, • I is the set of instructions denoted and defined, for all sates qi, qj and elements a, b of Σu, by [qi, abL, qj ] def = {([qi, ·xc, a, y·], [qj , ·x, c, by·]) | (x, c, y) ∈ E}, [qi, abR, qj ] def = {([qi, ·x, a, cy·], [qj , ·xb, c, y·]) | (x, c, y) ∈ E}, with E = Σ?u × Σu × Σ?u.

20.

Turing machine with internal direction

Program example

u u u o o i u u u ↑ R q2 P

• With program                    

                   

            

            

[q1, uu+, q2],

[q2, oi+, q2], [q2, io+, q2], , P =      [q , uu−, q ], 2 3       [q3, oo+, q3], [q3, ii+, q3]

• and input iio, • the machine moves through the sequence of configurations

u u u o o i u u u ↑ L q3 P u u u o o i u u u ↑ L q3 P u u u o o i u u u ↑ L q3 P u u u o o i u u u ↑ L q3 P

u u u i i o u u u ↑ R q1 P u u u i i o u u u ↑ R q2 P u u u o i o u u u ↑ R q2 P u u u o o o u u u ↑

• and produce the result ooi

21

Graph of a program

                           

                           

[q1, uu+, q2], [q2, oi+, q2], [q2, io+, q2],          [q , uu−, q ],    2 3                     [q , oo+, q ],     3 3                 [q3 , ii+, q3 ] 

22

Formal definition of a Turing machine with internal direction

23

A Turing machine, with internal direction, has a 5-tuple of the form (Σ, C, α, ω, I) where, • Σ 6= Σu, avec Σu = Σ ∪ {u}, • C is the set of 5-tuples of the form [d, qi, ·x, a, y·], with d ∈ {L, R}, qi being a state, x, y taken from Σ?u and a taken from Σu, • α(x) = [R, q1, ε, u, x], for all x ∈ Σ?, • ω([d, qi, ·x, a, y·]) is the longest element of Σ? beginning y·, • I is the set of instruction denoted and defined, for all states qi, qj , all elements a, b of Σu and all s ∈ {+, −}, by [qi, abs, qj ] def = {([d, qi, ·xc, a, y·], [L, qj , ·x, c, by·]) | (d, s) ∈ E1 and (x, c, y) ∈ F }} ∪ {([d, qi, ·x, a, cy·], [R, qj , ·xb, c, y·]) | (d, s) ∈ E2 and (x, c, y) ∈ F }, wth E1 = {(L, +), (r, −)}, E2 = {(L, +), (R, −)} and F = Σ?u × Σu × Σ?u.

24.

Relationship between the two types of Turing machines

25

Program transformations f1 and f2

• Let M1 and M2 be machines of same alphabet Σ, the first one of type Turing and the second one of type Turing with internal direction and let P1 and P2 denote the sets of their programs. • Property The program transformations g1 : P1 → P2 and g2 : P2 → P1, defined below, strongly simulate M1 on M2 and M2 on M1 : g1(P1) def = {[q2i−h, abs, q2j−k ] | [qi, abd, qj ] ∈ P1 and (h, k, d, s) ∈ E}, g2(P2) def = {[q2i−h, abs, q2j−k ] | [qi, abd, qj ] ∈ P2 and (h, k, s, d) ∈ E}, with

   def    

E=

   

   

   

(1, 1, +, R) (0, 1, −, R) ∪ . (1, 0, −, L) (0, 0, +, L) 

• Theorem 1 The program transformations f1 : P1 → P2 and f2 : P2 → P1, defined, for ` = 1 and ` = 2, by f` = clean ◦ g`, with g` defined above, simulate M1 on M2 and M2 on M1 and are such that f2 ◦ f1 ◦ f2 ◦ f1 = f2 ◦ f1, f1 ◦ f2 ◦ f1 ◦ f2 = f1 ◦ f2.

26.

Arithmetic machine with indirect adressing

Arithmetic machine with indirect addressing

27

Definition An indirect addressing arithmetic machine has a 5-tuple (Σ, C, α, ω, I) where, • Σ = {c1, . . . , cm}, • C is the set of infinite sequences on natural integers of the form r = (r0, r1, r2, . . .), • α(a1 . . . an) = (0, 25, 1, . . . , 1, r24+1, . . . , r24+n, 0, 0, . . .), with r24+i equal to 1, . . . , m depending whether ai equals c1, . . . , cm, • ω(r0, r1, . . .) = a1 . . . an, with ai equal to c1, . . . , cm depending whether ai equals 1, . . . , m, and satisfting the condition that n is the greatest integer such that rr1 , . . . , rr1+n are elements of {1, . . . , m}, • I is the set of instructions denoted and defined, for all natural integers i, j, k, by: def [i, cst, j, k] = {(r, s0) ∈ C 2 | r0 = i, sj = k and si = ri elsewhere}, [i, plus, j, k] def = {(r, s0) ∈ C 2 | r0 = i, sj = rj +rk and si = ri elsewhere}, [i, sub, j, k] def = {(r, s0) ∈ C 2 | r0 = i, sj = rj ÷rk and si = ri elsewhere}, [i, from, j, k] def = {(r, s0) ∈ C 2 | r0 = i, sj = rrk and si = ri elsewhere}, def [i, to, j, k] = {(r, s0) ∈ C 2 | r0 = i, srj = rk and si = ri elsewhere},    rk , if rj = 0, def 0 2 [i, ifzero, j, k] = {(r, s ) ∈ C | r0 = i, s0 =  and si = ri elsewhere}, r0 +1, if rj 6= 0 with s0 equal to s except that s00 = s0 + 1 and with rj ÷rk = max{0, rj −rk }.

28.

Universal program and coding

29

Universal program for translating

Σ = {t,0,1,...,9,a,b,...,z}

Translating program colorlesstgreentideastsleeeptfuriously ⇓ Universal program            

           

instruction 1, instruction 2,       . . .              instruction n   ⇓ destideestvertestincolorestdormenttfurieusement

30

Same universal program for multiplying

Σ = {t,0,1,...,9,a,b,...,z}

Multiplying program 26010x37979721 ⇓ Universal program            

           

instruction 1, instruction 2,       . . .              instruction n   ⇓ 9876543210

Definition of a universal pair

31

• Let M = (Σ, C, α, ω, I) be a machine and let us code each program P for M by a word code(P ) on Σ. Definition The pair (U, code), the program U and the coding function code, are said to be universal for M, if, for all programs P of M and for all x ∈ Σ?, out(U, code(P ) · x) = out(P, x) . • If in the above formula we replace P by U , and x by code(U )n · x we get : out(U, code(U )n+1 · x) = out(U, code(U )n · x) and thus: Property If (U, code) is a universal pair, then for all n ≥ 0 and x ∈ Σ?, out(U, code(U )n · x) = out(U, x) .

32.

Example of an universal program running on itself

Translating program

                                                              

1. Give to i the value 0. 2. Increase i by 1.

Input: English sentence

                               

3. If i is greater than the number of words to be tranlated,  go to 6.    4. Translate the ith word. 5. Go to 2. 6. Stop.

                          

colorlesst greentidea stsleeptfu riously

33

34 Input: translating program + English sentence

Universal program                                                                                                                                               

1. Give to n the value 0. 2. Increase n by 1. 3. Find instruction number n at the beginning of the input.

                                                                       

1. Give to i the value 0.

4. If the found instruction is a halting instruction, go to 12.

2. Increase i by 1.

5. If the found instruction is of the form "if test then go to p", go to 8.

3. If i is greater colorlesst than . . . , go to greentidea stsleeptfu 6. riously 4. Translate the ith word.

6. Execute the found instruction. 7. Go to 2.

                                                                      

8. Perform the test required by the found instruction. 9. If the test succeed, go to 2. 10. Give to n the value p. 11. Go to 3. 12. Stop.

5. Go to 2. 6. Stop.

Input: universal program + trans-35 lating program + English sentence

Same universal program                                                                                                                                               

1. Give to n the value 0. 2. Increase n by 1. 3. Find instruction number n at the beginning of the input.

                                                                       

1. Give . . . 2. Increase . . .

4. If the found instruction is a halting instruction, go to 12.

3. Find . . .

5. If the found instruction is of the form "if test then go to p", go to 8.

5. If . . .

6. Execute the found instruction. 7. Go to 2.

                                                                      

8. Perform the test required by the found instruction. 9. If the test is not true, go to 2. 10. Give to n the value p. 11. Go to 3. 12. Stop.

4. If . . .

6. Execute . . . 7. Go to 2. 8. Perform . . . 9. If the test . . . 10. Give . . . 11. Go to 3. 12. Stop.

1. Give to i the value 0. 2. Increase i by 1. 3. If i is greater colorlesst than . . . , go to greentidea stsleeptfu 6. riously 4. Translate the ith word. 5. Go to 2. 6. Stop.

36.

Complexity and introspection coefficient

Definition of complexity and introspection coefficient

37

Let (U, code) be a universal pair for the machine M = (C, I, Σ, α, ω).

Definition Given a program P for M and a word x on Σ such that cost(P, x) 6= ∞, the complexity of (U, code) is the real number denoted and defined by cost(U, code(P ) · x) λ(P, x) = . cost(P, x)

Definition If for all x ∈ Σ?, with cost(U, x) 6= ∞, the real number n+1 cost(U, code(U ) · x) n lim λ(U, code(U ) · x) = lim n→∞ n→∞ cost(U, code(U )n · x)

exists and does not depend on x, then this real number is the introspection coefficient of the universal pair (U, code).

Keeping the same complexity and introspection coefficient

38

• Let M1 be a Turing machine and M2 a Turing machine with internal direction and same alphabet Σ. • Let f1 and f2 be the program transformations of Theorem 1. • Property If P1 = f2(P2) or P2 = f1(P1) and if (U2, code 2) is a universal pair for M2 then the pair (U1, code 1) def = (f2(U2), code 2 ◦ f1) 1. is universal for M1, 2. has a complexity λ1(P1, x), not defined or equal to the complexity λ2(P2, x) of the pair (U2, code 2), depending whether the real number λ2(P2, x) is not defined or defined, 3. admits the same introspection coefficient as (U2, code2) or does not admit an introspection coefficient, depending whether (U2, code2) admits or does not admit one, 4. is such that code 1(P1) = code 2(P2).

39.

Existence and value of the introspection coefficient

40

Toward the labeling hypothesis

out(P, x) = y x ↓

y ↑ 1

2

2

1

3

code(P )·x •−−−−→•−−−−→•−−−−→•−−−−→•−−−−→• y ↓ ↓ ↓ ↓ ↓ & ↑ ↓ 1 1 4 3 2 2 3 3 2 3 3 3 2 3 3 1 5 5 •→ →→• → → •→ →→• → →→• → → •→ →→→→ •

out(U, code(P ) · x) = y

41

Labeling hypothesis

Let M = (Σ, C, α, ω, I) be a machine and (U, code) a universal pair for M

Hypothesis There exist • a synchronization function Φ : CU → CU , with Φ(c) final for U when c is final for U , • a labeling function µ : ( U )? → (1..n)? with n a positif integer and µ being surjective, such [ that µ(t1 . . . tk ) = µ(t1) . . . µ(tk ), for all t1 . . . tk ∈ ( U )?, [

• an initial sequence of labels δ ∈ (1..n)?, independent of x, such that δ = µ(track (U, α(code(U )·x), Φ(α(x)))), for all x ∈ Σ?, • a label rewriting ϕ : 1..n → (1..n)? such that, for all (c, c0) ∈ U , [

ϕ(µ(c, c0)) = µ(track (U, Φ(c), Φ(c0))).

Vector B and Matrix A related to δ and ϕ





b1   ·  B = ·  , ·   bn           



bi = number of occurrences of i in δ.



a11 . . .a1n   · ·  ·  , aij = number of occurrences of i in ϕ(j). A= · · ·   an1. . .ann           

42

43

Vector B and Matrix A related to δ and ϕ, next • For example, for x ↓

y ↑ 1

2

2

1

3

code(P )·x •−−−−→•−−−−→•−−−−→•−−−−→•−−−−→• y ↓ ↓ ↓ ↓ ↓ & ↑ ↓ 1 1 4 3 2 2 3 3 2 3 3 3 2 3 3 1 5 5 •→ →→• → → •→ →→• → →→• → → •→ →→→→ •

• with n = 5, we get 



2  0   B = 0  ,  1   0               



0 1 A= 1 0 0               

0 1 2 0 0

1 0 2 0 2

0 0 0 0 0



0  0   0  .  0   0

Properties of A and B

44

• Property For all x ∈ Σ?, with out(U, x) 6=%, by introducing the column matrix, 

X (k) =

          

(k) x1

· · · xn

           

,

   

number of occurrences of i (k) xi =  in µ(track (U, code(U )k ·x)),

we have X (k+1) = AX (k) + B

• Thus k

cost(U, code(U ) ·x) = ||X

(k)

||,

and

cost(U, code(U )k+1 ·x)| ||X (k+1)|| = . k (k) cost(U, code(U ) ·x) ||X ||

45

Main theorem Here B and A are the vector and the matrix associated with β and ϕ.

Theorem 2 If the matrix A admits a real eigenvalue λ, whose multiplicity is equal to 1 and whose value is strictly greater than 1 and strictly greater then the absolute value λ0 of the other eigenvalues of A then: • the limit matrix A¯ = limn→∞ ( 1 A)n exists, and is not everywhere zero, λ

¯ • if ||AB|| 6= 0, the introspection coefficient of U exists and is equal to λ, • if ` is a real numbers such that λ0 < ` < λ and the Xi’s are column vectors defined by 1 X0 = B, Xn+1 = AXn, ` then, when n → ∞,   ¯   if ||AB|| = 0, 0, ||Xn|| →  ¯ ∞, if ||AB|| 6= 0.

46.

Universal pair (U2, code 2) for Turing machine with internal direction

47

Presentation of (U2, code 2)

• (U2, code 2) is a universal pair for the Turing machine with internal direction M2 with alphabet Σ = {o, i, z}.

• In order to assign a position to each instruction [qi, abs, qj ] of a program, we introduce the numbers:  π(i, a) =

1, 2, 4(i − 1) +   3,      4,         

if a = u if a = o , if a = i if a = z

π(i) = 12 (f (i, o) + f (i, i)),

defined for all positive integers i and symbols a ∈ {u, o, i, z}.

48

Coding function code 2

• Let P2 be a program for M2 and let P20 = f1(f2(P2)). We take code 2(P2) = code 02(P20 ), with code 02(P20 ) the word on {o, i, z}: zI4nz . . . zIk+1zIk zIk−1z . . . zI1zoi . . . izz, where n is the number of states of P20 , and the size of the shuttle oi . . . iz equals the longest size of the Ik ’s minus 5, • where, for all a ∈ Σu and i ∈ 1..n, Iπ(i,a) • with,

[qi, abs, qj ], if there exists b, s, j with [qi, abs, qj ] ∈ P20 , =  oi, otherwise,     

    

iam . . . a2o, if π(j) − h(i, a) > 0, [qi, a, b, s, qj ] =  oa . . . a i, if π(j) − h(i, a) < 0, 2 m • with a2a3 equal to io, oi, ii, depending whether b equals u, o, i, z, • with a4 = o or a4 = i depending whether s = + or s = −, • with iam . . . a5 a binary number (o for 0 and i for 1) whose value is equal to 3 |π(j) − π(i, a)| + . 2

How program U2 operates

49

• Initial configuration of P2 · · · uu x uu · · · ↑ R q1 P2

• Initial corresponding configuration of U2 code(P ) z

}|

{

. . . uu zI4nz . . . zIk+1zIk zIk−1z . . . zI1zoi . . . izz | {z } ↑ shuttle R q1 P2

x

uu . . .

How program U2 operates, next 1

50

• Current configuration of P2 v

a w ↑ d qi P2

• Current corresponding configuration of U2 standard shuttle }| { z

v

or

uzzI4nz . . . zIk+1zIk zd0u . . . uzIk−1z . . . zI1zu w ↑ L q24 U2

reversed shuttle z }| {

v

uzzI4nz · · · zIk+1zu . . . ud0zIk zIk−1z · · · zI1zu w ↑ R q24 U2

(1)

(2)

depending whether Ik , with k = π(i, a), is in the standard form iam . . . a2o or in the reversed form iam . . . a2o. The read-write points to a3 or to the z which follows Ik when Ik is the empty instruction oi. Depending whether d is equal to L or R, the symbol d0 is equal to u or o, if Ik is standard, and to o or u, if Ik is reversed.

How program U2 operates, next 2

• Final configurations of P2 b y u ↑ d qm P2

• Final corresponding configurations of U2 uzzI4nz · · · zIk+1zu . . . ud00zIk zIk−1z · · · zI1zu y u ↑ R q23 P2

with Ik = oi, k = π(m, b) and d0 equal to o or u, depending whether d equals L or R.

51

Architecture of program U2 0

A Start I N S T R U C T I O N L O C A L I Z A T I O N

8

52

I Instruction orien tation test

1 B Shuttle direction updating

H Shuttle reversing

7

2

G Shuttle counter decreasing

C Shuttle counter initialization

6

3

F Moving shuttle to next z

D Writing, moving, reading

5

E Shuttle counter updating

4

J End

I N S T R U C T I O N E X E C U T I O N

9

Graph of program U2

53

uu+ ii+ oo+

9 uu+ ii+ oo+

+ u u i i +

uu+ ii+ o i −

u u +

i o −

i u −

1 o o +

i i +

o u +

i u +

oo+

u i +u u −

i u −

uu+ ii+

ii+

uu− io+

ii+

oo+

oo+

oi+

oo+

u o +

u u −

o u −

o o +

o o +

uu+ ii+

u u −

oo+

u o +

ii+ uu+

u u +

o o +

i u −

2

u i i i + − o o +

uo+

u o +

o o −

d o o +

u u +

oo+ uu+ oo+ u i +

u u +

ii+ o i −

uu+ i i −

o o −

3

ii+

d

u u −

o u −

8 u u + 7 u u −

0

c

u u −

uu+ oo+ ii+ uu+

o i o i + +

u u − u u +

u u −

i u +

7 u o −

u u − ui− ou− iu− uo−

oo+ ii+ uu+

u u −

i o +

iu+ oo+ o i +

uu+

6

u u −

i i + u i +

i u − u o + o i +

i u + u u + o u −

o o + o i u o u + + o u o u + + u i u + + u u +

o u i i o +u + + u u +

u u +

u u −

i o u − u −

u u −

o u −

uu+

u o −

u u − u o i u o i + + +

5 uu+ oo+ ii+

u u − u u +

u i +

i i +

u u +

u u +

4

u o i u o i + + + u i −

i u +

u o u i i + o + +

o u +

ii+ uu+ u u +

u i −

u u −

o u +

oo+

c

i o u u o i + + +

oo+

oo+ i u i u − +

u u +

u u − i u − o u − u u −

uu+ ii+

u o +

o o +

oo+ ii+

i u −

u u −

a o o +

i u +

o o − u u +

b

i u +

i i +

o o +

i o −

oi+

o u +

u u −

Listing of program U2

54

54 states and 184 instructions # A BEGINNING [X0,uz+,A1],

[X0,oo+,A1], [A1,oo+,A1],

[X0,ii+,A1], [A1,ii+,A1],

# B INSTRUCTION TAIL COPYING [X1,oo+,B1], [X1,ii+,B1], [B1,oo+,B5], [B1,iu-,B2], [B2,oo+,B2], [B2,ii+,B2], [B3,oi-,B4i], [B3,io-,B4i], [B4o,uo+,B5], [B4o,oo+,B4o], [B4o,ii+,B4o], [B4i,ui+,B5], [B4i,oo+,B4i], [B4i,ii+,B4i], [B5,uu-,B6], [B5,ou-,B4o], [B5,iu-,B4i], [B6,oo+,B4o], [B6,ii+,B4i], # Replacement of the remaining u’s by o’s [B7,uo+,B9], [B7,oo+,B7], [B7,ii+,B7], [B9,uo+,B9], [B9,oo+,X2], [B10,oo+,B10], [B10,ii+,B10], # C INSTRUCTION HEAD COPYING # Creating the symbol to be written [X2,oo+,C2], [X2,iu-,C1], [C1,ui+,C2], [C1,oi+,C1], [C1,io+,C1], [C2,oo-,C3o], [C2,ii-,C3i], [C3o,uo+,C4], [C3o,oo+,C3o], [C3o,ii+,C3o], [C3i,uz+,C4], [C3i,oo+,C3i], [C3i,ii+,C3i], # Taking in account the direction [C4,oi-,C5], [C4,ii-,X3], [C5,uu+,C6], [C5,oo+,C6], [C5,ii+,C6], [C6,oo-,X3],

[X0,zu-,X7], [A1,zz+,X0], [X7,zz+,X8],

[B2,zz+,B3], [B4o,zz+,B4o], [B4i,zz+,B4i], [B5,zz-,B7],

[B7,zz+,B7], [B9,zz-,B10], [B10,zz+,B9],

[C1,zu-,C1], [C3o,zu+,C4], [C3i,zi+,C4],

[C5,zz+,C6],

Listing of program U2, next 1 # D WRITING, MOVING AND READING # Writing and reading [X3,uu-,D1u], [X3,ou-,D1o], [X3,iu-,D1i], [D0,uu-,D1z], [D0,ou-,D1i], [D0,iu-,D1o], [D1u,uu-,X4], [D1u,oo+,D1u], [D1u,ii+,D1u], [D1o,uo-,X4], [D1o,oo+,D1o], [D1o,ii+,D1o], [D1i,ui-,X4], [D1i,oo+,D1i], [D1i,ii+,D1i], [D1z,uz-,X4], [D1z,oo+,D1z], [D1z,ii+,D1z], # Moving

55

[X3,zu-,D1z], [D0,zu-,D1u], [D1u,zz+,D1u], [D1o,zz+,D1o], [D1i,zz+,D1i], [D1z,zz+,D1z], [X4,zu+,D2z],

[D2o,uo+,D2u], [D2i,ui+,D2u], [D2z,uz+,X3], [D2zz,uz+,D0],

[D2u,ou+,D2o], [D2u,iu+,D2i], [D2o,oo+,D2o], [D2o,io+,D2i], [D2o,zo+,D2z], [D2i,oi+,D2o], [D2i,ii+,D2i], [D2i,zi+,D2z], [D2z,oz+,D2o], [D2z,iz+,D2i], [D2z,zz+,D2zz], [D2zz,oz+,D2o],

# E SHUTTLE UPDATING # Beginning of the updating [X4,oo-,E1b], [E1a,uz-,E2a], [E1a,oz-,E2b], [E1b,uz+,X5], [E1b,oz+,X6], # End of the updating [E2a,oo+,E2b], [E2b,oo+,E4], [E4,oi+,E4], [E5,uu+,E5], [E5,oo+,E5],

[X4,io-,E1a], [E1a,iz-,X6], [E1a,zz-,X5], [E1b,iz+,E2b], [E1b,zz+,E2a], [E2a,iu+,E2b], [E2b,ii+,E4], [E4,io-,E5], [E4,zz-,X7], [E5,ii+,E5], [E5,zz-,X6],

Listing of program U2, next 2

56

# F SUTTLE MOVING TO NEXT z [X5,uu+,X5], [X5,oo+,X5], [F1,uz+,F2u], [F1,oz+,F2o], [F2u,uu+,F2u], [F2u,ou+,F2o], [F2o,uo+,F2u], [F2o,oo+,F2o], [F2i,ui+,F2u], [F2i,oi+,F2o], [F3,oz-,F4o], [F4o,uu+,F4o], [F4o,oo+,F4o], [F4i,uu+,F4i], [F4i,oo+,F4i],

[X5,ii+,X5],

[X5,zz-,F1],

[F2u,iu+,F2i], [F2o,io+,F2i], [F2i,ii+,F2i], [F3,iz-,F4i], [F4o,ii+,F4o], [F4i,ii+,F4i],

[F2u,zu+,F3], [F2o,zo+,F3], [F2i,zi+,F3], [F3,zz-,X6], [F4o,zo-,F1], [F4i,zi-,F1],

# G SHUTTLE DECREASING [X6,uu+,G1], [X6,oo+,G1], [G1,uu-,X7], [G1,oi+,G1],

[X6,iu+,G1], [G1,io+,X5],

[G1,zz-,X8],

# H SHUTTLE REVERSING AFTER BLANK SYMBOLS INTRODUCTION [X7,uu-,E2a], [X7,ou-,E2b], [X7,iu+,X7], [E2a,uu+,E2a], [E2a,zz-,I1], [E2b,uu+,E2b], [E2b,zz-,I2], [I1,uo-,X8], [I2,ui-,X8], # I INSTRUCTION ORIENTATION TEST AFTER BLANK SYMBOLS INTRODUCTION [X8,ui+,X8], [X8,oo+,X8], [X8,iu+,X8], [X8,zz+,I1], [I1,oo+,I2], [I1,ii-,I2], [I2,oo+,X1], [I2,ii+,X1], [I2,zz+,X5], # J END OF THE PROGRAM [X9,oo+,X9],

[X9,ii+,X9],

[X1,zz+,X9], [X9,zz+,X9]];

57.

Complexity and introspection coefficient of (U1, code 1) and (U2, code 2)

General complexity of (U1, code 1) and (U2, code 2)

58

• Let (U1, code 1) be the universal pair (f2(U2), code 2 ◦ f1) for the Turing machine M1 of same alphabet Σ = {o, i, z} then M2. • U1 has 361 instructions and 106 states, while U2 has 184 instructions and 54 states. • For ` = 1 and ` = 2, and any program P` for M`, |code `(P`)| = O(n log n) , where n is the number of states of clean(P`)). • There exists a positive real number k, not dependent on x ∈ Σ?, such that λ`(P`, x) ≤ n log2 n • If m = |code `(P`)|, then there exists a positive real number k, not dependent on x ∈ Σ?, such that λ`(P`, x) ≤ m log m

Complexity of (U1, code 1) and (U2, code 2) on examples • For ` = 1 and ` = 2. cost( cost(U`, cost(U`, code `(U`)· x P`, x) code `(P`)·x) code `(P`)·x) ε 2 5 927 22 974 203 o 6 13 335 51 436 123 oi 12 23 095 88 887 191 oiz 20 35 377 136 067 693 oizo 30 49 663 190 667 285

λ`(P`, x) 2 963.50 2 222.50 1 924.58 1 768.85 1 655.43

59

λ`(U`, code `(P`)·x) 3 876.19 3 857.23 3 848.76 3 846.22 3 839.22

• • Here P`, with P1 = f2(P2), is a reversing program of 32 instructions and 9 states, such that, for all n ≥, out(P2, a1a2 . . . an) = an . . . a2a1, with the ai’s taken from {o, i, z}. • For ` = 1 and ` = 2, |code `(P`)| = 265 and |code `(U`)| = 1552.

Introspection coefficient of (U1, code 1) and (U2, code 2)

60

• In order to satisfy our Hypothesis, code 2(U2) = f1(f2(code 2(U2))) and the labeling function [ µ is defined so that, for all transitions (c1, c2) and (c01, c02) of M2, the integers µ(c1, c2) and µ(c01, c02) are equal if and only if together: • the states of c1 and c01 are equal, • the symbols pointed by the read-write heads in c1 and c01 are equal, • the symbols pointed by the read-write heads in c2 and c02 are equal, • the directions in c2 and c02 are the same. • The function Φ is defined, for all configuration of U2, with P2 = U2 by,     

current configuration corresponding to c, if c is not final for P2, Φ(c) =  final configuration corresponding to c, if c is final for P . 2 • After having computed the column vector B and the matrix A, using Theorem 2, we have verified that U2 admits an introspect coefficient and computed its value: for ` = 2 and all words x on Σ such that cost(P, x) 6= ∞, cost(U`, code `(U`)n+1 ·x) lim = 3672.98 n→∞ cost(U , code(U )n ·x) ` ` • This result also holds for ` = 1.

61.

Universal pair (U3, code 3) for arithmetic machine with indirect adressing

Execution of P3

Execution of U3

• Current configuration

• Current corresponding configuration

R0 R1 R2 0 3 2

R0 R1 R2 50                             

                            

[0, plus, 2, 1], [1, cst, 11, 1], [2, from, 5, 2], [3, ifzero, 5, 8], P3 =     [4, sub, 5, 11],                   [5, to, 2, 5],                 [6, plus, 2, 11],                 [7, cst, 0, 1] • Next current configuration R0 R1 R2 1 3 5

62

P

0 3 2

                            

                            

[0, cst, 8, 0], [1, cst, 10, 2], [2, cst, 11, 11], ... U =     [99, cst, 0, 49],                   [100, plus, 9, 1],                 [101, from, 9, 9],                 [102, plus, 1, 9] • Next current corresponding configuration R0 R1 R2 50

P

1 3 5

Listing of program U3 # INITIALISATION # OF THE REGISTERS [0,cst,8,0], [1,cst,10,2], [2,cst,11,11], [3,cst,12,20], [4,cst,13,26], [5,cst,14,33], [6,cst,15,67], [7,cst,16,68], [8,cst,17,70], [9,cst,18,76], [10,cst,19,82], [11,cst,20,88], [12,cst,21,94], # ENCODING OF THE # EMULATED PROGRAM # INITIALISATION OF THE # SOURCE POSITION R[1] AND # THE BOOLEEN VALUE c [13,cst,2,24], [14,cst,5,1], [15,cst,0,16],

63

# INCREASING THE # SOURCE POSITION R[1] [16,plus,1,9], # CASE STUDY ACCORDING # TO THE VALUE a OF R[R[1]] [17,from,3,1], [18,to,1,8], [19,plus,3,11], [20,from,0,3], # CASE WHERE a=1 [21,ifzero,5,24], [22,cst,5,0], [23,cst,4,0], [24,plus,4,4], [25,plus,4,9], [26,cst,0,15], # CASE WHERE a=2 [27,ifzero,5,30], [28,cst,5,0], [29,cst,4,0], [30,plus,4,4], [31,plus,4,9], [32,plus,4,9], [33,cst,0,15],

# CASE WHERE a=3 [34,ifzero,5,36], [35,cst,0,40], [36,plus,2,9], [37,sub,4,9], [38,to,2,4], [39,cst,5,1], [40,cst,0,15], # END [41,to,1,8], [42,cst,4,1], [43,plus,4,1], [44,cst,6,25], [45,to,4,6], # PROGRAM EMULATION # SKIP INCREMENTATION # OF THE INSTRUCTION COUNTER [46,cst,0,49], # INCREASING # THE INSTRUCTION COUNTER [47,from,6,1], [48,plus,6,9], [49,to,1,6],

Listing of program U3, next # COMPUTING THE POSITION # OF INSTRUCTION NB ZERO [50,from,7,1], [51,cst,6,25], [52,plus,6,7], [53,plus,6,7], [54,plus,6,7], # HALTING TEST [55,cst,7,0], [56,plus,7,1], [57,sub,7,6], [58,ifzero,7,100], # COMPUTING a:=R[R[6]], [59,from,3,6], # COMPUTING b:=R[R[6]]+R[1] [60,plus,6,9], [61,from,4,6], [62,plus,4,1], # COMPUTING c:=R[R[4]+2]; [63,plus,6,9], [64,from,5,6], # CASE STUDY ACCORDING # TO THE VALUE OF a

[65,cst,6,15], [66,plus,6,3], [67,from,0,6], # NO INSTRUCTION [68,cst,0,99], # CONSTANT INSTRUCTION [69,to,4,5], [70,cst,0,46], # PLUS INSTRUCTION [72,plus,5,1], [73,from,5,5], [74,plus,6,5], [75,to,4,6], [76,cst,0,46], # MINUS INSTRUCTION [77,from,6,4], [78,plus,5,1], [79,from,5,5], [80,sub,6,5], [81,to,4,6], [82,cst,0,46], # FROMINDIRECT INSTRUCTION [83,plus,5,1],

64

[84,from,5,5], [85,plus,5,1], [86,from,5,5], [87,to,4,5], [88,cst,0,46], # TOINDIRECT INSTRUCTION [89,from,4,4], [90,plus,4,1], [91,plus,5,1], [92,from,5,5], [93,to,4,5], [94,cst,0,46], # IFZERO INSTRUCTION [95,from,4,4], [96,ifzero,4,98], [97,cst,0,46], [98,to,1,5], [99,cst,0,49], # END [100,plus,9,1], [101,from,9,9], [102,plus,1,9].

Complexity and introspection coefficient of (U3, code 3)

65

• Property There exists a positive number k such that, for all programs P3 and word x on Σ, with cost(P3, x) 6= ∞, λ(P3, x) =

cost(U3 , code 3 (P3 )·x) cost(P3 , x)

|code(P )| ≤ 35 + k cost(P 3 , x)

• On particular examples we have obtained the following results: cost( cost(U3, cost(U3, code 3(U3)· λ(U3, x λ(P3, x) P3, x) code 3(P3)·x) code 3(P3)·x) code 3(P3)·x) ε 12 2 372 72 110 197.66 30.40 o 16 2 473 74 758 154, 56 30.23 oi 31 2 860 84 916 92.26 29.69 oiz 35 2 961 87 564 84.60 29.57 oizo 50 3 348 97 722 66.96 29.19 where P3 is a reversing program of 21 instructions such that, for all n ≥ 0 out(P3, a1a2 . . . an) = an . . . a2a1, with the ai’s taken from {o, i, z}. For information, |code 3(P3)| = 216 and |code 3(U3)| = 1042. • As introspection coefficient we have obtained: cost(U3 , code(U3 )n+1·x) limn→∞ cost(U3, code(U3)n·x)

= 26, 27

Matrix A and vector B for U3 

A=

4    9    1    6    2    0    1     0    0    0    0    0    0    0     0    0    0    0    0    0    0

4 11 1 8 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 10 2 8 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 11 1 8 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 11 1 8 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 8 1 6 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

4 9 1 7 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0

5 10 1 7 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 11 2 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

66

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 9 1 7 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 10 1 8 1 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 10 1 7 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 11 2 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 12 1 9 2 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0

5 9 1 7 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0



5   10  1   8   1  0  2   0   0   0   0  0  0   0   0   1   0  0  0   0   0



B=



 1967         4085         310         2041         1329         708         311          0         0         0         0         0         0         0        0          0         0         0         0        0      0

67.

Conclusion

68

Open problem

• Given a first universal pair (U, code) for a Turing machine M, by "cheating", it is possible to construct a second universal pair (U 0, code 0) for M with instrospection coefficient equal to 1.

• A first way of "cheating" consists of taking U 0 = U and    

ε, if P = U , code 0(P ) =  code(P ), if P 6= U . Then

cost(U 0, code(U 0)n+1 · x) cost(U 0, x) = =1 cost(U 0, code(U 0)n · x) cost(U 0, x) and (U, code 0) is a universal pair with introspection coefficient equal to 1.

69

Open problem, next

• A second way of "cheating" consists in keeping code 0 = code and constructing a program U 0, which, after having erased as many times as possible a given word z occurring as prefix of the input, behaves as U on the remaining input. According to the recursion theorem it is possible to take z equal to code(U 0) and thus to obtain a universal program U 0 such that, for all y ∈ Σ? having not code(U )0 as prefix, cost(U 0, code(U 0)n · y) = nk1 + k2(y),

(3)

where k1 and k2(y) are positive integers, with k1 not depending on y. Thus we have : cost(U 0, code(U 0)n+1 · y) cost(U, x) + (n + 1)k1 + k2(y) = = n 0 0 cost(U , code(U ) · y) cost(U, x) + nk1 + k2(y) k1 . cost(U, x) + k2(y) + nk1 By letting n tend toward infinity we obtain an introspection coefficient equal to 1 for the pair (U 0, code 0). 1+

• Open problem How to express in the definition of the introspection coefficient that the function code and the program U should not distinguish the case P = U from the case P 6= U .

Final conclusion

70

• Given the fact that a Turing machine with a universal program models the way our brain operates,

• given the fact that we should think about what we intend to say,

• given the fact that the introspection coefficient of our universal Turing program is 3673,

• do not think twice before you speak, but 3673 times.