You are on page 1of 2

Total No. of Questions : 6] SEAT No.

8
23
P67 Oct./TE/Insem.-186 [Total No. of Pages : 2

ic-
tat
T.E. (Computer Engineering)

2s
THEORY OF COMPUTATION

4:4
01 91
(2015 Course) (Semester - I) (310241)

0:3
0
91
Time : 1 Hour]
4/0 13 [Max. Marks : 30
Instructions to the candidates:
0
8/2
1) Attempt questions Q1 or Q2, Q3 or Q4, and Q5 or Q6.
.23 GP

2) Neat diagrams must be drawn wherever necessary.


E

3) Assume suitable data, if necessary.


82

8
C

23
ic-
16

tat
8.2

2s
Q1) a) Define the following terms with example- [3]
.24

4:4
i) DFA ii) NFA iii) epsilon NFA
91
49

0:3
Construct NFA with ε moves which accepts a language consisting the
30

b)
91

strings of any number of a’s followed by any number of b’s, followed


01
01

by any number of c’s. [3]


8/2
GP

Design Finite Automata (FA) for accepting strings over Σ = {0,1} with
4/0

c)
CE

even numbers of 0’s and odd number of 1’s. [4]


82

8
23
.23

OR
ic-
16

tat
Q2) a) Compare Moore machine and Mealy machine. [2]
8.2

2s
.24

b) Construct a Mealy Machine which can output EVEN/ODD if the total


4:4
91

number of 1’s in the input is even or odd. The input symbols are 0 and 1.[4]
49

0:3
30
91

c) Convert the following Mealy Machine to Moore machine. [4]


01
01
8/2
GP
4/0
CE
82
.23
16
8.2
.24

P.T.O.
49
Q3) a) Define the following terms: [2]

8
23
i) Kleene closure ii) Positive closure

ic-
b) i) Illustrate in English the language of the following regular expression:

tat
(1 + ε ) (00 *1) * 0 * [2]

2s
ii) Explain in brief, applications of regular expressions. [2]

4:4
01 91
c) Determine a regular expression over the alphabet Σ = {a,b} . [4]

0:3
0
i) All strings that contain an even number of ‘b’s

91
ii)
4/0 13
All strings that do not end with ‘aa’
0
8/2
OR
.23 GP

Q4) a) Justify if true or false the following: [3]


E

Every subset of a regular language is regular


82

8
C

23
b) Explain the applications of regular expression in GREP utilities in Unix.[3]

ic-
c) Construct minimized DFA accepting language represented by regular
16

tat
expression 0* 1 * 2 *. Convert given regular expression to NFA with ε
8.2

2s
moves. [4]
.24

4:4
91
49

0:3
Q5) a) Discuss applications of Context Free Grammar in XML. [3]
30
91

b) Construct the Context Free Grammar for the language having any number
01
01

of a’s over the set Σ = {a} . [3]


8/2
GP

c) Simplify the grammar: [4]


4/0

S → Ab, A → a, B → C|b, C → D, D → E, E → a
CE
82

8
23
OR
.23

ic-
Q6) a) Discuss applications of Context Free Grammar in Syntax Analysis of a
16

tat
Compiler. [3]
8.2

2s

b) Describe the language L for given Context Free Grammar G = [{S},


.24

4:4

{a,b}, P, {S}] where P = {S → aSb, S → ab}. [3]


91
49

0:3

c) Optimize the CFG given below by reducing the grammar where S is a


30

start symbol. [4]


91

S → A | 0C1
01
01

A → B | 01 | 10
8/2
GP

C → ε | CD
4/0
CE
82
.23
16


8.2
.24
49

TE/Insem.-186 2

You might also like