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

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

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

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

JNTUWORLD. Code No: R

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

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

(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

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

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

Multiple Choice Questions

Theory of Computation Dr. Weiss Extra Practice Exam Solutions

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

Regular Languages and Regular Expressions

CT32 COMPUTER NETWORKS DEC 2015

6 NFA and Regular Expressions

Ambiguous Grammars and Compactification

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

Midterm I (Solutions) CS164, Spring 2002

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

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

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

CSE 105 THEORY OF COMPUTATION

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

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

CSE 105 THEORY OF COMPUTATION

AUBER (Models of Computation, Languages and Automata) EXERCISES

Final Course Review. Reading: Chapters 1-9

QUESTION BANK. Unit 1. Introduction to Finite Automata

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

3. Which of the following is volatile? [ ] A) Bubble memory B) RAM C) ROM D) Magneticdisk

Compiler Construction

Chapter Seven: Regular Expressions

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

CS 403 Compiler Construction Lecture 3 Lexical Analysis [Based on Chapter 1, 2, 3 of Aho2]

Theory of Computations Spring 2016 Practice Final Exam Solutions

Computer Sciences Department

Theory of Computations Spring 2016 Practice Final

CS402 - Theory of Automata FAQs By

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2016

Lexical Analysis. Dragon Book Chapter 3 Formal Languages Regular Expressions Finite Automata Theory Lexical Analysis using Automata

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

UNIT -2 LEXICAL ANALYSIS

CSE 105 THEORY OF COMPUTATION

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

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

Midterm I - Solution CS164, Spring 2014

Actually talking about Turing machines this time

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

Where We Are. CMSC 330: Organization of Programming Languages. This Lecture. Programming Languages. Motivation for Grammars

MIT Specifying Languages with Regular Expressions and Context-Free Grammars

Languages and Compilers

CS402 - Theory of Automata Glossary By

Non-deterministic Finite Automata (NFA)

CS/ECE 374 Fall Homework 1. Due Tuesday, September 6, 2016 at 8pm

Assignment No.4 solution. Pumping Lemma Version I and II. Where m = n! (n-factorial) and n = 1, 2, 3

CS154 Midterm Examination. May 4, 2010, 2:15-3:30PM

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

(DCS/DIT311) Answer question no.1 compulsory (15 1 = 15) Answer ONE question for each unit (4 15 = 60) 1) Write short notes on :

UNIT I PART A PART B

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

Implementation of Lexical Analysis


Formal Languages and Automata

Limits of Computation p.1/?? Limits of Computation p.2/??

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

Implementation of Lexical Analysis

AUTOMATA THEORY AND COMPUTABILITY

Converting a DFA to a Regular Expression JP

CMSC 330: Organization of Programming Languages. Architecture of Compilers, Interpreters

Chapter Seven: Regular Expressions. Formal Language, chapter 7, slide 1

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

CS 314 Principles of Programming Languages. Lecture 3

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Front End: Lexical Analysis. The Structure of a Compiler

CSC-461 Exam #2 April 16, 2014

Optimizing Finite Automata

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 ǫ.

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

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

Concepts Introduced in Chapter 3. Lexical Analysis. Lexical Analysis Terms. Attributes for Tokens

CMSC 330: Organization of Programming Languages

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

Compilation 2012 Context-Free Languages Parsers and Scanners. Jan Midtgaard Michael I. Schwartzbach Aarhus University

CSE 401 Midterm Exam 11/5/10

Context-Free Grammars

CS 432 Fall Mike Lam, Professor. Finite Automata Conversions and Lexing

CSE 431S Scanning. Washington University Spring 2013

Implementation of Lexical Analysis

Decision Properties for Context-free Languages

Theory of Computation, Homework 3 Sample Solution

Context Free Grammars. CS154 Chris Pollett Mar 1, 2006.

Chapter 3 Lexical Analysis

CMSC 330: Organization of Programming Languages. Context Free Grammars

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

KHALID PERVEZ (MBA+MCS) CHICHAWATNI

Compiler course. Chapter 3 Lexical Analysis

CSE450. Translation of Programming Languages. Lecture 20: Automata and Regular Expressions

DEPARTMENT OF INFORMATION TECHNOLOGY AUTOMATA AND COMPILER DESIGN. B.Tech-IT, III Year -I Sem

CMSC 330: Organization of Programming Languages

Context-Free Grammars

Transcription:

Code No: 134BD Set No. 1 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name: Hall Ticket No. Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. A I Choose the correct alternative 1. Finite automata has [ ] A) Unlimited memory B) no memory at all C) limited memory D) None 2. PDA can recognize [ ] A) any grammar B) only CFG C) any unambiguous grammar D) only regular grammar 3. Given an arbitrary NFA with N states, the maximum number of states in an equivalent minimized DFA is at least [ ] A) N 2 B) N C) 2 N D) 2N 4. The recognizing capabilities of NDFSM and DFSM [ ] A) May be different B) must be same C) must be different D) none 5. The Union of two regular language is [ ] A) Regular B) Irregular C) Both A & B D) None 6. Which of the regular expression is not equivalent to the CFG S->aS bs a b [ ] A) (a+b) * B) (a+b) + C) (a+b)(a+b) * D) (a+b) * (a+b) 7. FORTRAN is a language. [ ] A) regular B) Context free C) context sensitive D) None 8. Which of the following regular expression identities are true? [ ] A) (r+s) * =r * B) (r * s * ) * = (r+s) * C) (r+s) * =r * +s * D) r * s * =r * +s * 9. Let S and T be languages over Σ={a,b} represented by the regular Expressions (a+b*)* and (a+b)* [ ] A) S T B) T S C) S =T D) S T=Ø 10. Which of the following is not a prefix of abc. [ ] A) Є B) a C) ab D) bc Cont.2

Code No: 134BD :2: Set No. 1 II Fill in the Blanks 11. Elimination of Є moves from NFA increases 12. For every context free language we can construct to accept the language. 13. In Moore machine represents the output alphabet. 14. NFA stands for 15. is a context free grammar to generate expression with balanced parenthesis. 16. If there is a unique LMD, the grammar is 17. Applying Pumping Lemma we can show that all languages are not regular (True/False). 18. Language L= {W/length (W) is prime} is 19. of a state is the set of states that can be reached by Є transitions. 20. The output in machine is associated with transition. -ooo-

Code No: 134BD Set No. 2 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name: Hall Ticket No. Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. A I Choose the correct alternative 1. The recognizing capabilities of NDFSM and DFSM [ ] A) May be different B) must be same C) must be different D) none 2. The Union of two regular language is [ ] A) Regular B) Irregular C) Both A & B D) None 3. Which of the regular expression is not equivalent to the CFG S->aS bs a b [ ] A) (a+b) * B) (a+b) + C) (a+b)(a+b) * D) (a+b) * (a+b) 4. FORTRAN is a language. [ ] A) regular B) Context free C) context sensitive D) None 5. Which of the following regular expression identities are true? [ ] A) (r+s) * =r * B) (r * s * ) * = (r+s) * C) (r+s) * =r * +s * D) r * s * =r * +s * 6. Let S and T be languages over Σ={a,b} represented by the regular Expressions (a+b*)* and (a+b)* [ ] A) S T B) T S C) S =T D) S T=Ø 7. Which of the following is not a prefix of abc. [ ] A) Є B) a C) ab D) bc 8. Finite automata has [ ] A) Unlimited memory B) no memory at all C) limited memory D) None 9. PDA can recognize [ ] A) any grammar B) only CFG C) any unambiguous grammar D) only regular grammar 10. Given an arbitrary NFA with N states, the maximum number of states in an equivalent minimized DFA is at least [ ] A) N 2 B) N C) 2 N D) 2N Cont.2

Code No: 134BD :2: Set No. 2 II Fill in the Blanks 11. NFA stands for 12. is a context free grammar to generate expression with balanced parenthesis. 13. If there is a unique LMD, the grammar is 14. Applying Pumping Lemma we can show that all languages are not regular (True/False). 15. Language L= {W/length (W) is prime} is 16. of a state is the set of states that can be reached by Є transitions. 17. The output in machine is associated with transition. 18. Elimination of Є moves from NFA increases 19. For every context free language we can construct to accept the language. 20. In Moore machine represents the output alphabet. -ooo-

Code No: 134BD Set No. 3 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name: Hall Ticket No. Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. A I Choose the correct alternative 1. Which of the regular expression is not equivalent to the CFG S->aS bs a b [ ] A) (a+b) * B) (a+b) + C) (a+b)(a+b) * D) (a+b) * (a+b) 2. FORTRAN is a language. [ ] A) regular B) Context free C) context sensitive D) None 3. Which of the following regular expression identities are true? [ ] A) (r+s) * =r * B) (r * s * ) * = (r+s) * C) (r+s) * =r * +s * D) r * s * =r * +s * 4. Let S and T be languages over Σ={a,b} represented by the regular Expressions (a+b*)* and (a+b)* [ ] A) S T B) T S C) S =T D) S T=Ø 5. Which of the following is not a prefix of abc. [ ] A) Є B) a C) ab D) bc 6. Finite automata has [ ] A) Unlimited memory B) no memory at all C) limited memory D) None 7. PDA can recognize [ ] A) any grammar B) only CFG C) any unambiguous grammar D) only regular grammar 8. Given an arbitrary NFA with N states, the maximum number of states in an equivalent minimized DFA is at least [ ] A) N 2 B) N C) 2 N D) 2N 9. The recognizing capabilities of NDFSM and DFSM [ ] A) May be different B) must be same C) must be different D) none 10. The Union of two regular language is [ ] A) Regular B) Irregular C) Both A & B D) None Cont.2

Code No: 134BD :2: Set No. 3 II Fill in the Blanks 11. If there is a unique LMD, the grammar is 12. Applying Pumping Lemma we can show that all languages are not regular (True/False). 13. Language L= {W/length (W) is prime} is 14. of a state is the set of states that can be reached by Є transitions. 15. The output in machine is associated with transition. 16. Elimination of Є moves from NFA increases 17. For every context free language we can construct to accept the language. 18. In Moore machine represents the output alphabet. 19. NFA stands for 20. is a context free grammar to generate expression with balanced parenthesis. -ooo-

Code No: 134BD Set No. 4 JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD B.Tech. II Year II Sem., I Mid-Term Examinations, February - 2018 FORMAL LANGUAGES AND AUTOMATA THEORY Objective Exam Name: Hall Ticket No. Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10. A I Choose the correct alternative 1. Which of the following regular expression identities are true? [ ] A) (r+s) * =r * B) (r * s * ) * = (r+s) * C) (r+s) * =r * +s * D) r * s * =r * +s * 2. Let S and T be languages over Σ={a,b} represented by the regular Expressions (a+b*)* and (a+b)* [ ] A) S T B) T S C) S =T D) S T=Ø 3. Which of the following is not a prefix of abc. [ ] A) Є B) a C) ab D) bc 4. Finite automata has [ ] A) Unlimited memory B) no memory at all C) limited memory D) None 5. PDA can recognize [ ] A) any grammar B) only CFG C) any unambiguous grammar D) only regular grammar 6. Given an arbitrary NFA with N states, the maximum number of states in an equivalent minimized DFA is at least [ ] A) N 2 B) N C) 2 N D) 2N 7. The recognizing capabilities of NDFSM and DFSM [ ] A) May be different B) must be same C) must be different D) none 8. The Union of two regular language is [ ] A) Regular B) Irregular C) Both A & B D) None 9. Which of the regular expression is not equivalent to the CFG S->aS bs a b [ ] A) (a+b) * B) (a+b) + C) (a+b)(a+b) * D) (a+b) * (a+b) 10. FORTRAN is a language. [ ] A) regular B) Context free C) context sensitive D) None Cont.2

Code No: 134BD :2: Set No. 4 II Fill in the Blanks 11. Language L= {W/length (W) is prime} is 12. of a state is the set of states that can be reached by Є transitions. 13. The output in machine is associated with transition. 14. Elimination of Є moves from NFA increases 15. For every context free language we can construct to accept the language. 16. In Moore machine represents the output alphabet. 17. NFA stands for 18. is a context free grammar to generate expression with balanced parenthesis. 19. If there is a unique LMD, the grammar is 20. Applying Pumping Lemma we can show that all languages are not regular (True/False). -ooo-