80 likes | 108 Views
Explore WHILE programs, UTM, Fixedpoint Theorem, Quines, and more in advanced computability theory and syntax. Learn about Normalform Theorem, SMN Theorem, and Currying concepts. Dive into the post‘s problem and Arithmetic Hierarchy.
E N D
WHILE programs UTM Theorem Normalform Theorem SMN Theorem / Currying (Schönfinkeling) Fixedpoint Theorem, Quines Oracle WHILE programs Post‘s Problem / Friedberg&Muchnik Arithmetic Hierarchy §3 Advanced Computability
WHILE Programs Syntax in Backus—Naur Form: P := ( xj := 0 | xj := xi+ 1 | P ; P | LOOP xj DO P END | WHILE xj DO P END ) body bettermodify xj Semantics: loop executed as long asxj≠0 Observation: a) To every LOOP program P there is an equivalent WHILE program P'without LOOPs. b) As opposed to LOOP programs, WHILE programs have undecidable Halting Problem. Rado’s Corollary: WHILE programs do not admit a bound t(P,n) such that P on input xNk either at most t(P,||x||1) steps or runs indefinitely.
First UTM Theorem UTM-Theorem: There exists a LOOP program U' that, given PN and x1,…,xkNand NN, simulates P on input (x1,…,xk) for N steps. Proof (Sketch): Use one variable y for x1,…,xk, and z to store the current program counter of P: Switch/case P[z] of: „xj:=0“ : x1,…xj,…,xk := x1,…0,…,xk ; z:=z+1 „xi:=xj+1“ : x1,…xi,…xk := x1,…xj+1…xk ; z:=z+1 „WHILE xj DO“ : if xj=0 then z:=1+#of corresponding END „END“ : z := line# of corresponding WHILE Definition: Let PN denote the encoding of WHILE program P (e.g. as ascii sequence).
Normalform Theorem UTM-Theorem: There exists a LOOP program U' that, given PN and x1,…,xkNand NN, simulates P on input (x1,…,xk) for N steps. Normalform-Thm: To every WHILE program P there exists an equivalent one P' containing only one WHILE command (and several LOOPs). Corollary: A WHILE program U can semi-decide the Halting problem for WHILE programs. H = { (P,x1,…xk) : P terminates on input (x1…xk) }
SMN Theorem: Currying Definition: Let C = PN denote the encoding of WHILE program P , P = C its inverse/decoding. Type conversion examplef(x,y) = sin(x)·ey SMN-Theorem: There exists a WHILE program that, given PN and xN, returns P(x, · ),where P(x, · )(y) :P(x,y) UTM-Theorem: There is a WHILE program that, given PN, returns QN with Q(x,y) = P(x) (y) WHILE program that, given P,Q, returns Q◦P
Fixedpoint Theorem and Quines Def: For partial functions f,g:N→N write fgto mean dom(f)=dom(g) and xdom: f(x)=g(x). x y :x y Theorem: Every total computable function φ:N→Nhas a „semantic fixedpoint“, i.e. xN s.t. φ(x) x. Proof: Let x := ψ(φ◦ψ), where ψ(y) := y (y) ψ'(y) := z →(y) (z) semantic extensionof (y) partial! defined? ' Application (Quines): Let A=A(p,y) be a program. Consider "fixedpoint" Pof (p) :=A(p, · ). NP = code of program P, C = program with code CN
Oracle WHILE programs xj := (xi) | P := ( xj := 0 | xj := xi+ 1 | P ; P | LOOP xj DO P END | WHILE xj DO P END ) Fix some arbitrary total :N→N Examples:▪ := χP characteristic function of Primality Probl. ▪ := χH characteristic function of Halting Problem ▪ := χT characteristic function of Totality Problem cmp. Cardinality…(Cantor–Schröder–Bernstein) χP≼ χH ≡χH ≼ χT For , N write ≼ if there is a WHILE program with oracle computing . For L,L' N write L≼L' if there is a computable f: N N such that x: xL f(x)L'. a) L' semi-/decidable so L. b) L≼L'≼L'' L≼L'' b) L≼L'≼L'' L≼L'' a) computable so b) ≼≼χ ≼ χ
Arithmetic Hierarchy : P := ( xj := 0 | xj := xi+ 1 | P ; P | LOOP xj DO P END | WHILE xj DO P END ) Def:Δ1 =Σ0 =Π0= decidable Δk+1 = decidableΣk = decidableΠk Σk+1 = semi-decidableΣk Πk+1 = co-semi-decidableΣk Δ3 Σ2Π2 Fix some arbitrary total :N→N Σ2 Π2 Δ2 Σ1 Π1 Lemma: a) Δk= co-Δk b) Δk = Σk Πk c) Σk Πk Δk+1 Π1 Σ1 Δ1