Toc Insem Pyq-1
Toc Insem Pyq-1
6
Total No. of Questions : 6] SEAT No. :
R3
R3
Q3) a) Using identity Laws prove that [4]
P5092
VE
VE
[Total No. of Pages :3
*
TE/Insem.-641 (1+011)* = 1 (011)* (1*(011*)*
ER
ER
T.E. (IT) (Semester-I)
6S
6S
b) Construct regular expression for the following FA using Ardens Theorem
THEORY OF COMPUTATION
1:0
1:0
[6]
71 1
71 1
(2015 Pattern)
9
9
2:0
2:0
8/2 30
8/2 30
Time : 1 Hour] [Maximum Marks : 30
Instructions to the candidates:
01
01
01
01
1) Figures to the right indicate full marks.
GP
GP
2) Attempt questions Q.1 or Q.2 Q.3 or Q.4 Q.5 or Q.6.
3) Neat diagrams must be drawn wherever necessary.
8/0
8/0
CE
CE
6
6
4) Assume suitable data if necessary.
R3
R3
0
0
38
38
VE
VE
.2
.2
Q1) a) Construct FA for the following Language L [8]
ER
ER
16
16
8.2
8.2
6S
6S
W|W is a binary word of length ½
° ° OR
.24
.24
1:0
1:0
71 1
71 1
L = ® 4i,i>=1 such that each consecutive¾
9
9
49
49
° °
2:0
2:0
Q4) a) Write regular expression for [4]
¯Block 4 bits contains at least 2 0’s ¿
8/2 30
8/2 30
1
1
i) Strings consisting of a's and b's without any combination of double
01
01
b) Distinguish between NFA & DFA [2]
8 0 P0
8 0 P0
letters over ¦ = {a, b}
G
G
8/0
8/0
ii) Strings that either contain all b's or else, there is an 'a' followed by
16 CE
16 CE
36
36
OR
some b's; the set also contain over ¦ = {a, b}
ER
ER
Q2) a) Construct Mealy machine for the following Language [6]
.23
.23
RV
RV
for input from ¦ * where ¦ ={0, 1}½ b) Construct DFA for following r.e. [6]
°if the input ends in 101 output is x, °
SE
SE
° °
8.2
8.2
L= ® r = (1(00)* 1+010*)* using direct method
¾
6
6
°if the input ends in 110 output is y, °
.24
.24
1:0
1:0
71 1
71 1
¯°otherwise output z} ¿°
9
9
49
49
2:0
2:0
Q5) a) Consider the following CFG: [4]
8/2 30
8/2 30
G = {(S, A), (a, b), P, S}
8/0 01
8/0 01
b) Define [4]
01
01
Where P consists of :
GP
GP
i) Alphabet
ii) String
S o aAs|a
CE
CE
iii) Language
80
80
iv) Formal Language A o SbA|ss|ba
.23
.23
Derive string 'aabbaa' using leftmost & right most derivation
16
16
8.2
8.2
.24
.24
P.T.O TE/Insem. -641 -2-
49
49
6
b) Convert given CFG into GNF [6] P5696 [Total No. of Pages : 3
E
RV
TE/INSEM./OCT. - 142
1
S o Bs|Aa
8:3
SE
A o Bc
6
THEORY OF COMPUTATION
1:0
81
71 1
8/2 1
B o Ac where,
09
01
8 0 30
13
GP
.23
OR
CE
CE
6
08
16
ER
Q6) a) Eliminate the - productions from the Grammar G which is defined as: 4) Assume suitable data if necessary.
38
8.2
V
[6]
.2
1
ER
.24
8:3
16
S o ABA
8.2
6S
49
0:5
.24
1:0
A o aA|
81
71 1
1
9
09
Q1) a) Design FSM for divisibility by 3 tester for binary number. [6]
49
2:0
01
8/2 30
B o bB|
8/2
3
01
7/0
01
8 0 P0
GP
80
.23
CE
CE
36
L = ^a j b j c k / i j + k`
16
i)
ER
8.2
.23
RV
1
.24
L = ^a 2n bc/ n t 1`
8:3
16
ii)
SE
8.2
49
0:5
:06
.24
81
91
1
:01
09
49
01
555
30
OR
12
8/2
13
01
17
7/0
0
GP
GP
80
/08
.23
16
38
ii) Set of all strings that do not contain three or more consecutive as
8.2
6.2
.24
49
-3-
8
.24
1
8:3
8:3
A → 0C / 1A / 0
0:5
0:5
B → 1B / 1A / 1
81
81
7/0 091
7/0 091
01
01
C → 0 / 0A
8/2
8/2
13
13
b) Simplify the following grammar G, [4]
P0
P0
b) Write Regular Language for the following regular expressions. [4]
80
80
G
G
S → A / bb
.23
.23
r1 = (0+1)* .11 (0+1)*
CE
CE
i)
16
16
A→B/b
8.2
8.2
ii) r2 = (1+10)*
:31
:31
B→S/a
.24
.24
OR
:58
:58
49
49
10
10
Q4) a) Prove that
7/0 091
7/0 091
18
18
/ = {D S S LVD SULPH} is not regular using pumping Lemma. O O O
/20
/20
[5]
3
3
8
8
01
01
b) Construct DFA using Direct Method for the following regular expression
GP
GP
80
80
r = 0* . 1* . 2* [5]
.23
.23
CE
CE
16
16
8.2
8.2
Q5) a) Check whether the following grammar is ambiguous & if yes then remove
:31
:31
.24
.24
ambiguity [6]
:58
:58
49
49
S→iCtS/iCtSeS/a
10
10
1
1
18
18
09
09
C→b
/20
/20
3
3
b) Write the CFG for (letter) (letter + digit)* [2]
/08
/08
.23 01
.23 01
07
07
P
P
c) Find CFL for [2]
G
G
8
8
S → aB / bA
CE
CE
16
16
A → a / aS / bAA
8.2
8.2
.24
.24
B → b / bS/ aBB
49
49
OR
TE/INSEM. - 142 2 TE/INSEM. - 142 3
Total No. of Questions : 6] SEAT No. : Q3) a) Determine the regular expression over the Σ = {a,b} for the following[6]
8
8
-23
-23
P72 Oct./TE/Insem.-191 [Total No. of Pages : 2 i) Set of all strings containing exactly 2 a’s
tic
tic
sta
iii) Set of all strings that do not consist of two consecutive 0’s
THEORY OF COMPUTATION
4
7:3
01 91
01 91
0:3
S → 0A|1B
0
0
91
91
4/0 13
4/0 13
0
8/2
8/2
GP
C → 0|0A
2) Neat diagrams must be drawn wherever necessary.
OR
CE
CE
82
8
c-2
.23
.23
{ 2
}
L = 0i / i is an integer, i ≥ 1 is not regular. [6]
i
i
16
16
tat
tat
8.2
8.2
4s
4s
.24
expressions:- [4]
7:3
7:3
1
49
0:3
09
09
91
ii) a+ b* ⋅ c + ∈
3
i) ∈ -closure of a state
01
01
01
01
8/2
8/2
ii) NFA Q5) a) Check whether or not the following Grammar is ambiguous; if it is remove
GP
GP
4/0
OR
CE
CE
S→iCtS|ictSeS|a
82
82
8
23
C→b
.23
.23
ic-
16
tat
tat
OR
8.2
8.2
4s
4s
.24
7:3
7:3
1
i) S → aA|bS|∈
49
49
0:3
0:3
09
09
A → aA|bB|∈
91
91
3
B → aA|bc|∈
01
01
01
01
C → aC|bc
8/2
8/2
GP
GP
ii) S → A|bb
4/0
4/0
A → B|b
CE
CE
82
82
B → S|a
.23
.23
16
8.2
8.2
b) State what do you mean by FSM & state limitations of FSM. [2]
.24
.24
P.T.O.
49
49
TE/Insem.-191 2
Total No. of Questions : 4] SEAT No. : Q2) a) Construct a Moore machine equivalent to the Mealy machine
8
[5]
23
23
[Total No. of Pages : 3
represented by the following Transition Diagram :
P-5054
ic-
ic-
[6187]-457
tat
tat
T.E. (Information Technology) (Insem)
0s
0s
6:2
6:2
THEORY OF COMPUTATION
91
91
0:5
0:5
(2019 Pattern) (Semester - I) (314441)
30
30
31
31
01
01
02
02
Time : 1 Hour] [Max. Marks : 30
9/2
9/2
GP
GP
Instructions to the candidates:
b) Design a DFA (Deterministic Finite Automata) that reads strings made
4/0
4/0
1) Attempt Q.1 or Q.2, Q.3 or Q.4. up of the letters in the word ‘UNIVERSITY’ and recognizes those
CE
CE
80
80
2) Neat diagrams must be drawn wherever necessary.
8
strings that contain the word ‘UNITY’ as a substring. [5]
23
23
3) Figures to the right indicate full marks.
.23
.23
ic-
ic-
4) Assume suitable data, if necessary. c) Justify that there can be the equivalent Mealy machine for any Moore
16
16
tat
tat
machine by suitable example. [5]
8.2
8.2
0s
0s
.24
.24
6:2
6:2
Q1) a) Design a Mealy machine to find 2’s complement of any binary number.
02 91
02 91
49
49
Write the definition of a Mealy Machine. [4]
0:5
0:5
Q3) a) For the following regular expressions, draw the FA (Finite Automata)
0
0
[5]
31
31
b) Find the final DFA by performing the DFA minimization process. A recognizing the corresponding language.
4/0 13
4/0 13
is initial state and final states are B, C, D, E, F, G. [5] i) l(01 + 10)* + 0(11 + 10)*
0
0
9/2
9/2
.23 GP
.23 GP
Q/ 0 1
ii) (01 + 10)* 00 (01 + 11)*
A B -
CE
CE
80
80
b) State and explain Pumping Lemma for a regular language. [5]
8
23
23
B C C ic-
ic-
c) Find the regular Expression for the FA (Finite Automata) using Arden’s
16
16
C D E
tat
tat
Theorem. [5]
8.2
8.2
0s
0s
D C C
.24
.24
6:2
6:2
91
91
E B G
49
49
0:5
0:5
30
30
F E -
31
31
01
01
02
02
G B G
9/2
9/2
GP
GP
c) Write the formal definitions for the following : [6]
4/0
4/0
CE
CE
i) NFA (Non-Deterministic Finite Automata)
80
80
.23
.23
ii) Mealy Machine
16
16
iii) Moore Machine
8.2
8.2
OR
OR
.24
.24
49
49
P.T.O. [6187]-457 2
b) Find the regular expression for the language over inputs {a, b}. [5]
tat
0s
ii) The set of all strings containing at least one ‘a’ and at least one ‘b’
0:5
09
31
4/0
CE
80
8
-23
.23
tic
16
sta
8.2
:20
.24
1
:56
49
9/2 309
10
23
1
0
0
GP
4/0
CE
80
8
23
.23
ic-
16
tat
8.2
0s
.24
6:2
91
49
0:5
0
31
13
02
0
9/2
GP
4/0
CE
80
.23
16
8.2
.24
49
[6187]-457 3