1 1. Eliminate all  -transitions from the following FA without changing the number of states and the language accepted by the automaton. You should also.

Slides:



Advertisements
Similar presentations
Grammar types There are 4 types of grammars according to the types of rules: – General grammars – Context Sensitive grammars – Context Free grammars –
Advertisements

CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Theory Of Automata By Dr. MM Alam
Lecture 8 From NFA to Regular Language. Induction on k= # of states other than initial and final states K=0 a a* b a c d c*a(d+bc*a)*
Regular Expressions and DFAs COP 3402 (Summer 2014)
CMSC Spring Finite Automaton: Example accepted.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
YES-NO machines Finite State Automata as language recognizers.
1 Introduction to Computability Theory Discussion1: Non-Deterministic Finite Automatons Prof. Amos Israeli.
CS 3240 – Chapter 3.  How would you delete all C++ files from a directory from the command line?  How about all PowerPoint files that start with the.
61 Nondeterminism and Nodeterministic Automata. 62 The computational machine models that we learned in the class are deterministic in the sense that the.
start 0, 4, 8 1, 5, 9 2, 6 3, 7 2 0,4,8 2, 6 3, 7 1, 5, 9 to state 2 to state 3 to state 1 to state 0 to state 1 to state 3 to state 0 to state.
1 1. Show the result of each of the following set operations in terms of set property. Write your sets as simple as possible. (a) L 0  L 4 (b) L 0  L.
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
1 Homework #6 (Models of Computation, Spring, 2001) Due: Section 1; March 29 Section 2; March Let L be the language of the following grammar G 1.
104 Closure Properties of Regular Languages Regular languages are closed under many set operations. Let L 1 and L 2 be regular languages. (1) L 1  L 2.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
79 Regular Expression Regular expressions over an alphabet  are defined recursively as follows. (1) Ø, which denotes the empty set, is a regular expression.
Key to Homework #2 1. What is the language of L-system G = ({a, b, c}, h, acb ), where the rewriting rule h is defined as follows: h (a) = aa h (b) = cb.
Dept. of Computer Science & IT, FUUAST Automata Theory 2 Automata Theory II B Q.For  = {a, b} construct DFA that accepts all strings with exactly one.
CPSC 388 – Compiler Design and Construction
Regular Languages A language is regular over  if it can be built from ;, {  }, and { a } for every a 2 , using operators union ( [ ), concatenation.
Finite-State Machines with No Output
Basics of automata theory
1 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
Lecture # 3 Regular Expressions 1. Introduction In computing, a regular expression provides a concise and flexible means to "match" (specify and recognize)
Lecture # 19. Example Consider the following CFG ∑ = {a, b} Consider the following CFG ∑ = {a, b} 1. S  aSa | bSb | a | b | Λ The above CFG generates.
2. Scanning College of Information and Communications Prof. Heejin Park.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 1. Let A ={r, p, i } and B = { w, o, r, l, d }. What does each of the following (a), (b) and (c) denote? Briefly explain in plain English. (a) A * B.
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
CS 3813: Introduction to Formal Languages and Automata
Brian K. Strickland a ba Λ a aa b Λ -NFA for Regular Expression (aab)*(a + aba)*
Regular Grammars Reading: 3.3. What we know so far…  FSA = Regular Language  Regular Expression describes a Regular Language  Every Regular Language.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Mathematical Foundations of Computer Science Chapter 3: Regular Languages and Regular Grammars.
Transparency No. 2-1 Formal Language and Automata Theory Homework 2.
using Deterministic Finite Automata & Nondeterministic Finite Automata
98 Nondeterministic Automata vs Deterministic Automata We learned that NFA is a convenient model for showing the relationships among regular grammars,
1 Language Recognition (11.4) Longin Jan Latecki Temple University Based on slides by Costas Busch from the courseCostas Busch
CS 154 Formal Languages and Computability February 11 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
1 Chapter 3 Regular Languages.  2 3.1: Regular Expressions (1)   Regular Expression (RE):   E is a regular expression over  if E is one of:
 2004 SDU Lecture4 Regular Expressions.  2004 SDU 2 Regular expressions A third way to view regular languages. Say that R is a regular expression if.
1 Introduction to the Theory of Computation Regular Expressions.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2006.
NFA’s with  Transitions We extend the class of NFAs by allowing instantaneous transitions: 1.The automaton may be allowed to change its state without.
1 Section 11.2 Finite Automata Can a machine(i.e., algorithm) recognize a regular language? Yes! Deterministic Finite Automata A deterministic finite automaton.
Deterministic Finite Automata Nondeterministic Finite Automata.
Lecture # 8 (Transition Graphs). Example Consider the language L of strings, defined over Σ={a, b}, having (containing) triple a or triple b. Consider.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Theory of Languages and Automata By: Mojtaba Khezrian.
WELCOME TO A JOURNEY TO CS419 Dr. Hussien Sharaf Dr. Mohammad Nassef Department of Computer Science, Faculty of Computers and Information, Cairo University.
Recap lecture 33 Example of trees, Polish Notation, examples, Ambiguous CFG, example,
Chapter 2 Finite Automata
CS314 – Section 5 Recitation 3
Recognizer for a Language
Language Recognition (12.4)
REGULAR LANGUAGES AND REGULAR GRAMMARS
Chapter 7 Regular Grammars
NFAs and Transition Graphs
Finite Automata.
Chapter 3. Lexical Analysis (2)
Recap lecture 6 Language of strings, beginning with and ending in different letters, Accepting all strings, accepting non-empty strings, accepting no string,
Midterm (Models of Computation, Fall, 2000)
Homework #5 (Models of Computation, Spring, 2001) Due: Section 1; February 27 Section 2; February 28 ** Please put your homework in the collection.
Language Recognition (12.4)
NFAs and Transition Graphs
Prepared by- Patel priya( ) Guided by – Prof. Archana Singh Gandhinagar Institute of Technology SUBJECT - CD ( ) Introcution to Regular.
Presentation transcript:

1 1. Eliminate all  -transitions from the following FA without changing the number of states and the language accepted by the automaton. You should also clearly show how (i.e., the procedure) you found your answer. Key to Homework #5 (Models of Computation, Spring, 2001) start a,b b  a b  b  2 Answer: For each state i and input symbol t  {a, b}, we find the reachable state set  (i, t) in the new FA by computing  (i,  *t  *) in the given FA. The results are as follows.  (1, a) = {1},  (1, b) = {1, 2},  (2, a) = {4, 5},  (2, b) = {1, 3, 4, 5},  (3, a) = {1, 3, 4, 5},  (3, b) = {1, 2, 3, 4, 5},  (4, a) = {1, 3, 4, 5},  (4, b) = {1, 3, 4, 5},  (5, a) = {1, 3, 4, 5},  (5, b) = {1, 3, 4, 5} start a,b b b 2 b b

2 2. Using the technique discussed in the class, construct a regular grammar which generates the same language that is recognized by the FA in problem 1 above. You should show how you got your answer. D C S B start a,b b  a b  b  A Answer: S  aS | bS | bA A  aC | bB |  B  S | C C  bC | D D  aB | bB | 

3 3. Find a regular expression which denotes the language accepted by the FA in problem 1 above. You should also clearly show the procedure that you took to get your answer start a,b b  a b  b  2 Change edge labels to regular expression, and eliminate states 3. Eliminate state 4 b start a+b b  2 b 5 1 start a+b b 2 b (a+b)b * a+b Change state 2 to non-accepting state And eliminate it. 5 1 start a+b+bb b(a+b)b * (a+b)b * a+b Change state 5 to non-accepting state and eliminate it. 1 start a+b b 2 b+(a+b)b * ((a+b)b * ) * (a+b) Regular expression denoting the language: (1) accepted by state 5: r 5 = (a+b+bb) * b(a+b)b * ((a+b)b * +(a+b)(a+b+bb) * b(a+b)b * ) * (2) accepted by state 2: r 2 = (a+b)*b((b+(a+b)b * ((a+b)b * ) * (a+b))(a+b) * b) * (3) Accepted by the automaton: r = r 5 + r 2 Answer:

4 4. Construct an FA (either DFA or NFA whichever for your convenience) which recognizes the language of the following regular grammar. Your answer should clearly show how you got your answer. S  abS | cC A  aS | B | a B  aA |  C  aB | abc S B C A start a bc a a b c a a  Answer: a

5 5. (a) Construct an FA (either NFA or DFA) which recognizes the language expressed by the regular expression below. (b) Construct a regular grammar which generates the language expressed by the following regular expression. For both answers, you should clearly show how you got your answers. ((ba + b)* + (cd(a + b))*)bba ba (a) FA accepting the language expressed by (ba+b)  ba    (b) FA accepting the language expressed by (ba+b) * cd a b (c) FA accepting the language expressed by cd(a+b) cd a b (d) FA accepting the language expressed by (cd(a+b)) *     Answer:

6 ba (e) FA accepting the language expressed by bba b  ba    (b) FA accepting the language expressed by (ba+b) * cd a b (d) FA accepting the language expressed by (cd(a+b)) *           An FA accepting the language expressed by the regular expression ((ba + b)* + (cd(a + b))*)bba

7 6. Using the procedure discussed at the class, construct a DFA which recognizes the same language that is recognized by the following NFA. Your answer should show how you got the answer. a, b a aa 4 start 1 b {1,2}{1,2,3}{1,2,3,4} a aa b b b Answer: a