Properties of Recursively Enumerable and Decidable Languages, Exams of Computer Science

Questions and answers related to the properties of decidable and recursively enumerable languages, including disjoint languages, encoding of dfas and pdas, language reducibility, and rice's theorem.

Typology: Exams

Pre 2010

Uploaded on 03/11/2009

koofers-user-6lc
koofers-user-6lc 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Pick the correct alternative from among the choices (A), (B), and (C) provided for each question below.
1. Let Aand Bbe disjoint, recursively enumerable languages. Further let ABalso be recursively
enumerable. What can you say about Aand B?
(A) It is possible that neither Anor Bis decidable.
(B) At least one among Aand Bis decidable.
(C) Both Aand Bare decidable.
The correct answer is (C). The decision procedure for A(and B) is as follows. Run the TMs for
A,Band ABsimultaneously on the input. One of these is guaranteed to accept. Accept only if
TM for A(B) accepts.
2. Just as we encoded Turing Machines as binary strings, we can also encode DFAs as binary strings.
Let hMidfa be the binary string encoding of DFA M. Consider the following language Ldfa
d=
{hMidfa | hMidfa 6∈ L(M)}. What can we say about Ldfa
d?
(A) Ldfa
dis regular.
(B) Ldfa
dis not regular but it is decidable.
(C) Ldfa
dis not recursively enumerable.
The correct answer is (B). Non-regularity follows for the same reasons that the diagonal language
is not r.e.
3. Just as we encoded Turing Machines as binary strings, we can also encode PDAs as binary strings.
Let hMipda be the binary string encoding of PDA M. Consider the following language Lpda
d=
{hMipda | hMipda 6∈ L(M)}. What can we say about Lpda
d?
(A) Lpda
dis decidable
(B) Lpda
dis not decidable but it is recursively enumerable.
(C) Lpda
dis not recursively enumerable.
The correct answer is (A). Decidability follows from the fact that PDA membership is decidable
(CYK algorithm).
4. Let Lbe decidable. Which of the following is true about L?
(A) If L0Lthen L0is decidable.
(B) If LL0then L0is decidable.
(C) Lm{0n1n|n0}
The correct answer is (C).
5. Let Aand Bbe any languages such that AmB. Under what conditions is it the case that AmB?
(A) Only when both Aand Bare decidable.
(B) Only when both Aand Bare recursively enumerable.
(C) Always.
The correct answer is (C). Let fbe a reduction from Ato B. Then fis a computable and xA
iff f(x)Bwhich is the same as x6∈ Aiff f(x)6∈ Bwhich is the same as xAiff f(x)B. Thus f
is a reduction from Ato B.
1
pf2

Partial preview of the text

Download Properties of Recursively Enumerable and Decidable Languages and more Exams Computer Science in PDF only on Docsity!

Pick the correct alternative from among the choices (A), (B), and (C) provided for each question below.

  1. Let A and B be disjoint, recursively enumerable languages. Further let A ∪ B also be recursively enumerable. What can you say about A and B? (A) It is possible that neither A nor B is decidable. (B) At least one among A and B is decidable. (C) Both A and B are decidable. The correct answer is (C). The decision procedure for A (and B) is as follows. Run the TMs for A, B and A ∪ B simultaneously on the input. One of these is guaranteed to accept. Accept only if TM for A (B) accepts.
  2. Just as we encoded Turing Machines as binary strings, we can also encode DFAs as binary strings. Let 〈M 〉dfa be the binary string encoding of DFA M. Consider the following language Ldfa d = {〈M 〉dfa | 〈M 〉dfa 6 ∈ L(M )}. What can we say about Ldfa d? (A) Ldfa d is regular. (B) Ldfa d is not regular but it is decidable. (C) Ldfa d is not recursively enumerable. The correct answer is (B). Non-regularity follows for the same reasons that the diagonal language is not r.e.
  3. Just as we encoded Turing Machines as binary strings, we can also encode PDAs as binary strings. Let 〈M 〉pda be the binary string encoding of PDA M. Consider the following language Lpda d = {〈M 〉pda | 〈M 〉pda 6 ∈ L(M )}. What can we say about Lpda d? (A) Lpda d is decidable (B) Lpda d is not decidable but it is recursively enumerable. (C) Lpda d is not recursively enumerable. The correct answer is (A). Decidability follows from the fact that PDA membership is decidable (CYK algorithm).
  4. Let L be decidable. Which of the following is true about L?

(A) If L′^ ⊆ L then L′^ is decidable. (B) If L ⊆ L′^ then L′^ is decidable. (C) L ≤m { 0 n 1 n^ | n ≥ 0 } The correct answer is (C).

  1. Let A and B be any languages such that A ≤m B. Under what conditions is it the case that A ≤m B?

(A) Only when both A and B are decidable. (B) Only when both A and B are recursively enumerable. (C) Always. The correct answer is (C). Let f be a reduction from A to B. Then f is a computable and x ∈ A iff f (x) ∈ B which is the same as x 6 ∈ A iff f (x) 6 ∈ B which is the same as x ∈ A iff f (x) ∈ B. Thus f is a reduction from A to B.

  1. Recall that Atm = {〈M, w〉 | M is a TM and M accepts w}. Suppose Atm ≤m L and Atm ≤m L. What can we say about L? (A) L is not recursively enumerable. (B) L is recursively enumerable. (C) L is decidable. The correct answer is (A). L is not decidable because Atm is not decidable and Atm ≤m L. L is not r.e. because Atm ≤m L means that Atm ≤m L (see previous part) and we know that Atm is not r.e.
  2. Which of the following is a property of recursively enumerable languages? (A) {〈M 〉 | M accepts 312929 strings} (B) {〈M 〉 | M has 312929 states} (C) {〈M 〉 | M has 312929 symbols in tape alphabet} The correct answer is (A).
  3. Which of the following is not a property of recursively enumerable languages? (A) {〈M 〉 | M accepts 0011} (B) {〈M 〉 | L(M ) is accepted by a TM with even number of states} (C) {〈M 〉 | M uses no more than 32 tape cells} The correct answer is (C).
  4. Let L = {〈M 〉 | M is a TM that accepts at least 312929 strings}. (A) L is decidable. (B) L is not decidable but is recursively enumerable. (C) L is not recursively enumerable. The correct answer is (B). It is not decidable because of Rice’s theorem, and it is r.e. because you can just guess 312929 strings and confirm that they all belong to the language.
  5. Let L = {〈M 〉 | M is a TM that accepts at most 312929 strings}.

(A) L is decidable. (B) L is not decidable but is recursively enumerable. (C) L is not recursively enumerable. The correct answer is (C). L is the complement of the language in the previous part. Since that is r.e. but not recursive, it follows that L is not r.e.