CS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/ ItIauIafIaAblll~AladUnrtel1ity

Similar documents
Multiple Choice Questions

JNTUWORLD. Code No: R

(a) R=01[((10)*+111)*+0]*1 (b) ((01+10)*00)*. [8+8] 4. (a) Find the left most and right most derivations for the word abba in the grammar

R10 SET a) Construct a DFA that accepts an identifier of a C programming language. b) Differentiate between NFA and DFA?

UNIT I PART A PART B

QUESTION BANK. Formal Languages and Automata Theory(10CS56)

1. Which of the following regular expressions over {0, 1} denotes the set of all strings not containing 100 as a sub-string?


T.E. (Computer Engineering) (Semester I) Examination, 2013 THEORY OF COMPUTATION (2008 Course)

Skyup's Media. PART-B 2) Construct a Mealy machine which is equivalent to the Moore machine given in table.

CS402 Theory of Automata Solved Subjective From Midterm Papers. MIDTERM SPRING 2012 CS402 Theory of Automata

CT32 COMPUTER NETWORKS DEC 2015

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Computer Sciences Department

Theory of Computation, Homework 3 Sample Solution

CS5371 Theory of Computation. Lecture 8: Automata Theory VI (PDA, PDA = CFG)

Derivations of a CFG. MACM 300 Formal Languages and Automata. Context-free Grammars. Derivations and parse trees

CS402 - Theory of Automata Glossary By

Final Course Review. Reading: Chapters 1-9

QUESTION BANK. Unit 1. Introduction to Finite Automata

Theory of Computation Dr. Weiss Extra Practice Exam Solutions

AUTOMATA THEORY AND COMPUTABILITY

Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10.

Closure Properties of CFLs; Introducing TMs. CS154 Chris Pollett Apr 9, 2007.

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

CS402 - Theory of Automata FAQs By

AUBER (Models of Computation, Languages and Automata) EXERCISES

DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY SIRUVACHUR, PERAMBALUR DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Theory Bridge Exam Example Questions Version of June 6, 2008

1. [5 points each] True or False. If the question is currently open, write O or Open.

Ambiguous Grammars and Compactification

Regular Languages (14 points) Solution: Problem 1 (6 points) Minimize the following automaton M. Show that the resulting DFA is minimal.

I have read and understand all of the instructions below, and I will obey the Academic Honor Code.

CMSC 330, Fall 2009, Practice Problem 3 Solutions

Last lecture CMSC330. This lecture. Finite Automata: States. Finite Automata. Implementing Regular Expressions. Languages. Regular expressions

Reflection in the Chomsky Hierarchy

Outline. Language Hierarchy

Theory of Computation

CS210 THEORY OF COMPUTATION QUESTION BANK PART -A UNIT- I

Decidable Problems. We examine the problems for which there is an algorithm.

From Theorem 8.5, page 223, we have that the intersection of a context-free language with a regular language is context-free. Therefore, the language

CSE 105 THEORY OF COMPUTATION

Turing Machine Languages

ONE-STACK AUTOMATA AS ACCEPTORS OF CONTEXT-FREE LANGUAGES *

Theory of Programming Languages COMP360

Midterm Exam II CIS 341: Foundations of Computer Science II Spring 2006, day section Prof. Marvin K. Nakayama

UNIT 1 SNS COLLEGE OF ENGINEERING

1. (10 points) Draw the state diagram of the DFA that recognizes the language over Σ = {0, 1}

Pushdown Automata. A PDA is an FA together with a stack.

Decision Properties for Context-free Languages

PS3 - Comments. Describe precisely the language accepted by this nondeterministic PDA.

Computation Engineering Applied Automata Theory and Logic. Ganesh Gopalakrishnan University of Utah. ^J Springer

Theory of Computations Spring 2016 Practice Final Exam Solutions

KHALID PERVEZ (MBA+MCS) CHICHAWATNI

Finite Automata. Dr. Nadeem Akhtar. Assistant Professor Department of Computer Science & IT The Islamia University of Bahawalpur

Automata Theory CS S-FR Final Review

CMSC 330 Practice Problem 4 Solutions

Converting a DFA to a Regular Expression JP

MIT Specifying Languages with Regular Expressions and Context-Free Grammars. Martin Rinard Massachusetts Institute of Technology

MIT Specifying Languages with Regular Expressions and Context-Free Grammars

Definition 2.8: A CFG is in Chomsky normal form if every rule. only appear on the left-hand side, we allow the rule S ǫ.

Limitations of Algorithmic Solvability In this Chapter we investigate the power of algorithms to solve problems Some can be solved algorithmically and

Formal Grammars and Abstract Machines. Sahar Al Seesi

CIT3130: Theory of Computation. Regular languages

HKN CS 374 Midterm 1 Review. Tim Klem Noah Mathes Mahir Morshed

ECS 120 Lesson 16 Turing Machines, Pt. 2

Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5

CS 315 Programming Languages Syntax. Parser. (Alternatively hand-built) (Alternatively hand-built)

Chapter 14: Pushdown Automata

Learn Smart and Grow with world

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

(Refer Slide Time: 0:19)

Finite automata. We have looked at using Lex to build a scanner on the basis of regular expressions.

CSE 105 THEORY OF COMPUTATION

Total No. of Questions : 18] [Total No. of Pages : 02. M.Sc. DEGREE EXAMINATION, DEC First Year COMPUTER SCIENCE.

TOPIC PAGE NO. UNIT-I FINITE AUTOMATA

CS 44 Exam #2 February 14, 2001

CSE 105 THEORY OF COMPUTATION

An Interactive Approach to Formal Languages and Automata with JFLAP

Final Exam 1, CS154. April 21, 2010

Regular Languages. MACM 300 Formal Languages and Automata. Formal Languages: Recap. Regular Languages

QUESTION BANK CS2303 THEORY OF COMPUTATION

Actually talking about Turing machines this time

Roll No. :... Invigilator's Signature :. CS/B.Tech(CSE)/SEM-7/CS-701/ LANGUAGE PROCESSOR. Time Allotted : 3 Hours Full Marks : 70

Languages and Compilers

Question Bank. 10CS63:Compiler Design

2010: Compilers REVIEW: REGULAR EXPRESSIONS HOW TO USE REGULAR EXPRESSIONS

ROEVER COLLEGE OF ENGINEERING AND TECHNOLOGY Elambalur, Perambalur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-I AUTOMATA

Automata Theory TEST 1 Answers Max points: 156 Grade basis: 150 Median grade: 81%

Formal languages and computation models

R10 SET a) Explain the Architecture of 8085 Microprocessor? b) Explain instruction set Architecture Design?

3 rd Year - Computer Science and Engineering,

Conversion of Fuzzy Regular Expressions to Fuzzy Automata using the Follow Automata

Name: CS 341 Practice Final Exam. 1 a 20 b 20 c 20 d 20 e 20 f 20 g Total 207

Theory of Computations Spring 2016 Practice Final

Context-Free Grammars

6 NFA and Regular Expressions

(DMTCS 01) Answer Question No.1 is compulsory (15) Answer One question from each unit (4 15=60) 1) a) State whether the following is True/False:

Definition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,

COMP-421 Compiler Design. Presented by Dr Ioanna Dionysiou

Transcription:

CS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/2015-16 ItIauIafIaAblll~AladUnrtel1ity ~ t; ~~ ) MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL Paper Code: CS-402 FORMAL LANGUAGE AND AUTOMATA THEORY Time Allotted: Full Marks: 70 3 Hours Thefigures in the margin indicate full marks. Candidates are required to give their answers in their own words asfar as practicable. GROUP-A ( Multiple Choice Type Questions ) 1. Choose the correct alternatives for any ten of the following: 10 x 1 = 10 i) A context free grammar is not closed under ii) a) Product b) Union c) Complementation d) Kleen star. Context sensitive grammar can be recognized by i a) deterministic push down machine " b) non-deterministic push down machine 4/40302 c) FSM d) linearly bounded memory machine. [Turn over --

CS/B.Tech/CSE/IT /EVEN/ SEM-4/CS-402/20 15-16 * * iii) A = ( a + b) a and B = b ( a + b) then A intersection B will be '" re -n r( a) ( a + b) * ab b) ab ( a + b) * c) a(a+b) * b d) * b(a+b) a. iv) Which of the following is most general phase - structured grammar? a) Regular b) Context sensitive c) PDA d) none of these. v) The string 1101 does not belong to the set vi) represented by a) 110* ( 0 + 1 ) b) 1(0+1)*101 c) (10)* (01)*(00+11)* d) [ 00 + ( 11 )* 0 J *. Pumping lemma is generally used for a) a given grammar is regular b) a given grammar is not regular sc c) whether two regular expressions are equivalent 1tt or not d) none of these. 4/40302 2 gr

, I i I CS/B.Tech/CSE/IT/EVEN/SEM-4/CS-402/ 2015-16 vii) The basic limitation of FSM is that a) it cannot remember arbitrary large amount of information t It b) it some times fail to recognize grammar that are regular c) it some times fail to recognizes grammar that are not regular d) all of these. viii) Recursive languages are a) closed under insertion b) recursively enumeration c) closed under complementation d) all of these. ix) k-ievel equivalence IS possible between two finite automata a) if all equivalence above k-level exist between b) c) d) them if all level equivalence up to k - 1 level already exist if both contain at least k: number of states if both contain exactly k number of states. 4/40302 3 lturn over ---

CS/B.Tcch/CSE/IT /EVEN/SEM-4/CS-402/2015-16,a aj '" rc 11 r( x) An automata is a/ an device. a) acceptor only b) acceptor / rejector c) rejector only d) generating. xi) Which of the following is correct? Language can be derived from the FA b) Regular expressions can be derived from the FA c) FA can be derived from the language d) both (a) & (c). GROUP- B ( Short Answer Type Questions I Answer any three of the following. 3 x 5 = 15 2. Design a two-input two-output sequence detector which generates an output' l ' every time the sequence 1010 is detected. And for all other cases output '0' is generated. Overlapping sequences are also counted. Draw only state table and state diagram. 3. Convert the following NFA into an equivalent DFA : sc 11, 4/40302 4 gr

-j I! CSj Il.Tech/CSE/IT /EVEN /SEM-4 / CSA02 /2015-16 -I. Deline DFA. Derive the DFA for the regular language 0(0 t I ) for the symbols L: = \ 0, I :. 2 + 3!i. Con st ruct a minimum state automaton from the Iransition table given below:.-.- r-------i----- -------' P5 I x = 0 ' x = 1 : -------.---, -- ----f-------.-- j I I I qo. q 1 i q2. q 1 +---~----I +' q 3 -.-~ ------t-----~-. -----{ q2 l'.--.-------, ----- q2 -.-------.---1 q4 i. ~_3---~----~-_t q3 ~ ~=~d~--_j----::-- I q3 ' q4 ' q 5 are final states. ::-=-_j 6. Find the string which is applied on state 'D producing output string 10011110 and final state 'D for the machine given below: -----~ P5 +5,0/ 1. --J. x=o x=l ------------r----....--.~ A. A, 1 c, 1 ~ B i E, 0 B, 1 ---I c I D._._,_, O"-- ~---=A" 0. Q_=-_~- c, 0 B,-0----l. A L_ B, 1 A,_O J 4/40:l0"2 5 I Turn over

c,,_' II.. CS/RTech/CSE/IT /EVEN /SEM-4 /CS-'102 1:20 15-16 GROUP- C ( Long Answer Type Questions) Answer any three of the follo\\'ing 3 x 15 = 45 III rc 7, a) Construct a regular grammar G generating the regular set represented bv P = a b ( a ~ b) b) Convert the following Mcalv machine to Moore machine, c) What is Klenne's star? Give example, What is -11 positive closure? Give example, 5+6+(2+2) r( Sc lit 8, a) Construct an equivalent PDA for the following 4/40302 CFG: S -> aab/bba A -> bs/a B -> as/b Show an ID for the string abbaaabbbab generated with stack description, for the PDA 6 gr

CS/ B.TechjCSE/IT /EVEN/SEM-4 /CS-402/20 15-16 b) Give the regular expression for the DFA using Arden theorem. 1 1 o c) Convert the following grammar into GNF : S ---.ABb/a A --> aaa/b B --> bab. 7+5+3 9. a) Let G be the grammar S --> ab Iba, B --> b j hs IaBB. For the string aaabbabbba i) leftmost derivation ii) iii) rightmost derivation parse tree. find: b) Prove that CFLs are not closed under intersection and complement operation. c) Design an NFA which accepts set of all binary strings containing 1100 or 1010. (2 + 2 + 2) + 4 + 5 4/40302 7 [Turn over._-

CS/B.Tech/CSE/IT /EVEN/SEM-4/CS-402/20 15-16 Ie 1,II.11 rc 10. a) What do you mean bv distinguishablt' and indistinguishable states? b) Draw the Merger graph, Merger table, compatibility graph and then minimize the following: Present r!-=-~=;-._-----_._--, I-In-~-u-_t-~-O-~'--In-'.[>-'_'u"'t c:'~"-.:::lo;! iool'''n'-p~u t ;_2_~~:t_~=_ 3-1 Next State, oie : - i Cl : El I b'l -t-----+--"-"-=-~t -, -----+---,----. -J D - -+B t_-~o i-f~i- 1 L 1-_ j I _. ~ E - F~_~~~O-~- D, 1_ '------=F_---L_-=.C'-", 0 J----_~_B,_O_L_C,_J, 11. a) Design a that accepts {0 n 1 n In> ~ 1 }. 3 + 12 b) What do you mean by halting problem of a Turing," machine? -n c) Explain Ogden's Lemma for CFL. Ie 1(( d) Construct CFG for the following: i) Palindrome for binary numbers ii) L~{anbncmdmlm,n>O}. 4/40302 8 5+2+3+(3+2) gr