Quiz2_Solution
Quiz2_Solution
3. Let C be a context-free language and R be a regular language. Then which options below are
correct? (4)
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
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