Toc Question Bank
Toc Question Bank
Toc Question Bank
QUESTION BANK
UNIT-I AUTOMATA
PART-A(2-MARKS)
δ 0 1
p {q,s} {q}
q {r} {q,r}
r {s} {p}
s - {p}
n n
2. a)Show that the set L={a b /n>=1} is not a regular. (6) b)Construct a DFA
0 1
p {p,q} P
q r R
r s -
s s S
n n
3. a)Check whether the language L=(0 1 /n>=1) is regular or not? Justify your
answer.
b) Let L be a set accepted by a NFA then show that there exists aDFA that accepts L.
b) Give the DFA accepting the following language:set of all strings beginning with a
1 that when interpretedas a binary integer is a multiple of 5.
(i) Set of Strings over alphabet {0,1,…….9} such that the final digit has
appeared before. (8)
(ii)Set of strings of 0’s and 1’s such that there are two 0’s separated by a number of
positions that is a multiple of 4.
b) Consider the following ε–NFA.Compute the ε–closure of each state and find it’s
equivalent DFA. (8)
ε A b C
p {q} {p} Ф Ф
q {r} ф {q} Ф
*r Ф ф ф {r}
9.a) Prove that a language L is accepted by some DFA if L is accepted by some NFA.
0 1
p {p,q} {p}
q {r} {r}
r {s} ф
*s {s} {s}
10.a) Explain the construction of NFA with εtransition from any given
regular expression.
b) Let A=(Q,∑, δ, q0 ,{qf ) be a DFA and suppose that for all a in ∑wehave δ(q0,
k
a)= δ(qf ,a). Show that if x is a non empty string in L(A),then for all k>0,x is also
in L(A).
UNIT-II REGULAR EXPRESSIONS AND LANGUAGES
PART-A
i i
b) Show that the set E={0 1 |i>=1} is not Regular. (6)
b)Obtain the regular expression that denotes the language accepted by the following
DFA.
5.a)Obtain the regular expression denoting the language accepted by the following
DFA (8) b)Obtain the regular expression denoting the language accepted by the
k
following DFA by using the formula Rij
2
7. a)Define a Regular set using pumping lemma Show that the language L={0i / i
is an integer,i>=1} is not regular
b)Verify whether the finite automata M1 and M2 given below are equivalent
over {a,b}.
k 2
14.a) Find whether the languages {ww,w is in (1+0)*} and {1 | k=n , n>=1} are
regular or not.
b) Show that the regular languages are closed under intersectionand reversal.
PART-A
PART-B
1. a) Let G be a CFG and let a=>w in G. Then show that there is a leftmost
derivation of w.
b) Let G=(V,T,P,S) be a Context free Grammar then prove that if S=> αthen there
is a
δ(q0,b,z0)={(q0,zz0)}
δ(q0,a,z)={(q1,z)}
δ(q1,b,z)={(q1, ε)}
δ(q1,a,z0)={(q0,z0)}
5. a)If L is Context free language then prove that there exists PDA M such that
L=N(M).
b)Find the left most and right most derivation corresponding to the tree.
b) Prove that if L is N(M1) for some PDA M1 then L is L(M2 ) for somePDA
M2.
PART-A
PART-B
b)Convert the grammar S->AB, A->BS/b, B->SA/a into Greibach NormalForm. (10)
9.State and Prove pumping lemma for Context free languages. (16)
n n
10.a)State Pumping Lemma for context free language. Show that (0 1
n
2 /n>=1} is not a Context free language. (6)
i j i j
b)State Pumping lemma for context free language σshow that language {a b c d /i>=1,
and j>=1} is not context-free. (6)
b)Describe the following Turing machine and their working. Are they more
powerful than the Basic Turing Machine? Multi-tape Turing Machine Multi-
Dimensional Turing Machine
(3) Non-Deterministic Turing Machine. (6)
(10)
b)Explain how the multiple tracks in a Turing Machine can be used for testing given
positive integer is a prime or not. (6)
16.Prove that the language L is recognized by a Turing Machine with a two way
infinite tape if and only if it is recognized by a Turing Machine with a one way
infinite tape. (16)
17.For each of the following Context free languages L, find the smallest pumping
length that will satisfy the statement of the Context free pumping lemma. In each
case, Your answer should include a number(the minimum pumping length), a
detailed explanation of why that the number is indeed a valid pumping length for
the given language L, and a detailed explanation of why no smaller number
qualifies as a valid pumping length for that particular language L.
n n
(i) L={a b |n>=0} (6)
(ii) L={w in {a,b}*|w has the same number of a’s and b’s} (6) (iii)L={w in
{a,b}*| w has twice as many a’s as b’s.} (4)
k n
18.Design a Turing Machine M that decides A={0 /n>0 and k=2 } the language
consisting of all strings of 0’s whose length is a power of 2. (16)
19.a)Give a High level implementation description with a neat sketch of a Turing
Machine M that performs the following computation.M=on input w: writes a
copy of w on the tape immediately after w,leaving the string w#w on the
tape.Assume that the input string initially appears at the left most end of the tape
and that the input alphabet does not contain the blank character’ : The end of the
input string is therefore determined by the location of the first blank cell on the
input tape. The symbol # is assumed to be in the tape alphabet,and the input
alphabet is {a,b}.
(12)
UNIT-V UNDECIDABILITY
PART-A
14.Show that the following problem is undecidable.“Given two CFG’s G1 and G2, is
L(G1)∩L(G2)=Φ?”.
15.Define Ld.
PART-B
1.a)Show that union of recursive languages is recursive.
(4)
b)Define the language Ld and show that Ld is not recursively enumerable language. (8)
b)Show that if a language L and its complement L are both recursively enumerable
then L is recursive. (4) 14.a)What are the features of a Universal Turing Machine?
(4)
b)Show that “If a language L and its compliment L are both recursively
enumerable,then both languages are recursive”. (6)
3 3
15.a)Does PCP with two lists x=(b,b ab ,ba) and y=(b ,ba , a)have a
solution?. (6) b)Show that the characteristic function of the set of
all even numbers is recursive. (6) c)Let ∑={0,1}.Let A and B be the
lists of three strings each,defined as List A List B
b)Show that “finding whether the given CFG is ambiguous or not” is undecidable by
reduction technique. (8)