Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)

Size: px
Start display at page:

Download "Finite Automata - Deterministic Finite Automata. Deterministic Finite Automaton (DFA) (or Finite State Machine)"

Transcription

1 Finite Automata - Deterministic Finite Automata Deterministic Finite Automaton (DFA) (or Finite State Machine) M = (K, Σ, δ, s, A), where K is a finite set of states Σ is an input alphabet s K is a distinguished state called the start state A K is a set of accepting states δ is a transition function, mapping K Σ K State Diagram: Graphical representation of a DFA Transition table can be used to represent transitions Rows indexed by states Columns indexed by alphabet Contents are state transitioned to Example: Configuration of DFA M is element of K Σ Represents current state and remaining input Initial configuration of M on input w denoted (s M, w) 1

2 Finite Automata - Deterministic Finite Automata (2) Yields-in-one-step relation relates configurations to their immediate successors Denoted M (for DFA M) Let c Σ, w Σ, q i, q j K. Then (q i, cw) M (q j, w) iff ((q i, c), q 2 ) δ I.e., c is legal transition symbol from q i to q j Yields is reflexive, transitive closure of M Denoted M Given configurations C i, C j C i M C j indicates that M can transition between C i and C j in 0 or more steps Computation by M is finite sequence of configurations C 0, C 1,..., C n, n 0, where C 0 is initial configuration C n is of the form (q, ɛ), q K M C 0 M C 1 M... M C n Given string w Σ M accepts w iff (s, w) M (q, ɛ), q A M (q, ɛ) called accepting configuration Given string w Σ M rejects w iff (s, w) M (q, ɛ), q / A M (q, ɛ) called rejecting configuration Language accepted by M denoted L(M) Operation (summary) 1. DFA M begins operation in start state 2. Symbols of input string w read one-at-a-time Each causes a transition to some state in M 3. After all symbols have been consumed, w is accepted if M is in an accepting state; otherwise, w is rejected 2

3 Theorem 5.1 Finite Automata - Deterministic Finite Automata (3) Statement: Every DFA M halts after w steps given input w Proof: (See p 60) State diagram variations 1. If several symbols transition between the same pair of states, represent as a single arc labeled with a comma-separated list of the symbols 2. If the majority of alphabet symbols cause a transition, represent those that do using set difference E.g., Σ {c 1, c 2,..., c n 3. Dead state Dead state is rejecting state with no transitions to other states Usually denoted d Can be eliminated from state diagrams If no labeled transition from a state for a given symbol, assume transition is to dead state 3

4 Finite Automata - Designing DFAs Need to id 2 things about strings w to be input to a DFA: 1. Id properties of prefixes of w that affect the result These properties translate into states 2. Id categories of strings Many strings will drive DFA to a particular state, which then leads to a fixed result Goal is to id these categories of strings They will generate a state, which can be named for the cluster for readability 4

5 Finite Automata - Nondeterminism Given an algorithm A and a set of inputs A is deterministic if it always performs the same computation on these inputs Otherwise, A is nondeterministic A nondeterministic algorithm is one that can guess what to do next For a given problem, a nondeterministic algorithm may produce different solutions at different times Nondeterministic algorithms are sometimes easier to design than deterministic ones 5

6 Finite Automata - Nondeterministic FAs Nondeterministic Finite Automata (NFAs) are FAs in which transitions are relaxed (See below) NFA M = (K, Σ,, s, A) where K is a finite set of states Σ is an input alphabet s K is a distinguished state called the start state A K is a set of accepting states is a transition relation, a finite subset of (K (Σ {ɛ)) K M accepts w iff one of its computations accepts w M rejects w iff none of its computations accepts w Language accepted by M denoted L(M) NFAs differ from DFAs as follows: DFAs are so-called because each symbol results in exactly one transition from a given state In NFAs 1. Multiple transitions may occur from a given state for a single symbol 2. Transitions may consume no input symbol These called ɛ-transitions 3. They correspond to guesses by M 4. There may be no transition from a given state for a symbol If input still remains, this results in rejection 6

7 Finite Automata - Nondeterministic FAs (2) Computation of an NFA can be considered from 2 perspectives: 1. As tree search Each node of tree represents a legal configuration Children represent configurations reachable in one step from the parent configuration Leaves represent configurations in which the input string has been consumed If any leaf represents an accepting state, the string is accepted 2. As parallel processing From a state, all transitions executed in parallel NFA moves between sets of states Given a set of states, the next set consists of all those states reachable from those in the initial set, based on the current input symbol If the final set contains an accepting state, the input string is accepted NFAs useful in following situations: 1. Languages that require complex DFAs ɛ-transitions often enable a much simpler NFA 2. Unions of languages Build a DFA for each language NFA constructed from a start state with ɛ-transitions to the start states of each participating DFA 3. Pattern/substring matching Have a set of states that read the prefix Have an ɛ-transition to the pattern Have a set of states that read the remainder 4. Creating complex DFAs NFAS usually easier to create Then, convert to DFA (see later notes) 7

8 Finite Automata - Analyzing NFAs Given an NFA M, want to identify L(M) Can do so using 2 approaches discussed previously: 1. Perform depth-first search of all paths through search tree 2. Trace all paths in parallel Following discussion deals with parallel trace Define function eps as mapping from K m P(K m ) I.e., eps(q) maps from state q to all states reachable from q via ɛ-transitions: eps(q) = {p K : (q, w) M (p, w) To compute eps(q): stateset eps (state q, delta) { stateset result = {q; push(q, stack); while (!empty(stack)) { p = pop(stack); for (each ((p, EPSILON), r) in delta) if (r!in result) { result = result + {r; // + is union operator push(r, stack); return result; 8

9 Finite Automata - Analyzing NFAs (2) To simulate parallel computation of an NFA: boolean nfasimulate (MFA M, string w) { stateset currentstate = eps(s); while (length(w) > 0) { stateset nextstate = NULL; char c = getnextsymbol(w); for (each state q in currentstate) for (each ((q, c), p) in M.delta) nextstate = nextstate + eps(p); for (each state q in currentstate) if (q in M.A) return TRUE; return FALSE; 9

10 Finite Automata - Nondeterminism and Implementation 2 possible approaches to implementing nondeterminism: 1. choose (action1;; action2;;... actionn;;) Each action produces a solution or FALSE Semantics: If any action produces a solution, choose will halt and return a solution Otherwise, If all actions halt, choose halts (returning FALSE) If any action fails to halt, choose will fail to halt Need a methodical way of selecting actions 2. choose (x from S: P(x)) S is a set of values (finite or infinite) Semantics: If P (x) produces a solution for any x, choose will halt and return a solution Otherwise, If P (x) halts for all x, choose halts (returning FALSE) If any computation of P (x) fails to halt, choose will fail to halt Need a methodical way of selecting x S Can associate probabilities with choices Options with higher probabilities are more likely to be chosen than those with lower probabilities Useful when have a priori knowledge of problem domain 10

11 Theorem 5.2 Finite Automata - Equivalence of DFAS and NFAs Statement: For every DFA that accepts L, there is an equivalent NFA that accepts L Proof: (See p74) Theorem 5.3 Statement: For every NFA that accepts L, there is an equivalent DFA that accepts L Proof: (By construction) Given: NFA M = (K, Σ,, s, A) Create M = (K, Σ, δ, s, A ), where K contains 1 state for each element of P s = eps(s) A = {Q K : Q A δ (Q, c) = {eps(p) : q Q((q, c, p) ) Note: 1. In most cases, only a small subset of K are actually needed 2. Accepting states of A are those that contain states from A 11

12 Finite Automata - Equivalence of DFAS and NFAs (2) Construction algorithm: DFA nfatodfa (NFA M) { for (each state q in M.K) compute eps(q, M.delta); stateset s = eps(s, delta) //Compute delta setofstatesets activestates = {s ; delta = NULL; while (there is a Q in activestates that has not been processed) for (each symbol c in M.sigma) { stateset newstate = NULL; for (each state q in Q) { for (each state p where ((q, c), p) is in Delta) newstate = newstate + eps(p, delta); delta = delta + {((Q, c), newstate); if (newstate!in activestates) activestates = activestates + {newstate; K = activestates; A = {Q in K : Q % M.A <> NULL; // % is intersection operator return M = (K, sigma, delta, s, A ); 12

13 Can implement FAs in several ways 1. In hardware 2. Hardcoded 3. Simulation via an interpreter Finite Automata - Implementation Most general approach, discussed below DFAs and NFAs treated separately Implementing DFAs Algorithm: boolean dfasim (DFA M, string w) { symbol c; state st = M.s; while (length(w) > 0) { c = getnextsymbol(w); st = M.delta(st, c); if (st in M.A) return TRUE; else return FALSE; Run time O( w ), assuming transition lookup O(1) Implementing NFAs 1. Convert NFA to DFA Then run above simulator on resulting DFA Conversion is most expensive operation: O(2 k ), where k is number of states 2. Simulate parallel execution of NFA See earlier algorithm Only generate states as they are needed, rather than generating entire DFA 13

14 Finite Automata - Generating a Minimal DFA for a Regular Language From an implementational point of view, want the smallest DFA that can accept a given language Minimal DFA M is one such that no other DFA M, where L(m) = L(M ) has fewer states than M Questions with important ramifications: 1. For a given language, can a minimal DFA be found? 2. Is a minimal DFA unique? 3. How can it be determined whether a given DFA is minimal? 4. Given a DFA, how is a minimal equivalent constructed? Construction based on concept of state clusters Indistinguishable strings: Given strings x, y x, y are indistinguishable wrt language L iff z Σ (either both xz and yz L, or neither xz and yz L) Denote indistinguishability as x L y Strings that are not indistinguishable are distinguishable L is an equivalence relation: 1. Reflexive: x L x 2. Symmetric: x L y y L x 3. Transitive: x L y, y L z x L z Equivalence classes Equivalence classes denoted using square brackets: [n], where n represents a numbered class [s], where s represents a string in the class [logical expression], which describes the class Every string in L belongs to exactly one equivalence class To id equivalence classes 1. Generate strings from shortest to longest, starting with ɛ 2. For each newly generated string, ask whether it belongs to an existing EC, or whether a new EC must be created for it 3. Continue until a pattern emerges 14

15 Finite Automata - Generating a Minimal DFA for a Regular Language (2) Note that 1. ɛ belongs to some EC, which corresponds to the start state of the minimal DFA 2. No EC can contain both strings L and strings L 3. More than 1 EC may contain strings that are in L 4. Exactly 1 EC corresponds to the dead state Containment: State q of DFA M contains string w if M is in state q after reading w 15

16 Finite Automata - Generating a Minimal DFA for a Regular Language (3) Theorem 5.4 Statement: L imposes a lower bound on the minimal number of states of a DFA for L. Let L be a regular language and M be a DFA that accepts L. The number of states in M the number of ECs of L. Proof: See p 86. Theorem 5.5 Statement: There exists a unique minimal DFA for every regular language. Let L be a regular language over alphabet Σ. There is a DFA M that accepts L and has exactly n states, where n = the ECs of L. Any other DFA that accepts L must either have more states than M, or n states that are equivalent to those of M. The number of states in M the number of ECs of L. Proof: By construction. Create M = (K, Σ, A, δ) as follows. 1. Generate n ECs of M 2. Create one state for each EC 3. Set K to this set of states 4. S = [ɛ] 5. A = {[x] : x L 6. δ([x], a) = [xa] Must prove the following: 1. K is finite 2. δ is a function 3. L = L(M) 4. M is minimal 5. No other DFA with n states accepts L Proof of above: See pp Theorem 5.6: Myhill-Nerode Theorem Statement: A language is regular iff the number of ECs of L is finite Proof: See p 90 16

17 Finite Automata - Minimizing an Existing DFA Previous discussion was concerned with creating a minimal DFA from scratch Here the concern is finding a minimal DFA equivalent to an existing DFA Two approaches: 1. Iteratively collapse redundant states until cannot collapse any further 2. Partition states into accepting and rejecting Iteratively subdivide states based on input characters until no more distinctions can be made This is approach described below Algorithm based on state equivalence States p and q are equivalent iff, for all strings w Σ, either w drives M to accepting states from both p and q, or it drives M to rejecting states from both p and q Denoted p q Series of equivalence relations denoted n, where n 0 p n q iff p and q produce the same outcome for all strings of length n Formally, p 0 q iff p and q are both accepting or rejecting For n 1, p n q iff p n 1 q and a Σ(δ(p, a) n 1 δ(q, a)) Algorithm overview 1. Algorithm starts by constructing 0 This partitions K into 2 sets 2. Then create 1, 2,... For each case, examine pairs of states in each class wrt every element in Σ For any symbol that drives states to 2 different results, partition states into 2 sets 3. Halt when no differences id d 17

18 Finite Automata - Minimizing an Existing DFA (2) Algorithm DFA mindfa (DFA M) { classes = {M.A, M.K - M.A; do { newclasses = NULL; for (each EC e in classes) if (e contains > 1 state) { for (each state q in e) for (each c in sigma) determine which set of classes q transitions to on c; for (each state p in e - q) for (each c in M.sigma) if (p transitions to a different class than q on c) if (new state already created for this transition on this pass) add p to new class; else { create new class for p; insert new class into newclasses; classes = newclasses; while (newclasses <> NULL); for (each q in M.K) //construct deltamprime for (each c in M.sigma) if (M.delta(q, c) = p) deltamprime(\q], c) = [p]; return (classes, sigma, deltamprime[m.s], {[q: elements of q in M.A]); 18

19 Alternative Algorithm Finite Automata - Minimizing an Existing DFA (3) Every pair of states has 2 associated structures: 1. D[i, j]: Indicates whether q i distinguishable (1) from q 2 or not (0) 2. S[i, j]: Holds a set of indices whose distinguishability depends on that of q i and q j Consider If q i and q j are known to be distinguishable when q m and q n are examined, then q m and q n are distinguishable If q i and q j are not distinguishable when q m and q n are examined, then q m and q n are added to S[i, j] because if later q i and q j are found to be distinguishable, then so should q m and q n 19

20 Finite Automata - Minimizing an Existing DFA (4) DFA mindfa2 (DFA M) { for (every state pair qi, qj, i < j) { D[i, j] = 0; S[i, j] = NULL; for (every i, j where i < j) if (((qi in M.A) and (qj in M.K - M.A)) OR ((qj in M.A) and (qi in M.K - M.A))) D[i, j] = 1; for (every i, j where i < j) if (D[i, j] == 0) { for (each c in M.sigma) if ((((qi, c) qm) AND ((qj, c) qn) in M.delta) AND ((D[m, n] = 1) OR (D[n, m] = 1)) dist(i, j); else for (each c in M.sigma) { qm = M.delta(qi, c); qn = M.delta(qj, c); if ((m < n) AND [i, j]!= [m, n] S[m, n] = S[m, n] + [i, j]; else if ((m > n) AND [i, j]!= [m, n] S[m, n] = S[n, m] + [i, j]; void dist(i, j) { D[i, j] = 1; for (each [m, n] in S[i, j]) dist(m, n); 20

21 Finite Automata - Canonical Form Canonical form is a standard representation If 2 objects are equivalent, they will have the same canonical form Advantage of canonical forms is that they can be used to test 2 objects for equivalence Minimization algorithm can be used to create a canonical form for a DFA A minimal DFA for language L(M) is unique, except possibly for state names If normalize state names, have a canonical form Algorithm DFA createcf (FA M) { M = nfatodfa (M); //convert NFA to equivalent DFA M = mindfa(m ); //convert to equivalent minimal DFA q0 = M.s; named = {s; push(s, statestack); k = 1; while(notempty(statestack)) { q = pop(statestack); for (each c in M.sigma) { p = M.delta(q, c); if ((p not NULL) AND (p not named)) { rename p as qk; named = named + p; push(p); k++; return M ; 21

Pushdown Automata: Introduction (2)

Pushdown Automata: Introduction (2) Pushdown Automata: Introduction Pushdown automaton (PDA) M = (K, Σ, Γ,, s, A) where K is a set of states Σ is an input alphabet Γ is a set of stack symbols s K is the start state A K is a set of 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

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

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

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

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

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

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

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

Finite State Machines. Languages g and Machines

Finite State Machines. Languages g and Machines Finite State Machines Chapter 5 Languages g and Machines Regular Languages g L Regular Language Regular Expression Accepts Finite State Machine Finite State Machines An FSM to accept $.50 in change: Definition

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

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

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

Optimizing Finite Automata

Optimizing Finite Automata Optimizing Finite Automata We can improve the DFA created by MakeDeterministic. Sometimes a DFA will have more states than necessary. For every DFA there is a unique smallest equivalent DFA (fewest states

More information

Computational Models - Lecture 4

Computational Models - Lecture 4 Computational Models - Lecture 4 Regular languages: The Myhill-Nerode Theorem Context-free Grammars Chomsky Normal Form Pumping Lemma for context free languages Non context-free languages: Examples Push

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

Notes on State Minimization

Notes on State Minimization U.C. Berkeley CS172: Automata, Computability and Complexity Handout 1 Professor Luca Trevisan 2/3/2015 Notes on State Minimization These notes present a technique to prove a lower bound on the number of

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

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

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

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

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

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2 Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. UNIT 2 Structure NON-DETERMINISTIC FINITE AUTOMATA

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

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

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

Nondeterminism. September 7, Nondeterminism

Nondeterminism. September 7, Nondeterminism September 7, 204 Introduction is a useful concept that has a great impact on the theory of computation Introduction is a useful concept that has a great impact on the theory of computation So far in our

More information

Finite Automata Part Two

Finite Automata Part Two Finite Automata Part Two DFAs A DFA is a Deterministic Finite Automaton A DFA is defined relative to some alphabet Σ. For each state in the DFA, there must be exactly one transition defined for each symbol

More information

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed

HKN CS/ECE 374 Midterm 1 Review. Nathan Bleier and Mahir Morshed HKN CS/ECE 374 Midterm 1 Review Nathan Bleier and Mahir Morshed For the most part, all about strings! String induction (to some extent) Regular languages Regular expressions (regexps) Deterministic finite

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

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ,

We define the multi-step transition function T : S Σ S as follows. 1. For any s S, T (s,λ) = s. 2. For any s S, x Σ and a Σ, Distinguishability Recall A deterministic finite automaton is a five-tuple M = (S,Σ,T,s 0,F) where S is a finite set of states, Σ is an alphabet the input alphabet, T : S Σ S is the transition function,

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

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

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

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS 154, Lecture 3: DFA NFA, Regular Expressions CS 154, Lecture 3: DFA NFA, Regular Expressions Homework 1 is coming out Deterministic Finite Automata Computation with finite memory Non-Deterministic Finite Automata Computation with finite memory and

More information

Finite Automata. Finite Automata

Finite Automata. Finite Automata Finite Automata Finite Automata Formal Specification of Languages Generators Grammars Context-free Regular Regular Expressions Recognizers Parsers, Push-down Automata Context Free Grammar Finite State

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

Fooling Sets and. Lecture 5

Fooling Sets and. Lecture 5 Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

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

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

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

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata

CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata CSE 135: Introduction to Theory of Computation Nondeterministic Finite Automata Sungjin Im University of California, Merced 1-27-215 Nondeterminism Michael Rabin and Dana Scott (1959) Michael Rabin Dana

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

Outline. Summary. DFA -> Regex. Finish off Regex -> e-nfa -> NFA -> DFA -> Regex Minimization/equivalence (Myhill-Nerode theorem)

Outline. Summary. DFA -> Regex. Finish off Regex -> e-nfa -> NFA -> DFA -> Regex Minimization/equivalence (Myhill-Nerode theorem) Outline Finish off Regex -> e-nfa -> NFA -> DFA -> Regex Minimization/equivalence (Myhill-Nerode theorem) http://www.cs.caltech.edu/~cs20/a October 9, 2002 1 Summary NFA -> DFA If NFA has states Q, construct

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

Nondeterminism and Epsilon Transitions

Nondeterminism and Epsilon Transitions Nondeterminism and Epsilon Transitions Mridul Aanjaneya Stanford University June 28, 22 Mridul Aanjaneya Automata Theory / 3 Challenge Problem Question Prove that any square with side length a power of

More information

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41

More on Finite Automata and Regular Languages. (NTU EE) Regular Languages Fall / 41 More on Finite Automata and Regular Languages (NTU EE) Regular Languages Fall 2016 1 / 41 Pumping Lemma is not a Sufficient Condition Example 1 We know L = {b m c m m > 0} is not regular. Let us consider

More information

2. Elements of the Theory of Computation, Lewis and Papadimitrou,

2. Elements of the Theory of Computation, Lewis and Papadimitrou, Introduction Finite Automata DFA, regular languages Nondeterminism, NFA, subset construction Regular Epressions Synta, Semantics Relationship to regular languages Properties of regular languages Pumping

More information

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization

COMP-330 Theory of Computation. Fall Prof. Claude Crépeau. Lec. 5 : DFA minimization COMP-33 Theory of Computation Fall 27 -- Prof. Claude Crépeau Lec. 5 : DFA minimization COMP 33 Fall 27: Lectures Schedule 4. Context-free languages 5. Pushdown automata 6. Parsing 7. The pumping lemma

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

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam

Compilers. Lexical analysis. Yannis Smaragdakis, U. Athens (original slides by Sam Compilers Lecture 3 Lexical analysis Yannis Smaragdakis, U. Athens (original slides by Sam Guyer@Tufts) Big picture Source code Front End IR Back End Machine code Errors Front end responsibilities Check

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

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

TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund

TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA. Written by Liat Peterfreund TWO-WAY FINITE AUTOMATA & PEBBLE AUTOMATA Written by Liat Peterfreund 1 TWO-WAY FINITE AUTOMATA A two way deterministic finite automata (2DFA) is a quintuple M Q,,, q0, F where: Q,, q, F are as before

More information

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 35 Finite Automata Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2017 Dantam (Mines CSCI-561) Finite Automata Fall 2017 1 / 35 Outline Dantam (Mines CSCI-561) Finite Automata Fall 2017 2 / 35

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

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

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

CPS 220 Theory of Computation REGULAR LANGUAGES

CPS 220 Theory of Computation REGULAR LANGUAGES CPS 22 Theory of Computation REGULAR LANGUAGES Introduction Model (def) a miniature representation of a thing; sometimes a facsimile Iraq village mockup for the Marines Scientific modelling - the process

More information

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 43

Finite Automata. Dr. Neil T. Dantam. Fall CSCI-561, Colorado School of Mines. Dantam (Mines CSCI-561) Finite Automata Fall / 43 Finite Automata Dr. Neil T. Dantam CSCI-561, Colorado School of Mines Fall 2018 Dantam (Mines CSCI-561) Finite Automata Fall 2018 1 / 43 Outline Languages Review Traffic Light Example Deterministic Finite

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

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010 University of Virginia - cs3102: Theory of Computation Spring 2010 PS2 - Comments Average: 77.4 (full credit for each question is 100 points) Distribution (of 54 submissions): 90, 12; 80 89, 11; 70-79,

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

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

Chapter 2: Finite Automata

Chapter 2: Finite Automata Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A

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

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

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

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is

Theory of Computation p.1/?? Theory of Computation p.2/?? Unknown: Implicitly a Boolean variable: true if a word is Abstraction of Problems Data: abstracted as a word in a given alphabet. Σ: alphabet, a finite, non-empty set of symbols. Σ : all the words of finite length built up using Σ: Conditions: abstracted as a

More information

Takeaway Notes: Finite State Automata

Takeaway Notes: Finite State Automata Takeaway Notes: Finite State Automata Contents 1 Introduction 1 2 Basics and Ground Rules 2 2.1 Building Blocks.............................. 2 2.2 The Name of the Game.......................... 2 3 Deterministic

More information

Finite-state Machines: Theory and Applications

Finite-state Machines: Theory and Applications Finite-state Machines: Theory and Applications Unweighted Finite-state Automata Thomas Hanneforth Institut für Linguistik Universität Potsdam December 10, 2008 Thomas Hanneforth (Universität Potsdam) Finite-state

More information

Deterministic finite Automata

Deterministic finite Automata Deterministic finite Automata Informatics 2A: Lecture 3 Alex Simpson School of Informatics University of Edinburgh als@inf.ed.ac.uk 21 September, 212 1 / 29 1 Languages and Finite State Machines What is

More information

Finite Automata. Mahesh Viswanathan

Finite Automata. Mahesh Viswanathan Finite Automata Mahesh Viswanathan In this lecture, we will consider different models of finite state machines and study their relative power. These notes assume that the reader is familiar with DFAs,

More information

Lecture 4. Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012

Lecture 4. Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012 Lecture 4 Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012 Initialization Analysis 2 Is this node well initialized? node init1() returns (out: int) let out = 1 + pre( 1 ->

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

September 7, Formal Definition of a Nondeterministic Finite Automaton

September 7, Formal Definition of a Nondeterministic Finite Automaton Formal Definition of a Nondeterministic Finite Automaton September 7, 2014 A comment first The formal definition of an NFA is similar to that of a DFA. Both have states, an alphabet, transition function,

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

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

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

CSC236 Week 11. Larry Zhang

CSC236 Week 11. Larry Zhang CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic

More information

Computational Models - Lecture 3 1

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

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

Pushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata.

Pushdown Automata. We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Pushdown Automata We have seen examples of context-free languages that are not regular, and hence can not be recognized by finite automata. Next we consider a more powerful computation model, called a

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

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

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

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata

CISC 4090: Theory of Computation Chapter 1 Regular Languages. Section 1.1: Finite Automata. What is a computer? Finite automata CISC 4090: Theory of Computation Chapter Regular Languages Xiaolan Zhang, adapted from slides by Prof. Werschulz Section.: Finite Automata Fordham University Department of Computer and Information Sciences

More information

Java II Finite Automata I

Java II Finite Automata I Java II Finite Automata I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz November, 23 Processing Regular Expressions We already learned about Java s regular expression

More information

Lecture 17: Language Recognition

Lecture 17: Language Recognition Lecture 17: Language Recognition Finite State Automata Deterministic and Non-Deterministic Finite Automata Regular Expressions Push-Down Automata Turing Machines Modeling Computation When attempting to

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

Lecture 4: Nondeterministic Finite Automata

Lecture 4: Nondeterministic Finite Automata Lecture 4: Nondeterministic Finite Automata Dr Kieran T. Herley Department of Computer Science University College Cork 2017-2018 KH (26/09/17) Lecture 4: Nondeterministic Finite Automata 2017-2018 1 /

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

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Before we show how languages can be proven not regular, first, how would we show a language is regular? CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

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

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

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

Computational Models: Class 3

Computational Models: Class 3 Computational Models: Class 3 Benny Chor School of Computer Science Tel Aviv University November 2, 2015 Based on slides by Maurice Herlihy, Brown University, and modifications by Iftach Haitner and Yishay

More information

CSE 135: Introduction to Theory of Computation Optimal DFA

CSE 135: Introduction to Theory of Computation Optimal DFA CSE 35: Introduction to Theory of Computation Optimal DFA Sungjin Im University of California, Merced 2-9-25 Optimal Algorithms for Regular Languages Myhill-Nerode Theorem There is a unique optimal algorithm

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