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

Quiz2_Solution

Uploaded by

prabidushk
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)
4 views

Quiz2_Solution

Uploaded by

prabidushk
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/ 2

Theory of Computation (CSC208)

Quiz 2, Date: 20 April 2023

Name: Admission No:

Time:7:35 PM - 8:00 PM Winter 2022-23, B.Tech. (IV Semester) Max mark: 20

Multiple options may be correct.


1. The class of context-free languages are NOT closed under which of the following operations (1)

(A) Union (C) Kleene closure


(B) Concatenation (D) Complementation

2. The language L = {ai bj ck |i, j, k ≥ 0} is a (1)

(A) regular language (C) recursively enumerable language


(B) context-free language (D) None of the above

3. Let C be a context-free language and R be a regular language. Then which options below are
correct? (4)

(A) C − R is context-free (C) R − C need not be context-free


(B) R − C is regular (D) All of the above

4. The minimum number of tracks in the single-tape multi-track TM that may be used to simulate a
multi-tape Turing machine with N tapes may be (1)

(A) 1 (C) 2
(B) 2N (D) N 2

5. Draw the complete transition diagram of the Turing machine for the language L = {1n |n >
0 and n is odd} that accepts by “halting" and rejects by “not halting". (4)

1 / 1,R
/
b//
b,L
q0 q1 qf

Accept and halt


1 / 1,R

b
/ //
b,R
/
b//
b,L

qnh

1
6. Design a non-deterministic PDA for the language L = {an bm |n ̸= m} (4)

b, z0 /z0
, a/a
b, z0 /z0

q0 q1 b, z0 /z0
qf
b, a/
, a/a
a, z0 /az0 b, a/
a, a/aa

If you have drawn any equivalent transition diagram (that may accept by empty stack also) you
will be awarded full marks.
S
7. Let Li , i ∈ I, be a family of recursive languages, and L = i∈I Li . Which of the following statements
is true? (2)

(A) If I is finite, the L must be recursive. (C) If L is recursive, then I must be finite.
(B) If I is infinite, the L must be recursive. (D) If L is recursive, then I must be infinite.

8. Consider the following two PDA. M1 accepts by empty stack, whereas M2 accepts by final state.
Which of the following strings is accepted by M2 but not by M 1? The initial stack-bottom marker
is ⊥ for both machines. (3)

A. ϵ B. a3 b3 C. a3 b4 D. a3 b5

You might also like