Universität Koblenz-Landau FB 4 Informatik
Prof. Dr. Viorica Sofronie-Stokkermans∗1 20.12.2017
M.Ed. Dennis Peuter∗2
Exercises for Advances in Theoretical Computer Science Exercise Sheet 9
Due at 08.01.2018, 10:00 s.t.
Remark: In the lecture from 13.12.2017 we sketched a possibility of associating with every Turing Machine M a unique Gödel number hMi ∈ N such that the coding function and the decoding function are primitive recursive. Similarly, we could associate with every con- guration of a given TM a unique Gödel number for the conguration such that coding and decoding are primitive recursive.
The construction uses the following encoding of words as natural numbers: If Σ = {a0, a1, . . . , am}andw=ai1. . . ain is a word overΣthenhwil =hi1, . . . , ini=Qn
j=1p(j)ij. Therefore, we can represent w.l.o.g. words as natural numbers and languages as sets of natural numbers.
Notation: In what follows we will denote by Mn the Turing machine with Gödel number n and with L(M) the language accepted by the Turing machineM.
Exercise 9.1
LetK ={n| Mnhalts on n}. a) Prove that K is undecidable.
b) Prove that K is acceptable.
c) Prove that the complement ofK is not acceptable.
Exercise 9.2
We dene the following relation ≤on languages (regarded as sets of natural numbers):
If L1, L2 be two languages (regarded as sets of natural numbers), we say thatL1 ≤L2 if there exists a TM computable function f :N→Nwith the property that:
∀n∈N n∈L1 if and only if f(n)∈L2.
Prove that the relation ≤ is transitive, i.e. that if L1, L2 and L3 are languages (regarded here as sets of natural numbers) such that L1 ≤L2 and L2 ≤L3 thenL1 ≤L3.
Exercise 9.3
Prove that it is undecidable whether a WHILE program which computes a partial function f :N→Nterminates on input n.
Hint: One can give e.g. a proof by contradiction using the fact that the class of WHILE- computable functions coincides with the class of T M-computable functions.
Exercise 9.4
Prove that the following problems are undecidable using the theorem of Rice.
I) L1 ={n|Mn accepts an innite language} II) L2 ={n|Mn accepts a nite language} III) L3 ={n|Mn accepts a decidable language}
IV) Letk∈N andL4 ={n|Mn accepts only words which have length greater thank}
V) L5 ={n|L(Mn)is context sensitive }
VI) L6 ={n|the language accepted byMn is regular} VII) L7 ={n|Mn halts on all inputsw∈Σ∗}
∗1 B 225 sofronie@uni-koblenz.de https://userpages.uni-koblenz.de/~sofronie/
∗2 B 223 dpeuter@uni-koblenz.de https://userpages.uni-koblenz.de/~dpeuter/
If you want to submit solutions, please do so until 08.01.2018, 10:00 s.t. via the cardboard box in the shelf in room B 222 or via e-mail (with Homework ACTCS in the subject) to dpeuter@uni-koblenz.de.