TOC QB(4-6)
TOC QB(4-6)
Unit 1
1. Convert the following Melay Machines into equivalent Mooremachine.
State =0 =l
Next Output Next output
st st
at at
e e
→q1 q3 0 q2 0
q2 q1 1 q4 0
q3 q2 1 q1 1
q4 q4 1 q3 0
Construct a DFA over (0, 1) that accept even number of 0's and
odd number of 1 's.
Construct a Moore machine from the following Mealy machine.
Construct a DFA for the set of strings over {a, b} whose length is
divisible by 4.
Construct a DFA for the set of strings over {a, b, c} having bca as
substring
Find a deterministic automata equivalent to
M = ({q0, q1, q2}, {a, b}, , q0, {q2}}, where is defined by its
following table
a b
Inp
q0 q0, q1 q2
q1 q0 q1
q2 q0, q1
Unit 2
Describe in English the set accepted by following FA.
B → 1B | 1A| 1 C → 0 | 0A
Construct a regular grammar G generating the regular set
represented by the regular expression a*b(a+b)*.
Show that the following language is not regular using pumping
lemma L = {wwR | w {a, b}}
Let G ={(A0, A1), (a, b), P, A0} where P consists of
A0 → aA1 A1 → bA1
A1 → a A1 → bA0
Unit 3
Design CFG for the regular language:
L(G) = {an bm | n m + 3} for n, m 0.
What is Chomsky hierarchy? Explain with example
Let G be the grammar:
S → aB | bA A → a | aS | bAA B → b | bS | aBB
for the string ‘aaabbabbba’ find a i) leftmost derivation ii) rightmost
derivation iii) parse tree.
Convert following grammar into Chomsky Normal form
S → abAB
A → bAB |
B → Baa | A |
Convert the following grammar into Chomsky Normal Form (CNF),
where S is the start symbol and P is given by
S → bA | aB
A → bAA | aS | a
B → aBB | bS | b
Convert the following grammar into Chomsky Normal Form (CNF),
where S is the start symbol and P is given by
S → bA | aB
A → bAA | aS | a
B → aBB | bS | b
Convert the following grammar into GNF:
S → AB
A → BS | b
B → SA | a
Design CFG for the regular language:
L(G) = {an bm | n m + 3} for n, m 0.
Convert the following grammar into GNF:
S → AB A → BS | b B → SA | a
Given a CFG G with the production set P as follows:
S → 0B | 1A
A → 0S | 1AA | 0
B → 1S | 0BB | 1
Prof. Ram Meghe Institute of Technology & Research, Badnera- Amravati
Department of Computer Science and Engineering
Question Bank-TOC
Unit 4
1. Is the language {wcwR | w {a, b}*} deterministic?
2. Describe a LBA and find on LBA that accepts the language L = {an!
|n 0}
3. Design a PDA to accept the language:
L = {an b2n | n 1}
4. Find context sensitive grammar for L = {an bn cn | n 1}Explain
Linear bounded automata.
5. Describe a LBA and find on LBA that accepts the language L = {an!
|n 0}
6. Design a PDA for the language L = {wcwR | w {a, b}+} Find context sensitive
grammar for L = {an bn cn | n 1} Design a PDA to accept the language:
7. L = {an b2n | n 1}
Unit 5
1. Design Turing Machine that accepts: L = {0n 1n | n 1}.Write a
note on Church's hypothesis.
F(X,Y)=X-Y if X>=Y
=0 if X<Y
Unit 6
1. Determine whether the following (A, B) pairs have a solution or not,if yes give
solution, if no why?
i) A = {b, babb, ba} B = (bb, ba, ba}ii) A =
{12, 102, 13} B = {13, 021, 12}.
i) A = {b, bab3, ba} B = {b3, ba, a}ii) A=
{01, 1, 1} B= {012, 102, 12}
i) A = {b, babb, ba} B = (bb, ba, ba}ii) A =
{12, 102, 13} B = {13, 021, 12}.
2. Show that the function f = nm are recursive. Show that
the function f = n+m are recursive. Explain universal
Turing machine
3. Explain the properties of Recursive and Recursively enumerablelanguages in
detail
4. Explain the properties of Recursive and Recursively enumerablelanguages in
detail.
5. Describe in brief what is halting problem