Chap. 2 Finite Automata

Size: px
Start display at page:

Download "Chap. 2 Finite Automata"

Transcription

1 Chap. 2 Finite Automata 2.1 An Informal Picture of Finite Automata A man with a wolf, goat, and cabbage is on the left bank of a river A boat carries one man and only one of the other three. The wolf eats the goat without the man. The goat eats the cabbage without the man. Is it possible to cross the river without the goat or cabbage being eaten? states: occupants of each bank after a crossing 16 subsets of the man(m), wolf(w), goat(g), and cabbage(c). 16 states: mwgc-, WC-mG,, -mwgc input symbol: four ways of crossing the river man cross alone(m), with the wolf(w), the goat(g), or cabbage(c) input string: a sequence of crossings(input symbols) state transition: From a state to another state by a input symbol 9/13/12 Kwang-Moo Choe 1

2 mcgw- m,c,w,g -mcgw g g m,c,w m-cgw mc-gw mw-cg m,c,w g g CW-mG m m mg-cw m mcw-g m c c w w W-mCG mgw-c w w m m m G-mCW C-mGW g g g g m mcg-w c c 9/13/12 Kwang-Moo Choe 2

3 2.2 Deterministic Finite Automata A deterministic finite automaton consists of: 1. A finite set of states, denoted Q, 2. A finite set of input symbols, denoted Σ, 3. A transition function, δ: Q Σ Q Let p, q Q, and a Σ, if we write δ(q, a) = p, meaning that when current state is in q and input symbol is a, the current state is changed to p, and input symbol is changed to the next(right) one. 4. A start(initial) state, q 0 Q, and 5. A set of final or accepting states, F Q. A DFA A = (Q, Σ, δ, q 0, F) five-tuple notation 9/13/12 Kwang-Moo Choe 3

4 2.2.2 How a DFA Processes Strings How a DFA decides whether or not accept a input string(sequence of input symbols) Suppose a 1 a 2 a n is a sequence of input symbols 1. We start out the DFA with in its start state q We consult the transition function, δ, with current state and current input symbol, asumme in the first trial δ(q 0, a 1 ) = q 1, 3. Repeat this step with the next state q 1 and the next input symbol a 2. Assume δ(q 1, a 2 ) = q 2, δ(q 2, a 3 ) = q 3,, δ(q n-1, a n ) = q n. 4. Finally, check if δ(q n-1, a n ) = q n F or not. If q n F, accept a 1 a 2 a n. If q n F does not accept a 1 a 2 a n. δ(δ( δ(δ(q 0, a 1 ), a 2 ), ), a n-1 ), a n ) = q n where δ(q i-1, a i ) = q i for 1 i n. 9/13/12 Kwang-Moo Choe 4

5 Example 2.1 Let Σ = {0, 1} and L = {x01y Σ * x, y Σ * }. State q 0 : initial state If it sees 0, go to a new state q 1. If it sees 1 stay in the state q 0. It has never seen 0. State q 1 : The last symbol it has seen is 0. If it sees 1, go to a new state q 2. If it sees 0, stay in the state q 1. State q 2 : It has ever seen is 01. final state Whether it sees 0 or 1, stay in the state q 2. A = (Q, Σ, δ, q 0, F) Q = {q 0, q 1, q 2 } Σ = {0, 1} δ = {δ(q 0, 0)=q 1, δ(q 0, 1)=q 0, δ(q 1, 0)=q 1, δ(q 1, 1)=q 2, δ(q 2, 0)=q 2, δ(q 2, 1)=q 2 } F = {q 2 } 9/13/12 Kwang-Moo Choe 5

6 2.2.3 Simple notations for DFA s Transition diagram 1 0 0, 1 0 q 0 q 1 1 q 2 Transition table 0 1 q 0 q 1 q 0 q 1 q 1 q 2 * q 2 q 2 q 2 9/13/12 Kwang-Moo Choe 6

7 2.2.4 Extend the domain of transition function from symbols to strings δ: Q Σ Q δ^: Q Σ * Q δ^(q, ε) = B q δ^(q, wa) = R δ(δ^(q, w), a) basis q Q, w Σ *, a Σ, wa Σ +. recursion δ^(q 0, a 1 a 2 a n ) = R δ(δ^(q 0, a 1 a 2 a n-1 ), a n ) 1st recursion = R δ(δ(δ^(q 0, a 1 a 2 a n-2 ), a n-1 ), a n ) 2nd recursion = R = R δ(δ( δ(δ^(q 0, a 1 ), a 2 ), ), a n-1 ), a n ) (n-1)-th recursion = R δ(δ( δ(δ(δ^(q 0, ε), a 1 ), a 2 ), ), a n-1 ), a n ) n-th recursion = B δ(δ( δ(δ(q 0, a 1 ), a 2 ), ), a n-1 ), a n ) basis 9/13/12 Kwang-Moo Choe 7

8 If δ^(q, w) = p, for some q, p Q and w Σ *, w is the path from the state q to the state p. Since δ^ δ, we may use δ instead of δ^. Example q 0 1 q even numbers of 0 s and even numbers of 1 s. 0 q q 3 9/13/12 Kwang-Moo Choe 8

9 2.2.5 The Language of DFA We define the language of a DFA A = (Q, Σ, δ, q 0, F), L(A), L(A) = {w Σ * δ^(q 0, w) F} or {w Σ * δ(q 0, w) F}, for short. L(A) Σ * or L(A) 2 Σ*. Definition: Regular languages Let L be a language. If L = L(A) for some DFA A, then we say L is a regular language. a class of languages type-3 languages in Chomsky s language hierarchy Definition: Equivalence of Automata Let M 1 and M 2 be two automata. We say two automata M 1 and M 2 are equivalent, if L(M 1 ) = L(M 2 ). 9/13/12 Kwang-Moo Choe 9

10 The state of automata summarizes the information concerning past inputs that is needed to determine the behavior of the automata on subsequent inputs. Aho and Ullman Let M = (Q, Σ, δ, q 0, F) be a DFA and q Q. We define accessible input strings from initial state to the state q. L(q) = {w Σ * δ^(q 0, w) = q} L(M) = q F L(q). Consider a binary relation R M on Σ * and x R M y, if δ^(q 0, x) = δ^(q 0, y). Then R M is a quivalent relation and the equivalent class [x] RM = L(q), if δ^(q 0, x) = q. Since R A is equivalent, [x] RM is a partion of Σ *. 9/13/12 Kwang-Moo Choe 10

11 2.3 Nondeterministic Finite Automaton A = (Q, Σ, δ, q 0, F) is a nondeterministic finite automaton(nfa), if 1. Q is a finite set of states, 2. Σ is a finite set of input symbols, open denoted, 3. δ is a transition function, δ: Q Σ 2 Q. If q Q, a Σ, and {p 1, p 2,, p n } Q(or 1 i n, p i Q) then we write δ(q, a) = {p 1, p 2,, p n }, meaning that when current state is in q and input symbol is a, the state may be changed to any one of p 1, p 2,, p n, and input symbol is changed to the next(right) one. 4. q 0 Q is a start state, and 5. F Q is a set of final or accepting states. Fig. 2.9, 2.10, /13/12 Kwang-Moo Choe 11

12 DFA: δ: Q Σ Q q Q, a Σ, δ(q, a) Q. Otherwise (total) function partial function If A = (Q, Σ, δ, q 0, F) be a FA with δ: Q Σ \ Q partial function, L(A) = L(B) for DFA B = (Q {d}, Σ, δ, q 0, F) where d Q, δ = δ {δ(q, a) = d δ(q, a) Q} {δ(d, a) = d a Σ} d: dead state B is the DFA(with total function) DFA: δ: Q Σ Q. DFA but partial function: δ: Q Σ Q { }. NFA: δ: Q Σ 2 Q. 9/13/12 Kwang-Moo Choe 12

13 2.3.3 The Extended Transition Function DFA δ: Q Σ Q δ^: Q Σ * Q NFA δ: Q Σ 2 Q δ : 2 Q Σ 2 Q in this lecture δ ^: 2 Q Σ * 2 Q in this lecture δ^: Q Σ * 2 Q in the text Two step extension 1. Set extension: δ δ We extend the 1st domain of δ to set of states. δ : 2 Q Σ 2 Q. Let P Q, we define δ (P, a) = {q Q p P, q δ(p, a)} 9/13/12 Kwang-Moo Choe 13

14 or = p P δ(p, a) We may write δ (p, a) instead of δ ({p}, a) when needed. 2. String extension : δ δ ^(same as δ δ^) δ ^: 2 Q Σ * 2 Q. δ ^(P, ε) = B P basis δ ^(P, wa) = R δ (δ ^(P, w), a) recursion P Q(or P 2 Q ), w Σ *, a Σ, wa Σ +. We may use δ instead of δ or δ ^, since δ δ, δ ^. Let N = (Q, Σ, δ, q 0, F) be an NFA. Then the language defined by the NFA N, denoted as L(N) is, L(N) = {w Σ * δ ^({q 0 }, w) F }. L(N) Σ * or L(N) 2 Σ*. 9/13/12 Kwang-Moo Choe 14

15 2.3.5 Equivalence of DFA and NFA Example 2.10(Fig. 2.12) Subset construction(nfa DFA) Given an NFA N = (Q N, Σ, δ N, q 0N, F N ), construct DFA D = (Q D, Σ, δ D, q 0D, F D ). 1. Q D = {P P Q N } = 2 Q N. 3. δ D (P, a) = {q Q N p P Q N, q δ N (p, a)} or = p P δ N (p, a) or = δ N (P, a) set extension of δ N. δ D (P, a) = δ N (P, a) or δ D = δ N in short, where δ D : Q D Σ Q D, δ N : 2 Q N Σ 2 Q N, and Q D = 2 Q N. 4. q 0D = {q 0N }. 5. F D = {F Q D F F N } 9/13/12 Kwang-Moo Choe 15

16 Theorem 2.11 L(D) = L(N) in the above subset construction Proof δ^ D (q 0D, w) = δ ^N ({q 0N }, w) for all w Σ*. δ^d : Q D Σ* Q D = 2 Q N Σ * 2 Q N. δ ^N : 2Q N Σ * 2 Q N. We may use q 0N instead of {q 0N }. Induction on w. basis: Let w = 0, δ^ D (q 0D, ε) = δ^ D ({q 0N }, ε) = {q 0N }= δ ^N ({q 0N }, ε). induction: Let w = xa where a Σ, x Σ *, and w Σ +. ( w = x + 1) δ^ D (q 0D, xa) = δ D (δ^ D ({q 0N }, x), a) by definition of δ^d. = δ N (δ^d ({q 0N }, x), a) by subset construction = δ N (δ ^N ({q 0N }, x), a) by induction hypothesis = δ ^ N ({q 0N }, xa) by definition of δ ^N. 9/13/12 Kwang-Moo Choe 16

17 δ ^ D ({q 0 }, x) F D, if and only if, δ ^N (q 0, x) F N. Q.E.D. Theorem 2.12 A language L is defined by some DFA, if and only if L is defined by some NFA.(NFA DFA) Proof: (If) subset construction(nfa DFA) (Only if) NFA can easily simulate DFA(DFA NFA). Let a DFA D = (Q, Σ, δ D, q 0, F). We define an NFA(Q, Σ, δ N, q 0, F) δ N (q, a) = {p δ D (q, a) = p}. Proof for w Σ *, if and only if, δ^ D (q, w) = p, then δ^d (q, w) = {p}. Then L(D) = L(N). L is regular, iff L = L(N) for some NFA N. 9/13/12 Kwang-Moo Choe 17

18 2.5 Finite Automata with Epsilon-Transitions A = (Q, Σ, δ, q 0, F) is a fa with epsilon transition(ε-nfa), if Q, Σ, q 0, and F are same as NFA, but 3. δ is a transition function, δ: Q (Σ {ε}) 2 Q. If q Q, and {p 1, p 2,, p n } Q, then we write δ(q, ε) = {p 1, p 2,, p n }, meaning that when current state is in q and regardless of input symbol the state may be changed to any one of p 1, p 2,, p n, and next input symbol is not changed. Ex. 2.16, Fig /13/12 Kwang-Moo Choe 18

19 2.5.3 Epsilon-closure basis: q ε * (q) (same as ECLOSE(q) in the text) recursion: If p ε * (q), and r δ(p, ε), then r ε * (q). Example 2.18 Why ε * (q) instead of ECLOSE(q) Let ε = {(p, q) q δ(p, ε)}. Then ε Q Q(a binary relation on Q) and ECLOSE(q) = ε * (q) reflexive-transitive closure of ε. 9/13/12 Kwang-Moo Choe 19

20 2.5.4 The Extended Transition and Language for ε-nfa s NFA: δ: Q Σ 2 Q. ε-nfa: δ: Q ({ε} Σ) 2 Q. Let s divide δ of ε-nfa into δ 1 and δ 0. δ 1 : Q Σ 2 Q. δ 0 : Q {ε} 2 Q. δ = δ 1 δ 0. δ 1 : is same as δ in NFA, we use δ instead of δ 1, since δ 1 δ. δ 0 f ε what is the bijection f? We use ε instead of δ 0. ε = {(p, q) q δ(p, ε)} Q Q binary relation on Q. ε * = i N ε i 0 Q Q binary relation on Q. ε, ε * : Q 2 Q. function from Q to 2 Q. 9/13/12 Kwang-Moo Choe 20

21 Let s extend the domain of δ(=δ 1 ), ε, and ε * from state to set of states. Let P Q, we define δ : 2 Q Σ 2 Q. δ (P, a) = {q Q p P, δ(p, a) = q} or = p P δ(p, a) We may write δ (p, a) instead of δ ({p}, a) when needed. We may write δ(p, a) instead of δ (P, a) when needed. ε : 2 Q 2 Q. ε (P) = {q Q p P, ε(p) = q} or = p P ε(p) ε * : 2 Q 2 Q. ε * (P) = {q Q p P, ε * (p) = q} = p P ε * (p) We write ε(p) instead of ε (P) and ε * (P) instead of ε * (P). 9/13/12 Kwang-Moo Choe 21

22 Let s extend the of domain of δ from symbol to strings. δ^: 2 Q Σ * 2 Q. δ^(p, ε) = ε * (P) basis δ^(p, wa) = ε * (δ(δ^(p, w), a)) recursion P Q(or P 2 Q ), w Σ *, a Σ, wa Σ +. δ^(q 0, a 1 a 2 a n ) = ε * (δ(δ^(q 0, a 1 a 2 a n-1 ), a n )) 1st recursion = ε * (δ(ε * (δ(δ^(q 0, a 1 a 2 a n-2 ), a n-1 )), a n )) 2nd recursion = = ε * (δ(ε * (δ( ε * (δ(δ^(q 0, a 1 ), a 2 )), ), a n-1 )), a n ))(n-1)th recursion = ε * (δ(ε * (δ( ε * (δ(ε * (δ(δ^(q 0, ε), a 1 )), a 2 )), )), a n-1 )), a n )) n-th = ε * (δ(ε * (δ( ε * (δ(ε * (δ(ε * (q 0 ), a 1 )), a 2 )), )), a n-1 )), a n )) basis δ n = ε * δ ε * δ ε * = ε * (δ ε * ) n. 9/13/12 Kwang-Moo Choe 22

23 We may write δ * instead of δ^, since δ^ = i N 0 δ i = δ *. Let E = (Q, Σ, δ, q 0, F) be an ε-nfa. Then the language defined by the ε-nfa E, denoted as L(E) is, L(E) = {w Σ * δ^(q 0, w) F }. L(E) Σ * or L(E) 2 Σ* 9/13/12 Kwang-Moo Choe 23

24 2.5.5 Eliminating ε-transitions Given an ε-nfa E = (Q E, Σ, δ E, q 0, F E ), construct the equivalent DFA D = (Q D, Σ, δ D, q 0D, F D ) such that L(D) = L(N). 1. Q D = {P P Q E } = 2 Q E. 3. q 0D = ε * ({q 0 }) 4. δ D (P, a) = ε * (δ E (P, a)) set extension of δ E and ε-closure where P Q E (P Q D ), a Σ, and δ D (P, a) Q E (or δ D (P, a) Q D ) 5. F D = {F Q D F F E } Theorem 2.22 A language L is accepted by some ε-nfa if and only if L is accepted by some DFA. Proof: (If) ε-nfa can easily simulate DFA(DFA ε-nfa). (Only if) Eliminating ε-transitions(ε-nfa DFA) 9/13/12 Kwang-Moo Choe 24

25 Let E = (Q E, Σ, δ E, q 0, F E ) be a ε-nfa and DFA D = (Q D, Σ, δ D, q 0D, F D ) is the one in We show δ E^(q0, w) = δ D^(q0D, w) by induction on w. basis: δ E^(q0, ε) = ε * (q 0 ) by basis definition of δ E^. = q 0D = by construction of δ D. = δ D^(q0D, ε) by basis definition of δ D^. Induction: Let w = xa Σ +, a Σ, and x Σ *. δ E^(q0, xa) = δ E (ε * (δ E^(q0, x), a) by recursive definition of δ E^. = δ E (ε * (δ D^(q0D, x), a)) by induction hypothesis. = δ D (δ D^(q0D, x), a) by construction of δ D. = δ D^(q0D, xa) by recursive definition of δ D^. 9/13/12 Kwang-Moo Choe 25

26 2.A Extended Finite Automata(XFA) X = (Q, Σ, q 0, δ, F) is an extended finite state automata(xfa), if δ: Q Σ * 2 Q. Given an XFA X = (Q X, Σ, q 0, δ X, F X ), construct an equivalent ε-nfa E = (Q E, Σ, q 0, δ E, F E ) such that L(X) = L(E). Construction algorithm Q E := Q X ; F E := F X ; δ E := ; for (δ X (q, x) = P) δ X where x = a 1 a 2 a n do if 0 n 1 δ E (q, x) := P where x Σ {ε} n 2 δ E (q, a 1 ) = δ E (q, a 1 ) {p 1 }; od fi for 2 i n-1 do δ E (p i-1, a i ) := {p i } od; δ E (p n-1, a n ) = P; Q E := Q E {p 1, p 2,, p n-1 } where Q E {p 1, p 2,, p n-1 } 9/13/12 Kwang-Moo Choe 26

27 The following statements are equivalent, 1. A language L is regular. 2. L = L(D) for some DFA D. δ : Q Σ Q. 3. L = L(P) for some FA P with partial function δ. δ : Q Σ Q { }. 4. L = L(N) for some NFA N. δ : Q Σ 2 Q. 5. L = L(E) for some ε-nfa E. δ : Q ({ε} Σ) 2 Q. 6. L = L(X) for some XFA X. δ : Q Σ * 2 Q. 9/13/12 Kwang-Moo Choe 27

Chap. 2 Finite Automata

Chap. 2 Finite Automata Chap. 2 Finite Automata 2.1 An Informal Picture of Finite Automata (See 2nd Edition) A man with a wolf, goat, and cabbage is on the left bank of a river A boat carries one man and only one of the other

More information

Chap. 2 Finite Automata

Chap. 2 Finite Automata Chap. 2 Finite Automata 2.1 An Informal Picture of Finite Automata (See 2nd Edition) A man with a wolf, goat, and cabbage is on the left bank of a river A boat carries one man and only one of the other

More information

Automata and Formal Languages - CM0081 Determinist Finite Automata

Automata and Formal Languages - CM0081 Determinist Finite Automata Automata and Formal Languages - CM0081 Determinist Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 2018-2 Formal Languages: Origins Source areas [Greibach 1981, p. 14] Logic and recursive-function

More information

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata

Automata and Formal Languages - CM0081 Non-Deterministic Finite Automata Automata and Formal Languages - CM81 Non-Deterministic Finite Automata Andrés Sicard-Ramírez Universidad EAFIT Semester 217-2 Non-Deterministic Finite Automata (NFA) Introduction q i a a q j a q k The

More information

CS 455/555: Finite automata

CS 455/555: Finite automata CS 455/555: Finite automata Stefan D. Bruda Winter 2019 AUTOMATA (FINITE OR NOT) Generally any automaton Has a finite-state control Scans the input one symbol at a time Takes an action based on the currently

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

Finite Automata. BİL405 - Automata Theory and Formal Languages 1

Finite Automata. BİL405 - Automata Theory and Formal Languages 1 Finite Automata BİL405 - Automata Theory and Formal Languages 1 Deterministic Finite Automata (DFA) A Deterministic Finite Automata (DFA) is a quintuple A = (Q,,, q 0, F) 1. Q is a finite set of states

More information

Lecture 1: Finite State Automaton

Lecture 1: Finite State Automaton Lecture 1: Finite State Automaton Instructor: Ketan Mulmuley Scriber: Yuan Li January 6, 2015 1 Deterministic Finite Automaton Informally, a deterministic finite automaton (DFA) has finite number of s-

More information

Finite Automata. Theorems - Unit I SUSAN ELIAS. Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering

Finite Automata. Theorems - Unit I SUSAN ELIAS. Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering Finite Automata Theorems - Unit I SUSAN ELIAS Professor Department of Computer Science & Engineering Sri Venkateswara College of Engineering September 17, 2012 Unit I - Guidelines Formal Definitions Definition

More information

Lecture 4 Nondeterministic Finite Accepters

Lecture 4 Nondeterministic Finite Accepters Lecture 4 Nondeterministic Finite Accepters COT 4420 Theory of Computation Section 2.2, 2.3 Nondeterminism A nondeterministic finite automaton can go to several states at once. Transitions from one state

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

Theory of Computation

Theory of Computation Theory of Computation COMP363/COMP6363 Prerequisites: COMP4 and COMP 6 (Foundations of Computing) Textbook: Introduction to Automata Theory, Languages and Computation John E. Hopcroft, Rajeev Motwani,

More information

Course 4 Finite Automata/Finite State Machines

Course 4 Finite Automata/Finite State Machines Course 4 Finite Automata/Finite State Machines The structure and the content of the lecture is based on (1) http://www.eecs.wsu.edu/~ananth/cpts317/lectures/index.htm, (2) W. Schreiner Computability and

More information

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F)

Outline. Nondetermistic Finite Automata. Transition diagrams. A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Outline Nondeterminism Regular expressions Elementary reductions http://www.cs.caltech.edu/~cs20/a October 8, 2002 1 Determistic Finite Automata A finite automaton is a 5-tuple (Q, Σ,δ,q 0,F) Q is a finite

More information

Chapter Five: Nondeterministic Finite Automata

Chapter Five: Nondeterministic Finite Automata Chapter Five: Nondeterministic Finite Automata From DFA to NFA A DFA has exactly one transition from every state on every symbol in the alphabet. By relaxing this requirement we get a related but more

More information

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA)

Languages. Non deterministic finite automata with ε transitions. First there was the DFA. Finite Automata. Non-Deterministic Finite Automata (NFA) Languages Non deterministic finite automata with ε transitions Recall What is a language? What is a class of languages? Finite Automata Consists of A set of states (Q) A start state (q o ) A set of accepting

More information

Lecture 3: Nondeterministic Finite Automata

Lecture 3: Nondeterministic Finite Automata Lecture 3: Nondeterministic Finite Automata September 5, 206 CS 00 Theory of Computation As a recap of last lecture, recall that a deterministic finite automaton (DFA) consists of (Q, Σ, δ, q 0, F ) where

More information

CS Pushdown Automata

CS Pushdown Automata Chap. 6 Pushdown Automata 6.1 Definition of Pushdown Automata Example 6.2 L ww R = {ww R w (0+1) * } Palindromes over {0, 1}. A cfg P 0 1 0P0 1P1. Consider a FA with a stack(= a Pushdown automaton; PDA).

More information

Introduction to Finite-State Automata

Introduction to Finite-State Automata Introduction to Finite-State Automata John McDonough Language Technologies Institute, Machine Learning for Signal Processing Group, Carnegie Mellon University March 26, 2012 Introduction In this lecture,

More information

Nondeterministic Finite Automata. Nondeterminism Subset Construction

Nondeterministic Finite Automata. Nondeterminism Subset Construction Nondeterministic Finite Automata Nondeterminism Subset Construction 1 Nondeterminism A nondeterministic finite automaton has the ability to be in several states at once. Transitions from a state on an

More information

Chapter Two: Finite Automata

Chapter Two: Finite Automata Chapter Two: Finite Automata In theoretical computer science, automata theory is the study of abstract machines (or more appropriately, abstract 'mathematical' machines or systems) and the computational

More information

Subset construction. We have defined for a DFA L(A) = {x Σ ˆδ(q 0, x) F } and for A NFA. For any NFA A we can build a DFA A D such that L(A) = L(A D )

Subset construction. We have defined for a DFA L(A) = {x Σ ˆδ(q 0, x) F } and for A NFA. For any NFA A we can build a DFA A D such that L(A) = L(A D ) Search algorithm Clever algorithm even for a single word Example: find abac in abaababac See Knuth-Morris-Pratt and String searching algorithm on wikipedia 2 Subset construction We have defined for a DFA

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 6 CHAPTER 2 FINITE AUTOMATA 2. Nondeterministic Finite Automata NFA 3. Finite Automata and Regular Expressions 4. Languages

More information

C2.1 Regular Grammars

C2.1 Regular Grammars Theory of Computer Science March 22, 27 C2. Regular Languages: Finite Automata Theory of Computer Science C2. Regular Languages: Finite Automata Malte Helmert University of Basel March 22, 27 C2. Regular

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

C2.1 Regular Grammars

C2.1 Regular Grammars Theory of Computer Science March 6, 26 C2. Regular Languages: Finite Automata Theory of Computer Science C2. Regular Languages: Finite Automata Malte Helmert University of Basel March 6, 26 C2. Regular

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Lecture 6 Section 2.2 Robb T. Koether Hampden-Sydney College Mon, Sep 5, 2016 Robb T. Koether (Hampden-Sydney College) Nondeterministic Finite Automata Mon, Sep 5, 2016

More information

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

Introduction to Formal Languages, Automata and Computability p.1/51 Introduction to Formal Languages, Automata and Computability Finite State Automata K. Krithivasan and R. Rama Introduction to Formal Languages, Automata and Computability p.1/51 Introduction As another

More information

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova. Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures and Instructions 23.10. 3.11. 17.11. 24.11. 1.12. 11.12.

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

Finite Automata. Seungjin Choi

Finite Automata. Seungjin Choi Finite Automata Seungjin Choi Department of Computer Science and Engineering Pohang University of Science and Technology 77 Cheongam-ro, Nam-gu, Pohang 37673, Korea seungjin@postech.ac.kr 1 / 28 Outline

More information

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova.

Introduction to the Theory of Computation. Automata 1VO + 1PS. Lecturer: Dr. Ana Sokolova. Introduction to the Theory of Computation Automata 1VO + 1PS Lecturer: Dr. Ana Sokolova http://cs.uni-salzburg.at/~anas/ Setup and Dates Lectures Tuesday 10:45 pm - 12:15 pm Instructions Tuesday 12:30

More information

COM364 Automata Theory Lecture Note 2 - Nondeterminism

COM364 Automata Theory Lecture Note 2 - Nondeterminism COM364 Automata Theory Lecture Note 2 - Nondeterminism Kurtuluş Küllü March 2018 The FA we saw until now were deterministic FA (DFA) in the sense that for each state and input symbol there was exactly

More information

Theory of Computation (I) Yijia Chen Fudan University

Theory of Computation (I) Yijia Chen Fudan University Theory of Computation (I) Yijia Chen Fudan University Instructor Yijia Chen Homepage: http://basics.sjtu.edu.cn/~chen Email: yijiachen@fudan.edu.cn Textbook Introduction to the Theory of Computation Michael

More information

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism, CS 54, Lecture 2: Finite Automata, Closure Properties Nondeterminism, Why so Many Models? Streaming Algorithms 0 42 Deterministic Finite Automata Anatomy of Deterministic Finite Automata transition: for

More information

Decision, Computation and Language

Decision, Computation and Language Decision, Computation and Language Non-Deterministic Finite Automata (NFA) Dr. Muhammad S Khan (mskhan@liv.ac.uk) Ashton Building, Room G22 http://www.csc.liv.ac.uk/~khan/comp218 Finite State Automata

More information

Algorithms for NLP

Algorithms for NLP Regular Expressions Chris Dyer Algorithms for NLP 11-711 Adapted from materials from Alon Lavie Goals of Today s Lecture Understand the properties of NFAs with epsilon transitions Understand concepts and

More information

Equivalence of DFAs and NFAs

Equivalence of DFAs and NFAs CS 172: Computability and Complexity Equivalence of DFAs and NFAs It s a tie! DFA NFA Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: L.von Ahn, L. Blum, M. Blum What we ll do today Prove that DFAs

More information

Regular Language Equivalence and DFA Minimization. Equivalence of Two Regular Languages DFA Minimization

Regular Language Equivalence and DFA Minimization. Equivalence of Two Regular Languages DFA Minimization Regular Language Equivalence and DFA Minimization Equivalence of Two Regular Languages DFA Minimization Decision Property: Equivalence Given regular languages L and M, is L = M? Algorithm involves constructing

More information

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r

UNIT-II. NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: SIGNIFICANCE. Use of ε-transitions. s t a r t. ε r. e g u l a r Syllabus R9 Regulation UNIT-II NONDETERMINISTIC FINITE AUTOMATA WITH ε TRANSITIONS: In the automata theory, a nondeterministic finite automaton (NFA) or nondeterministic finite state machine is a finite

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 TMV27/DIT32 LP4 28 Lecture 5 Ana Bove March 26th 28 Recap: Inductive sets, (terminating) recursive functions, structural induction To define an inductive set

More information

Lecture 2: Regular Expression

Lecture 2: Regular Expression Lecture 2: Regular Expression Instructor: Ketan Mulmuley Scriber: Yuan Li January 8, 2015 In the last lecture, we proved that DFA, NFA, and NFA with ϵ-moves are equivalent. Recall that a language L Σ is

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY NON-DETERMINISM and REGULAR OPERATIONS THURSDAY JAN 6 UNION THEOREM The union of two regular languages is also a regular language Regular Languages Are

More information

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 CMPSCI 250: Introduction to Computation Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013 λ-nfa s to NFA s to DFA s Reviewing the Three Models and Kleene s Theorem The Subset

More information

Chapter 6: NFA Applications

Chapter 6: NFA Applications Chapter 6: NFA Applications Implementing NFAs The problem with implementing NFAs is that, being nondeterministic, they define a more complex computational procedure for testing language membership. To

More information

Finite Automata and Regular Languages (part III)

Finite Automata and Regular Languages (part III) Finite Automata and Regular Languages (part III) Prof. Dan A. Simovici UMB 1 / 1 Outline 2 / 1 Nondeterministic finite automata can be further generalized by allowing transitions between states without

More information

3515ICT: Theory of Computation. Regular languages

3515ICT: Theory of Computation. Regular languages 3515ICT: Theory of Computation Regular languages Notation and concepts concerning alphabets, strings and languages, and identification of languages with problems (H, 1.5). Regular expressions (H, 3.1,

More information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions

Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular OctoberExpressions Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular Expressions Orit Moskovich Gal Rotem Tel Aviv University October 28, 2015 Recitation 2 - Non Deterministic Finite Automata (NFA) and Regular

More information

Chap. 1.2 NonDeterministic Finite Automata (NFA)

Chap. 1.2 NonDeterministic Finite Automata (NFA) Chap. 1.2 NonDeterministic Finite Automata (NFA) DFAs: exactly 1 new state for any state & next char NFA: machine may not work same each time More than 1 transition rule for same state & input Any one

More information

CSC173 Workshop: 13 Sept. Notes

CSC173 Workshop: 13 Sept. Notes CSC173 Workshop: 13 Sept. Notes Frank Ferraro Department of Computer Science University of Rochester September 14, 2010 1 Regular Languages and Equivalent Forms A language can be thought of a set L of

More information

Classes and conversions

Classes and conversions Classes and conversions Regular expressions Syntax: r = ε a r r r + r r Semantics: The language L r of a regular expression r is inductively defined as follows: L =, L ε = {ε}, L a = a L r r = L r L r

More information

CS 154. Finite Automata, Nondeterminism, Regular Expressions

CS 154. Finite Automata, Nondeterminism, Regular Expressions CS 54 Finite Automata, Nondeterminism, Regular Expressions Read string left to right The DFA accepts a string if the process ends in a double circle A DFA is a 5-tuple M = (Q, Σ, δ, q, F) Q is the set

More information

Automata and Languages

Automata and Languages Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Nondeterministic Finite Automata with empty moves (-NFA) Definition A nondeterministic finite automaton

More information

Extended transition function of a DFA

Extended transition function of a DFA Extended transition function of a DFA The next two pages describe the extended transition function of a DFA in a more detailed way than Handout 3.. p./43 Formal approach to accepted strings We define the

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 206 Slides by Katya Lebedeva. COMP 2600 Nondeterministic Finite

More information

Uses of finite automata

Uses of finite automata Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

More information

Finite Automata and Regular Languages

Finite Automata and Regular Languages Finite Automata and Regular Languages Topics to be covered in Chapters 1-4 include: deterministic vs. nondeterministic FA, regular expressions, one-way vs. two-way FA, minimization, pumping lemma for regular

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Mahesh Viswanathan Introducing Nondeterminism Consider the machine shown in Figure. Like a DFA it has finitely many states and transitions labeled by symbols from an input

More information

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata : Organization of Programming Languages Theory of Regular Expressions Finite Automata Previous Course Review {s s defined} means the set of string s such that s is chosen or defined as given s A means

More information

CSE 105 Theory of Computation Professor Jeanne Ferrante

CSE 105 Theory of Computation  Professor Jeanne Ferrante CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s agenda NFA Review and Design NFA s Equivalence to DFA s Another Closure Property proof for Regular Languages

More information

CS243, Logic and Computation Nondeterministic finite automata

CS243, Logic and Computation Nondeterministic finite automata CS243, Prof. Alvarez NONDETERMINISTIC FINITE AUTOMATA (NFA) Prof. Sergio A. Alvarez http://www.cs.bc.edu/ alvarez/ Maloney Hall, room 569 alvarez@cs.bc.edu Computer Science Department voice: (67) 552-4333

More information

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont )

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata (cont ) Sungjin Im University of California, Merced 2-3-214 Example II A ɛ B ɛ D F C E Example II A ɛ B ɛ D F C E NFA accepting

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

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

September 11, Second Part of Regular Expressions Equivalence with Finite Aut Second Part of Regular Expressions Equivalence with Finite Automata September 11, 2013 Lemma 1.60 If a language is regular then it is specified by a regular expression Proof idea: For a given regular language

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 23rd September, 2014 1 / 29 1 Closure properties of regular languages

More information

Lecture 5: Minimizing DFAs

Lecture 5: Minimizing DFAs 6.45 Lecture 5: Minimizing DFAs 6.45 Announcements: - Pset 2 is up (as of last night) - Dylan says: It s fire. - How was Pset? 2 DFAs NFAs DEFINITION Regular Languages Regular Expressions 3 4 Some Languages

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

Computational Theory

Computational Theory Computational Theory Finite Automata and Regular Languages Curtis Larsen Dixie State University Computing and Design Fall 2018 Adapted from notes by Russ Ross Adapted from notes by Harry Lewis Curtis Larsen

More information

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata.

Clarifications from last time. This Lecture. Last Lecture. CMSC 330: Organization of Programming Languages. Finite Automata. CMSC 330: Organization of Programming Languages Last Lecture Languages Sets of strings Operations on languages Finite Automata Regular expressions Constants Operators Precedence CMSC 330 2 Clarifications

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

Finite Automata and Regular languages

Finite Automata and Regular languages Finite Automata and Regular languages Huan Long Shanghai Jiao Tong University Acknowledgements Part of the slides comes from a similar course in Fudan University given by Prof. Yijia Chen. http://basics.sjtu.edu.cn/

More information

Decidability (intro.)

Decidability (intro.) CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The

More information

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 9 : Myhill-Nerode Theorem and applications

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 9 : Myhill-Nerode Theorem and applications COMP-33 Theory of Computation Fall 217 -- Prof. Claude Crépeau Lec. 9 : Myhill-Nerode Theorem and applications COMP 33 Fall 212: Lectures Schedule 1-2. Introduction 1.5. Some basic mathematics 2-3. Deterministic

More information

Incorrect reasoning about RL. Equivalence of NFA, DFA. Epsilon Closure. Proving equivalence. One direction is easy:

Incorrect reasoning about RL. Equivalence of NFA, DFA. Epsilon Closure. Proving equivalence. One direction is easy: Incorrect reasoning about RL Since L 1 = {w w=a n, n N}, L 2 = {w w = b n, n N} are regular, therefore L 1 L 2 = {w w=a n b n, n N} is regular If L 1 is a regular language, then L 2 = {w R w L 1 } is regular,

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation 1/19/2016 LECTURE 3 Last time: DFAs and NFAs Operations on languages Today: Nondeterminism Equivalence of NFAs and DFAs Closure properties of regular languages Sofya Raskhodnikova

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

DFA to Regular Expressions

DFA to Regular Expressions DFA to Regular Expressions Proposition: If L is regular then there is a regular expression r such that L = L(r). Proof Idea: Let M = (Q,Σ, δ, q 1, F) be a DFA recognizing L, with Q = {q 1,q 2,...q n },

More information

Homomorphisms and Efficient State Minimization

Homomorphisms and Efficient State Minimization Homomorphisms and Efficient State Minimization Mridul Aanjaneya Stanford University July 10, 2012 Mridul Aanjaneya Automata Theory 1/ 23 Homomorphisms A homomorphism on an alphabet is a function that gives

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

CS 208: Automata Theory and Logic

CS 208: Automata Theory and Logic CS 28: Automata Theory and Logic b a a start A x(la(x) y(x < y) L b (y)) B b Department of Computer Science and Engineering, Indian Institute of Technology Bombay of 32 Nondeterminism Alternation 2 of

More information

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS Automata Theory Lecture on Discussion Course of CS2 This Lecture is about Mathematical Models of Computation. Why Should I Care? - Ways of thinking. - Theory can drive practice. - Don t be an Instrumentalist.

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

Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties

Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties Harvard CS 121 and CSCI E-207 Lecture 4: NFAs vs. DFAs, Closure Properties Salil Vadhan September 13, 2012 Reading: Sipser, 1.2. How to simulate NFAs? NFA accepts w if there is at least one accepting computational

More information

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2

Great Theoretical Ideas in Computer Science. Lecture 4: Deterministic Finite Automaton (DFA), Part 2 5-25 Great Theoretical Ideas in Computer Science Lecture 4: Deterministic Finite Automaton (DFA), Part 2 January 26th, 27 Formal definition: DFA A deterministic finite automaton (DFA) M =(Q,,,q,F) M is

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Organization of Programming Languages Theory of Regular Expressions DFAs and NFAs Reminders Project 1 due Sep. 24 Homework 1 posted Exam 1 on Sep. 25 Exam topics list posted Practice homework

More information

Page 1. Compiler Lecture Note, (Regular Language) 컴파일러입문 제 3 장 정규언어. Database Lab. KHU

Page 1. Compiler Lecture Note, (Regular Language) 컴파일러입문 제 3 장 정규언어. Database Lab. KHU Page 1 컴파일러입문 제 3 장 정규언어 Page 2 목차 I. 정규문법과정규언어 II. 정규표현 III. 유한오토마타 VI. 정규언어의속성 Page 3 정규문법과정규언어 A study of the theory of regular languages is often justified by the fact that they model the lexical analysis

More information

Chapter 2. Finite Automata. (part A) (2015/10/20) Hokkaido, Japan

Chapter 2. Finite Automata. (part A) (2015/10/20) Hokkaido, Japan Chapter 2 Finite utomata (part ) (25//2) Hokkaido, Japan Outline 2 Introduction 2 n Informal Picture of Finite utomata 22 Deterministic Finite automata 23 Nondeterministic Finite utomata 24 n pplication:

More information

Inf2A: Converting from NFAs to DFAs and Closure Properties

Inf2A: Converting from NFAs to DFAs and Closure Properties 1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AN COMPUTABILITY FA NFA EFINITION Regular Language Regular Expression How can we prove that two regular expressions are equivalent? How can we prove that two FAs (or two

More information

Equivalence of NFAs and DFAs

Equivalence of NFAs and DFAs Equivalence of NFAs and DFAs Mark Greenstreet, CpSc 421, Term 1, 2008/09 15 September 2008 p.1/15 Lecture Outline Equivalence of NFAs and DFAs Implementing NFAs in software using exhaustive enumeration

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

What we have done so far

What we have done so far What we have done so far DFAs and regular languages NFAs and their equivalence to DFAs Regular expressions. Regular expressions capture exactly regular languages: Construct a NFA from a regular expression.

More information

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs

CSE 311: Foundations of Computing. Lecture 23: Finite State Machine Minimization & NFAs CSE : Foundations of Computing Lecture : Finite State Machine Minimization & NFAs State Minimization Many different FSMs (DFAs) for the same problem Take a given FSM and try to reduce its state set by

More information

Regular Expressions. Definitions Equivalence to Finite Automata

Regular Expressions. Definitions Equivalence to Finite Automata Regular Expressions Definitions Equivalence to Finite Automata 1 RE s: Introduction Regular expressions are an algebraic way to describe languages. They describe exactly the regular languages. If E is

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with

More information

Constructions on Finite Automata

Constructions on Finite Automata Constructions on Finite Automata Informatics 2A: Lecture 4 Mary Cryan School of Informatics University of Edinburgh mcryan@inf.ed.ac.uk 24 September 2018 1 / 33 Determinization The subset construction

More information

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable? } We ll now take a look at Turing Machines at a high level and consider what types of problems can be solved algorithmically and what types can t: What languages are Turing-decidable? What languages are

More information

ACS2: Decidability Decidability

ACS2: Decidability Decidability Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem

More information

Regular Languages. Kleene Theorem I. Proving Kleene Theorem. Kleene Theorem. Proving Kleene Theorem. Proving Kleene Theorem

Regular Languages. Kleene Theorem I. Proving Kleene Theorem. Kleene Theorem. Proving Kleene Theorem. Proving Kleene Theorem Regular Languages Kleene Theorem I Today we continue looking at our first class of languages: Regular languages Means of defining: Regular Expressions Machine for accepting: Finite Automata Kleene Theorem

More information