Chapter 1 Regular Language - 02

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Summary Showing regular Showing non-regular construct DFA, NFA
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
CSCI 2670 Introduction to Theory of Computing September 15, 2004.
Applied Computer Science II Chapter 1 : Regular Languages Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
Lecture 3: Closure Properties & Regular Expressions Jim Hook Tim Sheard Portland State University.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Courtesy Costas Busch - RPI1 Non-regular languages.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Theory of Languages and Automata
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory
Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing September 13.
CS 203: Introduction to Formal Languages and Automata
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Algorithms for hard problems Automata and tree automata Juris Viksna, 2015.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Equivalence with FA * Any Regex can be converted to FA and vice versa, because: * Regex and FA are equivalent in their descriptive power ** Regular language.
1 Introduction to the Theory of Computation Regular Expressions.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
Foundations of Computing Science
Standard Representations of Regular Languages
Non Deterministic Automata
PROPERTIES OF REGULAR LANGUAGES
FORMAL LANGUAGES AND AUTOMATA THEORY
CSE 105 theory of computation
CSE 3813 Introduction to Formal Languages and Automata
Single Final State for NFA
Chapter 2 FINITE AUTOMATA.
Intro to Theory of Computation
Regular Expressions Prof. Busch - LSU.
Regular Expression We shall build expressions from the symbols using simple operations include concatenation, union and kleen closure. Several intuitive.
Non-Deterministic Finite Automata
4. Properties of Regular Languages
Non-Deterministic Finite Automata
Nondeterministic Finite Automata
Non Deterministic Automata
Context-Free Grammars
فصل دوم Context-Free Languages
NFA vs DFA DFA: For every state q in S and every character  in , one and only one transition of the following form occurs:  q q’ NFA: For every state.
Finite Automata State Transition Graph (Non)deterministic FA: DFA, NFA
Non-regular languages
CSCI 2670 Introduction to Theory of Computing
CS21 Decidability and Tractability
Chapter 2 Context-Free Language - 01
Chapter 2 Context-Free Language - 02
CS21 Decidability and Tractability
Chapter 1 Regular Language
CHAPTER 1 Regular Languages
CSCI 2670 Introduction to Theory of Computing
COSC 3340: Introduction to Theory of Computation
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

Chapter 1 Regular Language - 02 Original author : Prof. Y-p Chen Reproduced : ccming 2010/10/02

1.3 Regular Expressions 1.3.1 Formal Definition (Inductive Definition) R is a regular expression if R is

Example 1.53

1.3.2 Equivalence with Finite Automata Theorem 1.54 : A language is regular if and only if some regular expression describes it Lemma 1.55 : If a language is described by a regular expression, then it is regular Lemma 1.60 : If a language is regular, then it is described by a regular expression

Proof of Lemma 1.55 Let’s convert R into an NFA N. We consider the six cases in the formal definition of regular expressions

Example 1.56

Proof of Lemma 1. 60 (1/2) Generalized nondeterministic finite automaton

Proof of Lemma 1. 60 (2/2)

Example 1.66 (1/3)

Example 1.66 (2/3) qi qj qrip R1 R2 R3 R4 ψ

Example 1.66 (3/3) qi qj qrip R1 R2 R3 R4 ψ

Equivalence models of regular language NFA DFA GNFA Theorem 1.39 Lemma 1.55 Lemma 1.60 part1 Lemma 1.60 part2

1.4 Nonregular Language Consider the language 1.4.1 Pumping Lemma Theorem 1.70 Pumping lemma : If A is a regular language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be divided in to three piece, s = xyz, satisfying the following conditions:

Pumping Lemma

How to use the pumping lemma? Pumping lemma is used to prove that a language is not regular. Never use it to prove a language is regular!!!!

Example 1.73

1.5 Closure Properties Let A and B be regular languages. The results of the following operations are all regular languages:

Homomorphism : A string substitution such that each symbols is replaced by a string. Inverse homomorphism :

1.6 Myhill-Nerode Theorem

For example

Myhill-Nerode theorem Let L be a language and let X be a set of string. Say that X is pair-wise distinguishable by L if every two distinct strings in X are distinguishable by L. Define the index of L to be the maximum number of elements in any set that is pair-wise distinguishable by L. The index of L may be finite or infinite. 1 . If L is recognized by a DFA with k states, L has index at most k 2. If the index of L is a finite number k, it is recognized by a DFA with k states 3. L is regular iff it has finite index.

How to use Myhill-Nerode theorem 1. Given a language B , construct the equivalence relation ≡B by using B 2. Prove that B has finite or infinite index : Finite : B is a regular language Infinite : B is not a regular language Example :

1.7 Minimization of DFAs 1.7.1 Table-filling Algorithm

An Example for Minimizing DFAs Given the DFA Find all the distinguishable pairs of states: Equivalent state pairs: {A,E} {B,H} and {D,F}