Institute of National Importance Under MHRD, of India) : (An Govt

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY

(An Institute of national importance under MHRD, Govt. of India)


KARAIKAL-609 609

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

FIRST CYCLE TEST

I CODE: CS205 I ROLL No.

DEGREE : B.Tech. (CSE) SEMESTER: ill


SUBJECT : AUTOMATA AND FORMAL LANGUAGES DATE: 07.10.2021
MAX.MARKS :20 DURATION : 90 minutes

All questions are compulsory. Assume any missing data.

(5*4 = 20 Marks)
0
1. (a) Construct the Deterministic Finite Automata ~FA) for the given language:

L= {w I w has both even µ~her O's & even number 1's over {0, 1} (2)

(b) Convert the given Regular Expression into equivalent NFA: (2)

(a+b+a)~ab)*+(a+b)*)*(ab)* /

2. Covert the given NFA into Equivalent DFA with Minimization (using Myhill - Nerode
Theorem) and to test whether the input string is accepted by this DFA or not: 0 1111 0 (4)

1 \
NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY
(An Institute of national importance under MHRD, Govt. of India)
KARAIKAL-609 609

3. Convert the given finite automata into regular expression using state elimination method

(4)
b

4. (a).Construct a Moore & Mealy machine that takes a string consisting of a's b's and e's as
input and outputs a string containing 1 at the end of each substring "abc" and a Oin all other
ro
(b) To check whether the given language is regular or not: { anbnc!'- In > 1} (2)

5. Draw and find the number of states in th~ minimized DFA that accepts the language defined
by the regular expression: abb(a+b)*
(4)

.
....... All the Best ...... .
NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY
(An Institute of national importance under MHRD, Govt of India)
KARAIKAL-609609

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SECOND CYCLE TEST

I CODE: CS205 I
ROLL No. L5wB 104-2-1
I
DEGREE
SUBJECT
: B.Tech. (CSE)
: AUTOMATA AND FORMAL LANGUAGES
MAX.MARKS :20
SEMESTER : III
DATE: 23.11.2021
DURATION : 90 minutes
I
All questions are compulsory. Assume any missing data.
l
Ii
(5*4 = 20 Marks)
I I

I
I
1. (a) To check whether the given
. . amb'1guous or not
grammar 1s (2)

I I
r '

(b) Construct the CFG for the following language L={a0 bm: n<=m+3} (2)
2. (a) Apply various simplification method for the following Context Free Grammar (CFG) (2) ·

A, A,
(b) Consider L = {OilJ2iJJ I i, j 1} and prove L is not CFL (2)
J -
3. Convert the given CFG into Chomsky Normal Form (CNF) (4)
S--+ ASB
A --+ aAS la It
B --+ SbS IA lbb
v
4. Construct pushdown automata (Draw Transition Diagram and Write Transition Function) for the
following . languages. Acceptance either by empty stack or by final state.
L= {a1 l,j ck/ i, j, k EN, i + j = k}
(4)
5. Construct pushdown automata (Draw Transition Diagram and Write Transition Function) for the
following languages. Acceptance either by empty stack or by final state.
L = {0iti2k /i j or j-k; i, j, k >= 1}
(4)
NATIONAL INS
. TITUTE OF TECHNOLOGY PUDUCHERRY
(An Institute of national importance under MHRD, Govt. of India)
KARAIKAL-609 609

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

THIRD CYCLE TEST

CODE: CS205 I ROLL No.

DEGREE : B.Tech. (CSE) SEMESTER : Iii


SUBJECT : AUTOMATA AND FORMAL LANGUAGES DATE: O3 .i'2.'2021
MAX. MARKS : 20 . DURATION : 90 minutes

All questions are compulsory. Assume any missing data.


(5*4 = 20 Marks)
I .
1. (a) Construct the Deterministic Finite Automata for language L= {w i w does not contain more
thanone"l"} where I,= {0,1} ~- '2_ C)l; 001 , 00(91 (2)
(b) Convert the given Regular Expression into equivaient epsilon - NFA:
(2)
(1 *(1 *01 *01 *01 *)*,1 *) \

2. Covert the given NFA into Equivalent DFA with Minimization (using Myhill - Nerode

_;

~)

(1 1 /J.. l?)a, \
G-,.J )
'(-
~) d,; d §,// \
)'Q) }

II'
3. Convert the given finite automata into regular expression using state elimination method (4)

a b
a

a
NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY
(An Institute of national importance under MHRD, Govt. of India)
KARAIKAL-609 609

4. (a) Construct the Moore and Mealy machines to produce 'X', 'Y', 'Z' depends on inputs that
end with '00' or '11' else other (2)
(b) To prove that the given language is not regular: L= {0"1": n>=l} (2)
5. Convert the given RE to DFA and draw and find the number of states in the minimized DFA that
accepts the language defined by the regular expression: (a+b)*ab (4)

.... All the Best .......


NATIONAL INSTITUTE
(An Institute of nation~~ TECHNOLOGY PUDUCHERRY
mportance under MHRD, Govt. of India)
KARAIKAL-609 609

DEPARTMENT OF co
MPUTER SCIENCE AND ENGINEERING
END SEMESTER EXAM

CODE: CS205
I ROLL No.C,S'.Wf:1011-) I
DEGREE : B.Tech. (CSE} SEMESTER : 111
SUBJECT : AUTOMATA AND FORMAL LANGUAGES DATE: 16.12.2021
MAX. MARKS : 50 DURATION : 3 Hours

All questions are compulsory. Assume any missing data.


(10*5 = 50 Marks)

Y,<a) Construct a DFA for the language L= {aa w bb I w E: (~, b~ and test whether the
string : aaabbbb accepted by the DFA (2.5)
r (b) Construct a Non-Deterministic Finite Automata (NFA) with three states that accept
Y"' \ the language L= {{ab, abc}*· I L = {a,b}} and test whether the string: abc@bab
-. -v
accepted by the FA (2.5)

2. i,r6onvert the given regular expression into epsilon NFA using Thomson construction
rule: (0+1 )*01 (01 +1 O)*"""--"'1 (2)
9>} Construct the Moore and Mealy machines to produce 'A', 'B', 'C' depends on inputs
that end with '01' or '1 0' else other 619-- (1.5 +1.5)

3. (a) Convert the given NFA into Equivalent DFA with Minimization and to test whether
the input string is accepted by this machine or not: 001122 (3)

0 1 2

epsilon epsilon

)hf To prove that the given language L= {a" b a" I n>=O} is not regular ('w\ (2)

4. }a) Draw and find the number of states in the minimized DFA that accepts the language
defined by the regular expression using Thomson construction rule: (a+b)* (2.5)
NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY
(An Institute of national Importance under MHRD, Govt. of India)
KARAJKAL-609 609

Convert the given finite automata into regular expression using state elimination
- method . (2.5)

1 011 011

5. ~check whether the given grammar is ambiguous or not (2)

S SS I aSa I bSb IE
(b) Construct the CFG for the following language L= {a"bm : n I= m I m, n>=0} / (3)

y (a) Convert the following CFG into Chomsky Normal Form (CNF) (3)

(b) Consider L = {0"1m2n3m Im, n i:!! 1} and prove L isr.not CFL (2)

/ Construct f?UShdown automata for the following language. Acceptance either by empty
stack or by final state over the input symbol {O, 1,2,3}: L = {0"1m2m3n I m, n >0}, and
perform the Instantaneous description for the given input: 011223 (5)

8. (a) Construct pushdown automata for the following languages. Acceptance either by
/ empty stack or by final state: L={ wwR I WE (a,bt } (2.5)
(b) Construct pushdown automata for the following languages. Acceptance either by
empty stack or by final state: L={ w I na(w)=nb(w), wt (a,b)*} (2_.5)

9. Construct the Turing Machine for the following language: L= { ww I wt(a,bt }, and
perform the Instantaneous description for the given input: abbabb (5)
1o. Explain in detail about Universal Turing Machine and Multi-tape Turing machine with
neat sketch and examples (5)

.... All the Best ....


NATIONAL INSTIT
(An Institute of n~J; TECHNOLOGY PUDUCHERRY
na importance under MHRD, Govt. of India)
KARAIKAL-609 609

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

MAKEU~ ·
• SUPPLEMENTARY EXAMINATIONS (May 2022)

r_ CODE: cs2os i. j ROLL No.


I
DEGREE : B.Tech. (CSE) ,__S-EM_E_S_T_E_R_:_11_1- - '
SUBJECT : AUTOMATA AND FORMAL LANGUAGES DATE: 17.05.2022
MAX. MARKS : 100 DURATION : 3 Hours

All questions are compulsory. Assume any missing data.


(10*10 = 100 Marks)

)r (a) Construct a DFA for the language L= {bb w aa I w E: {a, b}*} and test whether the
string : bbbb accepted by the DFA (5)
(b) Construct a Non-Deterministic Finite Automata (NFA) with three states that accept
the language L= {{ab, abc}* I I = {a, b}} and test whether the string: ababc accepted
~ffie~

2. Construct the Moore and Mealy machines to produce 'A', 'B', 'C' depends on inputs that
(5+5)
end with '000' or '111' else other

~onvert the given NFA into Equivalent DFA with Minimization and to test whether the
input string is accepted by this machine or not: 111222 (10)

0 l 2

epsilon epsilon

4. Draw and find the number of states in the minimized DFA that accepts the language
defined by the regular expression using Thomson construction rule: (a+b)abb (10)

5. Jrfo check whether the given grammar is ambiguous or not (5)

5 55 I a5a I b5b I a I b I£
(b) Construct the CFG for the following language L= {a"bm : n I= m I m, n>=O} (5)
f
r

NATIONAL INSTITUTE OF TECHNOLOGY PUDUCHERRY


(An Institute of national Importance under MHRD, Govt. of India)
KARAIKAL-609 609

,:!(~ Convert the following CFG into Chomsky Normal Form (CNF) (5)

s
t
B IE
(b) Consider L = {om1n2m3n Im, n =!!: 1} and prove Lis not CFL (5)

1/ Construct pushdown automata for the following language. Acceptance either by empty
stack or by final state over the input symbol {O, 1,2,3}: L = {om1m2n3n I m, n >0}, and
perform the Instantaneous description for the given input: 00112233 (10)

·7 (a) Construct pushdown automata for the following languages. Acceptance e ither ' ;
empty stack or by final state: L={ wwR I wt (a,bt} / (5) "--
(b) Construct pushdown automata for the following languages. Acc( ptance either by
empty stack or by final state: L={ w I na(w)=nb(W) , WE (a,b)*} // (5)

, 9 . • Construct the Turing Machine for the following language:,{: { wwR I wr..(a,bt }, and
I ' • /

perform the Instantaneous description for the given input: abbbba (10)
10. Explain in detail about Multi-track Turing Machine, Multi-tape Turing machine, and Multi-
/

• • dimensional Turing machine with neat sketch and examples (10)

.... All the Best ....

You might also like