INSTITUTE OF AERONAUTICAL ENGINEERING

Size: px
Start display at page:

Download "INSTITUTE OF AERONAUTICAL ENGINEERING"

Transcription

1 INSTITUTE OF AERONAUTICAL ENGINEERING DUNDIGAL , HYDERABAD COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : FORMAL LANGUAGES AND AUTOMATA THEORY Course Code : A40509 Class : II B. Tech II Semester Branch : Computer Science and Engineering Year : Course Faculty : Dr K Rajendra Prasad, Professor Ms N Mamatha, Assistant Professor Ms M Sandhya Rani, Assistant Professor Ms T Ramya, Assistant Professor OBJECTIVES To meet the challenge of ensuring excellence in engineering education, the issue of quality needs to be addressed, debated and taken forward in a systematic manner. Accreditation is the principal means of quality assurance in higher education. The major emphasis of accreditation process is to measure the outcomes of the program that is being accredited. In line with this, Faculty of Institute of Aeronautical Engineering, Hyderabad has taken a lead in incorporating philosophy of outcome based education in the process of problem solving and career development. So, all students of the institute should understand the depth and approach of course to be taught through this question bank, which will enhance learner s learning process. Group - A (Short Answer Questions) S. No. Questions Blooms Taxonomy Level UNIT - I Part- A (Short Answer Questions) 1. Explain transition diagram, transition table with example. Understand 1. Define transition function of DFA. Remember 3. Define ε transitions. Remember 4. Construct a DFA to accept even number of 0 s. 5. Define Kleene closure and positive closure. Remember 1 6. Construct a DFA to accept empty language. 7. Explain power of an alphabet ( *)? Understand 1 8. Write transition diagram for DFA accepting string ending with 00 defined over an alphabet = {0,1} 9. Write transition diagram for DFA to accept exactly one a defined over an alphabet = {a,b} 10. Define NFA with an example. Remember 11. Explain the different Operations on the languages. Understand 1. Construct a finite automaton accepting all strings over {0, 1} having even number of 0 s Course Outcomes

2 13. Define Moore Machines. Remember Define Mealy Machines. Remember Write DFA for odd number of 1 s. 16. Write NFA for (0+1)*101(0+1)*. 17. Write DFA for (0+1)*10(0+1)*. 18. Define ɛ - closure. Remember 19. Write NFA for (0+1)*001(0+1)*. 0. Write DFA for (0+1)*00(0+1)*. 1 Define FSM and its structure with an example. Remember Give any two comparisions between NFA and DFA Remember Part- B (Long Answer Questions) 1. Construct a DFA to accept set of all strings ending with 010. Define language over an alphabet = { 0,1} and write for the above DFA.. Construct a Moore machine to accept the following language. L = { w w mod 3 = 0} on = { 0,1,} 3 3. Write any six differences between DFA and NFA 4. Write NFA with Ɛ to NFA conversion with an example. Understand 5. Construct NFA for (0 + 1)*( )(0 + 1)* and Convert to DFA. 6. Design DFA for the following languages shown below = { a,b} a) L={w/ w does not contain the substring ab} b) L={w/ w contains neither the substring ab nor ba} c) L={w/ w is any string that doesn t contain exactly two a} d) L={w/ w is any string except a and b} 7. Illustrate given FA s are equivalent or not with an example Construct Mealy machine for (0 + 1)*( ) and convert to Moore machine Convert NFA with Ɛ a*b* to NFA. Understand 10. Construct NFA for (0 + 1)*101 and Convert to DFA. 11. Construct a mealy machine that takes binary number as input and Understand produces s complement of that number as output.assume the 3 string is read LSB to MSB and end carry is discarded. 1. Explain with the following example the Minimize the DFA. Understand 13. Construct a DFA, the language recognized by the Automaton being L {a n b/n 0}. Draw the transition table. 14. Construct the Minimized DFA 15. Construct the DFA that accepts/recognizes the language L(M) = w {a, b, c}* and w contains the pattern abac }. Draw the

3 transition table. 16. Construct NFA for given NFA with Є-moves 17. Differentiate between DFA and NFA with an example. Understand 18. Construct a finite automaton accepting all strings over {0, 1} having even number of 0 s and even number of 1 s. 19. Construct a Moore Machine to determine the residue mod 5 for each binary string treated as integer. Sketch the transition table Construct the Moore Machine for the given Mealy machine STATE/I a b output q0 q1 q 1 q1 q1 q1 0 q q1 q0 1 Understand 3 Part- C (Problem Solving and Critical Thinking) 1 Construct NFA for (0 + 1)*0(0 + 1)0(0 + 1)* and convert to DFA. Construct NFA for (0 + 1)*010(0 + 1)* and Convert to DFA. 3 Construct NFA with Ɛ for 0*1*1* and Convert to NFA. 4 Construct Mealy Machine for Residue Modulo of 5 for the ternary number system and convert to Moore Machines. 5 Write the DFA that will accept those words from {a, b} where the number of a s is divisible by two and the number of b s is 6 divisible by three. Sketch the transition table of the finite Automaton Construct DFA M. for the given NFA as shown in fig. below UNIT II Part- A (Short Answer Questions) 1. Define Regular Languages. Remember 7. Define Pumping Lemma for Regular Languages. Remember 7 3. Write the applications of pumping lemma for regular languages List any two applications of regular expression. Remember 7 5. Define Context Free Grammars. Remember 8 6. Define Left linear derivation. Remember 7 7. Write regular expression for denoting language containing empty string Differentiate left linear and right linear derivations. Understand 8 9. Write the Context free grammar for palindrome. Remember Define right linear grammars. Remember Define Regular grammars. Remember 7 1. Write regular expressions for the Set of strings over {0, 1} whose last two symbols are the same Define right linear derivation. Remember Define left linear grammars. Remember Write the regular language generated by regular expression (0+1)*001(0+1)* Write the Regular Expression for the set of binary strings Write the derivation of the string aaaa from CFG 8

4 S a S/A A a 18. Write the derivation of the string 110 from CFG S A0/B A 0/1/B B A/ Write the Regular Expression to generate atleast one b over Σ ={a,b} 8 0. Write the Context free grammar for equal number of a s and b s. 8 Part- B (Long Answer Questions) 1. Convert Regular Expression 01* + 1 to Finite Automata. Understand 7. Convert given Finite Automata to Regular Expression using Arden s Understand theorem with an example Construct Right linear, Left linear Regular Grammars for 7 01* Explain Identity rules. Simplify the Regular Expression - Understand 7 Є + 1*(011)*(1*(011)*)* 5. Construct Regular grammar for the given Finite Automata. 7 (a+b)*ab*. 6. Construct Leftmost Derivation., Rightmost Derivation, 8 Derivation Tree for the following grammar S ab ba A a as baa B b bs abb For the string aaabbabbba. 7. Explain the properties, applications of Context Free Languages Understand 8 8. Construct right linear and left linear grammars for given Regular 7 Expression. 9. Construct a Transition System M accepting L(G) for a given Regular Grammar G Discuss the properties of Context free Language. Explain the pumping Understand 7 lemma with an example. 11. Write regular expressions for the given Finite Automata 7 1. Construct a NFA with Є equivalent to the regular expression 10 + ( )0*1 13. Construct Leftmost Derivation., Rightmost Derivation, 7 Derivation Tree for the following grammar G = (V, T, P, S) with N = {E}, S = E, T = {id, +, *(,)} E E+E E E* E E (E) E id Obtain id+id*id in right most derivation, left most derivation 14. Write a CFG that generates equal number of a s and b s Convert G = ( {S},{a},{ S as /a},{s} ) into FA Understand Construct a Regular expression for the set all strings of 0 s and 1 s 7

5 with at least two consecutive 0 s 17. Construct context free grammar which generates palindrome strings ={a,b} 18. Construct equivalent NFA with є for the given regular expression 0*(1(0+1))* Construct the right linear grammar for the following 7 0. Write 1 identity rules for regular expressions 7 Part- C (Problem Solving and Critical Thinking) 1 Convert Regular Expression (11 + 0)*(00 + 1)* to NFA with Ɛ. Understand 7 Convert Regular Expression (a + b)*(aa + bb)(a + b)* to DFA. Understand 7 3 Construct Regular Grammars for Finite Automata 0*(1(0 + 1))*. 7 4 Construct Finite 7 5 Automata for A0 a A1 A1 Construct b left linear grammar for the following 7 UNIT III Part- A (Short Answer Questions) 1. Define Greibach normal form. Remember 9. Define nullable Variable. Remember 8 3. Write the minimized CFG for the following grammar Remember 9 S ABCa bd A BC b B b ε C Đ ε D d 4. Convert the grammar to CNF - S ba/ab A as/a B bs/b. Understand 8 5. Explain the elimination of UNIT production. Understand 8 6. Explain the elimination of useless symbols in productions. Understand 8 7. Define CNF. Remember 9 8. Write the minimization of CFG S a S/A A a B aa Understand 8 9. Define the ambiguity in CFG. Remember What is the use of CNF and GNF Write the minimization of CFG - S as1b S1 as1b/ɛ. Understand 8 1. Write the minimization of CFG - S A A aa/ ɛ. Understand Write the minimization of CFG - S AB / a A a. Understand Write the minimization of CFG - S as/a/c A a B aa C acb. Understand Write the minimization of CFG - S AbA A Aa/ ɛ. Understand 8

6 16. Write the minimization of CFG - S asa S bsb S a/b/ ɛ. Understand Write the minimization of CFG - S A0/B A 0/1/B Understand 8 B A/ Convert the grammar to CNF - S asa/aa S bsb/bb S a/b. Understand Convert the grammar to CNF - S aabb A aa/a B bb/a. Understand 8 0. Define PDA. Remember Define NPDA. Remember 10. Differentiate between deterministic and nondeterministic PDA. Understand Define the language of DPDA. Remember List the steps to convert CFG to PDA. Remember Explain acceptance of PDF by final state. Understand Explain acceptance of PDF by empty stack. Understand Convert the following PDA to CFG δ(q0,b,z0)={q0,zz0) 8. Convert the following PDA to CFG δ(q0, b, z)=(q0,zz) 9. Convert the following PDA to CFG δ(q0, ϵ,z0)=(q0,ϵ) 30. Convert the following PDA to CFG δ(q0,a,z) = (q1,z) 31. Convert the following PDA to CFG δ(q1,b,z)=(q1,ϵ) 3. Convert the following PDA to CFG δ(q1,a,z0)=(q0,z0) 33. Convert the following PDA to CFG δ(q0,0,z0)={q0,xz0) 34. Convert the following PDA to CFG δ(q0,0,x)=(q0,xx) 35. Convert the following PDA to CFG δ(q0,1,x)=(q1,ϵ) 36. Convert the following PDA to CFG δ(q1,1,x) = (q1,ϵ) 37. Convert the following PDA to CFG δ(q1,ϵ,x)=(q1,ϵ) 38. Convert the following PDA to CFG δ(q1,ϵ,z0)=(q1,ϵ) 39. Convert the following PDA to CFG δ(q1,ϵ,z)=(q0,ϵ) 40. Convert the following CFG to PDA S ABC BbB 41. Convert the following CFG to PDA A aa BaC aaa 4. Convert the following CFG to PDA B bbb a D 43. Convert the following CFG to PDA C CA AC 44. Convert the following CFG to PDA S a S/A Part- B (Long Answer Questions) 1. Write a short notes on Chomsky Normal Form and Griebach Normal 9 Form.. Show that the following grammar is ambiguous with respect to the Understand 8 string aaabbabbba. S ab ba A as baa a B bs abb b 3. Use the following grammar : 9 S ABC BbB A aa BaC aaa B bbb a D C CA AC D ε Eliminate ε-productions. Eliminate any unit productions in the resulting grammar. Eliminate any useless symbols in the resulting grammar. Convert the resulting grammar into Chomsky Normal Form 4. Illustrate the construction of Griebach normal form with an example. 9

7 5. Show that the following CFG ambiguous. 8 S icts ictses a C b 6. Discuss the Pumping lemma for Context Free Languages concept with Understand 9 example {a n b n c n where n>=0} 7. Write the simplified CFG productions in S a S1b 8 S1 a S1b/ Є 8. Convert the following CFG into GNF. Understand 8 S AA/a A SS/b 9. Explain unit production? Explain the procedure to eliminate unit Understand 8 production. 10. Explain the procedure to eliminate ϵ-productions in grammar. Understand Convert the following grammar into GNF Understand 8 G=({A1,A,A3},{a,b},P,A) A1->AA3 A->A3A1/b A3->A1A/a 1. Write simplified CFG productions from the following grammar 8 A->aBb/bBa B->aB/bB/ϵ 13. Convert the following grammar into GNF S->ABA/AB/BA/AA/B A->aA/a B->bB/b Understand 8 Part- C (Problem Solving and Critical Thinking) 1 Construct PDA for equal number of x s and y s 10 Convert the following grammar Understand 9 into GNF A1 A A3 A A3 A1 /b A3 A1 A /a 3 Construct DPDA for L = { W#W R /W ϵ ( X + Y)*} 10 4 Convert the following PDA to CFG δ(q0,0,z0)={q0,xz0) δ(q0,0,x)=(q0,xx) δ(q0,1,x)=(q1,ϵ) δ(q1,1,x) = (q1,ϵ) δ(q1,ϵ,x)=(q1,ϵ) δ(q1,ϵ,z0)=(q1,ϵ) Understand and 5 Write the PDA that accepts the language{a^m b^n/n>m} Design a PDA for the following grammar S->0A A->0AB/1 B->1 7 Convert the following PDA to CFG M=({q0,q1},{a,b},{z0,za},μ,q0,z0,Ф) δ is given by, δ(q0,a,z0)=(q0,zz) δ(q0,a,z)=(q0,zz0) δ(q0,b,z)=(q1,ϵ) δ(q1,b,z)=(q1,ϵ) δ(q1,ϵ,z0)=(q1,ϵ) UNIT - IV Create 10 Understand and 11 Part- A (Short Answer Questions) 1. Define Turing Machine 1. Explain the moves in Turing Machine. Understand 1 3. Define an Instantaneous Description of a Turing Machine. Remember 1 4. Define the Language of Turing Machine. Remember 1 5. List types of TM. Remember 1 6. Define Computable Functions by Turing Machines. Remember 1 7. Write the difference between Pushdown Automata and Turing 1

8 Machine. 8. Explain Church s Hypothesis. Understand 1 9. Define Context sensitive language. Remember Define multi head Turing Machine. Remember Define multi dimensional Turing Machine. Remember 1 1. Define multiple tapes Turing Machine. Remember Define Recursive languages. Remember Define Recursively enumerable languages. Remember Define Two way infinite Turing Machine. Remember Define Non deterministic Turing Machine. Remember Define Counter machine. Remember Explain the model of Turing machine. Remember Construct Turing Machine for 1 s complement for binary numbers. Remember 1 0. Differentiate Recursive languages and Recursively enumberable languages. Part- B (Long Answer Questions) Remember 1 1. Define a Turing Machine. With a neat diagram explain the working of Remember 1 a Turing Machine.. Differentiate Turing Machine with other automata Construct a Transition diagram for Turing Machine to accept 1 the following language. L = { 0 n 1 n 0 n n 1} 4. Construct Transition diagram for Turing Machine that accepts the 1 language L = {0 n 1 n n 1}. Give the transition diagram for the Turing Machine obtained and also show the moves made by the Turing machine for the string Construct a Transition diagram for Turing Machine to accept the 1 language L= { w#w R w ϵ ( a + b ) *} 6. Write short notes on Recursive and Recursively Enumerable 1 languages. 7. Write the properties of recursive and recursively enumerable 1 languages. 8. Construct a Turing Machine to accept strings formed with 0 1 and 1 and having substring Construct a Turing Machine that accepts the language 1 L = {1 n n 3 n n 1}. Give the transition diagram for the Turing Machine obtained and also show the moves made by the Turing machine for the string Define Linear bounded automata and explain its model? Explain the power and limitations of Turing machine. Create 1 1. Construct Transition diagram for Turing Machine - L={a n b n c n /n>=1} Construct a Transition diagram for Turing Machine to implement 1 addition of two unary numbers(x+y). 14. Construct a Linear Bounded automata for a language where 1 L={a n b n /n>=1} 15. Explain the types of Turing machines Write briefly about the following 1 a)church s Hypothesis b)counter machine 17. Construct a Transition table for Turing Machine to accept the 1 following language. L = { 0 n 1 n 0 n n 1} 18. Construct a Transition diagram for Turing Machine to accept the 1 language L= { ww R w ϵ ( a + b ) *} 19. Construct Transition table for TM - L={a n b n c n /n>=1} 1 0. Construct a Linear Bounded automata for a language where L={a n b n c n /n>=1} Part- C (Problem Solving and Critical Thinking) 1 Construct a Turing Machine that accepts the language L = {a n b n n 0}. Give the transition diagram for the Turing Machine obtained. 1 1

9 Construct a Turing Machine that gives two s compliment for the 1 given binary representation. 3 Construct a Turing Machine to accept the following 1 language. L = { w n x n y n z n n 1} UNIT - V Part- A (Short Answer Questions) 1. Define Chomsky hierarchy of languages. Knowledge 4. Define Universal Turing Machine Knowledge 1 3. Define Context sensitive language. Knowledge 5 4. Define decidability. Knowledge Define P problems. Knowledge Define Universal Turing Machines Knowledge Give examples for Undecidable Problems Understand Define Turing Machine halting problem. Knowledge Define Turing Reducibility Knowledge Define Post s Correspondence Problem. Knowledge Define Type 0 grammars. Knowledge 4 1. Define Type 1 grammars. Knowledge Define Type grammars. Knowledge Define Type 3 grammars. Knowledge Define NP problems. Knowledge Define NP complete problems Knowledge Define NP Hard problems Knowledge Define undecidability problem. Knowledge Define turing Reducibility. Knowledge List the types of grammars. Knowledge 13 Part- B (Long Answer Questions) 1. Explain the concept of decidable and undecidability problems Understand 1 about Turing Machines.. Write briefly about Chomsky hierarchy of languages Explain individually classes P and NP Understand Write a shot notes on post's correspondence problem and check the following is PCP or not. I A B Explain the Halting problem and Turing Reducibility. Understand Write a short notes on universal Turing machine Write a short notes on Chomsky hierarchy Write a short notes on Context sensitive language and linear bounded 4 automata. 9. Write a short note on NP complete Write a short note on NP hard problems Write a shot notes on post's correspondence problem and check the following is PCP or not. I A B Write a shot notes on post's correspondence problem and check the following is PCP or not. I A B

10 UNIT - V 1 Explain PCP and MPCP with examples. Understand 13 Explain Turing theorem,halting problems, Turing Reducibility. Understand 13 3 Explain Type 3 and Type grammars with example. 4 4 Explain Type 1 and Type 0 grammars with example. 4

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad-500 014 Subject: FORMAL LANGUAGES AND AUTOMATA THEORY Class : CSE II PART A (SHORT ANSWER QUESTIONS) UNIT- I 1 Explain transition diagram, transition

More information

Question Bank UNIT I

Question Bank UNIT I Siddhivinayak Technical Campus School of Engineering & Research Technology Department of computer science and Engineering Session 2016-2017 Subject Name- Theory of Computation Subject Code-4KS05 Sr No.

More information

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata. Code No: R09220504 R09 Set No. 2 II B.Tech II Semester Examinations,December-January, 2011-2012 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 75 Answer

More information

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,

More information

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3}, Code No: 07A50501 R07 Set No. 2 III B.Tech I Semester Examinations,MAY 2011 FORMAL LANGUAGES AND AUTOMATA THEORY Computer Science And Engineering Time: 3 hours Max Marks: 80 Answer any FIVE Questions All

More information

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor 60-354, Theory of Computation Fall 2013 Asish Mukhopadhyay School of Computer Science University of Windsor Pushdown Automata (PDA) PDA = ε-nfa + stack Acceptance ε-nfa enters a final state or Stack is

More information

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013 Q.2 a. Prove by mathematical induction n 4 4n 2 is divisible by 3 for n 0. Basic step: For n = 0, n 3 n = 0 which is divisible by 3. Induction hypothesis: Let p(n) = n 3 n is divisible by 3. Induction

More information

Theory of Computation Turing Machine and Pushdown Automata

Theory of Computation Turing Machine and Pushdown Automata Theory of Computation Turing Machine and Pushdown Automata 1. What is a Turing Machine? A Turing Machine is an accepting device which accepts the languages (recursively enumerable set) generated by type

More information

VTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a.

VTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a. VTU QUESTION BANK Unit 1 Introduction to Finite Automata 1. Obtain DFAs to accept strings of a s and b s having exactly one a.(5m )( Dec-2014) 2. Obtain a DFA to accept strings of a s and b s having even

More information

Theory of Computation - Module 3

Theory of Computation - Module 3 Theory of Computation - Module 3 Syllabus Context Free Grammar Simplification of CFG- Normal forms-chomsky Normal form and Greibach Normal formpumping lemma for Context free languages- Applications of

More information

Theory of Computation (Classroom Practice Booklet Solutions)

Theory of Computation (Classroom Practice Booklet Solutions) Theory of Computation (Classroom Practice Booklet Solutions) 1. Finite Automata & Regular Sets 01. Ans: (a) & (c) Sol: (a) The reversal of a regular set is regular as the reversal of a regular expression

More information

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014 Q.2 a. Show by using Mathematical Induction that n i= 1 i 2 n = ( n + 1) ( 2 n + 1) 6 b. Define language. Let = {0; 1} denote an alphabet. Enumerate five elements of the following languages: (i) Even binary

More information

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Theory of Computation. Copyright By NODIA & COMPANY No part of this publication may be reproduced or distributed in any form or any means, electronic, mechanical, photocopying, or otherwise without the prior permission of the author. GATE SOLVED PAPER Computer

More information

TAFL 1 (ECS-403) Unit- III. 3.1 Definition of CFG (Context Free Grammar) and problems. 3.2 Derivation. 3.3 Ambiguity in Grammar

TAFL 1 (ECS-403) Unit- III. 3.1 Definition of CFG (Context Free Grammar) and problems. 3.2 Derivation. 3.3 Ambiguity in Grammar TAFL 1 (ECS-403) Unit- III 3.1 Definition of CFG (Context Free Grammar) and problems 3.2 Derivation 3.3 Ambiguity in Grammar 3.3.1 Inherent Ambiguity 3.3.2 Ambiguous to Unambiguous CFG 3.4 Simplification

More information

Context Free Languages (CFL) Language Recognizer A device that accepts valid strings. The FA are formalized types of language recognizer.

Context Free Languages (CFL) Language Recognizer A device that accepts valid strings. The FA are formalized types of language recognizer. Context Free Languages (CFL) Language Recognizer A device that accepts valid strings. The FA are formalized types of language recognizer. Language Generator: Context free grammars are language generators,

More information

Pushdown Automata. Reading: Chapter 6

Pushdown Automata. Reading: Chapter 6 Pushdown Automata Reading: Chapter 6 1 Pushdown Automata (PDA) Informally: A PDA is an NFA-ε with a infinite stack. Transitions are modified to accommodate stack operations. Questions: What is a stack?

More information

An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM).

An automaton with a finite number of states is called a Finite Automaton (FA) or Finite State Machine (FSM). Automata The term "Automata" is derived from the Greek word "αὐτόματα" which means "self-acting". An automaton (Automata in plural) is an abstract self-propelled computing device which follows a predetermined

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Foundations of Informatics: a Bridging Course

Foundations of Informatics: a Bridging Course Foundations of Informatics: a Bridging Course Week 3: Formal Languages and Semantics Thomas Noll Lehrstuhl für Informatik 2 RWTH Aachen University noll@cs.rwth-aachen.de http://www.b-it-center.de/wob/en/view/class211_id948.html

More information

Introduction to Formal Languages, Automata and Computability p.1/42

Introduction to Formal Languages, Automata and Computability p.1/42 Introduction to Formal Languages, Automata and Computability Pushdown Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/42 Introduction We have considered

More information

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs

Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harvard CS 121 and CSCI E-207 Lecture 10: CFLs: PDAs, Closure Properties, and Non-CFLs Harry Lewis October 8, 2013 Reading: Sipser, pp. 119-128. Pushdown Automata (review) Pushdown Automata = Finite automaton

More information

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I

GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I GEETANJALI INSTITUTE OF TECHNICAL STUDIES, UDAIPUR I Internal Examination 2017-18 B.Tech III Year VI Semester Sub: Theory of Computation (6CS3A) Time: 1 Hour 30 min. Max Marks: 40 Note: Attempt all three

More information

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen

Pushdown automata. Twan van Laarhoven. Institute for Computing and Information Sciences Intelligent Systems Radboud University Nijmegen Pushdown automata Twan van Laarhoven Institute for Computing and Information Sciences Intelligent Systems Version: fall 2014 T. van Laarhoven Version: fall 2014 Formal Languages, Grammars and Automata

More information

Notes for Comp 497 (Comp 454) Week 10 4/5/05

Notes for Comp 497 (Comp 454) Week 10 4/5/05 Notes for Comp 497 (Comp 454) Week 10 4/5/05 Today look at the last two chapters in Part II. Cohen presents some results concerning context-free languages (CFL) and regular languages (RL) also some decidability

More information

Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where

Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where Recitation 11 Notes Context Free Grammars Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x A V, and x (V T)*. Examples Problem 1. Given the

More information

Theory of Computation

Theory of Computation Fall 2002 (YEN) Theory of Computation Midterm Exam. Name:... I.D.#:... 1. (30 pts) True or false (mark O for true ; X for false ). (Score=Max{0, Right- 1 2 Wrong}.) (1) X... If L 1 is regular and L 2 L

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

MA/CSSE 474 Theory of Computation

MA/CSSE 474 Theory of Computation MA/CSSE 474 Theory of Computation CFL Hierarchy CFL Decision Problems Your Questions? Previous class days' material Reading Assignments HW 12 or 13 problems Anything else I have included some slides online

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY REVIEW for MIDTERM 1 THURSDAY Feb 6 Midterm 1 will cover everything we have seen so far The PROBLEMS will be from Sipser, Chapters 1, 2, 3 It will be

More information

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic and Theory of Computing Fuhua (Frank) Cheng Department of Computer Science University of Kentucky 1 Table of Contents: Week 1: Preliminaries (set algebra, relations, functions) (read Chapters

More information

The Post Correspondence Problem

The Post Correspondence Problem The Post Correspondence Problem - Given a set, P of pairs of strings: where t i, b i Σ P = {[ t 1 b 1 ], t 2 b 2 ],, t k b k ]} - Question: Does there exist a sequence i 1, i 2, i n such that: t i1 t i2

More information

Theory & Practice Book. Computer Science & IT. for. Public Sector Exams

Theory & Practice Book. Computer Science & IT. for. Public Sector Exams Theory & Practice Book Computer Science & IT for Public Sector Exams ISRO, DRDO, BARC, BEL, HAL, NTPC, ONGC, BHEL, SAIL, GAIL, MTNL, FCI, ECL, ATC, DMRC, HLL, UPRVNL, CSPEB, OPTCL... Corporate Office:

More information

SCHEME FOR INTERNAL ASSESSMENT TEST 3

SCHEME FOR INTERNAL ASSESSMENT TEST 3 SCHEME FOR INTERNAL ASSESSMENT TEST 3 Max Marks: 40 Subject& Code: Automata Theory & Computability (15CS54) Sem: V ISE (A & B) Note: Answer any FIVE full questions, choosing one full question from each

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

Parsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26

Parsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26 Parsing Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Winter 2017/18 1 / 26 Table of contents 1 Context-Free Grammars 2 Simplifying CFGs Removing useless symbols Eliminating

More information

SFWR ENG 2FA3. Solution to the Assignment #4

SFWR ENG 2FA3. Solution to the Assignment #4 SFWR ENG 2FA3. Solution to the Assignment #4 Total = 131, 100%= 115 The solutions below are often very detailed on purpose. Such level of details is not required from students solutions. Some questions

More information

Context Free Languages and Grammars

Context Free Languages and Grammars Algorithms & Models of Computation CS/ECE 374, Fall 2017 Context Free Languages and Grammars Lecture 7 Tuesday, September 19, 2017 Sariel Har-Peled (UIUC) CS374 1 Fall 2017 1 / 36 What stack got to do

More information

Lecture 12 Simplification of Context-Free Grammars and Normal Forms

Lecture 12 Simplification of Context-Free Grammars and Normal Forms Lecture 12 Simplification of Context-Free Grammars and Normal Forms COT 4420 Theory of Computation Chapter 6 Normal Forms for CFGs 1. Chomsky Normal Form CNF Productions of form A BC A, B, C V A a a T

More information

download instant at Assume that (w R ) R = w for all strings w Σ of length n or less.

download instant at  Assume that (w R ) R = w for all strings w Σ of length n or less. Chapter 2 Languages 3. We prove, by induction on the length of the string, that w = (w R ) R for every string w Σ. Basis: The basis consists of the null string. In this case, (λ R ) R = (λ) R = λ as desired.

More information

Notes for Comp 497 (454) Week 10

Notes for Comp 497 (454) Week 10 Notes for Comp 497 (454) Week 10 Today we look at the last two chapters in Part II. Cohen presents some results concerning the two categories of language we have seen so far: Regular languages (RL). Context-free

More information

Einführung in die Computerlinguistik

Einführung in die Computerlinguistik Einführung in die Computerlinguistik Context-Free Grammars (CFG) Laura Kallmeyer Heinrich-Heine-Universität Düsseldorf Summer 2016 1 / 22 CFG (1) Example: Grammar G telescope : Productions: S NP VP NP

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

More information

Properties of Context-free Languages. Reading: Chapter 7

Properties of Context-free Languages. Reading: Chapter 7 Properties of Context-free Languages Reading: Chapter 7 1 Topics 1) Simplifying CFGs, Normal forms 2) Pumping lemma for CFLs 3) Closure and decision properties of CFLs 2 How to simplify CFGs? 3 Three ways

More information

CISC4090: Theory of Computation

CISC4090: Theory of Computation CISC4090: Theory of Computation Chapter 2 Context-Free Languages Courtesy of Prof. Arthur G. Werschulz Fordham University Department of Computer and Information Sciences Spring, 2014 Overview In Chapter

More information

CPS 220 Theory of Computation

CPS 220 Theory of Computation CPS 22 Theory of Computation Review - Regular Languages RL - a simple class of languages that can be represented in two ways: 1 Machine description: Finite Automata are machines with a finite number of

More information

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc.

The Pumping Lemma. for all n 0, u 1 v n u 2 L (i.e. u 1 u 2 L, u 1 vu 2 L [but we knew that anyway], u 1 vvu 2 L, u 1 vvvu 2 L, etc. The Pumping Lemma For every regular language L, there is a number l 1 satisfying the pumping lemma property: All w L with w l can be expressed as a concatenation of three strings, w = u 1 vu 2, where u

More information

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission. CSE 5 Homework Due: Monday October 9, 7 Instructions Upload a single file to Gradescope for each group. should be on each page of the submission. All group members names and PIDs Your assignments in this

More information

NPDA, CFG equivalence

NPDA, CFG equivalence NPDA, CFG equivalence Theorem A language L is recognized by a NPDA iff L is described by a CFG. Must prove two directions: ( ) L is recognized by a NPDA implies L is described by a CFG. ( ) L is described

More information

Sheet 1-8 Dr. Mostafa Aref Format By : Mostafa Sayed

Sheet 1-8 Dr. Mostafa Aref Format By : Mostafa Sayed Sheet -8 Dr. Mostafa Aref Format By : Mostafa Sayed 09 Introduction Assignment. For = {a, } a) Write 0 strings of the following languages i) All strings with no more than one a,,, a, a, a, a, a, a, a ii)

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Push-Down Automata CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Spring 27 Alexis Maciel Department of Computer Science Clarkson University Copyright c 27 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

6.8 The Post Correspondence Problem

6.8 The Post Correspondence Problem 6.8. THE POST CORRESPONDENCE PROBLEM 423 6.8 The Post Correspondence Problem The Post correspondence problem (due to Emil Post) is another undecidable problem that turns out to be a very helpful tool for

More information

Properties of Context-Free Languages. Closure Properties Decision Properties

Properties of Context-Free Languages. Closure Properties Decision Properties Properties of Context-Free Languages Closure Properties Decision Properties 1 Closure Properties of CFL s CFL s are closed under union, concatenation, and Kleene closure. Also, under reversal, homomorphisms

More information

Author: Vivek Kulkarni ( )

Author: Vivek Kulkarni ( ) Author: Vivek Kulkarni ( vivek_kulkarni@yahoo.com ) Chapter-2: Finite State Machines Solutions for Review Questions @ Oxford University Press 2013. All rights reserved. 1 Q.1 Construct Mealy and Moore

More information

Reducability. Sipser, pages

Reducability. Sipser, pages Reducability Sipser, pages 187-214 Reduction Reduction encodes (transforms) one problem as a second problem. A solution to the second, can be transformed into a solution to the first. We expect both transformations

More information

Automata and Computability. Solutions to Exercises

Automata and Computability. Solutions to Exercises Automata and Computability Solutions to Exercises Fall 28 Alexis Maciel Department of Computer Science Clarkson University Copyright c 28 Alexis Maciel ii Contents Preface vii Introduction 2 Finite Automata

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

CDM Parsing and Decidability

CDM Parsing and Decidability CDM Parsing and Decidability 1 Parsing Klaus Sutner Carnegie Mellon Universality 65-parsing 2017/12/15 23:17 CFGs and Decidability Pushdown Automata The Recognition Problem 3 What Could Go Wrong? 4 Problem:

More information

Recitation 4: Converting Grammars to Chomsky Normal Form, Simulation of Context Free Languages with Push-Down Automata, Semirings

Recitation 4: Converting Grammars to Chomsky Normal Form, Simulation of Context Free Languages with Push-Down Automata, Semirings Recitation 4: Converting Grammars to Chomsky Normal Form, Simulation of Context Free Languages with Push-Down Automata, Semirings 11-711: Algorithms for NLP October 10, 2014 Conversion to CNF Example grammar

More information

Concordia University Department of Computer Science & Software Engineering

Concordia University Department of Computer Science & Software Engineering Concordia University Department of Computer Science & Software Engineering COMP 335/4 Theoretical Computer Science Winter 2015 Assignment 3 1. In each case, what language is generated by CFG s below. Justify

More information

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF)

CS5371 Theory of Computation. Lecture 7: Automata Theory V (CFG, CFL, CNF) CS5371 Theory of Computation Lecture 7: Automata Theory V (CFG, CFL, CNF) Announcement Homework 2 will be given soon (before Tue) Due date: Oct 31 (Tue), before class Midterm: Nov 3, (Fri), first hour

More information

ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 17 april Classrum Edition

ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK. 17 april Classrum Edition ÖVNINGSUPPGIFTER I SAMMANHANGSFRIA SPRÅK 7 april 23 Classrum Edition CONTEXT FREE LANGUAGES & PUSH-DOWN AUTOMATA CONTEXT-FREE GRAMMARS, CFG Problems Sudkamp Problem. (3.2.) Which language generates the

More information

Theory Bridge Exam Example Questions

Theory Bridge Exam Example Questions Theory Bridge Exam Example Questions Annotated version with some (sometimes rather sketchy) answers and notes. This is a collection of sample theory bridge exam questions. This is just to get some idea

More information

Let P(n) be a statement about a non-negative integer n. Then the principle of mathematical induction is that P(n) follows from

Let P(n) be a statement about a non-negative integer n. Then the principle of mathematical induction is that P(n) follows from 1. Define automata? ANNA UNIVERSITY, CHENNAI B.E/B.Tech DEGREE EXAMINATION APR/MAY 2008 Fifth Semester Computer Science and Engineering CS1303-Theory of Computation Part-A An automaton is an abstract computing

More information

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, 1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u, v, x, y, z as per the pumping theorem. 3. Prove that

More information

CS500 Homework #2 Solutions

CS500 Homework #2 Solutions CS500 Homework #2 Solutions 1. Consider the two languages Show that L 1 is context-free but L 2 is not. L 1 = {a i b j c k d l i = j k = l} L 2 = {a i b j c k d l i = k j = l} Answer. L 1 is the concatenation

More information

Automata Theory CS F-08 Context-Free Grammars

Automata Theory CS F-08 Context-Free Grammars Automata Theory CS411-2015F-08 Context-Free Grammars David Galles Department of Computer Science University of San Francisco 08-0: Context-Free Grammars Set of Terminals (Σ) Set of Non-Terminals Set of

More information

Theory Of Computation UNIT-II

Theory Of Computation UNIT-II Regular Expressions and Context Free Grammars: Regular expression formalism- equivalence with finite automata-regular sets and closure properties- pumping lemma for regular languages- decision algorithms

More information

DD2371 Automata Theory

DD2371 Automata Theory KTH CSC VT 2008 DD2371 Automata Theory Dilian Gurov Lecture Outline 1. The lecturer 2. Introduction to automata theory 3. Course syllabus 4. Course objectives 5. Course organization 6. First definitions

More information

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam ECS 120: Theory of Computation Handout MT UC Davis Phillip Rogaway February 16, 2012 Midterm Exam Instructions: The exam has six pages, including this cover page, printed out two-sided (no more wasted

More information

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX

Part 4 out of 5 DFA NFA REX. Automata & languages. A primer on the Theory of Computation. Last week, we showed the equivalence of DFA, NFA and REX Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu Part 4 out of 5 ETH Zürich (D-ITET) October, 12 2017 Last week, we showed the equivalence of DFA, NFA and REX

More information

DM17. Beregnelighed. Jacob Aae Mikkelsen

DM17. Beregnelighed. Jacob Aae Mikkelsen DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................

More information

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of

More information

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata

Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata Harvard CS 121 and CSCI E-207 Lecture 10: Ambiguity, Pushdown Automata Salil Vadhan October 4, 2012 Reading: Sipser, 2.2. Another example of a CFG (with proof) L = {x {a, b} : x has the same # of a s and

More information

Author: Vivek Kulkarni ( )

Author: Vivek Kulkarni ( ) Author: Vivek Kulkarni ( vivek_kulkarni@yahoo.com ) Chapter-3: Regular Expressions Solutions for Review Questions @ Oxford University Press 2013. All rights reserved. 1 Q.1 Define the following and give

More information

Pushdown Automata. Chapter 12

Pushdown Automata. Chapter 12 Pushdown Automata Chapter 12 Recognizing Context-Free Languages We need a device similar to an FSM except that it needs more power. The insight: Precisely what it needs is a stack, which gives it an unlimited

More information

5 Context-Free Languages

5 Context-Free Languages CA320: COMPUTABILITY AND COMPLEXITY 1 5 Context-Free Languages 5.1 Context-Free Grammars Context-Free Grammars Context-free languages are specified with a context-free grammar (CFG). Formally, a CFG G

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 15 Ana Bove May 17th 2018 Recap: Context-free Languages Chomsky hierarchy: Regular languages are also context-free; Pumping lemma

More information

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4 Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is

More information

Theory of Computation - Module 4

Theory of Computation - Module 4 Theory of Computation - Module 4 Syllabus Turing Machines Formal definition Language acceptability by TM TM as acceptors, Transducers - designing of TM- Two way infinite TM- Multi tape TM - Universal Turing

More information

Closure under the Regular Operations

Closure under the Regular Operations September 7, 2013 Application of NFA Now we use the NFA to show that collection of regular languages is closed under regular operations union, concatenation, and star Earlier we have shown this closure

More information

Introduction to Theory of Computing

Introduction to Theory of Computing CSCI 2670, Fall 2012 Introduction to Theory of Computing Department of Computer Science University of Georgia Athens, GA 30602 Instructor: Liming Cai www.cs.uga.edu/ cai 0 Lecture Note 3 Context-Free Languages

More information

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen

Pushdown Automata. Notes on Automata and Theory of Computation. Chia-Ping Chen Pushdown Automata Notes on Automata and Theory of Computation Chia-Ping Chen Department of Computer Science and Engineering National Sun Yat-Sen University Kaohsiung, Taiwan ROC Pushdown Automata p. 1

More information

Sri vidya college of engineering and technology

Sri vidya college of engineering and technology Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Lecture 14 Ana Bove May 14th 2018 Recap: Context-free Grammars Simplification of grammars: Elimination of ǫ-productions; Elimination of

More information

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus

More information

Theory of Computation (IV) Yijia Chen Fudan University

Theory of Computation (IV) Yijia Chen Fudan University Theory of Computation (IV) Yijia Chen Fudan University Review language regular context-free machine DFA/ NFA PDA syntax regular expression context-free grammar Pushdown automata Definition A pushdown automaton

More information

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages Context Free Languages Automata Theory and Formal Grammars: Lecture 6 Context Free Languages Last Time Decision procedures for FAs Minimum-state DFAs Today The Myhill-Nerode Theorem The Pumping Lemma Context-free

More information

Please give details of your answer. A direct answer without explanation is not counted.

Please give details of your answer. A direct answer without explanation is not counted. Please give details of your answer. A direct answer without explanation is not counted. Your answers must be in English. Please carefully read problem statements. During the exam you are not allowed to

More information

Non-context-Free Languages. CS215, Lecture 5 c

Non-context-Free Languages. CS215, Lecture 5 c Non-context-Free Languages CS215, Lecture 5 c 2007 1 The Pumping Lemma Theorem. (Pumping Lemma) Let be context-free. There exists a positive integer divided into five pieces, Proof for for each, and..

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING CS6503 THEORY OF COMPUTATION L T P C 3 0 0 3 OBJECTIVES: The student should be made to: Understand various Computing models like Finite State Machine, Pushdown Automata, and Turing Machine. Be aware of

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University Simplification of CFG and Normal Forms Wen-Guey Tzeng Computer Science Department National Chiao Tung University Normal Forms We want a cfg with either Chomsky or Greibach normal form Chomsky normal form

More information

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University Simplification of CFG and Normal Forms Wen-Guey Tzeng Computer Science Department National Chiao Tung University Normal Forms We want a cfg with either Chomsky or Greibach normal form Chomsky normal form

More information

Solution Scoring: SD Reg exp.: a(a

Solution Scoring: SD Reg exp.: a(a MA/CSSE 474 Exam 3 Winter 2013-14 Name Solution_with explanations Section: 02(3 rd ) 03(4 th ) 1. (28 points) For each of the following statements, circle T or F to indicate whether it is True or False.

More information

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite The Church-Turing Thesis CS60001: Foundations of Computing Science Professor, Dept. of Computer Sc. & Engg., Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q 0, q accept, q reject ), where

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

Computational Models - Lecture 4 1

Computational Models - Lecture 4 1 Computational Models - Lecture 4 1 Handout Mode Iftach Haitner and Yishay Mansour. Tel Aviv University. April 3/8, 2013 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Final exam study sheet for CS3719 Turing machines and decidability.

Final exam study sheet for CS3719 Turing machines and decidability. Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,

More information