• Nem Talált Eredményt

Prove that L /∈R

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Prove that L /∈R"

Copied!
2
0
0

Teljes szövegt

(1)

Languages and Automata 2020 #11 Decidable and recognizable languages

1. Prove that the language of all prime numbers (in binary representation) is recursive (Turing-decidable).

(You can use tha fact, that arithmetic operations can be performed by Turing machines.)

Solution: The Turing machine checks if the input can be divided by any number smaller than itself.

If yes, it rejects. If not, it accepts.

2. Prove that (a) Ld 6∈R (b) Ld ∈RE

Solution: A Turing machine for Ld:

(a) checkw - if it is not a code for a TM, accept (b) otherwise runMw on w

(c) if it accepts, stop and accept, otherwise reject or run forever

If Ld would be recursive, then R =RE would hold. But there are languages inRE\R, so Ld∈/ R.

3. Let L={w#s:w∈Ld, and s6∈L(Mw)}. Prove that L /∈R.

Solution: IfL∈R, then there is a Turing machine that stops on all inputs, and decides if w#s ∈L.

If we give that Turing machine w#w as an input, we have a Turing machine for Ld. But we know, that there can not be one, so L /∈R.

4. Let L be the language of descriptions w of Turing machines where Mw accepts the prefix of w of length 5 (i.e. the string formed by the first 5 characters ofw). Show that this language is recognizable (it is in RE).

Solution: A Turing machine for L:

(a) checkw - if it is not a code for a TM, reject (b) otherwise runMw on the first five letter of w

(c) if it accepts, stop and accept, otherwise reject or run forever 5. Let L={w:w is a decription of a TM and L(Mw) =∅}.

(a) Prove that L /∈R.

(b) Is it true that L∈RE?

(c) Is it true that L∈co RE?

Solution:

(a) Rice’s theorem. L1 =∅ ∈RE has this property,L2 = Σ ∈RE does not have this property.

(c) It is in coRE. L={w|wis not a description of a TM, or L(Mw) accepts at least one word}

A Turing machine for L:

(a) checkw - if it is not a code for a TM, accept

(b) otherwise check all possible words withMw using the diagonal method (c) if there is one input it accepts, stop and accept

(b) Because L∈coRE\R, it cannot be in RE.

(2)

6. The languageLconsists of Turing machine descriptionsw, such that Mw accepts only strings of odd length (but not necessarily accepts all of these strings). Prove that

(a) L /∈R.

(b) L∈RE.

Solution:

(a) Rice’s theorem: L1 =}w| |w|= 3} ∈RE has this property,L2 = Σ ∈REdoes not have this property.

(b) L={w|w is not a description of a TM, or L(Mw) accepts at least one even length word}

A Turing machine for L:

(a) checkw - if it is not a code for a TM, accept

(b) otherwise check all possible even length words with Mw using the diagonal method (c) if there is one input it accepts, stop and accept

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

For the second part of the above problem, in 2012, Chen and Yang [2] gave two infinite sets W 1 and W 2 of integers such that there exists a complement to W 1 that does not contain

Note that for the case of state-dependent delays in the neutral term the conditions of [32] are not applicable to prove the existence of solutions since ˙ x t is assumed to be only an

In the case of a-acyl compounds with a high enol content, the band due to the acyl C = 0 group disappears, while the position of the lactone carbonyl band is shifted to

2,4-Dinitrophenylhydrazine (1.1 moles) in glacial acetic acid containing concentrated hydrochloric acid (1 drop) is added to the clear solution. The yellow precipitate is

the steady-state viscosity, where \f/(t) is the normalized relaxation function and G is the total relaxable shear modulus. The data of Catsiff et αΖ. 45 furnish in this way

T h e relaxation curves of polyisobutylene in the rubbery flow region have been used t o predict the bulk viscosity, using the " b o x " distribution as the

It has been shown in Section I I that the stress-strain geometry of laminar shear is complicated b y the fact that not only d o the main directions of stress and strain rotate

These troubles of yours the tree accepts, and absorbs them into its own magnetic life; so that henceforth they lose their devilish power of tormenting you” (Powys, Autobiography