0% found this document useful (0 votes)
72 views

Theory of Computation Test 2: Number of Questions: 25 Section Marks: 30

This document contains details about an upcoming Theory of Computation test, including: - The test will have 25 multiple choice questions worth 30 marks. - The questions will cover topics related to Turing machines, decidability, recursively enumerable languages, and more. - An answer key is provided for the sample questions along with some brief hints and explanations.

Uploaded by

AKASH PAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Theory of Computation Test 2: Number of Questions: 25 Section Marks: 30

This document contains details about an upcoming Theory of Computation test, including: - The test will have 25 multiple choice questions worth 30 marks. - The questions will cover topics related to Turing machines, decidability, recursively enumerable languages, and more. - An answer key is provided for the sample questions along with some brief hints and explanations.

Uploaded by

AKASH PAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Theory of Computation Test 2

Number of Questions: 25 Section Marks: 30

Directions for questions 1 to 25: Select the correct alterna- (A)


NTR
tive from the given choices.
TR
1. Which of the following is TRUE for Turing Machines?
(i) Turing machines accepts Type-0 languages. TD
(ii) Turing machines are used for computing func-
tions.
(iii) Turing machines are used for determining the un-
decidability of certain languages.
(B)
(A) (i), (ii) only (B) (i), (iii) only
TD TR NTR
(C) (ii), (iii) only (D) (i), (ii), (iii)
2. Which of the following operations are not performed
on Turing machines? (C)
(A) Writing a new symbol in the cell being currently TD
scanned. TR
(B) Moving to the cell left of the present cell. NTR
(C) Moving to the cell right of the present cell.
(D) None of the above
3. If the languages L1 and L2 are decidable then which of
the following are also decidable? (D)
(i) L1 ∪ L2 (ii) L1 ∩ L2 TD TR NTR
(A) (i) only (B) (ii) only
(C) Both (i) and (ii) (D) Neither (i) nor (ii)
8. Which of the following DFA problems are Decidable?
4. If L1 and L2 are Turing-recognizable languages then (A) The language of all DFA’s with an empty language.
which of the following are not Turing-recognizable? (B) The language of all pairs of DFA’s that have the
(i) L1 ∪ L2 (ii) L1 ∩ L2 same language.
(iii) L1 – L2 (iv) L1 (C) ADFA = {<D, ω >|D is a DFA, ω is a word and D
(v) L1* (vi) L1 o L2 accepts ω}
(A) (iv), (v) (B) (iii), (iv) (D) All of the above
(C) (i), (ii), (vi) (D) (ii), (iv), (v) 9. Which of the following language is accepted by a
5. Which of the following statement is FALSE? Turing machine?
(A) The set of decidable languages is closed under (i) {an # an # an : n ≥ 0} and Σ = {a, #}
symmetric difference. n
(ii) {an # b2 : n ≥ 0}, Σ = {a, b}
(B) If L1 is undecidable and L2 is decidable then the
(A) (i) only (B) (ii) only
symmetric difference of L1 and L2 is undecidable.
(C) Both (i) and (ii) (D) Neither (i) nor (ii)
(C) The intersection of a recognizable language and
an unrecognizable language is always unrecogniz- 10. For which of the following languages, no Turing-
able. machines will exist?
(D) All of the above (A) Recursive languages
(B) Recursively-enumerable languages
6. If L1 and L2 are recursive languages, then which of the
(C) Non-Recursively enumerable.
following also belongs to recursive languages?
(D) None of the above
(i) L1 ∪ L2
(ii) L1 L2 11. If L1 is a recursive language and L2 is a recursively enu-
merable language then which of the following is also
(iii) L1
recursively enumerable?
(A) (i) only (B) (i), (ii)
(i) L1 ∪ L2 (ii) L1 ∩ L2
(C) (ii), (iii) (D) (i), (ii), (iii)
(iii) L1 L2 (iv) L1 – L2
7. Which of the following correctly specifies the relation (v) L2 – L1
between Turing decidable (TD), Turing recognizable (A) (i), (ii), (iii) (B) (i), (iii), (iv)
(TR) and ‘not Turing recognizable’ (NTR) languages? (C) (iii), (iv), (v) (D) (i), (ii), (iii), (v)
3.140 | Theory of Computation Test 2

12. Which of the following is False, if A is mapping reduc- 19. If A ≤m B (i.e., A is reducible to B) and if B is regu-
ible to B? lar language then does it implies that A is a regular
(A) If B is decidable then A is decidable. language?
(B) If B is recursively enumerable then A is recursive- (A) Yes
ly enumerable. (B) No
(C) If A is undecidable then B is undecidable. (C) Data insufficient
(D) None of the above (D) Reduction is not possible with regular languages.
13. Which of the following language is Recursive? 20. If a language L is recursively enumerable and L ≤m L
(A) L1 = {<M>|M is a TM and there exists an input on then, which of the following is TRUE?
which M halts in less than |<M>| steps.} (A) L is recursive
(B) L2 = {<M> | M is a TM and |L (M)| ≤ 3} (B) L may or may not be recursive
(C) L3 = {<M> | M is a TM and |L (M)| ≥ 3} (C) L is undecidable
(D) All of the above (D) None of these
14. The language {<M> | M is a Turing machine and L(M) 21. Which of the following language(s) is/are undecidable?
is finite} is L1 = {<M> | M is a TM and L(M) is a CFL}
(A) recursive L2 = {<M> | M is a TM and L(M) is finite}
(B) recursively enumerable (A) L1 only (B) L2 only
(C) not recursively-enumerable (C) Both L1 and L2 (D) Neither L1 nor L2
(D) decidable 22. For which of the following language(s) a Turing
15. Which of the following problem is Recursive? machine exists?
(i) {<M> | M is a DFA and L(M) is finite} (i) ∅ (ii) {ε}
(ii) {<M> | M is a DFA and L(M) = Σ*} (A) (i) only (B) (ii) only
(iii) {<M, x> | M is a DFA and M accepts x} (C) Both (i) and (ii) (D) Neither (i) nor (ii)
(A) (i), (ii) (B) (iii) only 23. A language L is recursive if
(C) (ii), (iii) (D) (i), (ii), (iii) (A) L is recursively enumerable.
16. Which of the following is not accepted by a PDA but (B) L is recursively enumerable.
accepted by a TM? (C) Both L and L are recursively enumerable.
(A) {an bn c an bn | n > 0} (D) L is not recursively enumerable.
(B) {an b2n c3n | n ≥ 0} 24. If a Language L is recursively enumerable but not
(C) {an bn+m cm dm | m, n ≥ 0} recursive then L
(D) All of the above (A) is recursive
17. Which of the following has same power as Turing (B) is recursively enumerable
machine? (C) is not recursively enumerable
(A) NDFA (B) 2-PDA (D) is decidable
(C) k-tape TM (D) Both (B) and (C) 25. A decision problem is undecidable if
18. The language L = {an bn cn | n ≥ 0} can be accepted by (i) it has no algorithm to solve
a: (ii) it has no TM that halts on every input
(i) 2-PDA (ii) TM (iii) it specifies a language which is not recursive.
(A) (i) only (B) (ii) only (A) (i), (ii) (B) (ii) only
(C) Both (i) and (ii) (D) Neither (i) nor (ii) (C) (i), (iii) (D) (i), (ii), (iii)

Answer Keys
1. D 2. D 3. C 4. B 5. C 6. D 7. A 8. D 9. C 10. C
11. D 12. D 13. A 14. C 15. D 16. D 17. D 18. C 19. B 20. A
21. C 22. C 23. C 24. C 25. D
Theory of Computation Test 2 | 3.141

Hints and Explanations


1. Turing machines accepts type-0 languages. They are 12. If A is a mapping reducible to B, then based on some
used for computing functions and for determining the basic Theorems,
undecidability of languages. Choice (D) • B is decidable then A is decidable
2. A Turing machine can write into some cell, move left or • A is undecidable then B is undecidable
right. Choice (D) • B is Turing-recognizable then A is Turing recogniz-
able.
3. If a language is decidable then its complement is also
\ All are TRUE. Choice (D)
decidable.
The union and intersection of two decidable languages 13. L1 is a recursive language. First find the length of M and
is also decidable. Choice (C) store it. Then it runs M on all inputs of length atmost
|<M>| steps and accepts if M accepts atleast one of the
4. Turing-recognizable languages (i.e. Recursively-
strings within the specified number of steps.
enumerable) are not closed under subtraction and com-
Choice (A)
plement operations. Choice (B)
14. Given language is not recursively enumerable and
5. Decidable languages are closed under symmetric
undecidable. Choice (C)
difference.
If L1 is undecidable and L2 is decidable then the differ- 15. All the given problems are decidable and hence recur-
ence of L1 and L2 is undecidable. sive. Choice (D)
Let L1 is a recognizable language and L1 = ∅, L2 is un- n n n n
16. {a b ca b .|n > 0}. PDA can check equality of num-
recognizable. Then L1 ∩ L2 = ∅ which is recognizable. ber of a’s and b’s.
Choice (C) But it can’t able to compare this number of a’s and b’s
6. Recursive languages are closed under union, intersec- with next a’s and b’s.
tion, complementation, concatenation and Kleene clo- But this can be accepted by a TM. Similarly for
sure. Choice (D) {an b2n c3n|n ≥ 0} and {an bn+m cm dm| m, n ≥ 0}.
Choice (D)
7. Regular ⊂ Context-free ⊂ TD ⊂ TR ⊂ NTR.
Choice (A) 17. A TM has same power as k-tape TM (k ≥ 1) and 2-PDA
has same power as TM. Choice (D)
8. Some of the decidable properties of DFA are
• Universality 18. A 2-PDA (i.e., 2-stack PDA) has same power as TM. A
• Kleene-closedness TM can accept L. Choice (C)
• Inclusion 19. Given A ≤m B.
• Disjointness B is regular then it does not imply that A is regular.
• Membership Ex: {an bn | n ≥ 0} ≤m {an | n ≥ 0}. Choice (B)
• Emptyness 20. Given L is recursively enumerable and L ≤m L.
• Equivalance As L ≤m L then L ≤m L.
\ All the problems in given choices are Decidable.
( A ≤m B then A ≤m B).
Choice (D)
L is RE, so L is also RE. As both L and L are RE then
9. A TM can be designed to accept, {a # a # an}. In the
n n
L is recursive. Choice (A)
input write x for an ‘a’. Traverse till # and again write x
21. {<M, w>: M is a TM and M accepts input string w} is a
for an ‘a’ and traverse till next # and write x for an ‘a’.
known undecidable problem. We can reduce this to L1
Traverse left till left most x and repeat this for next ‘a’.
and L2 also. So both L1 and L2 are undecidable.
If no more a’s left in any part, accept the language.
n Choice (C)
Similarly, a TM can be constructed for {an # b2 : n ≥ 0}.
Replace a with x and traverse till # and replace n b’s 22. A TM can exist for both languages. (i) rejects every-
with x and traverse left till x and repeat this. If no more thing. (ii) accepts ‘∈’ only. Choice (C)
symbols left then accept the language. Choice (C) 23. If a language L and its complement L are recursively
10. Recursive: TM always halts. enumerable, then L is recursive. Choice (C)
Recursively enumerable: TM either halts or halts in 24. Both L and L are recursively enumerable if L is recur-
non-final state or loops. sive. Choice (C)
Non-Recursively-enumerable: No TM exists.
25. An undecidable problem has no algorithm, no TM and
Choice (C)
is also not recursive. Choice (D)
11. L1 – L2 is not recursively enumerable. Choice (D)

You might also like