1 Chapter 2 Finite Automata (part b) Windmills in Holland.

Slides:



Advertisements
Similar presentations
4b Lexical analysis Finite Automata
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
Complexity and Computability Theory I Lecture #4 Rina Zviel-Girshin Leah Epstein Winter
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Cpt S 317: Spring 2009 Reading: Chapter 2
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata 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.
Introduction to Computability Theory
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
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.
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.
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.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
1.Defs. a)Finite Automaton: A Finite Automaton ( FA ) has finite set of ‘states’ ( Q={q 0, q 1, q 2, ….. ) and its ‘control’ moves from state to state.
Fall 2004COMP 3351 Another NFA Example. Fall 2004COMP 3352 Language accepted (redundant state)
Costas Busch - LSU1 Non-Deterministic Finite Automata.
1 Non-Deterministic Finite Automata. 2 Alphabet = Nondeterministic Finite Automaton (NFA)
Nondeterminism (Deterministic) FA required for every state q and every symbol  of the alphabet to have exactly one arrow out of q labeled . What happens.
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 language,
Nondeterministic Finite Automata CS 130: Theory of Computation HMU textbook, Chapter 2 (Sec 2.3 & 2.5)
CS311: Computational Theory
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.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
4b 4b Lexical analysis Finite Automata. Finite Automata (FA) FA also called Finite State Machine (FSM) –Abstract model of a computing entity. –Decides.
COMP3190: Principle of Programming Languages DFA and its equivalent, scanner.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
Regular Expressions and Languages A regular expression is a notation to represent languages, i.e. a set of strings, where the set is either finite or contains.
CHAPTER 1 Regular Languages
Lecture # 12. Nondeterministic Finite Automaton (NFA) Definition: An NFA is a TG with a unique start state and a property of having single letter as label.
NFA defined. NFA A Non-deterministic Finite-state Automata (NFA) is a language recognizing system similar to a DFA. It supports a level of non-determinism.
Chapter 3 Regular Expressions, Nondeterminism, and Kleene’s Theorem Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2007.
Lecture Notes 
CS 154 Formal Languages and Computability February 9 Class Meeting Department of Computer Science San Jose State University Spring 2016 Instructor: Ron.
Overview of Previous Lesson(s) Over View  A token is a pair consisting of a token name and an optional attribute value.  A pattern is a description.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2006.
Finite Automata A simple model of computation. 2 Finite Automata2 Outline Deterministic finite automata (DFA) –How a DFA works.
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.
CS412/413 Introduction to Compilers Radu Rugina Lecture 3: Finite Automata 25 Jan 02.
COMP3190: Principle of Programming Languages DFA and its equivalent, scanner.
Lecture 2 Compiler Design Lexical Analysis By lecturer Noor Dhia
Lecture #5 Advanced Computation Theory Finite Automata.
1/29/02CSE460 - MSU1 Nondeterminism-NFA Section 4.1 of Martin Textbook CSE460 – Computability & Formal Language Theory Comp. Science & Engineering Michigan.
1 Chapter 2 Finite Automata (part a) Hokkaido, Japan.
Nondeterminism Subset Construction ε -Transitions.
CIS Automata and Formal Languages – Pei Wang
Non Deterministic Automata
Recognizer for a Language
Chapter 2 FINITE AUTOMATA.
Hierarchy of languages
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Non Deterministic Automata
Introduction to Finite Automata
4b Lexical analysis Finite Automata
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
4b Lexical analysis Finite Automata
Chapter 1 Regular Language
Finite-State Machines with No Output
AUTOMATA THEORY.
Presentation transcript:

1 Chapter 2 Finite Automata (part b) Windmills in Holland

2 Outline (part a --- in another PPT) 2.0 Introduction 2.1 An Informal Picture of Finite Automata 2.2 Deterministic Finite automata 2.3 Nondeterministic Finite Automata (part b --- in this PPT) 2.4 An Application: Text Search 2.5 Finite Automata with Epsilon-Transitions

3 2.4 An Application: Text Search Finding Strings in Text –Searching Google for a set of words is equivalent to just finding strings in documents –Techniques Using inverted indexes Using finite automata –Applications unsuitable to use inverted indexing: Document repository change rapidly. Documents to be searched cannot be catalogued. Keyword K Page p 1 Page p Page p n Inverted indexing

4 2.4 An Application: Text Search NFA’s for Text Search –(supplemental 1/3) A simple example --- find the DFA equivalent to the following NFA which searches words of x 1 = ab and x 2 = b in long text strings a, b 2 Start b $20 4 a 1 a, b $20 3 b

5 2.4 An Application: Text Search NFA’s for Text Search –(supplemental 2/3) A simple example (con’d) --- find the DFA equivalent to the following NFA (note: state 12 means state {1, 2}, etc.) Start b a 12 $20 b 13 4 a 1 b $ b a a b a $ ab

6 2.4 An Application: Text Search NFA’s for Text Search –(supplemental 3/3) A simple example (con’d) --- compare!!! Start b a 12 $20 a, b 13 4 a 1 a, b $ b a, b 2 Start b $2 0 4 a 1 a, b $2 0 3 b

7 2.4 An Application: Text Search NFA’s for Text Search –Example 2.14: use an NFA to search two keywords “web” and “eBay” among text Figure 2.16 (Note: there are two final states; red parts are necessary and missing in the textbook; correct your textbook!!!)    2 Start 3 e $20 4 b w e b a y  = set of all printable ASCII characters

8 2.4 An Application: Text Search NFA’s for Text Search –Example 2.14 (cont’d): how to implement NFA? Write a simulation program like Fig Convert the NFA to an equivalent DFA using subset construction and simulate the DFA. q0q0 q1q1 Stuck! q0q0 q1q1 q2q2 q0q0 q0q0 q1q1 q2q2 Accept! q0q0 q0q0 q0q0 q0q0 q0q0 q1q1 q2q2 Fig. 2.10

9 2.4 An Application: Text Search A DFA to Recognize a Set of Keywords –The converted DFA has an equal number of states of the original NFA (an observation). –The DFA states may be constructed as (may be proved): If q 0 is start state of NFA, then {q 0 } is start state of DFA If p is a state of NFA reachable (accessible) from a path x = a 1 a 2 …a m, then one state of the DFA is a set of NFA states consisting of one state of the DFA is a set of NFA states consisting of 1. q 0 2. p 3. every other NFA states reachable from q 0 by following every subpath which is a suffix ( 尾段 ) of x, like a j a j+1 …a m. –In the above way, all states in the DFA may be constructed, and then all transitions derived (see the next page).

An Application: Text Search A DFA to Recognize a Set of Keywords –Example 2.15 (a continuation of Example 2.14) E.g., state 3 of the NFA becomes state 135 of the DFA because start state 1 is included; state 3 itself is reachable by the path x=we, so state 3 itself is included; x has a suffix e by which states 1 and 5 are reachable from start state 1. (for the transition diagram, see the next page)

An Application: Text Search A DFA to Recognize a Set of Keywords –Example 2.15 (a continuation of Example 2.14) E.g., state 3 of the NFA becomes state 135 of the DFA    2 Start 3 e $2 0 4 b w e b a y  12 Start 3 e b w e b a y  146

An Application: Text Search A DFA to Recognize a Set of Keywords –How to derive transitions --- For any state of the DFA of the form {q 0, p 1, p 2, …, p n }, and for each input symbol x, let the reached states be {r 1, r 2, …, r m }, then the next state is {q 0, r 1, r 2, …, r m }. For any state of the DFA of the form {q 0, p 1, p 2, …, p n }, and for each input symbol x, let the reached states be {r 1, r 2, …, r m }, then the next state is {q 0, r 1, r 2, …, r m }. If no r i as above can be collected, then if the reached states from the q 0 by x are {s 1, s 2, …, s k }, then the next state is {q 0, s 1, s 2, …, s k }.

An Application: Text Search A DFA to Recognize a Set of Keywords –How to derive transitions --- e.g., (1) for x=b, state 3  4, state 5  6, so state 135  146 so state 135  146 (2) for x=e, state 3 , state 5 , but state 1  5, (2) for x=e, state 3 , state 5 , but state 1  5, so state 135  15 so state 135  15  12 Start 3 e w e b a y 135 b  146 e

An Application: Text Search A DFA to Recognize a Set of Keywords –A complete NFA to DFA conversion is shown in Fig (   b  e  w, e.g., means all ASCII characters other than b, e, w). –Derive it by yourself. Can you write it down directly??? –The above rules for constructing the DFA directly may be thought as theorems!

Finite Automata with Epsilon- Transitions Use of  -transitions –We allow the automaton to accept the empty string . –This means that a transition is allowed to occur without reading in a symbol. –The resulting NFA is called  -NFA. –It adds “programming (design) convenience” (more intuitive for use in designing FA’s)

16 Example 2.16: an  -NFA accepting decimal numbers like 2.15,.125, +1.4, … –To accept a number like “+5.” (nothing after the decimal point), we have to add q 4. q5q5q5q5  0, 1, …, Finite Automata with Epsilon- Transitions start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure 2.18

17   2.5 Finite Automata with Epsilon- Transitions Example 2.17: a more intuitive  -NFA for Example 2.14 Figure 2.19 Design an NFA with  -transitions.  2 Start 3 e $2 4 b  b a y 1 w 5 e

Finite Automata with Epsilon- Transitions Formal Notation for an  -NFA –Definition: an  -NFA A is denoted by A = (Q, , , q 0, F) where the transition function  takes as arguments: a state in Q, and a state in Q, and a member of  ∪ {  } a member of  ∪ {  }

Finite Automata with Epsilon- Transitions Formal Notation for an  -NFA –Notes:  cannot be used as an input symbol, but can be accepted to yield a transition!  (q i,  ) is defined for every state q i (getting into the dead state  if there is no next state with  as input symbol originally).  (q i,  ) is defined for every state q i (getting into the dead state  if there is no next state with  as input symbol originally).

Finite Automata with Epsilon- Transitions Formal Notation for an  -NFA –Example 2.18: the  -NFA of Fig is described as E = ({q 0, q 1,..., q 5 }, {., +, , 0, 1,..., 9}, , q 0, {q 5 }) E = ({q 0, q 1,..., q 5 }, {., +, , 0, 1,..., 9}, , q 0, {q 5 }) The transitions, e.g., include The transitions, e.g., include –  (q 0,  ) =  q 1  –  (q 1,  ) =  See Fig for the complete transition table of E (next page). See Fig for the complete transition table of E (next page).

Finite Automata with Epsilon- Transitions Formal Notation for an  -NFA –Example 2.18 (cont’d): Fig the complete transition table of E. Fig the complete transition table of E.   0, 1, …, 9 q0q1q2q3q4q5q0q1q2q3q4q5 {q1}{q5}{q1}{q5} {q1}{q1} {q2}{q3}{q2}{q3}  {q 1, q 4 } {q 3 } 

Finite Automata with Epsilon- Transitions Epsilon-Closures (  -closures) –We have to define the  -closure to define the extended transition function for the  -NFA. –We “  -closure” a state q by following all transitions out of q that are labeled .

Finite Automata with Epsilon- Transitions Epsilon-Closures (  -closures) –Formal recursive definition of the set ECLOSE(q) for q: State q is in ECLOSE(q) (including the state itself); State q is in ECLOSE(q) (including the state itself); If p is in ECLOSE(q), then all states accessible from p through paths of  ’s are also in ECLOSE(q). If p is in ECLOSE(q), then all states accessible from p through paths of  ’s are also in ECLOSE(q). (“ 經  式快速道路路段可到的所有 states 車站皆算在內 ”) (“ 經  式快速道路路段可到的所有 states 車站皆算在內 ”)

Finite Automata with Epsilon- Transitions Epsilon-Closures –  -closure for a set of states S: ECLOSE(S) = ∪ q  S ECLOSE(q) –Example 2.19 ECLOSE(1) = {1, 2, 3, 4, 6} ECLOSE({3, 5}) = ECLOSE(3) ∪ ECLOSE(5) = {3, 6} ∪ {5, 7} = {3, 5, 6, 7} 3 6    2  5 a b

Finite Automata with Epsilon- Transitions Extended Transitions & Languages for  - NFA’s –Recursive definition of extended transition function : Basis: (q,  ) = ECLOSE(q). Basis: (q,  ) = ECLOSE(q). Induction: if w = xa, then (q, w) is computed as: Induction: if w = xa, then (q, w) is computed as: If (q, x) = {p 1, p 2, …, p k } and  (p i, a) = {r 1, r 2, …, r m }, then (q, w) = ECLOSE( {r 1, r 2, …, r m })= ECLOSE(  (p i, a)).

Finite Automata with Epsilon- Transitions Extended Transitions & Languages for  - NFA’s –Induction: if w = xa, then (q, w) is computed as: If (q, x) = {p 1, p 2, …, p k } and  (p i, a) = {r 1, r 2, …, r m }, then (q, w) = ECLOSE( {r 1, r 2, …, r m }). … a (q, x)= { p 1 p 2. p k } x  a a { r 1 r 2. r m }  ECLOSE { r 1, r 2, …, r m }

Finite Automata with Epsilon- Transitions Example Computing (q 0, 5.6) for  -NFA of Fig –Compute (q 0, 5)= (q 0,  5) first: – (q 0,  ) = ECLOSE(q 0 ) = {q 0, q 1 } –  (q 0, 5) ∪  (q 1, 5) =  ∪ {q 1, q 4 } = {q 1, q 4 } – (q 0, 5) = (q 0,  5) = ECLOSE(  (q 0, 5) ∪  (q 1, 5)) = ECLOSE({q 1, q 4 }) = E CLOSE({q 1 }) ∪ ECLOSE({q 4 }) = ECLOSE({q 1, q 4 }) = E CLOSE({q 1 }) ∪ ECLOSE({q 4 }) = {q 1, q 4 } = {q 1, q 4 } (complete the rest of computations by yourself!) - (complete the rest of computations by yourself!) - q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure 2.18

Finite Automata with Epsilon- Transitions Eliminating  -Transitions –The  -transition is good for design of FA, but for implementation, they have to be eliminated. –Given an  -NFA, we can find an equivalent DFA (a theorem seen later). –Let E = (Q E, ,  E, q 0, F E ) be the given  -NFA, the equivalent DFA D = (Q D, ,  D, q D, F D ) is constructed as follows (in the next page).

Finite Automata with Epsilon- Transitions –Q D is the set of subsets of Q E, in which each accessible is an  -closed subset of Q E, i.e., are sets S  Q E such that S = ECLOSE(S). In other words, each  -closed set of states, S, includes those states such that any  -transition out of one of the states in S leads to a state that is also in S. In other words, each  -closed set of states, S, includes those states such that any  -transition out of one of the states in S leads to a state that is also in S. –q D = ECLOSE(q 0 ) (initial state of D) –F D = {S | S  Q D and S ∩ F E  } (continued in the next page) (continued in the next page)

Finite Automata with Epsilon- Transitions –  D (S, a) is computed for each a in  and each S in Q D in the following way: Let S = {p 1, p 2,..., p k } Let S = {p 1, p 2,..., p k } Compute  (p i, a) and let this set be {r 1, r 2, …, r m } Compute  (p i, a) and let this set be {r 1, r 2, …, r m } Set  D (S, a) = ECLOSE({r 1, r 2, …, r m }) Set  D (S, a) = ECLOSE({r 1, r 2, …, r m }) = ECLOSE(  (p i, a)) = ECLOSE(  (p i, a)) –Technique to create accessible states in DFA D: starting from the start state q 0 of  -NFA E, generate ECLOSE(q 0 ) as start state q D of D; starting from the start state q 0 of  -NFA E, generate ECLOSE(q 0 ) as start state q D of D; from the generated states to derive other states. from the generated states to derive other states.

Finite Automata with Epsilon-Transitions Example 2.21: eliminate  -transitions of Fig Example 2.21: eliminate  -transitions of Fig – Start state q D = ECLOSE(q 0 ) = {q 0, q 1 } –  D ({q 0, q 1 }, +) = ECLOSE(  E (q 0, +) ∪  E (q 1, +)) = ECLOSE({q 1 } ∪  ) = ECLOSE({q 1 }) = {q 1 },... = ECLOSE({q 1 } ∪  ) = ECLOSE({q 1 }) = {q 1 },... –  D ({q 0, q 1 }, 0) = ECLOSE(  E (q 0, 0) ∪  E (q 1, 0)) = ECLOSE (  ∪ {q 1, q 4 }) = ECLOSE({q 1, q 4 }) = {q 1, q 4 },... = ECLOSE (  ∪ {q 1, q 4 }) = ECLOSE({q 1, q 4 }) = {q 1, q 4 },... –  D ({q 0, q 1 },.) = ECLOSE(  E (q 0,.) ∪  E (q 1,.)) = {q 2 } q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure 2.18

Finite Automata with Epsilon- Transitions Example 2.21: (cont’d) Example 2.21: (cont’d) +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } Figure 2.22 {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}.

Finite Automata with Epsilon- Transitions Example 2.21: (cont’d) Example 2.21: (cont’d) –  D ({q 1 }, 0) = ECLOSE(  E (q 1, 0)) = ECLOSE({q 1, q 4 }) = {q 1, q 4 }... = {q 1, q 4 }... –  D ({q 1 },.) = ECLOSE(  E (q 1,.)) = ECLOSE({q 2 }) = {q 2 } = {q 2 } q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure 2.18

Finite Automata with Epsilon- Transitions +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}..

35 Example 2.21: (cont’d) Example 2.21: (cont’d) –  D ({q 1, q 4 }, 0) = ECLOSE(  E (q 1, 0) ∪  E (q 4, 0)) = ECLOSE({q 1, q 4 } ∪  ) = {q 1, q 4 }... = ECLOSE({q 1, q 4 } ∪  ) = {q 1, q 4 }... –  D ({q 1, q 4 },.) = ECLOSE(  E (q 1,.) ∪  E (q 4,.)) = ECLOSE({q 2 } ∪ {q 3 }) = ECLOSE(q 2 ) ∪ ECLOSE (q 3 ) ECLOSE({q 2 } ∪ {q 3 }) = ECLOSE(q 2 ) ∪ ECLOSE (q 3 ) = {q 2 } ∪ {q 3, q 5 } = {q 2, q 3, q 5 } = {q 2 } ∪ {q 3, q 5 } = {q 2, q 3, q 5 } q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure Finite Automata with Epsilon-Transitions

36 0, 1, …, Finite Automata with Epsilon- Transitions +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}.. {q 2, q 3, q 5 }.

37 Example 2.21: (cont’d) Example 2.21: (cont’d) –  D ({q 2 }, 0) = ECLOSE(  E (q 2, 0)) = ECLOSE({q 3 }) = {q 3, q 5 } … –  D ({q 2, q 3, q 5 }, 0) = ECLOSE(  E (q 2, 0) ∪  E (q 3, 0) ∪  E (q 5, 0))=ECLOSE({q 3 } ∪ {q 3 } ∪  )=ECLOSE(q 3 )={q 3, q 5 } … q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure Finite Automata with Epsilon-Transitions

Finite Automata with Epsilon- Transitions 0, 1, …, 9 +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}.. {q 2, q 3, q 5 }. {q 3, q 5 } 0, 1, …9

39 Example 2.21: (cont’d) Example 2.21: (cont’d) –  D ({q 3, q 5 }, 0) = ECLOSE(  E (q 3, 0) ∪  E (q 5, 0)) =ECLOSE({q 3 } ∪  ) =ECLOSE(q 3 )={q 3, q 5 } … q5q5q5q5  0, 1, …, 9 start q0q0q0q0 , +, - q1q1q1q1 q2q2q2q2. 0, 1, …, 9 q3q3q3q3 q4q4q4q4. Figure Finite Automata with Epsilon-Transitions

40 0, 1, …, Finite Automata with Epsilon- Transitions 0, 1, …, 9 +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}.. {q 2, q 3, q 5 }. {q 3, q 5 } 0, 1, …9

41 Example 2.21: (cont’d) Example 2.21: (cont’d) –The dead state  need be shown. –But according to Section 2.3.7a, the diagram in the last page may be regarded as deterministic. 0, 1, …, 9 +, - +, - {q1}{q1}{q1}{q1} start {q 0, q 1 } {q 1, q 4 } 0, 1, …, 9 {q2}{q2}{q2}{q2}.. {q 2, q 3, q 5 }. {q 3, q 5 } all symbols 0, 1, …9  2.5 Finite Automata with Epsilon-Transitions +, -,. +, - +, -,. +, -

Finite Automata with Epsilon- Transitions Theorem 2.22 –A language L accepted by some  -NFA if and only if L is accepted by some DFA. –Proof: see the textbook yourself.

A Review 3 Types of Automata – DFA --- good for soft/hardware implementation – NFA (  -NFA ) ---intermediately intuitive –  -NFA ---most intuitive  -NFA DFA equivalent