Cs1303 / Theory of Computation Unit I Part - A: N N 2n N 2n
Cs1303 / Theory of Computation Unit I Part - A: N N 2n N 2n
Cs1303 / Theory of Computation Unit I Part - A: N N 2n N 2n
UNIT I
PART – A
1. Define an alphabet.
2. Define a string.
3. Define a palindrome.
4. Define a language.
5. Define a countable set.
6. Define countably infinite set.
7. Define an uncountable set.
8. Mention the classification of a formal language.
9. Define phrase structure grammar.
10. Define context-sensitive grammar.
11. Define context-free grammar.
12. Find the phrase structure grammar for the following languages given below :
(i) L = {0n1n / n = 0,1,2,…..}
(ii) L = {012n / n≥ 0 }
(iii) L = {0n12n / n = 0,1,2,….}
13. Define finite automata ( FA) or finite state machine (FSM).
14. Define a transition function.
15. Define Deterministic Finite Automata.
16. Define Non- Deterministic Finite Automata.
17. Give the formal definition of NFA.
18. Define a transition function for NFA.
19. Define є- transition in NFA.
20. Define NFA with є-move.
21. Define є-closure(q).
22. Define є-closure(S).
23. Obtain the DFA equivalent to the following NFA.
0,1
qє q q
0 1
24. Obtain an NFA without є- transition for the following NFA with є- transition.
0 1 2
q q q
є є
PART – B :
1. Explain in detail about the equivalence of NFA and DFA with a suitable example.
2. Explain in detail about the equivalence of NFA and NFA with є-move with a
suitable example.
3. If L is accepted by an NFA with є-transition then show that L is accepted by an
NFA without є-transition. – may 2004.
4. Construct the DFA equivalent to the NFA. M = ({p,q,r},{0,1},δ,p,{q,s}), where δ
is defined in the following table. (10m) – Nov’2004
δ 0 1
p {q,s {q}
}
q {r} {q,r}
r {s} {p}
s -- {p}
5. Let L be a set accepted by an NFA. Then prove that there exists a DFA that
accepts L. Is the converse true ? Justify your answer.(10m) – Apr’2005
6. Construct DFA equivalent to the NFA given below :
0 1
p {p,q} p
q r r
r s -
s s s
UNIT II
PART – A :
1. Define regular grammar.
2. Define a regular expression.
3. List few identities on regular expression.
4. Construct an NFA for the regular expression ab(a+b)*.
5. Obtain the regular expression for the following DFA :
(i)
1 0,1
q q
0
(ii) a,b
a
(iii)
q q
b
a
(iv)
b
q q
c
6. Show that L = {aibjck / 0≤i<j<k } is not regular.
7. Is it true that the language accepted by any NFA is different from the regular
language ? Justify your answer.
8. Describe the following sets by regular expression :
i. L1 = the set of all strings of 0’s & 1’s ending in 00.
ii. L2 = the set of all strings of 0’s & 1’s beginning with 0 & ending
with 1.
9. Obtain the є-closure of the states q0 & q1 in the following NFA with є-transition.
a b c
q q q
є є
q q q
1 0
12. Define NFA with є-transition. Is the NFA’s with є-transitions are more powerful
than the NFA’s without є-transitions ? (In the sense of language acceptance).
PART – B :
1. Explain in detail about the equivalence of DFA and regular expression with a
suitable example.
2. Explain in detail about the equivalence of regular expression and NFA with є-move
with a suitable example.
3. Construct an NFA equivalent to (0+1)*(00+11) – may 2004.
4. Show that L = { 0i1i / i≥0 } is not regular. – may 2004.
5. Show that L = {ap / p is prime } is not regular.
6. Construct a regular expression corresponding to the state diagram given in the
following figure. – may 2004.
0 1
1 0
q q q
1
0
7. Let r be a regular expression , then prove that there exists an NFA with є-transition
that accepts L(r). – Dec’2003
8. Obtain the regular expression R for the following DFA such that L(A) = L(R). –
Dec’2003
1 0,1
q q
1
9. State the pumping lemma for regular sets. Show that the set L = { 0i2 / i is an
integer, i≥1 } is not a regular. – Dec’2003
10. Show that the set L = { anbn / n≥1 } is not regular.(6m) – Nov’2004
11. Construct an NFA- є equivalent bto the regular expression (0+1)*(00+11)(0+1)*.
(8m) – Nov’2004
12. Obtain the regular expression that denotes the language accepted by the following
DFA. (8m) – Nov’2004
1 0,1
q q
0
13. Show that the set L = { 0n2 / n is an integer, i≥1 } is not a regular.(6m) – Apr’2005
14. Construct an NFA equivalent to the regular expression 10+(0+11)0*1.(6m) –
Apr’2005
15. Check whether the language L = {on1n / n≥1 } is regular or not ? Justify your
answer. – Nov’2005
16. Construct an NFA equivalent to the regular expression ((0+1)(0+1)(0+1))*. –
Nov’2005
17. Obtain the regular expression denoting the language accepted by the following
DFA by using the formula Rijk . – Nov’2005
0,1
1
0
q q
UNIT III
PART – A :
PART – B :
1. State and prove the relationship between derivation trees and derivations.
2. State and prove that every non-empty CFL is generated by a CFG with no useless
symbols.
3. If L = L(G) for some CFG, G= (V,T,P,S), then L = { G } is L(G’) for a CFG G’
with no useless symbols or є-productions.
4. Every CFL without є , is defined by a grammar with no useless symbols , є-
productions or unit productions.
5. Construct a PDA accepting L = { wwR / w is in {0,1}* } by empty stack model.
6. Construct a PDA accepting L = { wwR / w is in {0,1}* } by final state model.
7. Construct a PDA accepting the set of all strings over {a,b} with equal number of
a’s and b’s by empty stack.
8. Construct a PDA accepting the set of all strings over {a,b} with equal number of
a’s and b’s by final state model. (OR) L = {x € {a,b}* / na(x) = nb(x) }.
9. Construct a deterministic PDA to accept the language having strings with more
a’s than b’s. (OR) L = {x € {a,b}* / na(x) > nb(x) } by empty stack and final state
model.
10. Construct a PDA to accept L = {anbmcn+m / n≥0,m≥0} by empty stack and final
state model.
11. Conversion of a PDA from final state to empty stack model for the following
language L = { anbn / n≥1 }.
12. Conversion of a PDA from empty stack to final state model for the following
language L = { anbn / n≥1 }.
UNIT IV
PART – A :
1. Mention the normal forms for CFG.
2. State Chomsky normal form .
3. State Griebach normal form.
4. State pumping lemma for CFL.
5. Mention the closure properties of CFL.
6. Define Turing Machine.
7. Mention the application of pumping lemma.
8. Give the formal definition for a Turing Machine.
9. Define instantaneous description.
10. Define a move.
11. What are the programming techniques available for Turing Machine ?
PART – B :
UNIT V
PART – A :
PART – B :
1. State and prove that a language that is not recursively enumerable.
2. State and prove that an undecidable problem that is recursively enumerable.
3. State and prove the post’s correspondence theorem.
4. Define Universal language Lu. Show that Lu is recursively enumerable but not
recursive language.
5. Show that the complement of recursive language is recursive.
6. Define the language Ld and show that Ld is not recursively enumerable language.