0% found this document useful (0 votes)
233 views7 pages

Cs1303 / Theory of Computation Unit I Part - A: N N 2n N 2n

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 7

1

CS1303 / THEORY OF COMPUTATION

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

є є

Dr. D. Saravanan, Professor of Mathematics


2

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

7. Find DFA equivalent to the given NFA


0 1
0,1
q q

Dr. D. Saravanan, Professor of Mathematics


3

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
є є

Dr. D. Saravanan, Professor of Mathematics


4

10. Show that (r*)* = r* for a regular expression r.


11. Find the language accepted by the following automaton:
0 1 0,1

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

Dr. D. Saravanan, Professor of Mathematics


5

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 :

1. Define Context-free grammar.


2. Define parse tree.
3. Give the formal definition for CFG.
4. Define a derivation.
5. Define Context-free language.
6. Define a subtree of a derivation tree.
7. Define parsing.
8. What are the ways to do parsing ?
9. Define leftmost derivation.
10. Define rightmost derivation.
11. Define ambiguous grammar.
12. Define ambiguous language.
13. Define inherently ambiguous language.
14. Define pushdown automata.
15. Define NPDA.
16. Define DPDA.
17. Construct the PDA accepting L={ anbn / n ≥1 } by empty stack.
18. Construct the PDA accepting L={ anbn / n ≥1 } by final state.
19. Construct the PDA accepting L={ anb2n / n ≥1 } by empty stack.
20. Construct the PDA accepting L={ anb2n / n ≥1 } by final state / accepting state
model.

Dr. D. Saravanan, Professor of Mathematics


6

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 :

1. State and prove the Chomsky normal form .

Dr. D. Saravanan, Professor of Mathematics


7

2. State and prove the Griebach normal form .


3. Convert a CFG to CNF. Let G be the CFG with productions
SAACD, AaAb, A є ,CaC , Ca , DaDa , DbDb, D є.
4. State and prove the pumping lemma for CFL.
5. Show that L = { anbncn / n≥1 } is not CFL.
6. Prove that L = { ai / i is prime} is not a CFL.
7. Prove that the language L = { an2 / n≥1} is not CFL.
8. Design a turing machine to accept the language L = {0n1n / n≥1}.
9. Design a turing machine to accept the language “pal” of palindromes over {a,b}.
10. Construct the TM for f(m,n)=m+n. (OR) Show that f(m,n)=m+n is computable.
11. Construct the TM for f(m,n)=m-n.
12. L is recognized by a TM with 2-way infinite tape iff it is recognized by a TM with
a oneway infinite tape.

UNIT V

PART – A :

1. Define decidable problem.


2. Define undecidable problem.
3. When we say a problem is decidable. Give an example of undecidable problem.
4. Give two properties of recursively enumerable sets which are undecidable.
5. Show that the union of recursive language is recursive.
6. Give two examples of undecidable problems.
7. Is it true that the complement of recursive language is recursive ? Justify your
answer.
8. Define Universal language.
9. Define classes P and NP.
10. Define NP- complete problems.

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.

Dr. D. Saravanan, Professor of Mathematics

You might also like